Base class of all EPG Models#

Defined in sycomore/epg/Base.h

class Base#

Base class for all EPG models.

Subclassed by sycomore::epg::Discrete, sycomore::epg::Discrete3D, sycomore::epg::Regular

Public Functions

Base(Species const &species, Vector3R const &initial_magnetization, unsigned int initial_size)#

Create a single-pool model.

Base(Species const &species_a, Species const &species_b, Vector3R const &M0_a, Vector3R const &M0_b, Quantity const &k_a, Quantity const &delta_b, unsigned int initial_size)#

Create an exchange model.

Base(Species const &species_a, Quantity const &R1_b_or_T1_b, Vector3R const &M0_a, Vector3R const &M0_b, Quantity const &k_a, unsigned int initial_size)#

Create an MT model.

Base(Base const &other) = default#

Default copy constructor.

Base(Base &&other) = default#

Default move constructor.

Base &operator=(Base const &other) = default#

Default copy assignment.

Base &operator=(Base &&other) = default#

Default move assignment.

virtual ~Base() = default#

Default destructor.

Model::Kind kind() const#

Return the kind of the model, set at creation.

std::size_t pools() const#

Return the number of pools of the model, set at creation.

Species const &species(std::size_t pool = 0) const#

Return the species of one of the pools.

void set_species(std::size_t pool, Species const &species)#

Set the species of one of the pools.

void set_species(Species const &species)#

Set the species of the first pool.

Real const &M0(std::size_t pool = 0) const#

Return the equilibrium magnetization of one of the pools.

void set_M0(std::size_t pool, Real const &M0)#

Set the equilibrium magnetization of one of the pools.

void set_M0(Real const &M0)#

Set the equilibrium magnetization of the first pool.

Quantity const &k(std::size_t pool) const#

Return the exchange constant of one of the pools.

void set_k(std::size_t pool, Quantity const &k)#

Set the exchange constant of one of the pools.

Quantity const &delta_b() const#

Return the frequency offset of the second pool.

void set_delta_b(Quantity const &delta_b)#

Set the frequency offset of the second pool.

virtual std::size_t size() const = 0#

Return the number of states of a pool.

ArrayC state(std::size_t order) const#

Return a given state of the model, as a concatenation of (F, F*, Z) for each pool.

ArrayC states() const#

Return all states in the model, as \(\tilde{F}\), \(\tilde{F}^*\), and \(\tilde{Z}\) for each order and each pool.

Quantity elapsed() const#

Return the elapsed time.

Complex const &echo(std::size_t pool = 0) const#

Return the echo signal, i.e. \(F_0\).

void apply_pulse(Quantity const &angle, Quantity const &phase = 0 * units::rad)#

Apply an RF hard pulse to a single-pool model.

void apply_pulse(Quantity const &angle_a, Quantity const &phase_a, Quantity const &angle_b, Quantity const &phase_b)#

Apply an RF hard pulse to an two-pools exchange model.

void apply_pulse(Quantity const &angle_a, Quantity const &phase_a, Real saturation)#

Apply an RF pulse to an two-pools magnetization transfer model.

void relaxation(Quantity const &duration)#

Simulate the relaxation during given duration.

void off_resonance(Quantity const &duration)#

Simulate field- and species-related off-resonance effects during given duration with given frequency offset.

Public Members

Quantity delta_omega = 0 * units::Hz#

Frequency offset of the simulator.

Real threshold = 0#

Threshold used to cull states with low population.