Skip to content

Dt pv descriptions - #75

Open
bhardwaj-gopika wants to merge 4 commits into
slaclab:mainfrom
bhardwaj-gopika:DT_PV_Descriptions
Open

bhardwaj-gopika wants to merge 4 commits into
slaclab:mainfrom
bhardwaj-gopika:DT_PV_Descriptions

Conversation

@bhardwaj-gopika

Copy link
Copy Markdown
Collaborator

Sets a description class attribute on each Bmad action variable class in virtual_accelerator/bmad/actions.py. Variable.description (introduced upstream in lume-base) is already inherited by every action class; each concrete class now just declares one line stating what kind of PV it represents (e.g. "Quadrupole magnet field integral setpoint (BDES)").

`>>> val = ctxt.get('BPMS:IN20:631:X_LUME_SM1')

print(val.raw)
struct "epics:nt/NTScalar:1.0" {
double value = -2.11878e-05
struct "alarm_t" {
int32_t severity = 0
int32_t status = 0
string message = ""
} alarm
struct "time_t" {
int64_t secondsPastEpoch = 1790793004
int32_t nanoseconds = 413602590
int32_t userTag = 0
} timeStamp
struct {
double limitLow = 0
double limitHigh = 0
string description = "BPM horizontal orbit position [cu_hxr_staged @ OTR4]"
string format = ""
string units = "mm"
} display
struct {
double limitLow = 0
double limitHigh = 0
double minStep = 0
} control
}`

@bhardwaj-gopika

Copy link
Copy Markdown
Collaborator Author

@roussel-ryan @pluflou Are we okay with description for each element?

@pluflou

pluflou commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

@roussel-ryan @pluflou Are we okay with description for each element?

For context for Ryan, the idea is that generic element descriptions would be in the VA, and then at the DT layer we append a deployment description such as "BPM horizontal orbit position [cu_hxr_staged @ OTR4]".

I like this especially if it's helpful, but I don't think these machine PVs even have descriptions as it is. I would almost prefer a generic description for everything in the model that focuses on the model itself e.g. bmad vs impact, and at the DT later we can append specific deployment specs like model and end element.

@roussel-ryan

Copy link
Copy Markdown
Collaborator

This all looks fine to me, I would add similar descriptions for impact and cheetah actions. Eventually we will make this process more consistent across backend simulation types, but hardcoding it is a fine intermediate solution

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

Successfully merging this pull request may close these issues.

3 participants