mseaberg / Commissioning_Tools

0 stars 0 forks source link

Golden trajectory support #72

Open mseaberg opened 3 years ago

mseaberg commented 3 years ago
mseaberg commented 3 years ago

Can borrow Silke's Imager_h5 class from startup/commissioning

mseaberg commented 3 years ago

Implemented hdf5 plugin. This doesn't discriminate between whether the yag screen is in or the reticule is in. Do we want separate buttons or should we try to check the imager state?

mseaberg commented 3 years ago

Link to notes on this: SXR Golden Trajectory

mseaberg commented 3 years ago

Added in check for state, this is put in the filename.

mseaberg commented 3 years ago

For automatic elog post and screen grab, can use the following code. Use the subprocess check_output command, with option shell=True, to call bash commands and return the output. Here is the code snippet to get the window ID and save an image corresponding to a screen grab of the window using ImageMagick. window_id = check_output('xdotool getactivewindow',shell=True).decode('utf-8').replace('\n','') check_output('import -window %s test.jpg',shell=True)

This can then be posted to the elog as (once elog is working) elog.post(message, facility=True, attachments=['test.jpg'], tags=['GoldenTrajectory'])

mseaberg commented 3 years ago

Implemented automatic elog post, with screen grab as well as centroid/width information. This still needs to be generalized so that it does the right thing depending on the hutch, for now it is hard-coded to XCS.

mseaberg commented 3 years ago

One easy way to take care of this is to just make individualized bash scripts in the hutch bin directory, to source the correct thing depending on the hutch.

mseaberg commented 3 years ago

Somewhat related, I have made individual files for each hutch to control which pv's are monitored, in the pv_lists directory.

mseaberg commented 3 years ago

Once tmo and rix python interface to elog is functional, this should be pretty close to ready.

mseaberg commented 3 years ago

Successful test on tmo.

mseaberg commented 3 years ago

Now I have elog post, hdf5 plugin and calculated data save all working separately. I can easily combine this to make all 3 of these things happen at once. It is probably worthwhile to allow all of these actions independently, but have an additional button that does all of them at once.

mseaberg commented 3 years ago

Made the button and tested, seems to work well.

mseaberg commented 3 years ago

Radio buttons to decide whether trajectory is set or not.