ess.snspowder.powgen.data.powgen_tutorial_calibration_file#
- ess.snspowder.powgen.data.powgen_tutorial_calibration_file(*, small=False)[source]#
Return the path to the POWGEN calibration file.
- Parameters:
small (
bool
, default:False
) –If True, return a smaller file for unit tests. The small version of the file was created using the following code, which keeps only 7 columns out of 154 (154 / 7 = 22):
import scipp as sc fname = 'PG3_FERNS_d4832_2011_08_24_spectrum.h5' dg = sc.io.load_hdf5(fname) sizes = {"bank": 23, "column": 154, "row": 7} def foldme(x, dim): return x.fold(dim=dim, sizes=sizes)['column', ::22].flatten( dims=list(sizes.keys()), to=dim) small = sc.Dataset( data={k: foldme(a, 'spectrum') for k, a in ds.items()}, coords={k: foldme(c, 'spectrum') for k, c in ds.coords.items()} ) sc.io.save_hdf5(small, 'TEST_PG3_FERNS_d4832_2011_08_24_spectrum.h5')
- Return type: