-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
If people are doing diagonal gates, it would be great to actually do said diagonal gates in Python.
Inspired by matplotlib.pyplot.axline, the easiest way to do this in log space would be to let the user specify two points on the line to compute the diagonal line.
The signature of such a function would be
# in rd.flow
def diagonal_gate(df: pd.DataFrame, x_col: str, y_col: str, xy1: Tuple[float,float], xy2: Tuple[float,float]) -> pd.Series:
# Computes if, in log space, each row in the data frame is above or below the line. The returned series is just
# a series of booleans so you can use it for slicing
passYou would use it like
df = df[rd.flow.diagonal_gate(df, 'FSC-A', 'mGL-A', (250, 250), (2500, 1000))]Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request