h5analysis.config.h5Config
- class h5analysis.config.h5Config
Bases:
objectInternal function to configure data streams.
Methods
define_roi(roi_string, roi_tuple)Setup dictionary of user-defined ROIs.
get_h5key(scan)Returns the proper h5 group/key to a given scan
get_h5scan(key)Extracts the scan number (integer) from h5 group/key for a scan
get_path(scan, path)Returns the full path to a h5 group/key for a given scan
key(pattern, scan_var)Set the h5 group structure.
mca(alias, path, scale[, norm_by, x_label, ...])Adds a specific alias for MCA data
sca(alias, path[, norm_by, x_label, y_label])Adds a specific alias for SCA data
sca_folder(path)Adds a specific path as sca folder for which all scalars will be directly accessible
stack(alias, path, scale1, scale2[, ...])Adds a specific alias for STACK data
- define_roi(roi_string, roi_tuple)
Setup dictionary of user-defined ROIs.
- Parameters:
roi_string (string) – pre-defined ROI string
roi_tuple (tuple) – associated values as tuples, i.e. (low_energy,high_energy)
- get_h5key(scan)
Returns the proper h5 group/key to a given scan
- Parameters:
scan (int,) – scan number
- get_h5scan(key)
Extracts the scan number (integer) from h5 group/key for a scan
- Parameters:
key (string,) – full h5 group/key to scan
- get_path(scan, path)
Returns the full path to a h5 group/key for a given scan
- Parameters:
scan (int,) – scan number
path (string) – sub group in h5 container
- key(pattern, scan_var)
Set the h5 group structure.
- Parameters:
pattern (string) – pattern of the groups holding scan entries in h5
scan_var (string) – name of the variable in the “pattern” containing the scan number
- mca(alias, path, scale, norm_by=None, x_label=None, y_label=None)
Adds a specific alias for MCA data
- Parameters:
alias (string) – name used to access this data stream
path (string) – sub group in h5 container, MCA data
scale (string) – sub group in h5 container, SCA data
norm_by (string) – sub group in h5 container, SCA data to norm by
x_label (string) – general custom label for the x-stream
y_label (string) – general custom label for the y-stream
- sca(alias, path, norm_by=None, x_label=None, y_label=None)
Adds a specific alias for SCA data
- Parameters:
alias (string) – name used to access this data stream
path (string) – sub group in h5 container, SCA data
norm_by (string) – sub group in h5 container, SCA data to norm by
x_label (string) – general custom label for the x-stream
y_label (string) – general custom label for the x-stream
- sca_folder(path)
Adds a specific path as sca folder for which all scalars will be directly accessible
- Parameters:
path (string) – sub group in h5 container
- stack(alias, path, scale1, scale2, norm_by=None, label1=None, label2=None)
Adds a specific alias for STACK data
- Parameters:
alias (string) – name used to access this data stream
path (string) – sub group in h5 container, MCA data
scale1 (string) – sub group in h5 container, SCA data
scale1 (string) – sub group in h5 container, SCA data
norm_by (string) – sub group in h5 container, SCA data to norm by
label1 (string) – general custom label for the stream
label2 (string) – general custom label for the stream