Analysis
estimate_linear_background(x, data, points_cut=0.1)
Estimates a linear background hihi hoho
Source code in sqil_core/utils/analysis.py
remove_linear_background(x, data, points_cut=0.1)
Removes a linear background from the input data (e.g. the phase background of a spectroscopy).
Parameters
data : np.ndarray Input data. Can be a 1D vector or a 2D matrix.
Returns
np.ndarray
The input data with the linear background removed. The shape of the
returned array matches the input data
.
Source code in sqil_core/utils/analysis.py
remove_offset(data, avg=3)
Removes the initial offset from a data matrix or vector by subtracting
the average of the first avg
points. After applying this function,
the first point of each column of the data will be shifted to (about) 0.
Parameters
data : np.ndarray Input data, either a 1D vector or a 2D matrix avg : int, optional The number of initial points to average when calculating the offset, by default 3
Returns
np.ndarray The input data with the offset removed