-
Notifications
You must be signed in to change notification settings - Fork 9
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
Propagation parameters #130
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
01cb528
to
7ad0b07
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestions for final touch-ups.
sirepo_bluesky/sirepo_ophyd.py
Outdated
if sim_type == "srw": | ||
post_prop_params = connection.data["models"]["postPropagation"] | ||
sirepo_propagation = [] | ||
object_name = "postPropagation" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see how we did name normalization for the objects (snake_case) vs. classes (CamelCase).
if sim_type == "srw" and model_field == "beamline": | ||
prop_params = connection.data["models"]["propagation"][str(el["id"])][0] | ||
sirepo_propagation = [] | ||
object_name += "_propagation" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we also need to apply inflection
here.
globals().update(**objects) | ||
|
||
assert not srw_empty_simulation.data["models"]["beamline"] | ||
objects.pop("postPropagation") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will chance once the name is "snake_cased".
postPropagation.hrange_mod.kind = "hinted" # noqa F821 | ||
|
||
(uid,) = RE(bp.scan([sample], postPropagation.hrange_mod, 0.1, 0.3, num_steps)) # noqa F821 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
postPropagation
-> post_propagation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! This is a useful feature.
sirepo_data
parameter from thecreate_classes
function as it was redundant.