aps-8id-dys / ipython-8idiuser

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

qmap_file should be set in StrReg13 #218

Closed prjemian closed 3 years ago

prjemian commented 4 years ago

There is a string register for the QMAP file but it is blank. Each detector has an attribute for qmap_file. Seems this value would be related to StrReg13. Should we set EPICS from the detector value or the other way around?

prjemian commented 4 years ago

See #206, #217

qzhang234 commented 4 years ago

Bluesky should write the PV

prjemian commented 4 years ago

Is this issue resolved now? If so, add a brief comment to describe how it was resolved, then close the issue.

qzhang234 commented 4 years ago

@prjemian It depends. For example, if I do rigaku.qmap_file = 'qzhang_XSPA.h5' and run AD_Acquire, Will StrReg13 show qzhang_XSPA.h5?

Screen Shot 2020-10-03 at 12 47 12 PM
prjemian commented 3 years ago

We think the path for the .bin file is correct but the detector does not trigger. When we add the SingleTrigger mixin to the detector, the support raises a KeyError exception as it constructs the SingleTrigger support, failing when it references self.cam.acquire. The test for hasattr(self, "cam") just succeeded so it does not know the acquire component yet.

Leave out the SingleTrigger mixin but add its features to the detector constructor after initializing the components.

prjemian commented 3 years ago

Turns out that even when we replace the SingleTrigger mixin (by name) with its actual code, sometimes the adrigaku.cam.acquire signal raises the same KeyError attribute not found exception. Add additional handling to fail on startup if the acquire attribute is not found on device construction.

prjemian commented 3 years ago

BTW, none of this work appears to be remotely related to the issue title.

prjemian commented 3 years ago

But at least now, the detector leaves a .bin file in the correct location. File size is ~15MB.

talc% pwd
/home/8ididata/2021-1/rigaku202104
talc% ls -lah A015_Test/
total 15M
drwxrwxrwx  2 8idiuser  s8staff    72 Jun  1 20:27 .
drwxrwxr-x 17 8idiuser  s8staff   325 Jun  1 20:28 ..
-rw-rw-r--  1 8idiuser  s8staff   41K Jun  1 20:27 A015_Test_0001-100000.hdf
-rw-r--r--  1 nfsnobody nfsnobody 15M Jun  1 20:28 A015_Test.bin
prjemian commented 3 years ago

@qzhang234 : Feel free to close this issue if you believe it has been resolved.

qzhang234 commented 3 years ago

I can confirm that using dm_pars.qmap_file.set() changes the value of StrReg13. Closing the issue now.

image