ewoksid02.utils.io#

Functions

deserialize_h5py_task(h5dict, h5py_parent)

get_array_dark(filename_dark, data_signal_shape)

Generate the array of the dark current correction, eventually applying the mask and dummy pixel filtering and dark dataset filtering params: - filename_dark (str): the filename of the dark current correction - data_signal_shape (tuple): the shape of the data signal array, used for binning unification - datatype (str): format of the imported array, if None, datatype is respected - binning (tuple): binning of the data signal, used for binning unification - dummy (int): if not None, the value of the dummy pixels to filter - delta_dummy (float): if dummy is not None, the tolerance around the dummy value - filename_mask (str): the filename of the mask - dark_filter (str): if not None, the method to use for filtering a stack of darks into a single dark (e.g. "median" or "quantil") - dark_filter_quantil_lower (float): if dark_filter is "quantil", the lower quantile to use for filtering - dark_filter_quantil_upper (float): if dark_filter is "quantil", the upper quantile to use for filtering - use_cupy (bool): if True, returns a cupy.asarray - persistent (bool): if True, the array is cached in memory and only reloaded if the file modification time changes.

get_array_flat(filename_flat, data_signal_shape)

Generate the array of the flat field correction, eventually applying the mask and dummy pixel filtering params: - filename_flat (str): the filename of the flat field correction - data_signal_shape (tuple): the shape of the data signal array, used for binning unification - datatype (str): format of the imported array, if None, datatype is respected - binning (tuple): binning of the data signal, used for binning unification - dummy (int): if not None, the value of the dummy pixels to filter - delta_dummy (float): if dummy is not None, the tolerance around the dummy value - filename_mask (str): the filename of the mask - use_cupy (bool): if True, returns a cupy.asarray - persistent (bool): if True, the array is cached in memory and only reloaded if the file modification time changes

get_array_mask(filename_mask, data_signal_shape)

Generate the array to mask (gaps or beamstop normally)

get_data_from_h5py_defaults(filename)

get_data_with_fabio(filename)

get_dataset_signal_from_processed_file(filename)

get_from_headers(key[, headers, ...])

Retrieve a header value from the header object (for online processing) or from an HDF5 group (for offline processing).

get_headers([headers, metadata_file_group])

Retrieve headers from a dictionary or an HDF5 group.

get_isotime([forceTime])

Get the current time as an ISO8601 string.

get_value_from_file(filename, h5path, key[, ...])

load_data(filename[, binning, ...])

Load data from a file or a list of files.

match_stream(name, streams)

parse_titleextension_template(template)

refactor_stream_name_interpreted(stream_name)

refactor_stream_name_raw(stream_name[, cut_name])

serialize_h5py_task(h5py_group)

Recursively convert an h5py Group or File into a nested Python dictionary.