workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00017186.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
Test: nexusfiles-scipp|bifrost|can_compute_tof|all_detectors
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00017046.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00016899.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00016759.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00016626.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00016479.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00016339.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00016199.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00016059.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00015919.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00015779.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00015646.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00015506.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00014867.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00014867.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00014867.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00014867.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00014867.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00014818.hdf')
def test_can_compute_tof__all_detectors(
workflow: sciline.Pipeline, coda_nexus_file_path: Path
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:30:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:38: in load_instrument_angle
return InstrumentAngle[RunType](_load_experiment_parameter(file_spec, "a4"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/bifrost/io/nexus.py:44: in _load_experiment_parameter
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:309: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
group =
nx_class =
def _unique_child_group(
group: snx.Group, nx_class: type[snx.NXobject], name: str | None
) -> snx.Group:
if name is not None:
child = group[name]
if isinstance(child, snx.Field):
raise ValueError(
f"Expected a NeXus group as item '{name}' but got a field."
)
if child.nx_class != nx_class:
raise ValueError(
f"The NeXus group '{name}' was expected to be a "
f'{nx_class} but is a {child.nx_class}.'
)
return child
children = group[nx_class]
if len(children) != 1:
> raise ValueError(
f"Expected exactly one {nx_class.__name__} group '{group.name}', "
f"got {len(children)}"
)
E ValueError: Expected exactly one NXparameters group '/entry', got 0
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:368: ValueError