Amplifier#

This module defines the analog signal amplification components used in flow cytometry simulations. Amplifiers convert weak photo-currents (from photodetectors) into measurable voltages prior to digitization.

In FlowCyPy, the primary amplification model is the transimpedance amplifier (TIA), which applies a configurable gain and bandwidth to the input signal. It also supports optional voltage and current noise sources to simulate realistic analog front-end behavior.

Available Amplifier#

class TransimpedanceAmplifier(gain, bandwidth, voltage_noise_density=<Quantity(0.0, 'volt / sqrt_hertz')>, current_noise_density=<Quantity(0.0, 'ampere / sqrt_hertz')>)[source]#

Bases: object

Represents a transimpedance amplifier (TIA) used to convert photocurrent signals into voltage.

This model simulates a TIA with a specified gain and bandwidth while incorporating input-referred noise sources. Both voltage (thermal) noise and current noise are modeled to account for the effects these factors have on the overall signal-to-noise ratio in photodetection systems, particularly in low-light or high-sensitivity applications.

Parameters:
  • gain (Quantity) – The amplifier gain in ohms (Ω), which sets the conversion factor from photocurrent to voltage. Typical values range from 1e3 Ω to 1e7 Ω, depending on the detector type (e.g., photomultiplier tubes or photodiodes).

  • bandwidth (Quantity) – The -3 dB bandwidth of the amplifier in Hertz (Hz). This defines the frequency range over which the amplifier effectively converts current to voltage.

  • voltage_noise_density (Quantity) – The input-referred voltage noise spectral density (in V/√Hz). Typical values are in the range of 1 nV/√Hz to 10 nV/√Hz.

  • current_noise_density (Quantity) – The input-referred current noise spectral density (in A/√Hz). Typical values are on the order of 2 fA/√Hz to 20 fA/√Hz.

gain#

The amplifier gain (Ω) used to convert photocurrent into voltage.

Type:

Quantity

bandwidth#

The -3 dB frequency bandwidth (Hz) of the amplifier.

Type:

Quantity

voltage_noise_density#

The spectral density of voltage noise at the amplifier input (V/√Hz).

Type:

Quantity

current_noise_density#

The spectral density of current noise at the amplifier input (A/√Hz).

Type:

Quantity

Notes

In applications such as flow cytometry or low-light detection, the noise characteristics of the TIA play a crucial role in determining the overall sensitivity and performance of the detection system. This model allows simulation of how the gain and noise parameters affect the output voltage and the signal-to-noise ratio.

A transimpedance amplifier (TIA) model that transforms photocurrent into voltage signals using a configurable gain, bandwidth, and optional noise sources. The TIA is applied to each detector channel and is responsible for setting the signal’s final amplitude and frequency content before digitization.

amplify(signal_generator, sampling_rate)[source]#

Amplifies the input signal from a detector using the transimpedance amplifier’s gain. The noise is added after the amplification.

Parameters:
  • signal_generator (object) – An instance of a signal generator that provides the input signal to be amplified.

  • sampling_rate (units.Quantity) – The sampling rate of the signal generator, used for filtering and noise calculations.

Raises:

ValueError – If the signal generator does not have a method to get the signal for the specified detector.

Notes

This method retrieves the signal from the specified detector, applies the amplifier’s gain, and adds noise if enabled in the SimulationSettings. It also applies a low-pass Butterworth filter to the amplified signal if a bandwidth is specified. The filter is applied using the apply_butterworth_lowpass_filter_to_signal method of the signal generator.

bandwidth: Quantity#
current_noise_density: Quantity = <Quantity(0.0, 'ampere / sqrt_hertz')>#
property current_rms_noise: Quantity#

Total RMS current noise (converted to voltage via gain).

gain: Quantity#
property total_output_noise: Quantity#

Total RMS output noise (in volts) from both voltage and current contributions.

voltage_noise_density: Quantity = <Quantity(0.0, 'volt / sqrt_hertz')>#
property voltage_rms_noise: Quantity#

Total RMS voltage noise introduced by the amplifier over its bandwidth.

Usage Example#

from FlowCyPy.amplifier import TransimpedanceAmplifier
import FlowCyPy.units as units

amplifier = TransimpedanceAmplifier(
    gain=10 * units.volt / units.ampere,
    bandwidth=10 * units.megahertz,
    voltage_noise_density=0.1 * units.nanovolt / units.sqrt_hertz,
    current_noise_density=0.2 * units.femtoampere / units.sqrt_hertz
)

opto_electronics = OptoElectronics(
    detectors=[...],
    source=...,
    amplifier=amplifier
)