aps-8id-dys / bluesky

XPCS bluesky instrument configuration
Other
2 stars 0 forks source link

In each case, we will add a ROI and a Stats to plot the counter as well #33

Open prjemian opened 4 months ago

prjemian commented 4 months ago

? flag1ad.stats1.total

sureshnaps commented 4 months ago

Pete, I have been reviewing and the plans look very good. When ready, we can run a scan.

One good question/comment you had was: …Provided the areadet flag plugins are correctly set up.

This was in my mind as well. With such cameras, it might make sense to collect N (~10) images per data point in case one of them has any issues. We will have to software trigger the camera appropriately.

Suresh

From: Pete R Jemian @.> Date: Monday, June 10, 2024 at 5:30 PM To: aps-8id-dys/bluesky @.> Cc: Subscribed @.***> Subject: Re: [aps-8id-dys/bluesky] In each case, we will add a ROI and a Stats to plot the counter as well (Issue #33) ? flag1ad. stats1. total — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread. Message ID: aps-8id-dys/bluesky/issues/33/2159417097@ github. com ‍ ‍ ‍ ‍ ‍ ‍ ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization.

ZjQcmQRYFpfptBannerEnd

? flag1ad.stats1.total

— Reply to this email directly, view it on GitHubhttps://urldefense.us/v3/__https:/github.com/aps-8id-dys/bluesky/issues/33*issuecomment-2159417097__;Iw!!G_uCfscf7eWS!Z6_tqljzSvZy1jaivioDT9uCmK8xoVAMmujfLmtnYrEH0eeH9OXfs6coFAxlHu0nRvi3FyMkrwcbEtSBQy4OkL4cuA$, or unsubscribehttps://urldefense.us/v3/__https:/github.com/notifications/unsubscribe-auth/AAYSAQ62WGONQ7C5KLRWHVLZGYSHPAVCNFSM6AAAAABJCZVVDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJZGQYTOMBZG4__;!!G_uCfscf7eWS!Z6_tqljzSvZy1jaivioDT9uCmK8xoVAMmujfLmtnYrEH0eeH9OXfs6coFAxlHu0nRvi3FyMkrwcbEtSBQy5JXxXfUQ$. You are receiving this because you are subscribed to this thread.Message ID: @.***>

prjemian commented 4 months ago

Note: to record the flag1ad.stats1.total (or any other signal) as another detector, it needs to have its .kind = "hinted", as in:

flag1ad.stats1.total.kind = "hinted"

This is an internal (bluesky & ophyd) setting that is needed to report this signal when flag1ad is used as a detector. This setting means the signal's value and time stamp are included with flag1ad.read() which is the method called by the RE to record data.

prjemian commented 4 months ago

Another signal you might be interested in: flag1ad.stats1.max_value

prjemian commented 4 months ago

Now that the detector is connected:

In [4]: flag1ad.stats1.total
Out[4]: EpicsSignalWithRBV(read_pv='8idaSoft:flag1:Stats1:Total_RBV', name='flag1ad_stats1_total', parent='flag1ad_stats1', timestamp=1718126235.5730493, auto_monitor=True, string=False, write_pv='8idaSoft:flag1:Stats1:Total', limits=False, put_complete=False)

In [5]: flag1ad.stats1.total.get()
Out[5]: 0.0

In [6]: flag1ad.stats1.total.kind
Out[6]: <Kind.omitted: 0>

In [7]: flag1ad.stats1.total.kind = "hinted"

In [8]: flag1ad.stats1.total.kind
Out[8]: <Kind.hinted: 5>

In [9]: flag1ad.read()
Out[9]: OrderedDict()

In [10]: flag1ad.stats1.read()
Out[10]: 
OrderedDict([('flag1ad_stats1_total',
              {'value': 0.0, 'timestamp': 1718126235.5749059})])

In [11]: flag1ad.stats1.kind
Out[11]: <Kind.omitted: 0>

In [12]: flag1ad.stats1.kind = "hinted"

In [13]: 

In [13]: flag1ad.read()
Out[13]: 
OrderedDict([('flag1ad_stats1_total',
              {'value': 0.0, 'timestamp': 1718126235.5749059})])

Summary:

flag1ad.stats1.kind = "hinted"
flag1ad.stats1.max_value.kind = "hinted"
flag1ad.stats1.total.kind = "hinted"
prjemian commented 4 months ago

Here's an example notebook showing the stats info in a bluesky scan: roi1_detector.pdf