Robust Alignment to a Target Spectrum (RATS).
rats(
mrs_data,
ref = NULL,
xlim = c(4, 0.5),
max_shift = 20,
p_deg = 2,
sp_N = 2,
sp_deg = 3,
max_t = 0.2,
basis_type = "poly",
rescale_output = TRUE,
phase_corr = TRUE
)
MRS data to be corrected.
optional MRS data to use as a reference, the mean of all dynamics is used if this argument is not supplied.
optional frequency range to perform optimisation, set to NULL to use the full range.
maximum allowable frequency shift in Hz.
polynomial degree used for baseline modelling. Negative values disable baseline modelling.
number of spline functions, note the true number will be sp_N + sp_deg.
degree of spline functions.
truncate the FID when longer than max_t to reduce time taken, set to NULL to use the entire FID.
may be one of "poly" or "spline".
rescale the bl_matched_spec and bl output to improve consistency between dynamic scans.
apply phase correction (in addition to frequency). TRUE by default.
a list containing the corrected data; phase and shift values in units of degrees and Hz respectively.