Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Spectroscopy Analysis Tools (spant)

R build status CRAN_Status_Badge Coverage Status


spant provides a full suite of tools to build automated analysis pipelines for Magnetic Resonance Spectroscopy (MRS) data. The following features and algorithms are included:

  • Advanced fully-automated metabolite fitting algorithm - ABfit
  • Robust retrospective frequency and phase correction - RATS
  • Flexible data types to support single voxel, dynamic and spectroscopic imaging data types.
  • Raw data import from individual coils and dynamic measurements, eg support for importing individual FIDs from Siemens TWIX formatted data.
  • Publication quality plotting.
  • Extensive set of pre-processing steps (phasing, coil-combination, zero-filling, HSVD filtering…)
  • Quantum mechanical based simulation for experimental design and basis-set generation.
  • Set of metabolite, macromolecule and lipid parameters for typical brain analyses.
  • Voxel registration to anatomical images for partial volume concentration corrections.


Download and install the latest version of R (, or with your package manager if using a recent Linux distribution, eg sudo apt install r-base.

It is also strongly recommended to install RStudio Desktop ( to provide a modern environment for interactive data analysis.

Once R and RStudio have been installed, open the RStudio application and type the following in the Console (lower left panel) to install the latest stable version of spant:

install.packages("spant", dependencies = TRUE)

Or the the development version from GitHub (requires the devtools package):

devtools::install_github("martin3141/spant", ref = "devel")


Quick introduction to the basic analysis workflow :

Short tutorials :

Function reference :

Once the spant library has been loaded with library(spant), type ?spant on the console for instructions on how to access the offline documentation. Note that offline help on the available functions can be quickly shown in RStudio using ?function_name, eg ?read_mrs.