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

Propagation parameters #130

Merged
merged 10 commits into from
Jul 24, 2023
Merged

Conversation

rlb131
Copy link
Contributor

@rlb131 rlb131 commented Jul 19, 2023

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Member

@mrakitin mrakitin left a 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/tests/test_bl_elements_as_ophyd_objs.py Outdated Show resolved Hide resolved
if sim_type == "srw":
post_prop_params = connection.data["models"]["postPropagation"]
sirepo_propagation = []
object_name = "postPropagation"
Copy link
Member

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"
Copy link
Member

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")
Copy link
Member

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".

Comment on lines 264 to 266
postPropagation.hrange_mod.kind = "hinted" # noqa F821

(uid,) = RE(bp.scan([sample], postPropagation.hrange_mod, 0.1, 0.3, num_steps)) # noqa F821
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

postPropagation -> post_propagation

Copy link
Member

@mrakitin mrakitin left a 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.

Copy link
Contributor

@thomaswmorris thomaswmorris left a 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.

@thomaswmorris thomaswmorris merged commit 3b22a2f into NSLS-II:main Jul 24, 2023
8 checks passed
@rlb131 rlb131 deleted the propagation-parameters branch July 24, 2023 18:30
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