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).
- Type:
array-like
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.
- 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 value in ssd.qv where 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.vec.wv[i]
according to bisect_right.
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(pickat=280, method=None, **kwargs)#
uv.get_uv_ibaseline(pickvalue=0.02)
Returns a baseline i-curve from the UV matrix data.
- Parameters:
pickvalue (float, optional) – See uv.get_icurve().
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:
Examples
>>> curve = uv.get_icurve() >>> baseline = uv.get_ibaseline() >>> corrected_curve = curve - baseline