DataObjects.SsMatrixData#
DataObjects.SsMatrixData.py
- class SsMatrixData(iv, jv, M, E, moment=None, baseline_method='linear')#
Bases:
object
A class to represent a SAXS/UV matrix data object. It contains a 2D matrix M where M[i,j] is the intensity value at the i-th value of the first variable (iv) and the j-th value of the second variable (jv).
- iv#
The values of the first variable (e.g., scattering angle or q).
- Type:
array-like
- jv#
The values of the second variable (e.g., time or wavelength).
- Type:
array-like
- M#
The 2D matrix of intensity values.
- Type:
2D array-like
- E#
The 2D matrix of error values. It can be None if errors are not available
- Type:
2D array-like or None
- moment#
The moment of the data along the iv axis. It can be None if not computed.
- Type:
Moment or None
- baseline_method#
The method used for baseline correction. Default is ‘linear’.
- Type:
str
Initialize the SsMatrixData object.
- 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_icurve(pickat)#
get an i-curve from the matrix data.
- Parameters:
pickat (float) – Specifies the value to pick an i-curve. The i-curve will be made from ssd.M[i,:] where ssd.iv[i] is the largest value that is less than or equal to pickat.
Examples
>>> curve = md.get_icurve(0.1)
- get_jcurve(j)#
Returns a j-curve from the matrix data.
- Parameters:
j (int) – Specifies the index to pick a j-curve. The j-curve will be made from ssd.xrM[:,j].
Examples
>>> curve = md.get_jcurve(150)
- get_moment()#
Get the moment of the matrix data along the iv axis.
- Returns:
moment – The moment object representing the moment along the iv axis.
- Return type:
- set_baseline_method(method)#
Set the baseline method for this data object.
- get_baseline_method()#
Get the baseline method for this data object.
- get_baseline2d(**kwargs)#
Get the 2D baseline for the matrix data using the specified method.
- Parameters:
method_kwargs (dict, optional) – Additional keyword arguments to pass to the baseline fitting method.
debug (bool, optional) – If True, enable debug mode.
- Returns:
baseline – The 2D baseline array with the same shape as self.M.
- Return type:
ndarray