MRSuite/wand-ismrm2016
Decomposes a spectrum into its metabolites, baseline and artifacts in the wavelet domain.
An MRSuite model, mrsuite.models.wand.WAND. Paper: https://doi.org/10.1002/nbm.70038
Use
import mrsuite.models
model = mrsuite.models.load("MRSuite/wand-ismrm2016")
results = model(data) # one spectrum as NIfTI-MRS, or a batch as NIfTI-MRS+
It runs as a step in any MRSuite pipeline, and each result's provenance records its exact
weights (SHA-256 635e74f89a9b6a33ea4fc757005f84c3986284d86f2e00334a111fd125f41107).
It takes single spectra acquired as its training data, and refuses others:
| Acquisition | |
|---|---|
| Bandwidth [Hz] | 4000.0 |
| Centre [ppm] | 4.65 |
| Spectrometer frequency [MHz] | 123.22 |
| Points | 2048 |
Training
{
"model": "mrsuite.models.wand.WAND",
"checkpoint": {
"path": "data/checkpoints/wand/epoch=0-step=1195264.ckpt",
"sha256": "182bf931ba58485465f5296aa31ef9a59bd84f0f01b23b4b8002239a7a87d642"
},
"job": {
"model": "wand",
"basis": "data/2016_fitting_challenge/basisset_JMRUI",
"specType": "synth",
"arch": "unet",
"dataType": "norm_rw_p"
},
"converted with": {
"wand-for-mrs": "2642659"
},
"run": {
"id": "sskt2pvt",
"settings": {
"arch": "unet",
"basisFmt": "",
"batch": 16,
"check_val_every_n_epoch": null,
"dataType": "norm_rw_p",
"device": "cuda:3",
"dropout": 0,
"gpu_selection": 3,
"l1_reg": 0,
"l2_reg": 0,
"learning": 0.0001,
"load_model": false,
"loss": "mse",
"max_epochs": -1,
"max_steps": -1,
"model": "nn",
"num_workers": 4,
"path2basis": "../Data/BasisSets/ISMRM_challenge/basisset_JMRUI/",
"path2trained": "",
"shuffle": true,
"skip_train": false,
"specType": "synth",
"trueBatch": 16,
"val_check_interval": 256,
"val_size": 1024
},
"W&B (added)": {
"started": "2024-07-10T15:48:49.107867",
"host": "EEMATLAB-OP02",
"program": "sweep.py",
"stopped at step": 1271899,
"runtime [s]": 676609,
"checkpoint": "step 1195264, the lowest validation loss (ModelCheckpoint(monitor='val_loss'), train.py)"
}
}
}
Training data
How the training spectra were made, reported as the MRSsynMRS minimum standard for synthetic
MRS data asks (LaMaster et al., arXiv 2602.23463). The full recipe is in recipe.json.
| MRSsynMRS | Value |
|---|---|
| Experiment | |
| ID | WAND-for-MRS dataType 'norm_rw_p' (normParamsRWP, normConcs), run sskt2pvt |
| Nucleus | 1H |
| Note (added) | the training-time code (forStudents/Code, 2024-07-10) draws the data as WAND-for-MRS 2642659 does: the same normParamsRWP and normConcs ranges for every basis function, simulation.py identical, SynthDataModule and the random walk and peaks unchanged |
| Software | |
| Basis Set Simulation | |
| Name | ISMRM 2016 MRS fitting challenge basis set, jMRUI (basisset_JMRUI): density-matrix simulation in MATLAB with ideal pulses, PRESS TE 30 ms (TE1 11 ms, TE2 19 ms), from measured and published chemical shifts and J-couplings (MarjaΕska et al., Magn Reson Med 2021, doi:10.1002/mrm.28942) |
| Repository (Link, DOI, or RRID) | https://github.com/wtclarke/mrs_fitting_challenge, doi:10.1002/mrm.28942 |
| Signal Model | |
| Name | VoigtModel (simulation/sigModels.py): each basis FID times exp(-(1jeps + gamma + sigma^2t)t), FFT, times its amplitude and exp(-1j(phi0 + phi1*f)), plus a polynomial baseline |
| Repository (Link, DOI, or RRID) | https://github.com/julianmer/WAND-for-MRS (2642659), doi:10.1002/nbm.70038 |
| Additional Code | |
| Name | simulation/simulation.py, simulation/dataModules.py (SynthDataModule.get_batch), utils/components.py; FSL-MRS reads the basis |
| Repository (Link, DOI, or RRID) | https://github.com/julianmer/WAND-for-MRS (2642659) |
| Purpose | draws the parameters and adds the noise and any random walk and random peaks; simulated online, fresh spectra for every training batch |
| Pulse Sequence | |
| Field Strength [T] | 2.89 |
| Localization | PRESS (TE1 11 ms, TE2 19 ms) |
| Spectral Width [Hz] | 4000 |
| Number of Points | 2048 |
| Voxel Size (X, Y, Z) [mm] | β |
| Sequence Timing(s) | |
| Repetition Time(s) [ms] | TR >> T1 (no T1 weighting) |
| Echo Time(s) [ms] | 30 |
| Mixing Time(s) [ms] | β |
| Inversion Time(s) [ms] | β |
| Water Suppression | |
| Method | β |
| Bandwidth(s) [Hz] | β |
| Shimming Method | β |
| Radio Frequency Pulse(s) | |
| Shape | ideal |
| Duration(s) | β |
| Delay(s) | β |
| Slice-Select Gradients | |
| Shape | β |
| Duration(s) | β |
| Delay(s) | β |
| Crusher/Rephasing Gradients | |
| Shape | β |
| Duration(s) | β |
| Delay(s) | β |
| Editing | |
| Type of editing | none |
| Number of subexperiments | 1 |
| Editing bands per subexperiment | β |
| Metabolites | |
| Population | |
| Age Range | β |
| Sex | β |
| Healthy included | β |
| Clinical included | β |
| Region of interest | β |
| Distribution | uniform: each parameter drawn independently and uniformly over its [low, high] (numpy.random.uniform) |
| Component dropout probability | 0 |
| Units | a.u.: the amplitude multiplying each basis FID as FSL-MRS reads the jMRUI files, not rescaled (a singlet's |FID(0)| is its number of protons, plus 0.1 from a reference peak at 0 ppm); not mM |
| Sources of Parameter Values | |
| Concentration Ranges (Link or DOI) | de Graaf, In Vivo NMR Spectroscopy, 3rd ed. (2019), per the original's comment on normConcs (simulation/simulationDefs.py); Mac's range assumed |
| T2 Relaxation Ranges (Link or DOI) | β |
| T1 Relaxation Ranges (Link or DOI) | β |
| Concentration Ranges | |
| Ace | 0 β 0.5 |
| Ala | 0.1 β 1.6 |
| Asc | 0.4 β 1.7 |
| Asp | 1 β 2 |
| Cr | 4.5 β 10.5 |
| GABA | 1 β 2 |
| GPC | 0.4 β 1.7 |
| GSH | 1.7 β 3 |
| Glc | 1 β 2 |
| Gln | 3 β 6 |
| Glu | 6 β 12.5 |
| Gly | 0.2 β 1 |
| Ins | 4 β 9 |
| Lac | 0.2 β 1 |
| Mac | 0 β 10 |
| NAA | 7.5 β 12 |
| NAAG | 0.5 β 2.5 |
| PCho | 0.2 β 1 |
| PCr | 3 β 5.5 |
| PE | 1 β 2 |
| Tau | 3 β 6 |
| sIns | 0.2 β 0.5 |
| T2 Relaxation Ranges | not per metabolite: one Lorentzian decay for all basis functions, exp(-gamma*t) with gamma in [2, 15] 1/s (1/gamma 66.67-500 ms, FWHM gamma/pi 0.6366-4.775 Hz), on top of each basis function's own linewidth |
| T1 Relaxation Ranges | not applied |
| Metabolite-Level Frequency Shifts | not applied: one global shift (see Artifacts) |
| Components | |
| Number Spectral Averages | 1 |
| Number of Acquisitions per Excitation | 1 |
| Dynamic Experiment | |
| Diffusion B-values | β |
| Diffusion Model (Name, DOI) | β |
| fMRS Target Metabolites and Percent Changes | β |
| Macromolecule | |
| Available in Isolation | yes |
| Simulated, Modeled, Experimental, or Mixture | Modeled from experimental data: a fit of the cohort-average metabolite-nulled spectrum, 2DJ PRESS (TE 25, 30 and 35 ms, inversion time 900 ms) in occipital grey matter (MarjaΕska et al., Magn Reson Med 2021, doi:10.1002/mrm.28942); a basis function sampled like the metabolites |
| Description | Mac |
| Spectral Baseline - nonMMBG | |
| Model Used (Equation, Description, or DOI) | second-order polynomial added to the frequency-domain spectrum, real and imaginary parts separately: coefficients of 1, x and x^2 (less its mean), x from -1 to 1 across the model's input window 0.60-4.45 ppm, zero outside it; a coefficient is its term's amplitude in a.u. |
| Available in Isolation | yes |
| Applied | yes |
| If Analytical, Parameter Ranges (added) | |
| Re 1 | -60 β 20 |
| Im 1 | -80 β 30 |
| Re x | -100 β 60 |
| Im x | -60 β 100 |
| Re x^2 | -160 β 20 |
| Im x^2 | -40 β 100 |
| Noise | |
| Available in Isolation | no |
| Distribution | additive complex Gaussian in the frequency domain (on the unnormalised FFT spectrum), real and imaginary parts independent; returned only summed with the random walk and random peaks |
| Amplitude Scaling | |
| std of each of the real and imaginary parts, a.u., fixed | 353.553 |
| B0 Map | |
| B0 Map Model Used | β |
| Available in Isolation | β |
| Applied | no |
| Tissue Segmentation | |
| Brain Map Model Used | β |
| Voxel Percentage(s) | β |
| Applied | no |
| Artifacts | |
| Zero-Order Phase | |
| Phase Range | |
| rad, as exp(-1j*phi0) | -0.2 β 0.2 |
| deg | -11.46 β 11.46 |
| Applied | yes |
| First-Order Phase | |
| Phase Range | |
| rad/Hz, as exp(-1jphi1f) | -1e-05 β 1e-05 |
| deg/ppm | -0.0706 β 0.0706 |
| Amplitude Range | β |
| PPM Reference [ppm] | -11.58 |
| Applied | yes |
| Frequency Shifts - Global | |
| Frequency Shift Range | |
| rad/s, as exp(-1jepst) | -5 β 5 |
| Hz | -0.7958 β 0.7958 |
| ppm | -0.006458 β 0.006458 |
| Applied | yes |
| Residual Water | |
| Model Used (Equation, Description, or DOI) | β |
| If Analytical, Parameter Ranges | β |
| Available in Isolation | β |
| Applied | no |
| Chemical Shift [ppm] | β |
| Number of Subcomponents | β |
| Amplitude Scaling [a.u.] | β |
| Unsuppressed Water | |
| Model Used (Equation, Description, or DOI) | β |
| Available in Isolation | β |
| Applied | no |
| Lipid | |
| Model Used (Equation, Description, or DOI) | β |
| Available in Isolation | β |
| Applied | no |
| Eddy Currents | |
| Model Used (Equation, Description, or DOI) | β |
| If Analytical, Parameter Ranges | β |
| Available in Isolation | β |
| Applied | no |
| Out-of-Voxel | |
| Model Used (Equation, Description, or DOI) | β |
| If Analytical, Parameter Ranges | β |
| Available in Isolation | β |
| Applied | no |
| Motion | |
| Model Used (Equation, Description, or DOI) | β |
| If Analytical, Parameter Ranges | β |
| Available in Isolation | β |
| Applied | no |
| Random Walk (added) | |
| Model Used (Equation, Description, or DOI) | smoothed random walk added to the whole frequency-domain spectrum, real and imaginary parts drawn independently (utils/components.py randomWalk): starts uniform in [low, high], Gaussian steps of std 'scale', a step that would leave [low, high] is reversed, then a moving average over 'smooth' points |
| If Analytical, Parameter Ranges | |
| scale (step std), a.u. | 0 β 1000 |
| smooth (moving-average window), points | 1 β 1000 |
| low limit, a.u. | -10000 β 0 |
| high limit, a.u. | 0 β 10000 |
| Available in Isolation | no |
| Applied | yes |
| Random Peaks (added) | |
| Model Used (Equation, Description, or DOI) | Gaussian peaks added to the whole frequency-domain spectrum at uniformly random points (utils/components.py randomPeak): real part a Gaussian, imaginary part its Hilbert transform, times exp(-1j*phase) |
| If Analytical, Parameter Ranges | |
| count per spectrum | 0 β 4 |
| amplitude, a.u. | 0 β 60000 |
| width (Gaussian std), points | 0 β 100 |
| width (Gaussian std), Hz | 0 β 195.3 |
| phase, rad | 0 β 6.28319 |
| Available in Isolation | no |
| Applied | yes |
| Data Quality | |
| Signal Noise Ratio Range [a.u.] | |
| Range | 16.1 β 44.3 |
| Metabolite-level SNRs recorded | no |
| Definition of SNR used | maximum of the real part of the noise-free spectrum (no phases, baseline or artifacts) in 1.9-2.1 ppm, the NAA singlet, over the standard deviation of the noise's real part; 1st-99th percentile of 2000 spectra drawn with the original code (numpy seed 0) |
| Linewidths | |
| Metabolite-level Linewidths recorded | no, per spectrum: gamma and sigma (1/s) in the returned parameters; they add FWHM gamma/pi 0.6366-4.775 Hz (Lorentzian) and 2*sqrt(ln2)*sigma/pi 1.06-7.95 Hz (Gaussian) |
| Reference Metabolite and Moiety | NAA, CH3 singlet (2.01 ppm) |
| Reference Metabolite Linewidth Range [Hz] | 3.04 β 12.34 |
Configuration
{
"acquisition": {
"bandwidth": 4000.0,
"centre": 4.65,
"frequency": 123.22,
"points": 2048
},
"baseline": true,
"batch_statistics": true,
"first": 1792,
"last": 2036,
"metabolites": [
"Ace",
"Ala",
"Asc",
"Asp",
"Cr",
"GABA",
"GPC",
"GSH",
"Glc",
"Gln",
"Glu",
"Gly",
"Ins",
"Lac",
"Mac",
"NAA",
"NAAG",
"PCho",
"PCr",
"PE",
"Tau",
"sIns"
],
"model": "mrsuite.models.wand.WAND",
"nuisance": [],
"weights": null,
"zero_fill": 1
}
- Downloads last month
- 227
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support