aps-8id-dys / bluesky

XPCS bluesky instrument configuration
Other
2 stars 0 forks source link

lambda.cam is missing energy threshold #5

Closed qzhang234 closed 1 year ago

qzhang234 commented 1 year ago

What is the generic solution for problems like these? Adding the attribute to the detector class or changing it in Bluesky plan using pyepics?

prjemian commented 1 year ago

The generic solution when adding EPICS configuration PVs to an ophyd device is to add them as a EpicsSignal or EpicsSignalWithRBV. Even though you only plan to set them once, you might want to record their current setting as part of data acquisition.

Example

An area detector CAM has ad:cam1:NewFeature and ad:cam1:NewFeature_RBV PVs which describe a new configuration feature.

Add this line to the ophyd class that provides the cam for this detector (it will connect with both PVs):

    new_feature = Component(EpicsSignalWithRBV, "NewFeature", kind="config")
prjemian commented 1 year ago

@qzhang234 How is the energy threshold set (without bluesky)?

sureshnaps commented 1 year ago

Pete, This is now set manually by the choice of the staff for each experiment. Suresh

From: Pete R Jemian @.> Date: Wednesday, December 21, 2022 at 8:49 AM To: aps-8id-dys/bluesky @.> Cc: Subscribed @.***> Subject: Re: [aps-8id-dys/bluesky] lambda.cam is missing energy threshold (Issue #5)

@qzhang234https://github.com/qzhang234 How is the energy threshold set (without bluesky)?

— Reply to this email directly, view it on GitHubhttps://github.com/aps-8id-dys/bluesky/issues/5#issuecomment-1361393515, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAYSAQZHQZQBSVK5N3LIPF3WOMIWHANCNFSM6AAAAAATFFSVFA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

prjemian commented 1 year ago

Not quite the kind of answer I was expecting but it is helpful to know that the configuration may be used by users occasionally, not just during initial setup.

By what means is the energy threshold changed?

In a presentation just now, I saw this is a PV in the EPICS IOC's cam module with label Energy Threshold. What is the PV?

Also, there is a Dual Threshold feature just below Energy Threshold. Will this also be used?

sureshnaps commented 1 year ago

Pete,

Typically: Threshold should be set to half of the x-ray energy being used, this is the reason that this should be decided by the staff manually. Sometimes, threshold is tweaked to a value different than ½ of x-rays. Dual threshold is an option that one could use, it runs at ½ the max frame rate. XPCS has not used it so far but might use it after apsu.

Energy Threshold PV: cam1:EnergyThreshold (always active) Dual threshold mode switch: cam1:DualMode (On/Off) Upper threshold PV: DualThreshold

Suresh

From: Pete R Jemian @.> Date: Wednesday, December 21, 2022 at 10:06 AM To: aps-8id-dys/bluesky @.> Cc: Narayanan, Suresh @.>, Comment @.> Subject: Re: [aps-8id-dys/bluesky] lambda.cam is missing energy threshold (Issue #5)

Not quite the kind of answer I was expecting. By what means is the energy threshold changed?

In a presentation just now, I saw this is a PV in the EPICS IOC's cam module with label Energy Threshold. What is the PV?

Also, there is a Dual Threshold feature just below Energy Threshold. Will this also be used?

— Reply to this email directly, view it on GitHubhttps://github.com/aps-8id-dys/bluesky/issues/5#issuecomment-1361578260, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAYSAQ7Q3SXR4T32REVGWR3WOMTCDANCNFSM6AAAAAATFFSVFA. You are receiving this because you commented.Message ID: @.***>

prjemian commented 1 year ago

Ophyd controls for these PVs can be created, through which you can adjust their settings in the IOC. Bluesky does not use these, but rather makes them available for you to control.

prjemian commented 1 year ago
63         lambda2M.cam.energy_threshold                                                1.0 2023-03-01 16:43:40.296113
64                lambda2M.cam.dual_mode                                             Single 2023-03-01 16:43:40.320103
65           lambda2M.cam.dual_threshold                                                1.5 2023-03-01 16:43:40.347675