Skip to main content

A package for flow-cytometry simulations.

Project description

python Unittest coverage PyPi PyPi_download docs

Overview

The FlowCytometer Simulation Tool is a Python-based simulation framework designed to replicate the operation of a flow cytometer. It generates realistic raw signals for Forward Scatter (FSC) and Side Scatter (SSC) channels, incorporating noise, baseline shifts, signal saturation, and signal discretization into a specified number of bins. This tool is highly configurable, allowing users to simulate a wide range of scenarios and analyze the resulting signals.

Features

  • Simulate Particle Events: Generate realistic FSC and SSC signals based on user-defined particle event parameters.

  • Noise and Baseline Shift: Introduce Gaussian noise and sinusoidal baseline shifts to simulate real-world conditions.

  • Signal Saturation: Apply saturation effects to replicate detector limits.

  • Signal Discretization: Discretize the continuous signal into a specified number of bins for quantized signal analysis.

  • Flexible Plotting: Visualize the simulated signals with customizable options for plotting specific channels or both together.

Installation

To install the FlowCytometer simulation tool, you can clone the repository and install the required dependencies:

git clone https://github.com/MartinPdeS/FlowCytometry.git
cd FlowCytometry
pip install .[testing]

Dependencies

  • numpy: For numerical operations and signal generation.

  • matplotlib: For plotting the simulated signals.

  • scipy: A module to generate Gaussian pulses (part of this package or an external dependency).

Getting Started

Below is a quick guide on how to get started with the FlowCytometer simulation tool.

from FlowCytometry import FlowCytometer

cytometer = FlowCytometer(
    n_events=30,
    time_points=1000,
    noise_level=30,
    baseline_shift=0.01,
    saturation_level=10_000,
    n_bins=40,
)

# Simulate the flow cytometer signals
cytometer.simulate_pulse()

# Plot the generated signals
cytometer.plot()

This produce the following figure: example_fcm

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flowcytometry-0.0.3.post0.tar.gz (715.7 kB view details)

Uploaded Source

Built Distribution

FlowCytometry-0.0.3.post0-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file flowcytometry-0.0.3.post0.tar.gz.

File metadata

  • Download URL: flowcytometry-0.0.3.post0.tar.gz
  • Upload date:
  • Size: 715.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for flowcytometry-0.0.3.post0.tar.gz
Algorithm Hash digest
SHA256 abba6411bfc76380abdd1d60afdb848dacd684456a816a50a98cacfb6b9a18b3
MD5 c9ad21cc6f321278f6e33a1c7da13f99
BLAKE2b-256 a2d1ebf596d9c9be6937496de1b46feba550f8dd19c3867cebf0e049933d02a1

See more details on using hashes here.

File details

Details for the file FlowCytometry-0.0.3.post0-py3-none-any.whl.

File metadata

File hashes

Hashes for FlowCytometry-0.0.3.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ef361b54b09784fe3fc372c8cc72f94c0fe7b0366b36c7deb0e94368279ef03
MD5 90af183ef0d2ae35ab21b07ede9cdacf
BLAKE2b-256 17f30d6437cdbaa31ac30c819ad271b4b4b00f60cc1420fafc3341d588e5cb3e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page