DataObjects.UvData#

DataObjects.UvData.py

class UvData(iv, jv, M, E, **kwargs)#

Bases: SsMatrixData

UvData class for UV matrix data. Inherits from SsMatrixData.

wv#

The wavelength values corresponding to the spectral axis (iv). Alias: wavelengths.

Type:

array-like

wavelengths#

Human-readable alias for iv / wv — the wavelength axis (nm).

Type:

array-like (property)

frames#

Human-readable alias for jv — the frame (time) axis.

Type:

array-like (property)

Notes

Matrix M has shape (len(wavelengths), len(frames)): rows index wavelength, columns index frame number.

Initialize the UvData object.

Parameters:
  • iv (array-like) – The wavelength values corresponding to the spectral axis.

  • jv (array-like) – The values corresponding to the temporal axis.

  • M (2D array-like) – The 2D matrix of intensity values.

  • E (2D array-like or None) – The 2D matrix of error values. It can be None if errors are not available.

  • kwargs (dict, optional) – Additional keyword arguments to pass to the SsMatrixData constructor.

property uv_pickat#

Alias for pickat — the default wavelength (nm) for i-curve extraction.

property wavelengths#

Wavelength axis in nm (alias for iv / wv).

property frames#

Frame (time) axis (alias for jv).

property wavelength_range#

Wavelength coverage as (min, max) in nm.

copy(slices=None)#

Return a copy of the SsMatrixData object.

Parameters:

slices (tuple of slices, optional) – The slices to apply to the iv, jv, and M attributes.

get_recognition_curve()#

Return the elution curve at self.pickat wavelength (default 280 nm, or the value set via SSD(uv_pickat=...)).

Unlike XR where M.sum(axis=0) is a useful alternative, UV sum across all wavelengths is dominated by noise from non-absorbing channels and is not appropriate for peak/buffer classification.

Returns:

The recognition elution curve at the selected wavelength.

Return type:

Curve

get_ipickvalues()#

Get the default pickvalues for i-curves. :returns: The default pickvalues for i-curves. :rtype: list

get_icurve(pickat=280)#

Returns an i-curve from the UV matrix data.

Parameters:

pickat (float, optional) –

Specifies the wavelength (nm) at which to pick an i-curve. The i-curve will be made from self.M[i,:] where the picking index i will be determined to satisfy

self.wv[i-1] <= pickat < self.wv[i]

according to bisect_right. If None, uses self.pickat (default 280 nm, or the value set via SSD(uv_pickat=…)).

Examples

>>> curve = uv_data.get_icurve()
get_flowchange_points()#

Returns a pair of flowchange points.

Parameters:
  • pickvalues (list) – specifies the pickvalues of icurves which are used to detect the flowchange points.

  • return_also_curves (bool) – If it is False, the method returns only a list of indeces of points. If it is True, the method returns a list indeces of points and a list of curves which were used to detect the points.

Examples

>>> i, j = uv.get_flowchange_points()
get_usable_wrange()#

Returns a pair of indeces which should be used as a slice for the spectral axis to trim away unusable UV data regions.

Parameters:

None

Examples

>>> i, j = uv.get_usable_wrange()
get_ibaseline()#

Returns a baseline i-curve from the UV matrix data.

Parameters:
  • pickat (float, optional) – Wavelength (nm) at which to pick the i-curve for baseline fitting. If None, uses self.pickat (default 280 nm, or the value set via SSD(uv_pickat=…)).

  • method (str, optional) – The baseline method to use. If None, the method set in self.baseline_method will be used.

  • debug (bool, optional) – If True, enable debug mode.

  • kwargs (dict, optional) – Additional keyword arguments to pass to the baseline fitting method. These will be merged with the default_kwargs defined above.

Returns:

baseline

Return type:

Curve

Examples

>>> curve = uv.get_icurve()
>>> baseline = uv.get_ibaseline()
>>> corrected_curve = curve - baseline