Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rlb131 committed Jul 21, 2023
1 parent 6da615e commit fb1fc13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions sirepo_bluesky/sirepo_ophyd.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,14 +538,14 @@ def create_classes(connection, create_objects=True, extra_model_fields=[]):
)
)
propagation = PropagationConfig(*sirepo_propagation[:])
classes[object_name] = propagation
classes[inflection.camelize(object_name)] = propagation
if create_objects:
objects[object_name] = propagation

if sim_type == "srw":
post_prop_params = connection.data["models"]["postPropagation"]
sirepo_propagation = []
object_name = "postPropagation"
object_name = "post_propagation"
for i in range(9):
sirepo_propagation.append(
SirepoSignal(
Expand All @@ -556,7 +556,7 @@ def create_classes(connection, create_objects=True, extra_model_fields=[]):
)
)
propagation = PropagationConfig(*sirepo_propagation[:])
classes[object_name] = propagation
classes[inflection.camelize(object_name)] = propagation
if create_objects:
objects[object_name] = propagation

Expand Down
6 changes: 3 additions & 3 deletions sirepo_bluesky/tests/test_bl_elements_as_ophyd_objs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_empty_simulation(srw_empty_simulation):
globals().update(**objects)

assert not srw_empty_simulation.data["models"]["beamline"]
objects.pop("postPropagation")
objects.pop("post_propagation")
assert not objects


Expand Down Expand Up @@ -261,9 +261,9 @@ def test_srw_propagation_with_run_engine(RE, db, srw_chx_simulation, num_steps=5
classes, objects = create_classes(connection=srw_chx_simulation)
globals().update(**objects)

postPropagation.hrange_mod.kind = "hinted" # noqa F821
post_propagation.hrange_mod.kind = "hinted" # noqa F821

(uid,) = RE(bp.scan([sample], postPropagation.hrange_mod, 0.1, 0.3, num_steps)) # noqa F821
(uid,) = RE(bp.scan([sample], post_propagation.hrange_mod, 0.1, 0.3, num_steps)) # noqa F821
hdr = db[uid]
tbl = hdr.table(fill=True)
print(tbl)
Expand Down

0 comments on commit fb1fc13

Please sign in to comment.