Image and shot file association management

78 views
Skip to first unread message

Alessandro Muzi Falconi

unread,
Dec 14, 2023, 5:49:20 AM12/14/23
to the labscript suite
Hi all,
we are setting up our Kinetix22 Photometrics camera for our lab. 
We plan to control the camera with a different software (probably a running labrad server) and then send hardware triggers for acquiring images. 

However, we are debated on how to associate the correct shot file to each saved image. 

I read there is a possibility to save the acquired image in the hdf file as BLACS completes the shot execution.

Can someone explain to me how this is done or how can a device which is external from labscript know which shot file has just been executed? 

Otherwise, how do you manage your shot file - acquired image association? 

Thank you very much,
Cheers
Alessandro
  

Philip Starkey

unread,
Jan 13, 2024, 2:28:43 AMJan 13
to the labscript suite
Hi Alessandro,

Apologies for the delay in replying. A few of the recent mailing list posts, including yours, ended up in my spam folder.

When integrating with external camera acquisition software, people usually write a custom labscript/BLACS device that communicates with the 3rd party software over whatever mechanism is available (socket, file, etc.). This custom labscript/BLACS device will get the HDF5 file path when the transition_to_buffered worker method is called by the internal BLACS state machine. 

An example of this done over sockets is the "Camera" device that communicates with the now deprecated and unmaintained LabVIEW software BIAS over sockets. See here for code. I suspect you will be able to adapt that to work for you. Alternatively, there is general purpose documentation on creating a new labscript device in our docs and/or my thesis.

Cheers,
Phil

Alessandro Muzi Falconi

unread,
Jan 19, 2024, 12:26:10 PMJan 19
to the labscript suite
Hi Philip,

No problem on the delay and thank you for your reply.
At the end we managed to have our system working with this workaround: 
we use the function_runner device to, at the start of each sequence, write the name of the shot file that is preparing to be executed on a given text file (called something like "last_shot.txt"). When the camera gets a trigger, it reads the  "last_shot.txt" file and saves the image with the same name of the corresponding shot file. 

We found this to be working well for the moment and it has been very easy to implement, but maybe we will/should improve and put the camera as a labscript device starting from you suggestions.

Thank you for your help and for setting the whole labscript up, we just started taking measurements and we are really liking how it works compared to older control systems|

Best,
Alessandro
Reply all
Reply to author
Forward
0 new messages