Skip to content

Commit

Permalink
Merge pull request #155 from usnistgov/Issue154_Updatetest_SST1DBLoader
Browse files Browse the repository at this point in the history
Update test_SST1DBLoader.py by testing scan ID 87758
  • Loading branch information
pbeaucage authored Dec 3, 2024
2 parents 2204024 + e3a9c89 commit 5059025
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/test_SST1DBLoader.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,24 @@ def test_SST1DB_load_snake_scan_explicit_dims(sstdb):
assert 'sam_th' in run.indexes
assert 'polarization' in run.indexes


## This is intended to test a scan that was run at a single energy and two polarizations
@must_have_tiled
def test_SST1DB_load_SingleEnergy2Polarizations_scan_hinted_dims(sstdb):
run = sstdb.loadRun(87758).unstack('system')
assert 'energy' in run.indexes
assert 'polarization' in run.indexes
@must_have_tiled
def test_SST1DB_load_SingleEnergy2Polarizations_scan_explicit_dims(sstdb):
run = sstdb.loadRun(87758,dims=['energy','polarization']).unstack('system')
assert type(run) == xr.DataArray
assert 'energy' in run.indexes
assert 'polarization' in run.indexes


@must_have_tiled
def test_SST1DB_exposurewarnings(sstdb):
with pytest.warns(UserWarning, match="Wide Angle CCD Detector is reported as underexposed"):
sstdb.loadRun(83192)
with pytest.warns(UserWarning, match="Wide Angle CCD Detector is reported as saturated"):
sstdb.loadRun(67522)
sstdb.loadRun(67522)

0 comments on commit 5059025

Please sign in to comment.