ssfp_dictionary

Dictionary lookup of NMR parameters given bSSFP signal.

mr_utils.sim.ssfp.ssfp_dictionary.find_atom(sig, D, keys)[source]

Find params of dictionary atom closest to observed signal profile.

Parameters:
  • sig (array_like) – Signal that should match an atom of the dicionary.
  • D (array_like) – Dictionary of signals with keys being the MR parameters.
  • keys (array_like) – Keys of dictionary D, all (T1, T2, alpha) combinations.
Returns:

param_est – T1, T2, alpha estimation based on closest dictionary atom.

Return type:

tuple

mr_utils.sim.ssfp.ssfp_dictionary.get_keys(T1s, T2s, alphas)[source]

Generate matrix of params [T1, T2, alpha] to generate a dictionary.

Parameters:
  • T1s (array_like) – longitudinal relaxation values.
  • T2s (array_like) – transverse relaxation values.
  • alphas (array_like) – Flip angle values (in rad).
Returns:

keys – Valid tuples of (T1 ,T2, alpha) to simulate and lookup.

Return type:

array_like

Notes

T1, T2 are chosen to be feasible, i.e., T1 >= T2.

mr_utils.sim.ssfp.ssfp_dictionary.ssfp_dictionary(T1s, T2s, TR, alphas, df)[source]

Generate a dicionary of bSSFP profiles given parameters.

Parameters:
  • T1s (array_like) – (1D) all T1 decay constant values to simulate.
  • T2s (array_like) – (1D) all T2 decay constant values to simulate.
  • TR (float) – repetition time for bSSFP simulation.
  • alphas (array_like) – (1D) all flip angle values to simulate.
  • df (array_like) – (1D) off-resonance frequencies over which to simulate.
Returns:

  • D (array_like) – Dictionary of simulated values
  • keys (array_like) – Keys of dictionary D, all (T1, T2, alpha) combinations.

Notes

T1s,T2s,alphas should all be 1D arrays. All feasible combinations will be simulated (i.e., where T1 >= T2). The dictionary and keys are returned. Each dictionary column is the simulation over frequencies df. The keys are a list of tuples: (T1,T2,alpha).

mr_utils.sim.ssfp.ssfp_dictionary.ssfp_dictionary_for_loop(T1s, T2s, TR, alphas, df)[source]

Verification for ssfp_dictionary generation.

Parameters:
  • T1s (array_like) – (1D) all T1 decay constant values to simulate.
  • T2s (array_like) – (1D) all T2 decay constant values to simulate.
  • TR (float) – repetition time for bSSFP simulation.
  • alphas (array_like) – (1D) all flip angle values to simulate.
  • df (array_like) – (1D) off-resonance frequencies over which to simulate.
Returns:

  • D (array_like) – Dictionary of simulated values
  • keys (array_like) – Keys of dictionary D, all (T1, T2, alpha) combinations.