LorentzianSimulator#

class blochsim.simulators.LorentzianSimulator[source]#

Bases: Simulator

Z-spectrum (CEST) as equilibrium minus one Lorentzian line per pool.

Each pool saturates the water signal along a Lorentzian line centred on its own offset [1], and the lines add:

M0 (1 - sum_i A_i (W_i / 2)^2 / ((W_i / 2)^2 + (offset - shift_i)^2))

The signal is real, the water magnetization relative to M0 at each saturation offset; no Bloch-McConnell evolution is run (see CESTSimulator for that).

Parameters:
  • pools (int, default=1) – Number of Lorentzian lines; at least 1.

  • offsets (array-like) – Saturation offsets from water, in the unit of the pool widths and shifts (conventionally ppm). Passed by keyword, as for any Simulator.

  • **values – Properties or protocol arguments to fix.

Tissue properties:
  • M0 (float or array-like, default=1.0) – Water signal off saturation.

  • pool1_amplitude, pool2_amplitude, … (float or array-like) – Depth of each line, as a fraction of M0. There is one of each property below per pool, numbered from one.

  • pool1_width, pool2_width, … (float or array-like) – Full width at half maximum of each line, in the unit of offsets.

  • pool1_shift, pool2_shift, … (float or array-like) – Centre of each line, in the unit of offsets.

References

Examples

import torch
from blochsim.simulators import LorentzianSimulator

sequence = LorentzianSimulator(2, offsets=torch.linspace(-5.0, 5.0, 41))
signal = sequence.simulate(
    pool1_amplitude=0.9, pool1_width=1.5, pool1_shift=0.0,
    pool2_amplitude=0.1, pool2_width=2.0, pool2_shift=3.5,
)
print(signal.shape)
torch.Size([41])

Methods

bind

Return a copy with further arguments fixed.

describe

Return the SequenceDescription of a protocol.

evaluate

Return the closed-form signal.

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 the operators of one repetition in playing order.

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.

evaluate()[source]#

Return the closed-form signal.