Exemple #1
0
def test_read_spb_proc_run(mock_spb_proc_run):
    run = RunDirectory(mock_spb_proc_run)  #Test for calib data
    assert len(run.files) == 16  # only 16 detector modules for calib data
    assert run.train_ids == list(range(10000, 10064))  #64 trains
    tid, data = next(run.trains())
    device = 'SPB_DET_AGIPD1M-1/DET/15CH0:xtdf'
    assert tid == 10000
    for prop in ('image.gain', 'image.mask', 'image.data'):
        assert prop in data[device]
    assert 'u1' == data[device]['image.gain'].dtype
    assert 'u4' == data[device]['image.mask'].dtype
    assert 'f4' == data[device]['image.data'].dtype
    run.info()  # Smoke test
Exemple #2
0
def test_read_fxe_raw_run(mock_fxe_raw_run):
    run = RunDirectory(mock_fxe_raw_run)
    assert len(run.files) == 18  # 16 detector modules + 2 control data files
    assert run.train_ids == list(range(10000, 10480))
    run.info()  # Smoke test
Exemple #3
0
def test_info(mock_spb_raw_run):
    run = RunDirectory(mock_spb_raw_run)
    run.info(details_for_sources='*/DOOCS/*')  # Smoketest