Utility functions

mrsimulator.utils.collection.single_site_system_generator(isotopes, isotropic_chemical_shifts=0, shielding_symmetric=None, quadrupolar=None, abundance=None, rtol=0.001)

Generate and return a list of single-site spin systems from the input parameters.

Parameters
  • isotopes – A string or a list of isotopes.

  • isotropic_chemical_shifts – A float or a list/ndarray of values. The default value is 0.

  • shielding_symmetric – A shielding symmetric like dict object, where the keyword value can either be a float or a list/ndarray of floats. The default value is None. The allowed keywords are zeta, eta, alpha, beta, and gamma.

  • quadrupolar – A quadrupolar like dict object, where the keyword value can either be a float or a list/ndarray of floats. The default value is None. The allowed keywords are Cq, eta, alpha, beta, and gamma.

  • abundance – A float or a list/ndarray of floats describing the abundance of each spin system.

  • rtol – The relative tolerance. This value is used in determining the cutoff abundance given as \(\tt{abundance}_\tt{cutoff} = \tt{rtol} * \tt{max(abundance)}.\) The spin systems with abundance below this threshold are ignored.

Note

The parameter value can either be a float or a list/ndarray. If the parameter value is a float, the given value is assigned to the respective parameter in all the spin systems. If the parameter value is a list or ndarray, its ith value is assigned to the respective parameter of the ith spin system. When multiple parameter values are given as lists/ndarrays, the length of all the lists must be the same.