Functions and classes

Simulation

class cest.Species

Chemical species

cest.bm(*args, **kwargs)

Overloaded function.

  1. bm(species_a: cest._cest.Species, species_b: cest._cest.Species, Cb: float, w0: float, delta_w_rf: float, w1: float, step: float) -> numpy.ndarray[numpy.float64[7, 7]]

Two-pools Bloch-McConnell transition matrix between two pools A and B, using projective coordinates

  1. bm(species_a: cest._cest.Species, species_b: cest._cest.Species, Cb: float, w0: float, delta_w_rf: float, w1: float, step: float, M0: numpy.ndarray[numpy.float64[6, 1]]) -> numpy.ndarray[numpy.float64[6, 1]]

Two-pools Bloch-McConnell simulation

  1. bm(species_a: cest._cest.Species, species_b: cest._cest.Species, Cb: float, w0: float, delta_w_rf: float, w1: numpy.ndarray[numpy.float64[m, 1]], step: float, M0: numpy.ndarray[numpy.float64[7, 1]]) -> numpy.ndarray[numpy.float64[7, 1]]

Two-pools Bloch-McConnel simulation of a shaped pulse

  1. bm(species_a: cest._cest.Species, species_b: cest._cest.Species, Cb: float, w0: float, delta_w_rf: float, w1: numpy.ndarray[numpy.float64[m, 1]], step: float, M0: numpy.ndarray[numpy.float64[6, 1]]) -> numpy.ndarray[numpy.float64[6, 1]]

Two-pools Bloch-McConnel simulation of a shaped pulse

Pulses

cest.pulses.block(steps)
cest.pulses.gaussian(steps, sigma=1, x_max=3.5)
cest.pulses.sech(steps, x_max=10)
cest.pulses.train(pulse, count, gap_steps)

Post-processing

class cest.wassr(image, meta_data, wassr, delta_ppm=0.001, ppm_range=None)

Compute a Z-spectrum shift map using the WASSR method.

Parameters:
  • image (path_like) – Path to the source Z-spectrum image

  • meta_data (path_like) – Path to the meta-data related to the source image

  • wassr (path_like) – Path to the target WASSR map

  • delta_ppm (float, optional) – Interpolation step

  • ppm_range (pair_of_floats, optional) – Range over which to interpolate the Z-spectrum, defaults to full range defined by meta-data.

References

Water saturation shift referencing (WASSR) for chemical exchange saturation transfer (CEST) experiments, Kim et al., Magnetic Resonance in Medicine 61(6), 2009. doi:10.1002/mrm.21873.

class cest.shift_spectrum(image, meta_data, B0, shifted)

Shift a Z-spectrum as described in the WASSR method.

Parameters:
  • image (path_like) – Path to the source Z-spectrum image

  • meta_data (path_like) – Path to the meta-data related to the source image

  • B0 (path_like) – Path to the frequency shift map

  • shifted (path_like) – Path to the target shifted Z-spectrum

References

Water saturation shift referencing (WASSR) for chemical exchange saturation transfer (CEST) experiments, Kim et al., Magnetic Resonance in Medicine 61(6), 2009. doi:10.1002/mrm.21873.

class cest.refine(z_spectrum, meta_data, ppms, refined)

Interpolate a Z-spectrum.

Parameters:
  • z_spectrum (path_like) – Path to the source Z-spectrum image

  • meta_data (path_like) – Path to the meta-data related to the source image

  • ppms (array_like) – Target frequencies

  • refined (path_like) – Path to the target interpolated Z-spectrum

cest.mtr(z_spectrum, ppms, mtr=None, normalization='normref')

Compute an MTR map.

Parameters:
  • z_spectrum (path-like or image or array) – Source Z-spectrum data. It must be path-like if used as a task, otherwise it may be a nibabel image or a numpy array.

  • ppms (path-like or array) – PPM values of the z-spectrum. If path-like, the values will be loaded from the path. The PPM values must be symmetric with respect to 0.

  • mtr (path-like, optional) – Path to the target MTR image. It is optional only when used as a function.

  • normalization (string, optional) – Normalization method, must be one of asym, normref (default value), pcm, rex

Returns:

MTR data, only applicable when used as a function.

Return type:

array or image

References

Inverse Z-spectrum analysis for spillover-, MT-, and T1-corrected steady-state pulsed CEST-MRI – application to pH-weighted MRI of acute stroke. Zaiss et al. NMR in Biomedicine 27(3), 2014. doi:10.1002/nbm.3054.

class cest.utils.get_ppm(path)

Return the frequency offsets as PPM from the meta-data.

Parameters:

path (path_like) – Path to the meta-data