HEAD
All functions |
|
---|---|
Apply Arg operator to an MRS dataset. |
|
Apply Conj operator to an MRS dataset. |
|
Apply Im operator to an MRS dataset. |
|
Complex rounding function taken from complexplus package to reduce the number of spant dependencies. |
|
Apply Mod operator to an MRS dataset. |
|
Return the total number of coil elements in an MRS dataset. |
|
Return the total number of dynamic scans in an MRS dataset. |
|
Return the number of data points in an MRS dataset. |
|
Return the total number of spectra in an MRS dataset. |
|
Return the total number of acquired transients for an MRS dataset. |
|
Return the total number of x locations in an MRS dataset. |
|
Return the total number of y locations in an MRS dataset. |
|
Return the total number of z locations in an MRS dataset. |
|
Apply Re operator to an MRS dataset. |
|
Return a list of options for an ABfit analysis. |
|
Return a list of options for an ABfit analysis to maintain comparability with analyses performed with version 1.9.0 (and earlier) of spant. |
|
Simulate pulse sequence acquisition. |
|
Add noise to an mrs_data object. |
|
Add noise to an mrs_data object to match a given SNR. |
|
Align spectra to a reference frequency using a convolution based method. |
|
Apodise MRSI data in the x-y direction with a k-space filter. |
|
Combine a pair of basis set objects. |
|
Append MRS data across the coil dimension, assumes they matched across the other dimensions. |
|
Append MRS data across the dynamic dimension, assumes they matched across the other dimensions. |
|
Append multiple regressor data frames into a single data frame. |
|
Apply a function over specified array axes. |
|
Apply a function across given dimensions of a MRS data object. |
|
Simulate an RF pulse on a single spin. |
|
Convert a 7 dimensional array in into a mrs_data object. The array dimensions should be ordered as : dummy, X, Y, Z, dynamic, coil, FID. |
|
Perform zeroth-order phase correction based on the minimisation of the squared difference between the real and magnitude components of the spectrum. |
|
Back extrapolate time-domain data points using an autoregressive model. |
|
Convert a basis object to a dynamic mrs_data object. |
|
Convert a basis object to an mrs_data object - where basis signals are spread across the dynamic dimension. |
|
Generate a spline basis, slightly adapted from : "Splines, knots, and penalties", Eilers 2010. |
|
Baseline correction using the ALS method. |
|
Remove a constant baseline offset based on a reference spectral region. |
|
Apply and subtract a Gaussian smoother in the spectral domain. |
|
Fit and subtract a polynomial to each spectrum in a dataset. |
|
Fit and subtract a smoothing spline to each spectrum in a dataset. |
|
Covert a beta value in the time-domain to an equivalent linewidth in Hz: x * exp(-i * t * t * beta). |
|
Bin equally spaced spectral regions. |
|
Estimate the correlation matrix for a basis set. |
|
Estimate the CRLB for each element in a basis set. |
|
Calculate the noise correlation between coil elements. |
|
Calculate the noise standard deviation for each coil element. |
|
Calculate the efficiency of a regressor data frame. |
|
Calculate the effective dimensions of a spline smoother from lambda. |
|
Calculate the FWHM of a peak from a vector of intensity values. |
|
Perform a polynomial fit, subtract and return the standard deviation of the residuals. |
|
Calculate the sum of squares differences between two mrs_data objects. |
|
Calculate the spectral SNR. |
|
Check LCModel can be run |
|
Check the TARQUIN binary can be run |
|
Create a logical circular mask spanning the full extent of an n x n matrix. |
|
Zero all coherence orders other than the one supplied as an argument. |
|
Collapse MRS data by concatenating spectra along the dynamic dimension. |
|
Combine coil data based on the first data point of a reference signal. |
|
Combine MRSI coil data using the GLS method presented by An et al JMRI 37:1445-1450 (2013). |
|
Combine SVS coil data using the GLS method presented by An et al JMRI 37:1445-1450 (2013). |
|
Combine all fitting data points from a list of fits into a single data frame. |
|
Combine the fit result tables from a list of fit results. |
|
Combine all fitting data points into a single data frame. |
|
Combine a reference and metabolite mrs_data object. |
|
Convolve two MRS data objects. |
|
Crop |
|
Crop |
|
Crop |
|
Crop |
|
Crop |
|
Crop an MRSI dataset in the x-y direction |
|
Compute the vector cross product between vectors x and y. Adapted from http://stackoverflow.com/questions/15162741/what-is-rs-crossproduct-function |
|
Decimate an MRS signal to half the original sampling frequency by filtering in the frequency domain before down sampling. |
|
Decimate an MRS signal by filtering in the time domain before downsampling. |
|
Deconvolve two MRS data objects. |
|
Return the default number of data points in the spectral dimension. |
|
Return (and optionally modify using the input arguments) a list of the default acquisition parameters. |
|
Return the default sampling frequency in Hz. |
|
Return the default transmitter frequency in Hz. |
|
Return the default nucleus. |
|
Return the default reference value for ppm scale. |
|
A very simple DICOM reader. |
|
Apply the diff operator to an MRS dataset in the FID/spectral dimension. |
|
Downsample an MRS signal by a factor of 2 using an FFT "brick-wall" filter. |
|
Downsample an MRS signal by a factor of 2 by removing every other data point in the time-domain. Note, signals outside the new sampling frequency will be aliased. |
|
Return a time scale vector of acquisition times for a dynamic MRS scan. The first temporal scan is assigned a value of 0. |
|
Eddy current correction. |
|
Create an elliptical mask stored as a matrix of logical values. |
|
Estimate the standard deviation of the noise from a segment of an mrs_data object. |
|
Transform frequency-domain data to the time-domain. |
|
Frequency-domain convolution based filter. |
|
Apply a Gaussian smoother in the spectral domain. |
|
Search for MRS data files in a BIDS filesystem structure. |
|
Find valid MRS data files recursively from a directory path. |
|
Extract the fit amplitudes from an object of class |
|
Calculate diagnostic information for object of class |
|
Perform a fit based analysis of MRS data. |
|
Write fit results table to a csv file. |
|
Fit a T1 recovery curve, from multiple TIs, to a set of amplitudes. |
|
Fit a T1 recovery curve, from multiple TRs, to a set of amplitudes. |
|
Fit a T2 relaxation curve, from multiple TEs, to a set of amplitudes. |
|
Return the phase of the first data point in the time-domain. |
|
Perform a zeroth order phase correction based on the phase of the first data point in the time-domain. |
|
Scale the first time-domain data point in an mrs_data object. |
|
Return the sampling frequency in Hz of an MRS dataset. |
|
Apply the Fourier transform over the dynamic dimension. |
|
Perform a fft and ffshift on a vector. |
|
Perform a fft and fftshift on a matrix with each column replaced by its shifted fft. |
|
Create a two dimensional Gaussian window function stored as a matrix. |
|
Generate the F product operator. |
|
Generate the Fxy product operator with a specified phase. |
|
Generate the I product operator for a single spin. |
|
Generate baseline regressor. |
|
Generate BOLD regressors. |
|
Generate regressors by convolving a specified response function with a stimulus. |
|
Expand a regressor matrix for a group analysis. |
|
Generate impulse regressors. |
|
Generate polynomial regressors. |
|
Generate trapezoidal regressors. |
|
Return a character vector of common 1H molecules found in healthy human brain. |
|
Return a list of |
|
Return a list of |
|
Return a list of |
|
Return a list of |
|
Return a character vector of molecules included in the GE BRAINO phantom. |
|
Return a character vector of molecules included in the Gold Star Phantoms SPECTRE phantom. |
|
Get the point spread function (PSF) for a 2D phase encoded MRSI scan. |
|
Return acquisition parameters from a MRS data object. |
|
Return a subset of the input basis. |
|
Extract a subset of dynamic scans. |
|
Return even numbered dynamic scans starting from 1 (2,4,6...). |
|
Return the first half of a dynamic series. |
|
Get a data array from a fit result. |
|
Return the first time-domain data point. |
|
Generate a gaussian pulse shape. |
|
Return the first scans of a dynamic series. |
|
Print the command to run the LCModel command-line program. |
|
Extract the metabolite component from an mrs_data object. |
|
Return a character array of names that may be used with the |
|
Get a |
|
Generate an affine for nifti generation. |
|
Calculate the partial volume estimates for each voxel in a 2D MRSI dataset. |
|
Generate a MRSI VOI from an |
|
Generate a MRSI voxel from an |
|
Generate a MRSI voxel PSF from an |
|
Return odd numbered dynamic scans starting from 1 (1,3,5...). |
|
Extract the reference component from an mrs_data object. |
|
Get the indices of data points lying between two values (end > x > start). |
|
Return the second half of a dynamic series. |
|
Return a single slice from a larger MRSI dataset. |
|
Return the spin number for a given nucleus. |
|
Extract a subset of MRS data. |
|
Generate a SVS acquisition volume from an |
|
Return the last scans of a dynamic series. |
|
Return an array of amplitudes derived from fitting the initial points in the time domain and extrapolating back to t=0. |
|
Print the command to run the TARQUIN command-line program. |
|
Generate a |
|
Calculate the centre of gravity for an image containing 0 and 1's. |
|
Return the white matter, gray matter and CSF composition of a volume. |
|
Return the white matter, gray matter and CSF composition of a volume. |
|
Return a single voxel from a larger mrs dataset. |
|
Perform a GLM analysis of dynamic MRS data in the spectral domain. |
|
Perform first-level spectral GLM analysis of an fMRS dataset. |
|
Perform group-level spectral GLM analysis of an fMRS dataset. |
|
Test a group-level spectral GLM linear hypothesis. |
|
Grid shift MRSI data in the x/y dimension. |
|
Arrange spectral plots in a grid. |
|
Arrange spectral plots in a grid. |
|
HSVD of an mrs_data object. |
|
HSVD based signal filter. |
|
HSVD of a complex vector. |
|
Return the frequency scale of an MRS dataset in Hz. |
|
Perform an iffshift and ifft on a vector. |
|
Perform an ifft and ifftshift on a matrix with each column replaced by its shifted ifft. |
|
Image plot method for objects of class mrs_data. |
|
Transform 2D MRSI data to k-space in the x-y direction. |
|
Integrate a spectral region. |
|
Interleave the first and second half of a dynamic series. |
|
Invert even numbered dynamic scans starting from 1 (2,4,6...). |
|
Invert odd numbered dynamic scans starting from 1 (1,3,5...). |
|
Check if an object is defined, which is the same as being not NULL. |
|
Check if the chemical shift dimension of an MRS data object is in the frequency domain. |
|
Transform 2D MRSI data from k-space to image space in the x-y direction. |
|
Perform l2 regularisation artefact suppression. |
|
Apply line-broadening (apodisation) to MRS data or basis object. |
|
Correct linear frequency drift. |
|
Covert a linewidth in Hz to an equivalent alpha value in the time-domain ie: x * exp(-t * alpha). |
|
Covert a linewidth in Hz to an equivalent beta value in the time-domain ie: x * exp(-t * t * beta). |
|
Make a basis-set object from a directory containing LCModel formatted RAW files. |
|
Mask an MRS dataset in the dynamic dimension. |
|
Mask fit result spectra depending on a vector of bool values. |
|
Mask an MRSI dataset in the x-y direction |
|
Mask the four corners of an MRSI dataset in the x-y plane. |
|
Mask the voxels outside an elliptical region spanning the MRSI dataset in the x-y plane. |
|
Mask a 2D MRSI dataset in the x-y dimension. |
|
Convert a matrix (with spectral points in the column dimension and dynamics in the row dimensions) into a mrs_data object. |
|
Matrix exponential function taken from complexplus package to reduce the number of spant dependencies. |
|
Apply the max operator to an MRS dataset. |
|
Apply the max operator to an interpolated MRS dataset. |
|
Calculate the mean spectrum from an mrs_data object. |
|
Calculate the mean spectrum from an mrs_data object. |
|
Calculate the mean of adjacent dynamic scans. |
|
Calculate the pairwise means across a dynamic data set. |
|
Calculate the mean dynamic data. |
|
Return the mean of a list of mrs_data objects. |
|
Calculate the mean of adjacent blocks in a vector. |
|
Calculate the median dynamic data. |
|
Apply the Modulus operator to the time-domain MRS signal. |
|
Convert an mrs_data object to basis object - where basis signals are spread across the dynamic dimension in the MRS data. |
|
Create a BIDS file structure from a vector of MRS data paths or list of mrs_data objects. |
|
Convert mrs_data object to a matrix, with spectral points in the column dimension and dynamics in the row dimension. |
|
Convert mrs_data object to a matrix, with spectral points in the column dimension and dynamics in the row dimension. |
|
Convert mrs_data object to a vector. |
|
Perform a fftshift on a matrix, with each column replaced by its shifted result. |
|
Perform an ifftshift on a matrix, with each column replaced by its shifted result. |
|
Print fit coordinates from a single index. |
|
Flip the x data dimension order of a nifti image. This corresponds to flipping MRI data in the left-right direction, assuming the data in save in neurological format (can check with fslorient program). |
|
Export a one-page pdf of a single fit result |
|
Display an orthographic projection plot of a nifti object. |
|
Display an interactive orthographic projection plot of a nifti object. |
|
Search for the highest peak in a spectral region and return the frequency, height and FWHM. |
|
Papoulis-Gerchberg (PG) algorithm method for k-space extrapolation. |
|
Apply phasing parameters to MRS data. |
|
Corrected zero order phase and chemical shift offset in 1H MRS data from the brain. |
|
Plot the fitting results of an object of class |
|
Plotting method for objects of class mrs_data. |
|
Convenience function to plot a baseline estimate with the original data. |
|
Plot regressors as an image. |
|
Plot a 2D slice from an MRSI fit result object. |
|
Plot a 2D slice from an MRSI fit result object. |
|
Plot a slice from a 7 dimensional array. |
|
Plot an interactive slice map from a data array where voxels can be selected to display a corresponding spectrum. |
|
Plot the spectral standard deviation. |
|
Plot a volume as an image overlay. |
|
Plot a volume as an overlay on a segmented brain volume. |
|
Return the ppm scale of an MRS dataset or fit result. |
|
Save function results to file and load on subsequent calls to avoid repeat computation. |
|
Preprocess and perform quality assessment of a single SVS data set. |
|
Preprocess and perform quality assessment of one or more SVS data sets. |
|
Print a summary of an object of class |
|
Print a summary of mrs_data parameters. |
|
Get the quantum coherence matrix for a spin system. |
|
Robust Alignment to a Target Spectrum (RATS). |
|
Apply a weighting to the FID to enhance spectral resolution. |
|
Read a basis file in LCModel .basis format. |
|
Read a directory containing Siemens MRS IMA files and combine along the coil dimension. Note that the coil ID is inferred from the sorted file name and should be checked when consistency is required between two directories. |
|
Read a directory containing Siemens MRS IMA files and combine along the dynamic dimension. Note that the coil ID is inferred from the sorted file name and should be checked when consistency is required. |
|
Read an LCModel formatted coord file containing fit information. |
|
Read MRS data from a file. |
|
Read MRS data using the TARQUIN software package. |
|
Read an ASCII formatted pulse file. |
|
Read a Bruker formatted pulse file |
|
Read a .pta formatted pulse file compatible with Siemens PulseTool. |
|
Read the text format header found in Siemens IMA and TWIX data files. |
|
Reader for csv fit results generated by TARQUIN. |
|
Reader for csv results generated by TARQUIN. |
|
Reconstruct complex time-domain data from the real part of frequency-domain data. |
|
Reconstruct complex time-domain data from the real part of frequency-domain data. |
|
Reconstruct 2D MRSI data from a twix file loaded with read_mrs. |
|
Create a rectangular mask stored as a matrix of logical values. |
|
Repeat an array over a given dimension. |
|
Replicate a scan in the dynamic dimension. |
|
Replicate a scan over a given dimension. |
|
Resample a basis-set to match a mrs_data acquisition. |
|
Resample an image to match a target image space. |
|
Resample a VOI to match a target image space using nearest-neighbour interpolation. |
|
Reslice a nifti object to match the orientation of mrs data. |
|
Generate mrs_data from a table of single Lorentzian resonances. |
|
Remove a subset of dynamic scans. |
|
Apply water reference scaling to a fitting results object to yield metabolite quantities in millimolar (mM) units (mol / kg of tissue water). |
|
Apply water reference scaling to a fitting results object to yield metabolite quantities in millimolar (mM) units (mol / kg of tissue water). |
|
Apply water reference scaling to a fitting results object to yield metabolite quantities in millimolar (mM) units (mol / Litre of tissue). |
|
Convert default LCM/TARQUIN concentration scaling to molal units with partial volume correction. |
|
Scale fitted amplitudes to a ratio of signal amplitude. |
|
Scale fitted amplitudes to a ratio of signal amplitude. |
|
Scale metabolite amplitudes as a ratio to the unsuppressed water amplitude. |
|
Scale a basis object by a scalar. |
|
Scale a basis-set to be consistent with spant assumptions for water scaling. |
|
Scale an mrs_data object by a scalar or vector or amplitudes. |
|
Scale mrs_data to a spectral region. |
|
Calculate the standard deviation spectrum from an mrs_data object. |
|
Calculate the standard deviation spectrum from an mrs_data object. |
|
Return a time scale vector to match the FID of an MRS data object. |
|
CPMG style sequence with ideal pulses. |
|
MEGA-PRESS sequence with ideal localisation pulses and Gaussian shaped editing pulse. |
|
PRESS sequence with shaped refocusing pulses. |
|
PRESS sequence with ideal pulses. |
|
Simple pulse and acquire sequence with ideal pulses. |
|
sLASER sequence with ideal pulses. |
|
Spin echo sequence with ideal pulses. |
|
STEAM sequence with ideal pulses. |
|
STEAM sequence with ideal pulses and coherence order filtering to simulate gradient crushers. |
|
STEAM sequence with ideal pulses using the z-rotation gradient simulation method described by Young et al JMR 140, 146-152 (1999). |
|
Set the number of transients for an mrs_data object. |
|
Set the default acquisition parameters. |
|
Set the command to run the LCModel command-line program. |
|
Apply line-broadening to an mrs_data object to achieve a specified linewidth. |
|
Set the masked voxels in a 2D MRSI dataset to given spectrum. |
|
Set the precompute mode. |
|
Set the verbosity of the precompute function. |
|
Set the ppm reference value (eg ppm value at 0Hz). |
|
Set the number of time-domain data points, truncating or zero-filling as appropriate. |
|
Set the command to run the TARQUIN command-line program. |
|
Set the repetition time of an MRS dataset. |
|
Apply a frequency shift to MRS data. |
|
Apply frequency shifts to basis set signals. |
|
Simulate a basis set object. |
|
Simulate a basis-set suitable for 1H brain MRS analysis acquired with a PRESS sequence. Note, ideal pulses are assumed. |
|
Simulate a basis-set suitable for 1H brain MRS analysis acquired with a PRESS sequence. Note, ideal pulses are assumed. |
|
Simulate a macromolecular and lipid basis-set suitable for 1H brain MRS analysis. |
|
Simulate a basis file using TARQUIN. |
|
Simulate MRS data with a similar appearance to normal brain (by default). |
|
Simulate a |
|
Simulate an mrs_data object containing simulated Gaussian noise. |
|
Simulate a MRS data object containing a set of simulated resonances. |
|
Simulate an ideal pulse excitation profile by smoothing a top-hat function with a Gaussian. |
|
Simulate an mrs_data object containing complex zero valued samples. |
|
Smooth data across the dynamic dimension with a Gaussian kernel. |
|
Sort the basis-set elements alphabetically. |
|
spant: spectroscopy analysis tools. |
|
Simulate and fit some spectra with ABfit for benchmarking purposes. Basic timing and performance metrics will be printed. |
|
Example MEGA-PRESS data with significant B0 drift. |
|
Simulate an example fMRS dataset for a block design fMRS experiment and export a BIDS structure. |
|
Simulate a typical metabolite basis set for benchmarking. Timing metrics will be printed on completion. |
|
Decompose an mrs_data object into white and gray matter spectra. |
|
Perform a mathematical operation on a spectral region. |
|
Create a spin system object for pulse sequence simulation. |
|
Convert SPM style segmentation files to a single categorical image where the numerical values map as: 0) Other, 1) CSF, 2) GM and 3) WM. |
|
Signal space projection method for lipid suppression. |
|
Produce a plot with multiple traces. |
|
Plot the fitting results of an object of class |
|
Stackplot plotting method for objects of class mrs_data. |
|
Subtract the first dynamic spectrum from a dynamic series. |
|
Subtract the mean dynamic spectrum from a dynamic series. |
|
Subtract the median dynamic spectrum from a dynamic series. |
|
Calculate the sum across receiver coil elements. |
|
Calculate the sum of data dynamics. |
|
Sum two mrs_data objects. |
|
Return the sum of a list of mrs_data objects. |
|
Standard SVS 1H brain analysis pipeline. |
|
Standard SVS 1H brain analysis pipeline. |
|
Batch interface to the standard SVS 1H brain analysis pipeline. |
|
Perform a t-test on spectral data points. |
|
Transform time-domain data to the frequency-domain. |
|
Time-domain convolution based filter. |
|
Time-domain spectral registration. |
|
Return the echo time of an MRS dataset. |
|
Return the repetition time of an MRS dataset. |
|
Return a list of options for VARPRO based fitting with 3 free parameters. |
|
Return a list of options for a basic VARPRO analysis. |
|
Return a list of options for VARPRO based fitting. |
|
Convert a vector into a mrs_data object. |
|
Write a basis object to an LCModel .basis formatted file. |
|
Generate a basis file using TARQUIN. |
|
Write MRS data object to file. |
|
Write MRS data object to file in NIFTI format. |
|
Write an ASCII formatted pulse file. |
|
Fade a spectrum to zero by frequency domain multiplication with a tanh function. Note this operation distorts data points at the end of the FID. |
|
Zero all coherences including and above a given order. |
|
Set |
|
Zero-fill MRS data in the time domain. |
|
Zero-fill MRSI data in the k-space x-y direction. |