Normalise the matrix X according to normalise_type.
Utilises the JTPnormalise function written by Jake Pearce and a bespoke
probabilistic normalisation function.
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 );
Variable | Type | Default Value | Description |
---|---|---|---|
*spectra | csm_spectra | None | csm_spectra object containing spectral matrix. |
*normalise_type | str | None | 'area', 'median fold', 'peak', 'probabilistic', 'total excretion', 'noise', or 'none'. |
urine_volumes | 1*n | [] | Urine volumes, required for 'total excretion' |
direction | str | None | 'r' for rows, 'c' for columns. |
peak | 1*1 | None | Which peak to normalise against, defaults to TSP, -0.8 to 0.8 ppm. Used in 'peak' and 'total excretion'. |
noise_region | 1*2 | None | specify a region containing only noise to normalise to. Defaults to [-1 -0.3]. |
target_spectra | m*1 | None | Either 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. |
Variable | Type | Description |
---|---|---|
model | obj | csm_wrapper with some stored inputs, the outputs and auditInfo. |
model.output.normalised_spectra | csm_nmr_spectra | Normalised spectra object. |
model.output.normalisation_factor | 1*1 | Normalisation factor. |
Copyright Imperial College London 2019