Sample#

Sample is a class that stores and calculates sample-related parameters in a MRFM experiment. Use the spin type, experimental temperature, relaxation time, and spin density to determine the sample for simulation. The gyromagnetic ratio and angular momentum are calculated based on a pre-defined dictionary. The computed parameters include the homogenous linewidth and saturation linewidth.

Example Usage#

To create an electron spin sample:

from mrfmsim.component import Sample
sample = Sample(
    spin='e',
    temperature=4.2,
    T1=1e-3,
    T2=250e-9,
    spin_density=2.41e-2)

Print out the summary of the sample:

>>> print(sample)
Sample(spin=e
        T1=1.000e-03 s
        T2=2.500e-07 s
        temperature=4.200 K
        spin_density=0.024 1/nm^3
        Gamma=1.761e+08 rad/(s.mT)
        J=0.5
        dB_hom=0.023 mT
        dB_sat=0.000 mT)

sample module#

class mrfmsim.component.sample.Sample(spin: str, T1: float, T2: float, temperature: float, spin_density: float, Gamma: float | None = None, J: float | None = None)[source]#

Bases: ComponentBase

Sample object for magnetic resonance force microscopy experiments.

For spins ‘e’, ‘1H’, ‘71Ga’, ‘19F’, or ‘2H’ the Gamma and J are preset. For other spins, input the name, Gamma and J directly.

Parameters:
  • spin (str) – spin type

  • T1 (float) – spin-lattice relaxation \(T_1\) [s]

  • T2 (float) – spin-spin relaxation \(T_2\) [s]

  • temperature (float) – the sample temperature [K]

  • spin_density (float) – the sample spin density \(\rho\) [1/nm^3]

  • Gamma (float) – spin gyromagnetic ratio [rad/s.mT] defaults to None if spin_type is one of the preset

  • L (float) – spin angular momentum [unitless] default to None if spin_type is one of the preset

  • dB_hom (float) – homogeneous linewidth [mT]

  • dB_sat (float) – saturation linewidth [mT]

Gamma: float = None#
J: float = None#
T1: float#
T2: float#
dB_hom: float = None#
dB_sat: float = None#
spin: str#
spin_density: float#
temperature: float#