Name | AMS-BP JSON |
Version |
0.0.251
JSON |
| download |
home_page | None |
Summary | Advanced Microscopy Simulations developed for the Weber Lab by Baljyot Singh Parmar |
upload_time | 2025-01-01 12:29:22 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | None |
keywords |
sms
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# AMS-BP
<p>
<img src="./docs/assets/icons/drawing.svg" alt="AMS-BP Logo" width="500" height="200">
</p>
## Advanced Fluorescence Microscopy Simulation Tool
AMS-BP is a powerful simulation tool for advanced fluorescence microscopy experiments. This guide covers both command-line usage and library integration.
> **_NOTE:_** Please note that this application DOES NOT currently model the process of stimulated emission, and as such is not suitable for simulating stimulated emission microscopy ([STED](https://en.wikipedia.org/wiki/STED_microscopy))-type experiments. Work in this area is ongoing.
## Table of Contents
- [Installation](#installation)
- [Command Line Interface](#command-line-interface)
- [Configuration File](#configuration-file)
- [Running Experiments](#running-experiments)
- [Advanced Usage](#advanced-usage)
## Installation
### ***Installing the CLI tool using UV***
1. [Install UV](https://docs.astral.sh/uv/getting-started/installation/).
2. Run the command:
```bash
uv tool install AMS_BP
```
3. You will have access to two CLI commands (using the uv interface):
- `run_AMS_BP runsim` : This is the main entry point for the simulation. (see `run_AMS_BP runsim --help` for more details)
- `run_AMS_BP config` : This is a helper tool to generate a template config file for the simulation. (see `run_AMS_BP config --help` for more details)
- Note: using `run_AMS_BP --help` will show you all the available commands.
4. You can now use these tools (they are isolated in their own env created by uv, which is cool).
### ***PyPi***
1. Run:
```bash
pip install AMS_BP
```
## Command Line Interface
AMS-BP provides a command-line interface with two main commands:
```bash
# Generate a default configuration file
run_AMS_BP config [OPTIONS]
# Run a simulation using a configuration file
run_AMS_BP runsim CONFIG_FILE
```
### Config Command Options
- `-o, --output_path PATH`: Specify the output directory for the configuration file
- `-r, --recursive_o`: Create output directory if it doesn't exist
## Configuration File
The configuration file (sim_config.toml) is divided into several key sections:
#### For a detailed description of the configuration file, refer to the [Configuration File Reference](https://joemans3.github.io/AMS_BP/API_Documentation/sim_config/).
### Basic Units
```toml
version = "0.1"
length_unit = "um" # micrometers
time_unit = "ms" # milliseconds
diffusion_unit = "um^2/s" # diffusion coefficient units
```
### Key Configuration Sections
1. **Cell Parameters**
- Define cell space dimensions
- Set cell axial radius
2. **Molecule Parameters**
- Number of molecules per type
- Tracking types (constant/fbm)
- Diffusion coefficients
- State transition probabilities
3. **Global Parameters**
- Sample plane dimensions
- Cycle count -> Exposure time + Interval time
- Exposure and interval times
4. **Fluorophore Configuration**
- Any number of fluorophores
- Any number of States per fluorophore
- Fluorophore StateType: (bright, dark, bleached) -> All States must be one of these.
- Transition parameters
- Spectral properties
5. **Optical Configuration**
- PSF parameters
- Laser settings
- Channel configuration
- Camera settings
## Running Experiments
AMS-BP supports two types of experiments:
### 1. Time Series
```toml
[experiment]
experiment_type = "time-series"
z_position = 0.0
laser_names_active = ["red", "blue"]
laser_powers_active = [0.5, 0.05]
laser_positions_active = [[5, 5, 0], [5, 5, 0]]
```
### 2. Z-Stack
```toml
[experiment]
experiment_type = "z-stack"
z_position = [-0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.2, 0.3, 0.4, 0.5]
laser_names_active = ["red", "blue"]
laser_powers_active = [0.5, 0.05]
laser_positions_active = [[5, 5, 0], [5, 5, 0]]
```
## Advanced Usage
### Using AMS-BP as a Library
For programmatic control, you can import and use AMS-BP as a Python library:
```python
from AMS_BP.configio.convertconfig import ConfigLoader
# Configuration loader intialization
config_loader = ConfigLoader(config_path="path/to/config.toml")
# Setup microscope
setup_config = config_loader.setup_microscope()
microscope = setup_config["microscope"]
config_exp = setup_config["experiment_config"]
function_exp = setup_config["experiment_func"]
# Run simulation
frames, metadata = function_exp(microscope=microscope, config=config_exp)
# Save results
from AMS_BP.configio.saving import save_config_frames
save_config_frames(metadata, frames, setup_config["base_config"].OutputParameters)
```
> A more detailed example is provided in the jupyter notebook in the examples. For starters refer to the [VisualizingIndividualModules](examples/VisualizingIndividualModules/modules_explained.ipynb). Then head over to the [laser modulation module](examples/VisualizingIndividualModules/laser_modulation.ipynb) which will show how to change the laser power over time in the simulations. Then view an example of a complex experiment setup for [FRAP](examples/QuantitativeExperiments/FRAP_methods.ipynb) which is possible by the use of compositions of modules in this simulation library.
Raw data
{
"_id": null,
"home_page": null,
"name": "AMS-BP",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "Baljyot Singh Parmar <baljyotparmar@hotmail.com>",
"keywords": "SMS",
"author": null,
"author_email": "Baljyot Singh Parmar <baljyotparmar@hotmail.com>",
"download_url": "https://files.pythonhosted.org/packages/33/6b/de2c18c193c272542633dc2067a0b27f083860f5a86cf6966b114d01ad15/ams_bp-0.0.251.tar.gz",
"platform": null,
"description": "# AMS-BP\n<p>\n<img src=\"./docs/assets/icons/drawing.svg\" alt=\"AMS-BP Logo\" width=\"500\" height=\"200\">\n</p>\n\n## Advanced Fluorescence Microscopy Simulation Tool\n\nAMS-BP is a powerful simulation tool for advanced fluorescence microscopy experiments. This guide covers both command-line usage and library integration.\n\n> **_NOTE:_** Please note that this application DOES NOT currently model the process of stimulated emission, and as such is not suitable for simulating stimulated emission microscopy ([STED](https://en.wikipedia.org/wiki/STED_microscopy))-type experiments. Work in this area is ongoing.\n\n## Table of Contents\n- [Installation](#installation)\n- [Command Line Interface](#command-line-interface)\n- [Configuration File](#configuration-file)\n- [Running Experiments](#running-experiments)\n- [Advanced Usage](#advanced-usage)\n\n## Installation\n\n\n### ***Installing the CLI tool using UV***\n\n\n\n\n1. [Install UV](https://docs.astral.sh/uv/getting-started/installation/).\n2. Run the command:\n```bash\nuv tool install AMS_BP\n```\n3. You will have access to two CLI commands (using the uv interface):\n - `run_AMS_BP runsim` : This is the main entry point for the simulation. (see `run_AMS_BP runsim --help` for more details)\n - `run_AMS_BP config` : This is a helper tool to generate a template config file for the simulation. (see `run_AMS_BP config --help` for more details)\n - Note: using `run_AMS_BP --help` will show you all the available commands.\n4. You can now use these tools (they are isolated in their own env created by uv, which is cool).\n\n### ***PyPi***\n\n1. Run:\n```bash\npip install AMS_BP\n```\n\n## Command Line Interface\n\nAMS-BP provides a command-line interface with two main commands:\n\n```bash\n# Generate a default configuration file\nrun_AMS_BP config [OPTIONS]\n\n# Run a simulation using a configuration file\nrun_AMS_BP runsim CONFIG_FILE\n```\n\n### Config Command Options\n\n- `-o, --output_path PATH`: Specify the output directory for the configuration file\n- `-r, --recursive_o`: Create output directory if it doesn't exist\n\n## Configuration File\n\nThe configuration file (sim_config.toml) is divided into several key sections:\n\n#### For a detailed description of the configuration file, refer to the [Configuration File Reference](https://joemans3.github.io/AMS_BP/API_Documentation/sim_config/).\n### Basic Units\n```toml\nversion = \"0.1\"\nlength_unit = \"um\" # micrometers\ntime_unit = \"ms\" # milliseconds\ndiffusion_unit = \"um^2/s\" # diffusion coefficient units\n```\n\n### Key Configuration Sections\n\n1. **Cell Parameters**\n - Define cell space dimensions\n - Set cell axial radius\n\n2. **Molecule Parameters**\n - Number of molecules per type\n - Tracking types (constant/fbm)\n - Diffusion coefficients\n - State transition probabilities\n\n3. **Global Parameters**\n - Sample plane dimensions\n - Cycle count -> Exposure time + Interval time\n - Exposure and interval times\n\n4. **Fluorophore Configuration**\n - Any number of fluorophores\n - Any number of States per fluorophore\n - Fluorophore StateType: (bright, dark, bleached) -> All States must be one of these.\n - Transition parameters\n - Spectral properties\n\n5. **Optical Configuration**\n - PSF parameters\n - Laser settings\n - Channel configuration\n - Camera settings\n\n## Running Experiments\n\nAMS-BP supports two types of experiments:\n\n### 1. Time Series\n```toml\n[experiment]\nexperiment_type = \"time-series\"\nz_position = 0.0\nlaser_names_active = [\"red\", \"blue\"]\nlaser_powers_active = [0.5, 0.05]\nlaser_positions_active = [[5, 5, 0], [5, 5, 0]]\n```\n\n### 2. Z-Stack\n```toml\n[experiment]\nexperiment_type = \"z-stack\"\nz_position = [-0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.2, 0.3, 0.4, 0.5]\nlaser_names_active = [\"red\", \"blue\"]\nlaser_powers_active = [0.5, 0.05]\nlaser_positions_active = [[5, 5, 0], [5, 5, 0]]\n```\n\n## Advanced Usage\n\n### Using AMS-BP as a Library\n\nFor programmatic control, you can import and use AMS-BP as a Python library:\n\n```python\nfrom AMS_BP.configio.convertconfig import ConfigLoader\n\n# Configuration loader intialization\nconfig_loader = ConfigLoader(config_path=\"path/to/config.toml\")\n\n# Setup microscope\nsetup_config = config_loader.setup_microscope()\nmicroscope = setup_config[\"microscope\"]\nconfig_exp = setup_config[\"experiment_config\"]\nfunction_exp = setup_config[\"experiment_func\"]\n\n# Run simulation\nframes, metadata = function_exp(microscope=microscope, config=config_exp)\n\n# Save results\nfrom AMS_BP.configio.saving import save_config_frames\nsave_config_frames(metadata, frames, setup_config[\"base_config\"].OutputParameters)\n```\n\n> A more detailed example is provided in the jupyter notebook in the examples. For starters refer to the [VisualizingIndividualModules](examples/VisualizingIndividualModules/modules_explained.ipynb). Then head over to the [laser modulation module](examples/VisualizingIndividualModules/laser_modulation.ipynb) which will show how to change the laser power over time in the simulations. Then view an example of a complex experiment setup for [FRAP](examples/QuantitativeExperiments/FRAP_methods.ipynb) which is possible by the use of compositions of modules in this simulation library.\n",
"bugtrack_url": null,
"license": null,
"summary": "Advanced Microscopy Simulations developed for the Weber Lab by Baljyot Singh Parmar",
"version": "0.0.251",
"project_urls": {
"Documentation": "https://joemans3.github.io/AMS_BP/",
"Source code": "https://github.com/joemans3/AMS_BP"
},
"split_keywords": [
"sms"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a35080b1e0afe7f6b7dc83f2b2c5a5e8bd779ed8829229d73af3286f0e0c44c9",
"md5": "f2010062d2a4df0af65e4d241a69832d",
"sha256": "9ad2d30ef62503d0eb5b15a9033697ac4ff26d8709f6af115c95c7ec1972f667"
},
"downloads": -1,
"filename": "ams_bp-0.0.251-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f2010062d2a4df0af65e4d241a69832d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 76529,
"upload_time": "2025-01-01T12:29:21",
"upload_time_iso_8601": "2025-01-01T12:29:21.276002Z",
"url": "https://files.pythonhosted.org/packages/a3/50/80b1e0afe7f6b7dc83f2b2c5a5e8bd779ed8829229d73af3286f0e0c44c9/ams_bp-0.0.251-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "336bde2c18c193c272542633dc2067a0b27f083860f5a86cf6966b114d01ad15",
"md5": "f3ea45324910e25f78c16433f76ad8f2",
"sha256": "f705817605164eea1bc43d4619c8a6616d979a6f0e2fff51a370b34172f3506a"
},
"downloads": -1,
"filename": "ams_bp-0.0.251.tar.gz",
"has_sig": false,
"md5_digest": "f3ea45324910e25f78c16433f76ad8f2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 6463864,
"upload_time": "2025-01-01T12:29:22",
"upload_time_iso_8601": "2025-01-01T12:29:22.925260Z",
"url": "https://files.pythonhosted.org/packages/33/6b/de2c18c193c272542633dc2067a0b27f083860f5a86cf6966b114d01ad15/ams_bp-0.0.251.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-01 12:29:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "joemans3",
"github_project": "AMS_BP",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ams-bp"
}