Transformer#
- class artof.transform.Transformer(acquisition, t0, artof_center_x, artof_center_y)#
Class to transform raw artof data
- Parameters:
acquisition (Acquisition)
t0 (float)
artof_center_x (float)
artof_center_y (float)
- get_axis_and_bins(load_as, acquisition)#
Get axis names and default bin edges for given transformation.
- Parameters:
load_as (str) – Desired representation to transform to (options: ‘raw’, ‘raw_SI’, ‘cylindrical’, ‘spherical’, ‘bipolar’, ‘kspace’).
metadata – Metadata class containing all metadata for current measurement.
acquisition (Acquisition)
- Returns:
Names of axes and default binning configurations
- Return type:
(axis_names, bin_confs)
- transform(raw_data, load_as, center_energy=None, trigger_period=None, t0=None, work_func=None)#
Transform raw data to desired representation. If additional columns are provided (other than x,y,t), the will be mantained and filtered with the actual data.
- Parameters:
raw_data (ndarray) – 2D list of raw data points (x, y, t) in ticks + optional additional columns.
load_as (str) – Desired representation to transform to (options: ‘raw’, ‘raw_SI’, ‘cylindrical’, ‘spherical’, ‘bipolar’, ‘kspace’).
center_energy (float | None) – Center energy in eV (required for energy transformations).
trigger_period (int | None) – Period between two trigger. When provided time of flight longer than one one trigger period can be loaded.
t0 (float | None) – Custom t offset in ticks (default: provided during initialization or from acquisition.cfg).
work_func (float | None) – Work function in eV used to calculate kspace coordinates. Required for kspace transformation.
- Returns:
Transformed data in desired format (including additional columns).
- Return type:
data