Generic one-dimensional method

mrsimulator.methods.Method1D(spectral_dimensions=[{}], **kwargs)

A generic one-dimensional 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.

  • rotor_frequency (float (optional)) – A global value for the sample spinning frequency, \(\nu_r\), in units of Hz. The default value is 0.

Returns

Return type

A Method instance.

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

Example method for simulating triple-quantum 1D spectrum.

>>> from mrsimulator.methods import Method1D
>>> method1 =  Method1D(
...     channels=["87Rb"],
...     magnetic_flux_density=7,  # in T
...     rotor_angle=54.735*np.pi/180,
...     rotor_frequency=1e9,
...     spectral_dimensions=[
...         {
...             "count": 1024,
...             "spectral_width": 1e4,  # in Hz
...             "reference_offset": -4e3,  # in Hz
...             "label": "quad only",
...             "events":[
...                 {"transition_query": {"P": [-3], "D": [0]}},
...             ]
...         }
...     ]
... )