Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Tracked by #30
prjemian opened this issue Jun 10, 2024 · 6 comments
Open
Tracked by #30
Assignees

Comments

@prjemian
Copy link
Contributor

No description provided.

@prjemian
Copy link
Contributor Author

? flag1ad.stats1.total

@prjemian prjemian self-assigned this Jun 10, 2024
@sureshnaps
Copy link

sureshnaps commented Jun 11, 2024 via email

@prjemian
Copy link
Contributor Author

prjemian commented Jun 11, 2024

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
Copy link
Contributor Author

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

@prjemian
Copy link
Contributor Author

prjemian commented Jun 11, 2024

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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants