aps-8id-dys / ipython-8idiuser

8-ID-I ipython configuration for bluesky (and other)
1 stars 1 forks source link

Refactor AD_Acquire for testing of its parts #278

Closed prjemian closed 2 years ago

prjemian commented 2 years ago

per the Teams chat yesterday

qzhang234 commented 2 years ago

I have started writing a very naïve script xpcs_acquire_2.py that aims to perform the detector acquisition in a modular manner. I have pushed the current version of the code onto QZ_Test.

@prjemian How do I modify the mode specification part so that it actually does the staging? In particular, I'm thinking about calling adrigaku and then modify its attributes, but I can't find where it is defined.

@sureshnaps At the end of the script, I will define something called Detector_Acq that does the acquisition by pushing the Acquire button on the EPICS IOC, which will be done via a bps.mv command. I will work on the acquisition with trigger signals later. Does this look like a reasonable approach so far?

Bluesky Behavior with New Implementation ``` In [1]: testuser = Info_User() In [2]: testuser.select_path('qzhang202111') In [3]: print(testuser.det_directory, testuser.scan_directory) /home/8idiuser/2021-3/qzhang202111 /home/beams10/8IDIUSER/bluesky_data/2021-3 In [4]: testdet = Info_Detector() In [5]: testdet.select_qmap('dummy_qmap.h5') In [6]: testdet.select_det_mode('rigaku500k', 0, 'fast') In [7]: print(testdet.stage_sigs) {'cam.acquire': 0, 'cam.acquire_time': 2e-05, 'cam.image_mode': '2 Bit, Zero-Deadtime', 'cam.trigger_mode': 'ZDT Fixed Time', 'cam.num_images': 100000, 'cam.corrections': 'Enabled', 'cam.data_type': 'UInt32'} In [8]: ```
qzhang234 commented 2 years ago

@prjemian Do you think this is an appropriate way to stage detectors (permalink attached)?

I also defined another Rigaku detector instance for this purpose so as not to affect the working version

qzhang234 commented 2 years ago

@prjemian Another question: should I use a nested class (see attached) or define an EpicsSignal like DM_Workflow for staging/scanning parameters?

image

qzhang234 commented 2 years ago

Closing this issue and continue working on it in #282