File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -519,13 +519,10 @@ def parse_disk_choppers(
519
519
) -> Choppers [RunType ]:
520
520
"""Convert the NeXus representation of a chopper to ours."""
521
521
return Choppers [RunType ](
522
- sc .DataGroup (
523
- {
524
- name : extract_chopper_from_nexus (
525
- nexus .compute_component_position (chopper )
526
- )
527
- for name , chopper in choppers .items ()
528
- }
522
+ choppers .apply (
523
+ lambda chopper : extract_chopper_from_nexus (
524
+ nexus .compute_component_position (chopper )
525
+ )
529
526
)
530
527
)
531
528
@@ -534,14 +531,7 @@ def parse_analyzers(
534
531
analyzers : AllNeXusComponents [snx .NXcrystal , RunType ],
535
532
) -> Analyzers [RunType ]:
536
533
"""Convert the NeXus representation of an analyzer to ours."""
537
- return Analyzers [RunType ](
538
- sc .DataGroup (
539
- {
540
- name : nexus .compute_component_position (analyzer )
541
- for name , analyzer in analyzers .items ()
542
- }
543
- )
544
- )
534
+ return Analyzers [RunType ](analyzers .apply (nexus .compute_component_position ))
545
535
546
536
547
537
def _drop (
You can’t perform that action at this time.
0 commit comments