calour.experiment.Experiment.rescale

Experiment.rescale(total=10000, axis=0, inplace=False)[source]

Rescale the data to mean sum of all samples (axis=0) or features (axis=1) to be total.

This function rescales by multiplying ALL entries in exp.data by same number.

Parameters:
  • total (float) – the mean sum (along axis) to normalize to
  • axis (0, 1, 's', or 'f', optional) – the axis to normalize. 0 or ‘s’ (default) is normalize each sample; 1 or ‘f’ to normalize each feature
  • inplace (bool, optional) – False (default) to create a copy, True to replace values in exp
Returns:

the normalized experiment

Return type:

Experiment