toolbox_scs.detectors.dssc_processing
¶
DSSC-related sub-routines.
comment: contributions should comply with pep8 code structure guidelines.
Module Contents¶
Functions¶
|
Collects and reduces DSSC data for a single module. |
- toolbox_scs.detectors.dssc_processing.process_dssc_data(proposal, run_nr, module, chunksize, info, dssc_binners, path='./', pulsemask=None, dark_image=None, xgm_mnemonic='SCS_SA3', xgm_normalization=False, normevery=1)[source]¶
Collects and reduces DSSC data for a single module.
Copyright (c) 2020, SCS-team
- Parameters:
proposal (int) – proposal number
run_nr (int) – run number
module (int) – DSSC module to process
chunksize (int) – number of trains to load simultaneously
info (dictionary) – dictionary containing keys ‘dims’, ‘frames_per_train’, ‘total_frames’, ‘trainIds’, ‘number_of_trains’.
dssc_binners (dictionary) – a dictionary containing binner objects created by the ToolBox member function “create_binner()”
path (str) – location in which the .h5 files, containing the binned data, should be stored.
pulsemask (numpy.ndarray) – array of booleans to be used to mask dssc data according to xgm data.
dark_image (xarray.DataArray) – an xarray dataarray with matching coordinates with the loaded data. If dark_image is not None it will be subtracted from each individual dssc frame.
xgm_normalization (bool) – true if the data should be divided by the corresponding xgm value.
xgm_mnemonic (str) – Mnemonic of the xgm data to be used for normalization.
normevery (int) – One out of normevery dssc frames will be normalized.
- Returns:
module_data – xarray datastructure containing data binned according to bins.
- Return type:
xarray.Dataset