Dear Devs,
My source is defined by a set of parameters x, but also contains an inner scalar q=f(x). I want to modify the x and dynamically get the q within python. The end goal is to have a python script that loops over multiple x values, makes pictures of a source, but also gets and writes the q value into a file as follows:
GetActiveSource().x = [1,2,3,4,5]
GetActiveSource().q # <--expecting new q value
Currently, if apply button is pressed, the correct q value is produced, but Render() + Update() in a python console do not have the same effect.
What is the correct python command for an apply button?
Iâm currently trying to understand how the python interface for a source works. Particularly, what functions are called and when? Are data transferred only upon apply? Is it possible to transfer the data before apply is pressed?
Could you give a general direction towards how the python interface in PV is implemented, what classes are used etc.
Thank you very much,
Art