Open mseaberg opened 3 years ago
Can borrow Silke's Imager_h5 class from startup/commissioning
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?
Link to notes on this: SXR Golden Trajectory
Added in check for state, this is put in the filename.
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'])
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.
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.
Somewhat related, I have made individual files for each hutch to control which pv's are monitored, in the pv_lists directory.
Once tmo and rix python interface to elog is functional, this should be pretty close to ready.
Successful test on tmo.
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.
Made the button and tested, seems to work well.
Radio buttons to decide whether trajectory is set or not.