File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 4747 PreopenNeXusFile ,
4848 RawChoppers ,
4949 RunType ,
50- SampleRun ,
5150 TimeInterval ,
5251 UniqueComponent ,
5352)
@@ -606,14 +605,16 @@ def _assign_values_as_variances(var: sc.Variable) -> sc.Variable:
606605 return var
607606
608607
609- def load_beamline_metadata_from_nexus (file_spec : NeXusFileSpec [SampleRun ]) -> Beamline :
608+ def load_beamline_metadata_from_nexus (
609+ file_spec : NeXusFileSpec [RunType ],
610+ ) -> Beamline [RunType ]:
610611 """Load beamline metadata from a sample NeXus file."""
611612 return nexus .load_metadata (file_spec .value , Beamline )
612613
613614
614615def load_measurement_metadata_from_nexus (
615- file_spec : NeXusFileSpec [SampleRun ],
616- ) -> Measurement :
616+ file_spec : NeXusFileSpec [RunType ],
617+ ) -> Measurement [ RunType ] :
617618 """Load measurement metadata from a sample NeXus file."""
618619 return nexus .load_metadata (file_spec .value , Measurement )
619620
Original file line number Diff line number Diff line change @@ -633,7 +633,7 @@ def test_generic_nexus_workflow_load_beamline_metadata(
633633) -> None :
634634 wf = GenericNeXusWorkflow (run_types = [SampleRun ], monitor_types = [])
635635 wf [Filename [SampleRun ]] = bifrost_simulated_elastic
636- beamline = wf .compute (Beamline )
636+ beamline = wf .compute (Beamline [ SampleRun ] )
637637
638638 assert beamline .name == 'BIFROST'
639639 assert beamline .facility == 'ESS'
@@ -646,7 +646,7 @@ def test_generic_nexus_workflow_load_measurement_metadata(
646646 wf = GenericNeXusWorkflow (run_types = [SampleRun ], monitor_types = [])
647647 wf [Filename [SampleRun ]] = loki_tutorial_sample_run_60250
648648 wf [Filename [BackgroundRun ]] = loki_tutorial_background_run_60248
649- measurement = wf .compute (Measurement )
649+ measurement = wf .compute (Measurement [ SampleRun ] )
650650
651651 assert measurement .title == 'My experiment'
652652 assert measurement .experiment_id == 'p1234'
You can’t perform that action at this time.
0 commit comments