instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00017189.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/experiment_shutter as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
Test: nexusfiles-scipp|loki|load_raw_file|
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00017042.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/experiment_shutter as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00016902.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/experiment_shutter as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00016762.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/experiment_shutter as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00016629.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/experiment_shutter as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00016482.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/experiment_shutter as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00016342.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/experiment_shutter as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00016195.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/experiment_shutter as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00016062.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/experiment_shutter as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00015922.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/experiment_shutter as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00015782.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/experiment_shutter as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00015642.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/experiment_shutter as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00015502.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/experiment_shutter as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00015448.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/experiment_shutter as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00015371.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/experiment_shutter as NXlog: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00014814.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00014534.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00014393.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00014253.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00014113.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00013973.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00013826.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00013688.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00013548.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00013408.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011153.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00011076.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00010936.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00010803.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00010677.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning
instrument = 'loki'
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/loki_999999_00010537.hdf')
def test_load_raw_file(instrument: str, coda_nexus_file_path: Path) -> None:
# Catch the warnings while loading the file to avoid the test from stopping after
# the first warning.
# Note that we need action="default" to make sure that the warnings are not
# promoted as errors.
with warnings.catch_warnings(action="default", record=True) as recorded_warnings:
with sx.File(coda_nexus_file_path, "r", locking=False) as f:
dg = f[()]
# Log the warnings to the test output.
for w in recorded_warnings:
logging.warning("%s: %s", w.category.__name__, w.message)
assert dg["entry"]["instrument"]["name"] == NEXUS_INSTRUMENT_NAME[instrument]
# Re-issue the warnings. We do this instead of asserting that the list of warnings
# is empty to make sure that the filtering of warnings in the pyproject.toml is
# working correctly.
for w in recorded_warnings:
> warnings.warn(
message=w.message,
category=w.category,
source=w.source,
stacklevel=1,
)
E UserWarning: Failed to load /entry/instrument/beam_monitor_2 as NXmonitor: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
tests/nexusfiles-scipp/fileloading_test.py:32: UserWarning