Source code for ccpn.AnalysisMetabolomics.lib.centering

import numpy as np


[docs]def meanCenter(spectrumCluster): means = np.mean(spectrumCluster, axis=0) meanCentered = spectrumCluster - means return meanCentered
[docs]def medianCenter(spectrumCluster): medians = np.median(spectrumCluster, axis=0) medianCentered = spectrumCluster - medians return medianCentered