Metadata-Version: 2.1
Name: FlowCytometry
Version: 0.0.3.post0
Summary: A package for flow-cytometry simulations.
Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
License: MIT License
        
        Copyright (c) 2020 Martin de Sivry
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Keywords: refracive index,optics
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Development Status :: 3 - Alpha
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Science/Research
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: pydantic>=2.6.3
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: MPSPlots
Provides-Extra: documentation
Requires-Dist: numpydoc==1.8.0; extra == "documentation"
Requires-Dist: sphinx>=5.1.1; extra == "documentation"
Requires-Dist: sphinx-gallery==0.17.1; extra == "documentation"
Requires-Dist: sphinx-rtd-theme==2.0.0; extra == "documentation"
Requires-Dist: pydata-sphinx-theme==0.15.4; extra == "documentation"
Provides-Extra: testing
Requires-Dist: pytest>=0.6; extra == "testing"
Requires-Dist: pytest-cov>=2.0; extra == "testing"
Requires-Dist: pytest-json-report==1.5.0; extra == "testing"
Requires-Dist: mypy>=0.910; extra == "testing"
Requires-Dist: flake8>=3.9; extra == "testing"
Requires-Dist: tox>=3.24; extra == "testing"
Requires-Dist: coverage==6.5.0; extra == "testing"

FlowCytometer Simulation Tool
=============================

|python| |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:

.. code-block:: bash

    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.


.. code-block:: python

    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|

.. |python| image:: https://img.shields.io/pypi/pyversions/flowcytometry.svg
   :target: https://www.python.org/

.. |example_fcm| image:: https://github.com/MartinPdeS/FlowCytometry/blob/master/docs/images/example_signal_FCM.png

.. |coverage| image:: https://raw.githubusercontent.com/MartinPdeS/FlowCytometry/python-coverage-comment-action-data/badge.svg
   :alt: Unittest coverage
   :target: https://htmlpreview.github.io/?https://github.com/MartinPdeS/FlowCytometry/blob/python-coverage-comment-action-data/htmlcov/index.html

.. |PyPi| image:: https://badge.fury.io/py/FlowCytometry.svg
    :target: https://badge.fury.io/py/FlowCytometry

.. |PyPi_download| image:: https://img.shields.io/pypi/dm/FlowCytometry.svg
    :target: https://pypistats.org/packages/flowcytometry

.. |docs| image:: https://readthedocs.org/projects/flowcytometry/badge/?version=latest
    :target: https://flowcytometry.readthedocs.io/en/latest/
