FlowCytometer#

Classes related to the overall configuration of a flow cytometry system.

class FlowCytometer(source, scatterer_collection, flow_cell, digitizer, detectors, transimpedance_amplifier, background_power=<Quantity(0, 'milliwatt')>)[source]#

Bases: object

A simulation class for modeling flow cytometer signals, including Forward Scatter (FSC) and Side Scatter (SSC) channels.

The FlowCytometer class integrates optical and flow dynamics to simulate signal generation in a flow cytometer. It handles particle distributions, flow cell properties, laser source configurations, and detector behavior to replicate realistic cytometry conditions. This includes the generation of synthetic signal pulses for each particle event and noise modeling for accurate signal representation.

Parameters:
  • flow_cell (FlowCell) – The flow cell object representing the fluidic and optical environment through which particles travel.

  • detectors (List[Detector]) – A list of Detector objects representing the detectors used to measure optical signals (e.g., FSC and SSC). Exactly two detectors must be provided.

  • background_power (units.watt, optional) – The background optical power added to the detector signal. Defaults to 0 milliwatts.

  • source (BaseBeam)

  • scatterer_collection (object)

  • digitizer (SignalDigitizer)

  • transimpedance_amplifier (TransimpedanceAmplifier)

flow_cell#

The flow cell instance representing the system environment.

Type:

FlowCell

scatterer_collection#

A collection of particles or scatterers passing through the flow cytometer.

Type:

ScattererCollection

source#

The laser beam source providing illumination to the flow cytometer.

Type:

GaussianBeam

detectors#

The detectors used to collect and process signals from the scatterers.

Type:

List[Detector]

background_power#

The optical background power added to the detector signals.

Type:

units.watt

Raises:

AssertionError – If the number of detectors provided is not exactly two, or if both detectors share the same name.

Parameters:
  • source (BaseBeam)

  • scatterer_collection (object)

  • flow_cell (FlowCell)

  • digitizer (SignalDigitizer)

  • detectors (List[Detector])

  • transimpedance_amplifier (TransimpedanceAmplifier)

  • background_power (Quantity | None)

get_acquisition(processing_steps=[])[source]#

Simulates the generation of optical signal pulses for each particle event.

This method calculates Gaussian signal pulses based on particle positions, coupling power, and widths. It adds the generated pulses, background power, and noise components (thermal and dark current) to each detector’s raw signal.

Notes

  • Adds Gaussian pulses to each detector’s raw_signal.

  • Includes noise and background power in the simulated signals.

  • Updates detector dataframes with captured signal information.

Parameters:

processing_steps (list of SignalProcessor, optional) – List of signal processing steps to apply in order.

Returns:

The simulated acquisition experiment.

Return type:

Acquisition

Raises:

ValueError – If the scatterer collection lacks required data columns (‘Widths’, ‘Time’).

get_detector_by_name(name)[source]#

Retrieve a detector object by its name.

Parameters:

name (str) – The name of the detector to retrieve.

Returns:

The detector object corresponding to the specified name.

Return type:

Detector

prepare_acquisition(run_time, compute_cross_section=False)[source]#

Set the internal properties for run_time.

Parameters:
  • run_time (pint.Quantity) – The duration of the acquisition in seconds.

  • compute_cross_section (bool)

Return type:

DataFrame

run_processing(*processing_steps)[source]#
Return type:

None