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)

get_originals()

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_raw_files()

Remove orignals files fitting the target (dark or flat files)

run()

Attributes

DARKHST_PREFIX

RAW_DARK_RE

regular expression to discover raw dark files

RAW_FLAT_RE

regular expression to discover flat files

REFHST_PREFIX

input_dark_pattern

input_flat_pattern

output_dtype

overwrite

reduced_method

reducer_target

scan

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)