tomoscan.esrf.scan.framereducer.edfframereducer.EDFFrameReducer¶
- class tomoscan.esrf.scan.framereducer.edfframereducer.EDFFrameReducer(scan: TomoScanBase, reduced_method: ReduceMethod, target: REDUCER_TARGET, output_dtype: Optional[dtype], input_flat_pattern='ref*.*[0-9]{3,4}_[0-9]{3,4}', input_dark_pattern='darkend[0-9]{3,4}', flat_output_prefix='refHST', dark_output_prefix='dark.edf', overwrite=False, file_ext='.edf')¶
Bases:
FrameReducerBase- __init__(scan: TomoScanBase, reduced_method: ReduceMethod, target: REDUCER_TARGET, output_dtype: Optional[dtype], input_flat_pattern='ref*.*[0-9]{3,4}_[0-9]{3,4}', input_dark_pattern='darkend[0-9]{3,4}', flat_output_prefix='refHST', dark_output_prefix='dark.edf', overwrite=False, file_ext='.edf')¶
Methods
__init__(scan, reduced_method, target, ...)getDARK_N(scan)getTomo_N(scan)get_closest_SR_current(scan_dir[, refFile])Parse files contained in the given directory to get information about the incoming energy for the serie iSerie
get_closest_count_time(scan_dir[, refFile])get_info(keyword)get_n_digits(_file, directory)compute the list of originals files to be used to compute the reducer target.
get_series_value(fileNames, file_ext)group_files_per_serie(files, series)preprocess()preprocess_PCOTomo()Remove orignals files fitting the target (dark or flat files)
run()Attributes
DARKHST_PREFIXregular expression to discover raw dark files
regular expression to discover flat files
REFHST_PREFIXinput_dark_patterninput_flat_patternoutput_dtypeoverwritereduced_methodreducer_targetscan- RAW_DARK_RE = 'darkend[0-9]{3,4}'¶
regular expression to discover raw dark files
- RAW_FLAT_RE = 'ref*.*[0-9]{3,4}_[0-9]{3,4}'¶
regular expression to discover flat files
- static get_closest_SR_current(scan_dir, refFile=None)¶
Parse files contained in the given directory to get information about the incoming energy for the serie iSerie
- Parameters:
scan_dir – directory containing the acquisition
refFile – the refXXXX_YYYY which should contain information about the energy.
- Returns:
the energy in keV or none if no energy found
- get_originals() list¶
compute the list of originals files to be used to compute the reducer target.
- remove_raw_files()¶
Remove orignals files fitting the target (dark or flat files)