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

implement standard AD PV in metadata?? What does DAMA recommend #31

Open
ambarb opened this issue Dec 18, 2019 · 5 comments
Open

implement standard AD PV in metadata?? What does DAMA recommend #31

ambarb opened this issue Dec 18, 2019 · 5 comments
Assignees

Comments

@ambarb
Copy link
Contributor

ambarb commented Dec 18, 2019

Frame type is not used. Instead we have, for the dark images, created custom md keys for the start document. Maybe this is not needed if we use FrameType and the existing md key 'fccd_cam_fcric_gain', which is in the descriptors document.

[xf23id1@xf23id-ws3 ~]$ caget -d24 XF:23ID1-ES{FCCD}cam1:FrameType
Options t,d,a are mutually exclusive. ('caget -h' for help.)
XF:23ID1-ES{FCCD}cam1:FrameType
    Native data type: DBF_ENUM
    Request type:     DBR_GR_ENUM
    Element count:    1
    Value:            Normal
    Status:           NO_ALARM
    Severity:         NO_ALARM
    Enums:            ( 4)
                      [ 0] Normal
                      [ 1] Background
                      [ 2] FlatField
                      [ 3] DblCorrelation

@johnsinsheimer do you have any idea what DblCorrelation is?

@ambarb
Copy link
Contributor Author

ambarb commented Oct 24, 2020

@stuwilkins do you know DblCorrelation should be of the top of your head?

@stuwilkins
Copy link
Member

stuwilkins commented Oct 24, 2020

@ambarb as far as I know, this whole PV is not used by this driver, so I have no idea what DblCorrelation is ... I would just ignore this.

@ambarb ambarb self-assigned this Jan 13, 2021
@ambarb
Copy link
Contributor Author

ambarb commented Jan 13, 2021

The reason why I am asking is we can use this to label "intent" from the IOC level by using Bluesky plans appropriately instead of randomly labeling the intent of the data in 5000 different ways with 5000 unique field or key names

@johnsinsheimer
Copy link
Contributor

johnsinsheimer commented Jan 13, 2021

I don't think this PV has any default behavior, and needs to given a function by the driver. For another detector, the MarCCD for example, this PV does have a use defined in the driver, but it does not for the ADFastCCD driver.

But the PV itself is part of ADCore or ADBase, and is of type mbbo. mbbo has fields with indexes, 0-15 and can have strings associated each index.

record(mbbo, "$(P)$(R)FrameType")
{
   field(PINI, "YES")
   field(DTYP, "asynInt32")
   field(OUT,  "@asyn($(PORT),$(ADDR=0),$(TIMEOUT=1))FRAME_TYPE")
   field(ZRST, "Normal")
   field(ZRVL, "0")
   field(ONST, "Background")
   field(ONVL, "1")
   field(TWST, "FlatField")
   field(TWVL, "2")
   field(THST, "DblCorrelation")
   field(THVL, "3")
   field(VAL,  "0")
   info(autosaveFields, "VAL")
}

Are you looking to define a PV to store additional meta data? the strings in mbbo might be limited to 16 characters. You could make a new PV stringout, but that is limited to 40 characters. Or an array could be used for longer strings.

@ambarb
Copy link
Contributor Author

ambarb commented Jan 14, 2021

possibly. we have plans for counting darks so it would be easy to either use the default settings found here or make customized strings as you indicate. we should also make a flatfield plan and can consider how to do this. the alternative is to fully commit to the bluesky dark frames model and also develop a similar model for flat field results that bluesky would "calculate" and then write as part of the data. If users want to customize later, they still can.

NSLS-II-CSX/csxtools#55 what we decide to do affects csxtools.

and also there is a better explanation of dark frames here
#32

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

No branches or pull requests

3 participants