Mapping.MappingInfo#

Mapping.MappingInfo.py

class MappingInfo(slope, intercept, xr_peaks, uv_peaks, xr_moment, uv_moment, xr_curve, uv_curve)#

Bases: object

Contains information about the mapping between XR and UV data.

slope#

The slope of the linear mapping from XR to UV in the form y = slope * x + intercept.

Type:

float

intercept#

The intercept of the linear mapping from XR to UV in the form y = slope * x + intercept.

Type:

float

xr_peaks#

List of (position, intensity) tuples for XR peaks.

Type:

list of tuples

uv_peaks#

List of (position, intensity) tuples for UV peaks.

Type:

list of tuples

xr_moment#

The moment of the XR data.

Type:

float

uv_moment#

The moment of the UV data.

Type:

float

xr_curve#

The XR curve object.

Type:

Curve

uv_curve#

The UV curve object.

Type:

Curve

Initializes the MappingInfo object with the given parameters.

get_mapped_x(xr_x)#

Map XR x-values to UV x-values using the linear mapping.

Parameters:

xr_x (float or array-like) – The x-values in the XR domain.

Returns:

uv_x – The corresponding x-values in the UV domain.

Return type:

float or array-like

get_mapped_index(i, xr_x, uv_x)#

Get the index in the UV data corresponding to the given index in the XR data.

Parameters:
  • i (int) – The index in the XR data.

  • xr_x (array-like) – The x-values in the XR domain.

  • uv_x (array-like) – The x-values in the UV domain.

Returns:

index – The corresponding index in the UV data.

Return type:

int

get_mapped_curve(xr_icurve, uv_icurve, inverse_range=False, debug=False)#

Get the mapped curve from XR to UV domain.

Parameters:
  • xr_icurve (Curve) – The XR curve object.

  • uv_icurve (Curve) – The UV curve object.

  • inverse_range (bool, optional) – If True, map the range of uv_icurve back to xr_icurve, by default False.

  • debug (bool, optional) – If True, print debug information, by default False.

Returns:

mapped_curve – The mapped curve in the UV domain.

Return type:

Curve

compute_ratio_curve(mp_curve=None, data_threshold=0.05, debug=False)#

Compute the ratio curve, which is the ratio of the UV absorbance to the XR intensity, based on the mapping information.

Parameters:
  • mp_curve (Curve, optional) – The mapping curve to use, by default None.

  • data_threshold (float, optional) – The data threshold to apply, by default 0.05.

  • debug (bool, optional) – If True, print debug information, by default False.

Returns:

ratio_curve

Return type:

RatioCurve