tomwer.core.process.reconstruction.darkref.darkrefscopy.DarkRefsCopy#
- class tomwer.core.process.reconstruction.darkref.darkrefscopy.DarkRefsCopy(process_id=None, varinfo=None, inputs=None, node_id=None, node_attrs=None, execinfo=None)#
Reimplement Dark ref to deal with copy when there is no median/mean files
- DEFAULT_SRCURRENT = 200.0#
- clear_cache()#
remove the file used to cache the reduced darks / flats. This can be used in the case it contain unrelevant data. Like frame with another shape…
- contains_dark(scan)#
Return True if the scan has already some dark processed
- Return type:
bool
- contains_dark_or_ref(scan)#
- contains_flat(scan)#
Return True if the scan has already some dark processed
- property darkHST_prefix#
- static get_darks_url(save_dir)#
- static get_flats_url(save_dir)#
- static get_reduced_frame_data(url, reduced_target, check_for_reduced_key=True)#
- Parameters:
url (
DataUrl
) – url expected to contain the dict with one key per serie of reduced framereduced_target (
REDUCER_TARGET
) – what we are looking for (used when check_for_reduced_key is set to True)check_for_reduced_key (
bool
) – if True then if the dict contains the given key then return the value of this key instead of the loaded dict. Used as a user friendly feature to be able to load dict when upper data path is provided instead of the ‘darks’ or ‘flats’ one.
- Return type:
tuple
- Returns:
tuple as (data, metadata)
- static get_save_file(save_dir)#
- has_dark_stored()#
- Return type:
bool
- Returns:
True if the process has registered at least one dark
- has_flat_or_dark_stored()#
- Return type:
bool
- Returns:
True if the process has at least registered one flat or one dark
- has_flat_stored()#
- Return type:
bool
- Returns:
True if the process has registered at least one ref
- has_missing_dark_or_ref(scan)#
return True if the scan has no ref or no dark registered
- Return type:
bool
- property is_on_mode_auto#
- property refHST_prefix#
- run()#
This is function triggered when a new scan / data is received. As explained in issue #184 the behavior is the following:
if the scan has already ref files files won’t be overwrite
if the mode is in auto will register last ref file met
if the scan has no ref files and refCopy has some register. Will create a copy of those, normalized from srCurrent (for flat field)
- static save_darks_to_be_copied(save_dir, data)#
- static save_flats_to_be_copied(save_dir, data)#
- set_darkHST_prefix(prefix)#
- set_darks_and_flats_from_scan(scan)#
- Return type:
bool
- set_mode_auto(b)#
- set_process_only_copy(value)#
- Return type:
None
- set_process_only_dkRf(value)#
- Return type:
None
- set_refHST_prefix(prefix)#