Skip to main content

A package for flow-cytometry simulations.

Project description

python Unittest coverage

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.2.post0.tar.gz (715.6 kB view details)

Uploaded Source

Built Distribution

FlowCytometry-0.0.2.post0-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flowcytometry-0.0.2.post0.tar.gz
  • Upload date:
  • Size: 715.6 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.2.post0.tar.gz
Algorithm Hash digest
SHA256 0fb6111c7c0dc6d1d8a6fdfe272de74947d74b142e5e63fc17d7394f81d2aace
MD5 3d2e5517ed151ae15a4f07fff0ea805f
BLAKE2b-256 c98a75988829b2c7106329e9e1bf74421c80374b0a2a7e48362ecd717689aacd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for FlowCytometry-0.0.2.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 50b592fdc8df619a02a68698aa87b40cc4ed3c45a18f0e683bc5725480ba1600
MD5 215973009809145acba5aaa97fa35f19
BLAKE2b-256 0894bbc812e4b0a49713e986e4f592e59fc3fed4f447a9e009b142adaf888561

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