Common Data Structures#

Hard RF Pulse#

Defined in sycomore/Pulse.h

class Pulse#

RF pulse.

Public Functions

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

Creator.

Quantity const &angle() const#

Return the flip angle of the pulse.

void set_angle(Quantity const &q)#

Set the flip angle of the pulse.

Quantity const &phase() const#

Return the phase of the pulse.

void set_phase(Quantity const &q)#

Set the phase of the pulse.

Shaped RF Pulse#

Defined in sycomore/HardPulseApproximation.h

class HardPulseApproximation#

Small tip angle approximation of a shaped pulse.

Public Types

using Envelope = std::function<Quantity(Quantity const&)>#

Normalized envelope of the pulse as a function of time.

Public Functions

HardPulseApproximation(Pulse const &model, std::vector<Quantity> const &support, Envelope const &envelope)#

Create a shaped pulse with a flip angle equivalent to given hard pulse.

std::vector<Pulse> const &pulses() const#

Return the hard pulses approximating the shaped pulse.

Quantity const &duration() const#

Return the duration of a hard pulse.

Quantity const &phase() const#

Return the phase of the shaped pulse.

void set_phase(Quantity const &phase)#

Set the phase of the shaped pulse.

Envelopes#

HardPulseApproximation::Envelope apodized_sinc_envelope(Quantity const &t0, unsigned int N, Real alpha)#

Create an apodized sinc envelope.

HardPulseApproximation::Envelope hann_sinc_envelope(Quantity const &t0, unsigned int N)#

Create an Hann-apodized sinc envelope.

HardPulseApproximation::Envelope hamming_sinc_envelope(Quantity const &t0, unsigned int N)#

Create an Hamming-apodized sinc envelope.

HardPulseApproximation::Envelope sinc_envelope(Quantity const &t0)#

Create a sinc envelope.

Time Interval#

Defined in sycomore/TimeInterval.h

class TimeInterval#

Time interval, with or without magnetic field gradient.

Public Functions

TimeInterval()#

Default-initialize duration and gradient.

TimeInterval(Quantity const &duration, Quantity const &gradient = 0 * units::T / units::m)#

Constructor, gradient may be specified as amplitude (in T/m), area (in T/m*s) or dephasing (in rad/m).

TimeInterval(Quantity const &duration, Vector3Q const &gradient)#

Constructor, gradient may be specified as amplitude (in T/m), area (in T/m*s) or dephasing (in rad/m).

TimeInterval(TimeInterval const&) = default#
TimeInterval(TimeInterval&&) = default#
TimeInterval &operator=(TimeInterval const&) = default#
TimeInterval &operator=(TimeInterval&&) = default#
~TimeInterval() = default#
Quantity const &duration() const#

Return the duration.

void set_duration(Quantity const &q)#

Set the duration.

void set_gradient(Quantity const &q)#

Set gradient amplitude (in T/m), area (in T/m*s) or dephasing (in rad/m).

void set_gradient(Vector3Q const &a)#

Set gradient amplitude (in T/m), area (in T/m*s) or dephasing (in rad/m).

Vector3Q const &gradient_amplitude() const#

Return the gradient amplitude.

Vector3Q gradient_area() const#

Return the gradient area.

Vector3Q gradient_dephasing() const#

Return the gradient dephasing.

bool operator==(TimeInterval const &other) const#

Equality of duration and gradient.

bool operator!=(TimeInterval const &other) const#

Difference of duration or gradient.

Public Static Functions

static TimeInterval shortest(Quantity const &k, Quantity const &G_max)#

Shortest possible time interval given 1D gradient area (T/m*s) or dephasing (rad/m) and maximum gradient amplitude.

static TimeInterval shortest(Vector3Q const &k, Quantity const &G_max)#

Shortest possible time interval given 3D gradient area (T/m*s) or dephasing (rad/m) and maximum gradient amplitude.

Species#

Defined in sycomore/Species.h

class Species#

Species described by its NMR parameters.

Public Functions

Species(Quantity const &R1, Quantity const &R2)#

Create a species given relaxation rates or times.

Species(Quantity const &R1, Quantity const &R2, Quantity const &D, Quantity const &delta_omega = 0 * units::Hz)#

Create a species given relaxation rates or times, isotropic diffusion coefficient, off-resonance and weight.

Species(Quantity const &R1, Quantity const &R2, Matrix3x3Q const &D, Quantity const &delta_omega = 0 * units::Hz)#

Create a species given relaxation rates or times, diffusion tensor, off-resonance and weight.

Quantity const &R1() const#

Return the longitudinal relaxation rate.

void set_R1(Quantity const &q)#

Set the longitudinal relaxation rate or time.

Quantity const &T1() const#

Return the longitudinal relaxation time.

void set_T1(Quantity const &q)#

Set the longitudinal relaxation rate or time.

Quantity const &R2() const#

Return the transversal relaxation rate.

void set_R2(Quantity const &q)#

Set the transversal relaxation rate or time.

Quantity const &T2() const#

Return the transversal relaxation time.

void set_T2(Quantity const &q)#

Set the transversal relaxation rate or time.

Matrix3x3Q const &D() const#

Return the diffusion tensor.

void set_D(Quantity const &q)#

Set the diffusion coefficient (i.e. diagonal diffusion tensor).

void set_D(Matrix3x3Q const &q)#

Set the diffusion tensor.

Quantity const &delta_omega() const#

Return the frequency offset.

void set_delta_omega(Quantity const &q)#

Set the frequency offset.