CESTSimulator#

class blochsim.simulators.CESTSimulator[source]#

Bases: Simulator

Chemical exchange saturation transfer (CEST) Z-spectrum by Bloch-McConnell simulation.

Per saturation offset, a train of rectangular pulses, a spoiled delay and a pi/2 read pulse, each starting from equilibrium. Free water and the exchanging pools (poolB_* to poolE_*, the Bloch-McConnell model [1]) evolve through the pulses and the delay, and the longitudinal magnetization at the read is the point of the spectrum. Each pulse starts at the phase the previous one ended at; the delays between pulses accrue none. The signal is real, with offsets on the last axis.

Parameters:
  • offsets (array-like) – Saturation offsets from the free water, in ppm.

  • field_strength (float, default=3.0) – Main field, in T; converts ppm to Hz.

  • B1sat (float, default=1.0) – Saturation pulse amplitude, in microtesla.

  • npulses (int, default=1) – Saturation pulses per offset.

  • pulse_duration (float, default=100.0) – Duration of each pulse, in ms; a whole number of dwell.

  • interpulse_delay (float, default=0.0) – Delay between pulses, in ms.

  • recovery (float, default=6.5) – Spoiled delay from the last pulse to the read, in ms.

  • dwell (float, default=0.01) – Hold time of each pulse sample, in ms.

  • states (int, default=1) – Configuration states kept; the rotating-frame pulses and spoiled delay leave nothing above order zero.

Tissue properties:
  • T1, T2 (float or array-like) – Relaxation times of the free water, in ms.

  • M0 (float or array-like, default=1.0) – Equilibrium magnetization.

  • B1 (float or array-like, default=1.0) – Transmit field, as a fraction of B1sat.

  • B0 (float or array-like, default=0.0) – Off-resonance, in Hz.

  • poolB_fraction, poolB_exchange, poolB_T1, poolB_T2, poolB_shift (float or array-like) – An exchanging pool: fraction of M0, exchange rate in Hz, T1 and T2 in ms, chemical shift from the free water in Hz. Further pools take poolC_* to poolE_*.

Notes

Corresponds to the sequence BART’s sim plays as CEST.

References

Examples

import torch
from blochsim.simulators import CESTSimulator

sequence = CESTSimulator(offsets=torch.linspace(-5.0, 5.0, 21))
spectrum = sequence.simulate(
    T1=1300.0, T2=75.0,
    poolB_fraction=0.001, poolB_exchange=1000.0, poolB_T1=1300.0,
    poolB_T2=10.0, poolB_shift=3.5 * 127.7,
)
print(spectrum.shape)
torch.Size([21])

Methods

bind

Return a copy with further arguments fixed.

describe

Return the SequenceDescription of a protocol.

evaluate

Return the longitudinal magnetization, offsets last.

from_description

Return a simulator that plays an existing description.

from_pulseq

Return a simulator over one repetition of a Pulseq sequence.

jacobian

Return the signal and its derivative with respect to tissue properties.

layout

Return one saturation train and read per offset.

played

Return the protocol arguments of layout(), arrays as torch tensors.

repetition_s

Return the duration of one repetition in seconds.

simulate

Return the recorded signal.

layout()[source]#

Return one saturation train and read per offset.

Raises:

ValueError – If a pulse is not a whole number of samples.

evaluate()[source]#

Return the longitudinal magnetization, offsets last.