Baseline.UvDiffEffect#
Baseline.UvDiffEffect.py
- create_diff_spline(icurve)#
Create a derivative spline from the given intensity curve.
- Parameters:
icurve (Curve) – The intensity curve from which to create the derivative spline.
- Returns:
diff_spline – A callable representing the derivative spline of the curve.
- Return type:
callable
- class UvDiffEffect(ssd, params=None)#
Bases:
Curve
A class to represent the UV difference effect. .. attribute:: x
The x-coordinates of the DFEF curve.
- type:
array-like
- y#
The y-coordinates of the DFEF curve.
- Type:
array-like
- params#
The parameters used to compute the DFEF curve.
- Type:
array-like
Initializes the UvDiffEffect object with the given SSD and parameters. :param ssd: The SSD object containing the UV data. :type ssd: SSD :param params: The parameters used to compute the DFEF curve. If None, default parameters are used. :type params: array-like, optional
- estimate_uvdiffeffect_params(curve1, curve2, fc_slice, diff_spline, pickat=None, debug=False, plot_info=None)#
Estimate UV difference effect parameters by analyzing the difference between two curves.
- Parameters:
curve1 (Curve) – The first curve (usually the original UV curve).
curve2 (Curve) – The second curve (usually the UV curve with pickat applied).
fc_slice (tuple) – A tuple (i, j) representing the slice of the curves to analyze.
diff_spline (callable) – A callable representing the derivative spline of the first curve.
pickat (int, optional) – The index at which the pickat was applied. If None, it will be estimated.
debug (bool, optional) – If True, debug information is printed and plots are generated.
plot_info (tuple, optional) – A tuple containing (fig, ax) for plotting. If None, no plot is generated.
- Returns:
uvbaseline_params (array-like) – The estimated UV baseline parameters.
dfef_curve (Curve) – The computed DFEF curve.
baseline (array-like) – The computed baseline.
- compute_dfef_curve(x, dfef_params)#
Compute the DFEF curve using the given parameters.
- Parameters:
x (array-like) – The x-coordinates at which to compute the DFEF curve.
dfef_params (array-like) – The parameters used to compute the DFEF curve.
- Returns:
dfef_curve – The computed DFEF curve.
- Return type: