Generic two-dimensional correlation method¶
-
mrsimulator.methods.Method2D(spectral_dimensions=[{}], **kwargs)¶ A generic two-dimensional correlation spectrum method.
- Parameters
name (str (optional)) – The value is the name or id of the method. The default value is None.
label (str (optional)) – The value is a label for the method. The default value is None.
description (str (optional)) – The value is a description of the method. The default value is None.
experiment (CSDM or ndarray (optional)) – An object holding the experimental measurement for the given method, if available. The default value is None.
channels (list (optional)) – The value is a list of isotope symbols over which the given method applies. An isotope symbol is given as a string with the atomic number followed by its atomic symbol, for example, ‘1H’, ‘13C’, and ‘33S’. The default is an empty list. The number of isotopes in a channel depends on the method. For example, a BlochDecaySpectrum method is a single channel method, in which case, the value of this attribute is a list with a single isotope symbol, [‘13C’].
spectral_dimensions (List of SpectralDimension or dict objects (optional).) – The number of spectral dimensions depends on the given method. For example, a BlochDecaySpectrum method is a one-dimensional method and thus requires a single spectral dimension. The default is a single default SpectralDimension object.
magetic_flux_density (float (optional)) – A global value for the macroscopic magnetic flux density, \(H_0\), of the applied external magnetic field in units of T. The default is
9.4.rotor_angle (float (optional)) – A global value for the angle between the sample rotation axis and the applied external magnetic field, \(\theta\), in units of rad. The default value is
0.9553166, i.e. the magic angle.affine_matrix (np.ndarray or list (optional)) – An affine transformation square matrix, \(\mathbf{A} \in \mathbb{R}^{n \times n}\), where n is the number of spectral dimensions. The affine operation follows \(\mathbf{V}^\prime = \mathbf{A} \cdot \mathbf{V}\), where \(\mathbf{V}\in\mathbb{R}^n\) and \(\mathbf{V}^\prime\in\mathbb{R}^n\) are the initial and transformed frequency coordinates.
- Returns
- Return type
A
Methodinstance.
Note
If any parameter is defined outside of the spectral_dimensions list, the value of those parameters is considered global. In a multi-event method, you may also assign parameter values to individual events.
Example
>>> from mrsimulator.methods import Method2D
>>> method = Method2D(
... channels=["87Rb"],
... magnetic_flux_density=7, # in T. Global value for `magnetic_flux_density`.
... rotor_angle=0.95531, # in rads. Global value for the `rotor_angle`.
... spectral_dimensions=[
... {
... "count": 256,
... "spectral_width": 4e3, # in Hz
... "reference_offset": -5e3, # in Hz
... "event": [
... { # Global value for the `magnetic_flux_density` and `rotor_angle`
... # is used during this event.
... "transition_query": {"P": [-3], "D": [0]}
... }
... ]
... },
... {
... "count": 512,
... "spectral_width": 1e4, # in Hz
... "reference_offset": -4e3, # in Hz
... "event": [
... { # Global value for the `magnetic_flux_density` is used during this
... # event. User defined local value for `rotor_angle` is used here.
... "rotor_angle": 1.2238, # in rads
... "transition_query": {"P": [-1], "D": [0]}
... }
... ]
... },
... ],
... affine_matrix=[[1, -1], [0, 1]],
... )