transforms Module
Various transforms for FCS data
- flowutils.transforms.logicle(data, channel_indices, t=262144, m=4.5, w=0.5, a=0)
Logicle transformation, implemented as defined in the GatingML 2.0 specification:
logicle(x, T, W, M, A) = root(B(y, T, W, M, A) − x)
where B is a modified bi-exponential function defined as:
B(y, T, W, M, A) = ae^(by) − ce^(−dy) − f
The Logicle transformation was originally defined in the publication:
Moore WA and Parks DR. Update for the logicle data scale including operational code implementations. Cytometry A., 2012:81A(4):273–277.
- Parameters:
data – NumPy array of FCS event data. If a 1-D array, channel_indices option is ignored
channel_indices – channel indices to transform (other channels returned in place, untransformed). If None, then all events will be transformed.
t – parameter for the top of the linear scale (e.g. 262144)
m – parameter for the number of decades the true logarithmic scale approaches at the high end of the scale
w – parameter for the approximate number of decades in the linear region
a – parameter for the additional number of negative decades
- Returns:
NumPy array of transformed events
- flowutils.transforms.logicle_inverse(data, channel_indices, t=262144, m=4.5, w=0.5, a=0)
Inverse of the Logicle transformation (see logicle() documentation for more details)
- Parameters:
data – NumPy array of FCS event data. If a 1-D array, channel_indices option is ignored
channel_indices – channel indices to transform (other channels returned in place, untransformed). If None, then all events will be transformed.
t – parameter for the top of the linear scale (e.g. 262144)
m – parameter for the number of decades the true logarithmic scale approaches at the high end of the scale
w – parameter for the approximate number of decades in the linear region
a – parameter for the additional number of negative decades
- Returns:
NumPy array of transformed events
- flowutils.transforms.hyperlog(data, channel_indices, t=262144, m=4.5, w=0.5, a=0)
Hyperlog transformation, implemented as defined in the GatingML 2.0 specification:
hyperlog(x, T, W, M, A) = root(EH(y, T, W, M, A) − x)
where EH is defined as:
EH(y, T, W, M, A) = ae^(by) + cy − f
The Hyperlog transformation was originally defined in the publication:
Bagwell CB. Hyperlog-a flexible log-like transform for negative, zero, and positive valued data. Cytometry A., 2005:64(1):34–42.
- Parameters:
data – NumPy array of FCS event data. If a 1-D array, channel_indices option is ignored
channel_indices – channel indices to transform (other channels returned in place, untransformed). If None, then all events will be transformed.
t – parameter for the top of the linear scale (e.g. 262144)
m – parameter for desired number of decades
w – parameter for the approximate number of decades in the linear region
a – parameter for the additional number of negative decades
- Returns:
NumPy array of transformed events
- flowutils.transforms.hyperlog_inverse(data, channel_indices, t=262144, m=4.5, w=0.5, a=0)
Inverse of the Hyperlog transformation, implemented as defined in the GatingML 2.0 specification (see hyperlog() documentation for more details).
- Parameters:
data – NumPy array of FCS event data. If a 1-D array, channel_indices option is ignored
channel_indices – channel indices to transform (other channels returned in place, untransformed). If None, then all events will be transformed.
t – parameter for the top of the linear scale (e.g. 262144)
m – parameter for desired number of decades
w – parameter for the approximate number of decades in the linear region
a – parameter for the additional number of negative decades
- Returns:
NumPy array of transformed events
- flowutils.transforms.asinh(data, channel_indices, t, m, a)
An implementation of the parametrized inverse hyperbolic sine function as defined in the GatingML 2.0 specification.
- Parameters:
data – NumPy array of FCS event data. If a 1-D array, channel_indices option is ignored
channel_indices – channel indices to transform (other channels returned in place, untransformed). If None, then all events will be transformed.
t – parameter specifying the top of the scale, (e.g. 262144)
m – parameter for the number of decades
a – parameter for the number of additional negative decades
- Returns:
NumPy array of transformed events
- flowutils.transforms.asinh_inverse(data, channel_indices, t, m, a)
Inverse of the parametrized inverse hyperbolic sine function as defined in the GatingML 2.0 specification.
- Parameters:
data – NumPy array of FCS event data. If a 1-D array, channel_indices option is ignored
channel_indices – channel indices to transform (other channels returned in place, untransformed). If None, then all events will be transformed.
t – parameter specifying the top of the scale, (e.g. 262144)
m – parameter for the number of decades
a – parameter for the number of additional negative decades
- Returns:
NumPy array of transformed events
- flowutils.transforms.log(data, channel_indices, t, m)
Parametrized logarithmic transformation, implemented as defined in the GatingML 2.0 specification:
flog(x, T, M) = (1 / M) * log_10(x / T) + 1
- Parameters:
data – NumPy array of FCS event data. If a 1-D array, channel_indices option is ignored
channel_indices – channel indices to transform (other channels returned in place, untransformed). If None, then all events will be transformed.
t – parameter for the top of the linear scale (e.g. 262144)
m – parameter for desired number of decades
- Returns:
NumPy array of transformed events
- flowutils.transforms.log_inverse(data, channel_indices, t, m)
Inverse of logarithmic transformation
- Parameters:
data – NumPy array of FCS event data. If a 1-D array, channel_indices option is ignored
channel_indices – channel indices to transform (other channels returned in place, untransformed). If None, then all events will be transformed.
t – parameter for the top of the linear scale (e.g. 262144)
m – parameter for desired number of decades
- Returns:
NumPy array of transformed events