dcnum.feat.gate
Feature gating
Classes
Gate feature data |
Module Contents
- class dcnum.feat.gate.Gate(data, *, online_gates: bool = False, size_thresh_mask: int | None = None)[source]
Gate feature data
- Parameters:
data (.hdf5_data.HDF5Data) – dcnum data instance
online_gates (bool) – set to True to enable gating with “online” gates stored in the input file; online gates are applied in real-time deformability cytometry before writing data to disk during a measurement
size_thresh_mask (int) – Only masks with more pixels than
size_thresh_maskare considered to be a valid event; Originally, thebin area min / trig_threshvalue defaulted to 200 which is too large; defaults to 10 or the original value in caseonline_gatesis set.
- _default_size_thresh_mask = 10
the default value for size_thresh_mask if not given as kwarg
- box_gates
box gating (value range for each feature)
- kwargs
gating keyword arguments
- property features
Sorted list of feature gates defined
- get_ppid()[source]
Return a unique gating pipeline identifier
The pipeline identifier is universally applicable and must be backwards-compatible (future versions of dcnum will correctly acknowledge the ID).
The gating pipeline ID is defined as:
KEY:KW_GATE
Where KEY is e.g. “online_gates”, and KW_GATE is the corresponding value, e.g.:
online_gates=True^size_thresh_mask=5
- classmethod get_ppid_from_ppkw(kwargs)[source]
return full pipeline identifier from the given keywords
- gate_feature(feat: str, data: numbers.Number | numpy.ndarray)[source]
Return boolean indicating whether data value is in box gate
datamay be a number or an array. If no box filter is defined forfeat, True is always returned. Otherwise, either a boolean or a boolean array is returned, depending on the type ofdata. Not thatnp.logical_andcan deal with mixed argument types (scalar and array).