Different useful transforms.

Compose

Compose(*transforms)

Compose multiple transforms into one.

Examples:

>>> import spacephyml.transforms as tf
>>> transforms = tf.Compose(tf.Threshold(0,1), tf.Flatten())

Parameters:

Name Type Description Default
transforms callables)

All the transforms to compose.

()

IonDist_Transform

IonDist_Transform(norm=(-28, -17))

Bases: Compose

The default transform used in MMS1IonDistLabeled.

Parameters:

Name Type Description Default
norm tuple

The values to threshold and calculate LogNorm with.

(-28, -17)

ZScoreNorm

ZScoreNorm(mean, std)

Calculate the Z-Score norm using specified mean and std.

Threshold

Threshold(thresholds)

Threshold the sample.

LogNorm

LogNorm(normalization=None)

Log Normalize the data between a given range

Flatten

Filter for flattening the data

Log10

Calculate the log10 of all non zero values in the sample.

Roll

Roll(shift=16, axis=-3)

Perform a roll along a axis.

MoveAxis

MoveAxis(src=-1, dst=-3)

Move around the axis in the sample.

Sum

Sum(axis=-1)

Calculate the sum along specified axis.

Mean

Mean(axis=-1)

Calculate the mean along specified axis.