QuadrantGate Class
- class flowkit.gates.QuadrantGate(gate_name, dividers, quadrants)
Represents a GatingML Quadrant Gate.
A QuadrantGate must have at least 1 divider, and must specify the labels of the resulting quadrants the dividers produce. Quadrant gates are different from other gate types in that they are actually a collection of gates (quadrants), though even the term quadrant is misleading as they can divide a plane into more than 4 sections.
Note: Only specific quadrants may be referenced as parent gates or as a component of a Boolean gate. If a QuadrantGate has a parent, then the parent gate is applicable to all quadrants in the QuadrantGate.
Create a QuadrantGate instance.
- Parameters:
gate_name – text string for the name of the gate
dividers – a list of QuadrantDivider instances
quadrants – a list of Quadrant instances
- apply(df_events)
Apply gate to events in given pandas DataFrame. The given DataFrame must have columns matching the QuadrantDivider dimension_ref for the QuadrantDivider instances defined for the gate.
- Parameters:
df_events – pandas DataFrame with column labels matching QuadrantDivider dimension_ref values.
- Returns:
A dictionary where each key is a Quadrant ID and the value is a NumPy array of boolean values for each event (True is inside gate).
- get_dimension(dim_id)
Retrieve the Dimension instance given the dimension ID
- Parameters:
dim_id – Dimension ID
- Returns:
Dimension instance
- get_dimension_ids()
Retrieve all gate Dimension IDs in order
- Returns:
list of Dimension ID strings