cytoflow.operations.ratio#

Creates a new “channel” that is the ratio of the measurements in two other channels. ratio has one class:

RatioOp – applies the operation.

class cytoflow.operations.ratio.RatioOp[source]#

Bases: HasStrictTraits

Create a new “channel” from the ratio of two other channels.

name#

The operation name. Also becomes the name of the new channel.

Type:

Str

numerator#

The channel that is the numerator of the ratio.

Type:

Str

denominator#

The channel that is the denominator of the ratio.

Type:

Str

Examples

>>> ratio_op = flow.RatioOp()
>>> ratio_op.numerator = "FITC-A"
>>> ex5 = ratio_op.apply(ex4)
apply(experiment)[source]#

Applies the ratio operation to an experiment

Parameters:

experiment (Experiment) – the Experiment to which this operation is applied

Returns:

a new experiment with the new ratio channel

The new channel also has the following new metadata:

  • numeratorStr

    What was the numerator channel for the new one?

  • denominatorStr

    What was the denominator channel for the new one?

Return type:

Experiment