CSM Normalise


Normalise the matrix X according to normalise_type.

Utilises the JTPnormalise function written by Jake Pearce and a bespoke

probabilistic normalisation function.

Usage

model = csm_normalise( spectra, normalise_type );

model = csm_normalise( spectra, normalise_type, 'urine_volumes', urine_volumes, 'direction', direction, 'peak', peak, 'noise_region', noise_region, 'target_spectra', target_spectra );

Arguments (* = required)

VariableTypeDefault ValueDescription
*spectracsm_spectraNonecsm_spectra object containing spectral matrix.
*normalise_typestrNone'area', 'median fold', 'peak', 'probabilistic', 'total excretion', 'noise', or 'none'.
urine_volumes1*n[]Urine volumes, required for 'total excretion'
directionstrNone'r' for rows, 'c' for columns.
peak1*1NoneWhich peak to normalise against, defaults to TSP, -0.8 to 0.8 ppm. Used in 'peak' and 'total excretion'.
noise_region1*2Nonespecify a region containing only noise to normalise to. Defaults to [-1 -0.3].
target_spectram*1NoneEither column index for which spectra in X to use, set to 0 to use median of all spectra for 'median fold' normalisation, or entire spectra vector to use as median.

Returns

VariableTypeDescription
modelobjcsm_wrapper with some stored inputs, the outputs and auditInfo.
model.output.normalised_spectracsm_nmr_spectraNormalised spectra object.
model.output.normalisation_factor1*1Normalisation factor.

Copyright Imperial College London 2019