ETA icon indicating copy to clipboard operation
ETA copied to clipboard

ROI cutting (Threshold)

Open linzuzeng opened this issue 6 years ago • 3 comments

~~We can maintain an old copy of the "result['h3']", and calculate the difference result_diff between current "result['h3']" and the old "result['h3']". We also need "result['countrate'][0]" which comes from the Virtual Instrument copied from the "countrate" recipe. In the meantime, we consider if "result['countrate'][0]>threslold", then we add that result_diff to the final histogram variable, for live display or file saving. Otherwise we discard result_diff of this section.~~ I don't understand what i said

linzuzeng avatar Dec 20 '19 07:12 linzuzeng

Samuel: https://docs.bokeh.org/en/dev/docs/gallery/range_tool.html https://github.com/bokeh/bokeh/issues/7795 I think we could use that for defining the regions.

linzuzeng avatar Mar 12 '20 07:03 linzuzeng

Lucas: fnAHgZrYVkoLdIzfxrofCgma

linzuzeng avatar Sep 27 '21 13:09 linzuzeng

you can simply write a FORMAT_QT_RAW to disk and use it with Lucas' solution as if shutter events are recorded physically

Maybe we can make a generic toolkit to add markers to a histogram and save the markers into memory with FORMAT_QT_RAW. I think the tricky part would be how to get the GUI work.

user_marker = Clip() 
user_marker.buffer=np.asbytes(....)
user_marker.RecordType=eta.FORMAT_QT_RAW
user_marker.BytesofRecords=10

linzuzeng avatar Sep 27 '21 13:09 linzuzeng