AMS-BP 0.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ams_bp-0.0.2/.github/workflows/lint.yml +26 -0
- ams_bp-0.0.2/.github/workflows/pages.yml +36 -0
- ams_bp-0.0.2/.github/workflows/publish_pypi.yml +93 -0
- ams_bp-0.0.2/.gitignore +168 -0
- ams_bp-0.0.2/LICENSE +21 -0
- ams_bp-0.0.2/PKG-INFO +173 -0
- ams_bp-0.0.2/README.md +152 -0
- ams_bp-0.0.2/docs/API_Documentation/cells/base_cell.md +121 -0
- ams_bp-0.0.2/docs/API_Documentation/cells/rectangular_cell.md +109 -0
- ams_bp-0.0.2/docs/API_Documentation/cells/rod_cell.md +0 -0
- ams_bp-0.0.2/docs/API_Documentation/cells/spherical_cell.md +0 -0
- ams_bp-0.0.2/docs/API_Documentation/configio/configmodels.md +212 -0
- ams_bp-0.0.2/docs/API_Documentation/configio/convertconfig.md +166 -0
- ams_bp-0.0.2/docs/API_Documentation/configio/experiments.md +202 -0
- ams_bp-0.0.2/docs/API_Documentation/configio/saving.md +74 -0
- ams_bp-0.0.2/docs/API_Documentation/metadata/metadata.md +110 -0
- ams_bp-0.0.2/docs/API_Documentation/motion/condensate_movement.md +195 -0
- ams_bp-0.0.2/docs/API_Documentation/motion/movement/boundary_conditions.md +57 -0
- ams_bp-0.0.2/docs/API_Documentation/motion/movement/fbm_BP.md +97 -0
- ams_bp-0.0.2/docs/API_Documentation/motion/track_gen.md +108 -0
- ams_bp-0.0.2/docs/API_Documentation/optics/camera/detectors.md +252 -0
- ams_bp-0.0.2/docs/API_Documentation/optics/camera/quantum_eff.md +57 -0
- ams_bp-0.0.2/docs/API_Documentation/optics/filters/channels/channelschema.md +51 -0
- ams_bp-0.0.2/docs/API_Documentation/optics/filters/filters.md +203 -0
- ams_bp-0.0.2/docs/API_Documentation/optics/lasers/laser_profiles.md +289 -0
- ams_bp-0.0.2/docs/API_Documentation/optics/psf/psf_engine.md +108 -0
- ams_bp-0.0.2/docs/API_Documentation/photophysics/photon_physics.md +95 -0
- ams_bp-0.0.2/docs/API_Documentation/photophysics/state_kinetics.md +62 -0
- ams_bp-0.0.2/docs/API_Documentation/probabilityfuncs/markov_chain.md +133 -0
- ams_bp-0.0.2/docs/API_Documentation/probabilityfuncs/probability_functions.md +156 -0
- ams_bp-0.0.2/docs/API_Documentation/run_cell_simulation.md +140 -0
- ams_bp-0.0.2/docs/API_Documentation/sample/flurophore/flurophore_schema.md +115 -0
- ams_bp-0.0.2/docs/API_Documentation/sample/sim_sampleplane.md +82 -0
- ams_bp-0.0.2/docs/API_Documentation/sim_config.md +400 -0
- ams_bp-0.0.2/docs/API_Documentation/sim_microscopy.md +161 -0
- ams_bp-0.0.2/docs/API_Documentation/utils/constants.md +45 -0
- ams_bp-0.0.2/docs/API_Documentation/utils/errors.md +65 -0
- ams_bp-0.0.2/docs/API_Documentation/utils/util_functions.md +196 -0
- ams_bp-0.0.2/docs/assets/icons/Cells-actin-like-a-tree-Jamie-Whitelaw-1.png +0 -0
- ams_bp-0.0.2/docs/assets/icons/drawing.pdf +0 -0
- ams_bp-0.0.2/docs/assets/icons/drawing.png +0 -0
- ams_bp-0.0.2/docs/assets/icons/drawing.svg +107 -0
- ams_bp-0.0.2/docs/index.md +180 -0
- ams_bp-0.0.2/mkdocs.yml +30 -0
- ams_bp-0.0.2/pyproject.toml +63 -0
- ams_bp-0.0.2/pytest.ini +1 -0
- ams_bp-0.0.2/src/AMS_BP/__init__.py +13 -0
- ams_bp-0.0.2/src/AMS_BP/cells/__init__.py +5 -0
- ams_bp-0.0.2/src/AMS_BP/cells/base_cell.py +55 -0
- ams_bp-0.0.2/src/AMS_BP/cells/rectangular_cell.py +82 -0
- ams_bp-0.0.2/src/AMS_BP/cells/rod_cell.py +98 -0
- ams_bp-0.0.2/src/AMS_BP/cells/spherical_cell.py +74 -0
- ams_bp-0.0.2/src/AMS_BP/configio/__init__.py +0 -0
- ams_bp-0.0.2/src/AMS_BP/configio/configmodels.py +93 -0
- ams_bp-0.0.2/src/AMS_BP/configio/convertconfig.py +910 -0
- ams_bp-0.0.2/src/AMS_BP/configio/experiments.py +121 -0
- ams_bp-0.0.2/src/AMS_BP/configio/saving.py +32 -0
- ams_bp-0.0.2/src/AMS_BP/metadata/__init__.py +0 -0
- ams_bp-0.0.2/src/AMS_BP/metadata/metadata.py +87 -0
- ams_bp-0.0.2/src/AMS_BP/motion/__init__.py +4 -0
- ams_bp-0.0.2/src/AMS_BP/motion/condensate_movement.py +356 -0
- ams_bp-0.0.2/src/AMS_BP/motion/movement/__init__.py +10 -0
- ams_bp-0.0.2/src/AMS_BP/motion/movement/boundary_conditions.py +75 -0
- ams_bp-0.0.2/src/AMS_BP/motion/movement/fbm_BP.py +244 -0
- ams_bp-0.0.2/src/AMS_BP/motion/track_gen.py +541 -0
- ams_bp-0.0.2/src/AMS_BP/optics/__init__.py +0 -0
- ams_bp-0.0.2/src/AMS_BP/optics/camera/__init__.py +4 -0
- ams_bp-0.0.2/src/AMS_BP/optics/camera/detectors.py +320 -0
- ams_bp-0.0.2/src/AMS_BP/optics/camera/quantum_eff.py +66 -0
- ams_bp-0.0.2/src/AMS_BP/optics/filters/__init__.py +17 -0
- ams_bp-0.0.2/src/AMS_BP/optics/filters/channels/__init__.py +0 -0
- ams_bp-0.0.2/src/AMS_BP/optics/filters/channels/channelschema.py +27 -0
- ams_bp-0.0.2/src/AMS_BP/optics/filters/filters.py +184 -0
- ams_bp-0.0.2/src/AMS_BP/optics/lasers/__init__.py +28 -0
- ams_bp-0.0.2/src/AMS_BP/optics/lasers/laser_profiles.py +691 -0
- ams_bp-0.0.2/src/AMS_BP/optics/psf/__init__.py +7 -0
- ams_bp-0.0.2/src/AMS_BP/optics/psf/psf_engine.py +215 -0
- ams_bp-0.0.2/src/AMS_BP/photophysics/__init__.py +0 -0
- ams_bp-0.0.2/src/AMS_BP/photophysics/photon_physics.py +181 -0
- ams_bp-0.0.2/src/AMS_BP/photophysics/state_kinetics.py +146 -0
- ams_bp-0.0.2/src/AMS_BP/probabilityfuncs/__init__.py +0 -0
- ams_bp-0.0.2/src/AMS_BP/probabilityfuncs/markov_chain.py +143 -0
- ams_bp-0.0.2/src/AMS_BP/probabilityfuncs/probability_functions.py +350 -0
- ams_bp-0.0.2/src/AMS_BP/run_cell_simulation.py +217 -0
- ams_bp-0.0.2/src/AMS_BP/sample/__init__.py +0 -0
- ams_bp-0.0.2/src/AMS_BP/sample/flurophores/__init__.py +16 -0
- ams_bp-0.0.2/src/AMS_BP/sample/flurophores/flurophore_schema.py +290 -0
- ams_bp-0.0.2/src/AMS_BP/sample/sim_sampleplane.py +334 -0
- ams_bp-0.0.2/src/AMS_BP/sim_config.toml +418 -0
- ams_bp-0.0.2/src/AMS_BP/sim_microscopy.py +453 -0
- ams_bp-0.0.2/src/AMS_BP/utils/__init__.py +0 -0
- ams_bp-0.0.2/src/AMS_BP/utils/constants.py +11 -0
- ams_bp-0.0.2/src/AMS_BP/utils/decorators.py +227 -0
- ams_bp-0.0.2/src/AMS_BP/utils/errors.py +37 -0
- ams_bp-0.0.2/src/AMS_BP/utils/maskMaker.py +12 -0
- ams_bp-0.0.2/src/AMS_BP/utils/util_functions.py +319 -0
- ams_bp-0.0.2/uv.lock +1593 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
name: ruff
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- "master"
|
6
|
+
paths-ignore:
|
7
|
+
- "docs/**"
|
8
|
+
jobs:
|
9
|
+
build:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v4
|
13
|
+
- name: Install Python
|
14
|
+
uses: actions/setup-python@v5
|
15
|
+
with:
|
16
|
+
python-version: "3.10"
|
17
|
+
- name: Install dependencies
|
18
|
+
run: |
|
19
|
+
python -m pip install --upgrade pip
|
20
|
+
pip install ruff
|
21
|
+
# Update output format to enable automatic inline annotations.
|
22
|
+
- name: Run Ruff
|
23
|
+
run: |
|
24
|
+
ruff check --fix
|
25
|
+
ruff format
|
26
|
+
ruff format --check --diff
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: pages
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
paths:
|
7
|
+
- 'docs/**'
|
8
|
+
permissions:
|
9
|
+
contents: write
|
10
|
+
jobs:
|
11
|
+
deploy:
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
strategy:
|
14
|
+
fail-fast: false
|
15
|
+
matrix:
|
16
|
+
python-version: ["3.10.13"]
|
17
|
+
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v4
|
20
|
+
|
21
|
+
- name: Set up Python ${{ matrix.python-version }}
|
22
|
+
uses: actions/setup-python@v5
|
23
|
+
with:
|
24
|
+
python-version: ${{ matrix.python-version }}
|
25
|
+
- name: Install mkdocs and pymdown-extensions
|
26
|
+
run: |
|
27
|
+
python -m pip install --upgrade pip
|
28
|
+
pip install mkdocs mkdocs-material pymdown-extensions mkdocstrings-python
|
29
|
+
|
30
|
+
- run: python -m pip install -e .
|
31
|
+
- name: Build and deploy
|
32
|
+
run: |
|
33
|
+
mkdocs build
|
34
|
+
mkdocs gh-deploy --force
|
35
|
+
env:
|
36
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@@ -0,0 +1,93 @@
|
|
1
|
+
name: Publish Python 🐍 distribution 📦 to PyPI
|
2
|
+
|
3
|
+
on: push
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
strategy:
|
10
|
+
fail-fast: false
|
11
|
+
matrix:
|
12
|
+
python-version: ["3.12"]
|
13
|
+
|
14
|
+
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v4
|
17
|
+
- name: Install uv
|
18
|
+
uses: astral-sh/setup-uv@v3
|
19
|
+
|
20
|
+
- name: Set up Python
|
21
|
+
run: uv python install ${{ matrix.python-version }}
|
22
|
+
- name: Build a binary wheel and a source tarball
|
23
|
+
run: uv build
|
24
|
+
- name: Store the distribution packages
|
25
|
+
uses: actions/upload-artifact@v4
|
26
|
+
with:
|
27
|
+
name: python-package-distributions
|
28
|
+
path: dist/
|
29
|
+
|
30
|
+
publish-to-pypi:
|
31
|
+
name: >-
|
32
|
+
Publish Python 🐍 distribution 📦 to PyPI
|
33
|
+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
|
34
|
+
needs:
|
35
|
+
- build
|
36
|
+
runs-on: ubuntu-latest
|
37
|
+
environment:
|
38
|
+
name: pypi
|
39
|
+
url: https://pypi.org/p/AMS_BP
|
40
|
+
permissions:
|
41
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
42
|
+
|
43
|
+
steps:
|
44
|
+
- name: Download all the dists
|
45
|
+
uses: actions/download-artifact@v4
|
46
|
+
with:
|
47
|
+
name: python-package-distributions
|
48
|
+
path: dist/
|
49
|
+
- name: Publish distribution 📦 to PyPI
|
50
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
51
|
+
|
52
|
+
github-release:
|
53
|
+
name: >-
|
54
|
+
Sign the Python 🐍 distribution 📦 with Sigstore
|
55
|
+
and upload them to GitHub Release
|
56
|
+
needs:
|
57
|
+
- publish-to-pypi
|
58
|
+
runs-on: ubuntu-latest
|
59
|
+
|
60
|
+
permissions:
|
61
|
+
contents: write # IMPORTANT: mandatory for making GitHub Releases
|
62
|
+
id-token: write # IMPORTANT: mandatory for sigstore
|
63
|
+
|
64
|
+
steps:
|
65
|
+
- name: Download all the dists
|
66
|
+
uses: actions/download-artifact@v4
|
67
|
+
with:
|
68
|
+
name: python-package-distributions
|
69
|
+
path: dist/
|
70
|
+
- name: Sign the dists with Sigstore
|
71
|
+
uses: sigstore/gh-action-sigstore-python@v2.1.1
|
72
|
+
with:
|
73
|
+
inputs: >-
|
74
|
+
./dist/*.tar.gz
|
75
|
+
./dist/*.whl
|
76
|
+
- name: Create GitHub Release
|
77
|
+
env:
|
78
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
79
|
+
run: >-
|
80
|
+
gh release create
|
81
|
+
'${{ github.ref_name }}'
|
82
|
+
--repo '${{ github.repository }}'
|
83
|
+
--notes ""
|
84
|
+
- name: Upload artifact signatures to GitHub Release
|
85
|
+
env:
|
86
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
87
|
+
# Upload to GitHub Release using the `gh` CLI.
|
88
|
+
# `dist/` contains the built packages, and the
|
89
|
+
# sigstore-produced signatures and certificates.
|
90
|
+
run: >-
|
91
|
+
gh release upload
|
92
|
+
'${{ github.ref_name }}' dist/**
|
93
|
+
--repo '${{ github.repository }}'
|
ams_bp-0.0.2/.gitignore
ADDED
@@ -0,0 +1,168 @@
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
2
|
+
__pycache__/
|
3
|
+
*.py[cod]
|
4
|
+
*$py.class
|
5
|
+
|
6
|
+
# C extensions
|
7
|
+
*.so
|
8
|
+
|
9
|
+
# Distribution / packaging
|
10
|
+
.Python
|
11
|
+
build/
|
12
|
+
develop-eggs/
|
13
|
+
dist/
|
14
|
+
downloads/
|
15
|
+
eggs/
|
16
|
+
.eggs/
|
17
|
+
lib/
|
18
|
+
lib64/
|
19
|
+
parts/
|
20
|
+
sdist/
|
21
|
+
var/
|
22
|
+
wheels/
|
23
|
+
share/python-wheels/
|
24
|
+
*.egg-info/
|
25
|
+
.installed.cfg
|
26
|
+
*.egg
|
27
|
+
MANIFEST
|
28
|
+
|
29
|
+
# PyInstaller
|
30
|
+
# Usually these files are written by a python script from a template
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
32
|
+
*.manifest
|
33
|
+
*.spec
|
34
|
+
|
35
|
+
# Installer logs
|
36
|
+
pip-log.txt
|
37
|
+
pip-delete-this-directory.txt
|
38
|
+
|
39
|
+
# Unit test / coverage reports
|
40
|
+
htmlcov/
|
41
|
+
.tox/
|
42
|
+
.nox/
|
43
|
+
.coverage
|
44
|
+
.coverage.*
|
45
|
+
.cache
|
46
|
+
nosetests.xml
|
47
|
+
coverage.xml
|
48
|
+
*.cover
|
49
|
+
*.py,cover
|
50
|
+
.hypothesis/
|
51
|
+
.pytest_cache/
|
52
|
+
cover/
|
53
|
+
|
54
|
+
# Translations
|
55
|
+
*.mo
|
56
|
+
*.pot
|
57
|
+
|
58
|
+
# Django stuff:
|
59
|
+
*.log
|
60
|
+
local_settings.py
|
61
|
+
db.sqlite3
|
62
|
+
db.sqlite3-journal
|
63
|
+
|
64
|
+
# Flask stuff:
|
65
|
+
instance/
|
66
|
+
.webassets-cache
|
67
|
+
|
68
|
+
# Scrapy stuff:
|
69
|
+
.scrapy
|
70
|
+
|
71
|
+
# Sphinx documentation
|
72
|
+
docs/_build/
|
73
|
+
|
74
|
+
# PyBuilder
|
75
|
+
.pybuilder/
|
76
|
+
target/
|
77
|
+
|
78
|
+
# Jupyter Notebook
|
79
|
+
.ipynb_checkpoints
|
80
|
+
|
81
|
+
# IPython
|
82
|
+
profile_default/
|
83
|
+
ipython_config.py
|
84
|
+
|
85
|
+
# pyenv
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
88
|
+
# .python-version
|
89
|
+
|
90
|
+
# pipenv
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
94
|
+
# install all needed dependencies.
|
95
|
+
#Pipfile.lock
|
96
|
+
|
97
|
+
# UV
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
100
|
+
# commonly ignored for libraries.
|
101
|
+
#uv.lock
|
102
|
+
|
103
|
+
# poetry
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
106
|
+
# commonly ignored for libraries.
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
108
|
+
#poetry.lock
|
109
|
+
|
110
|
+
# pdm
|
111
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
112
|
+
#pdm.lock
|
113
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
114
|
+
# in version control.
|
115
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
116
|
+
.pdm.toml
|
117
|
+
.pdm-python
|
118
|
+
.pdm-build/
|
119
|
+
|
120
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
121
|
+
__pypackages__/
|
122
|
+
|
123
|
+
# Celery stuff
|
124
|
+
celerybeat-schedule
|
125
|
+
celerybeat.pid
|
126
|
+
|
127
|
+
# SageMath parsed files
|
128
|
+
*.sage.py
|
129
|
+
|
130
|
+
# Environments
|
131
|
+
.env
|
132
|
+
.venv
|
133
|
+
env/
|
134
|
+
venv/
|
135
|
+
ENV/
|
136
|
+
env.bak/
|
137
|
+
venv.bak/
|
138
|
+
|
139
|
+
# Spyder project settings
|
140
|
+
.spyderproject
|
141
|
+
.spyproject
|
142
|
+
|
143
|
+
# Rope project settings
|
144
|
+
.ropeproject
|
145
|
+
|
146
|
+
# mkdocs documentation
|
147
|
+
/site
|
148
|
+
|
149
|
+
# mypy
|
150
|
+
.mypy_cache/
|
151
|
+
.dmypy.json
|
152
|
+
dmypy.json
|
153
|
+
|
154
|
+
# Pyre type checker
|
155
|
+
.pyre/
|
156
|
+
|
157
|
+
# pytype static type analyzer
|
158
|
+
.pytype/
|
159
|
+
|
160
|
+
# Cython debug symbols
|
161
|
+
cython_debug/
|
162
|
+
|
163
|
+
# PyCharm
|
164
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
165
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
166
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
167
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
168
|
+
#.idea/
|
ams_bp-0.0.2/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 Baljyot Parmar
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
ams_bp-0.0.2/PKG-INFO
ADDED
@@ -0,0 +1,173 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: AMS_BP
|
3
|
+
Version: 0.0.2
|
4
|
+
Summary: Advanced Microscopy Simulations developed for the Weber Lab by Baljyot Singh Parmar
|
5
|
+
Project-URL: Documentation, https://joemans3.github.io/AMS_BP/
|
6
|
+
Project-URL: Source code, https://github.com/joemans3/AMS_BP
|
7
|
+
Author-email: Baljyot Singh Parmar <baljyotparmar@hotmail.com>
|
8
|
+
Maintainer-email: Baljyot Singh Parmar <baljyotparmar@hotmail.com>
|
9
|
+
License-File: LICENSE
|
10
|
+
Keywords: SMS
|
11
|
+
Requires-Python: >=3.10
|
12
|
+
Requires-Dist: jsonschema>=4.23.0
|
13
|
+
Requires-Dist: matplotlib>=3.6.0
|
14
|
+
Requires-Dist: numpy>=1.21.2
|
15
|
+
Requires-Dist: pydantic>=2.9.2
|
16
|
+
Requires-Dist: scikit-image>=0.18.3
|
17
|
+
Requires-Dist: scipy>=1.7.1
|
18
|
+
Requires-Dist: tomli>=2.0.2
|
19
|
+
Requires-Dist: typer>=0.12.5
|
20
|
+
Description-Content-Type: text/markdown
|
21
|
+
|
22
|
+
# AMS-BP
|
23
|
+
<p>
|
24
|
+
<img src="./docs/assets/icons/drawing.svg" alt="AMS-BP Logo" width="500" height="200">
|
25
|
+
</p>
|
26
|
+
## Advanced Fluorescence Microscopy Simulation Tool
|
27
|
+
|
28
|
+
AMS-BP is a powerful simulation tool for advanced fluorescence microscopy experiments. This guide covers both command-line usage and library integration.
|
29
|
+
|
30
|
+
> **_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.
|
31
|
+
|
32
|
+
## Table of Contents
|
33
|
+
- [Installation](#installation)
|
34
|
+
- [Command Line Interface](#command-line-interface)
|
35
|
+
- [Configuration File](#configuration-file)
|
36
|
+
- [Running Experiments](#running-experiments)
|
37
|
+
- [Advanced Usage](#advanced-usage)
|
38
|
+
|
39
|
+
## Installation
|
40
|
+
|
41
|
+
|
42
|
+
### ***Installing the CLI tool using UV***
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
1. [Install UV](https://docs.astral.sh/uv/getting-started/installation/).
|
48
|
+
2. Run the command:
|
49
|
+
```bash
|
50
|
+
uv tool install AMS_BP
|
51
|
+
```
|
52
|
+
3. You will have access to two CLI commands (using the uv interface):
|
53
|
+
- `run_AMS_BP runsim` : This is the main entry point for the simulation. (see `run_AMS_BP runsim --help` for more details)
|
54
|
+
- `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)
|
55
|
+
- Note: using `run_AMS_BP --help` will show you all the available commands.
|
56
|
+
4. You can now use these tools (they are isolated in their own env created by uv, which is cool).
|
57
|
+
|
58
|
+
### ***PyPi***
|
59
|
+
|
60
|
+
1. Run:
|
61
|
+
```bash
|
62
|
+
pip install AMS_BP
|
63
|
+
```
|
64
|
+
|
65
|
+
## Command Line Interface
|
66
|
+
|
67
|
+
AMS-BP provides a command-line interface with two main commands:
|
68
|
+
|
69
|
+
```bash
|
70
|
+
# Generate a default configuration file
|
71
|
+
run_AMS_BP config [OPTIONS]
|
72
|
+
|
73
|
+
# Run a simulation using a configuration file
|
74
|
+
run_AMS_BP runsim CONFIG_FILE
|
75
|
+
```
|
76
|
+
|
77
|
+
### Config Command Options
|
78
|
+
|
79
|
+
- `-o, --output_path PATH`: Specify the output directory for the configuration file
|
80
|
+
- `-r, --recursive_o`: Create output directory if it doesn't exist
|
81
|
+
|
82
|
+
## Configuration File
|
83
|
+
|
84
|
+
The configuration file (sim_config.toml) is divided into several key sections:
|
85
|
+
|
86
|
+
#### For a detailed description of the configuration file, refer to the [Configuration File Reference](https://joemans3.github.io/AMS_BP/API_Documentation/sim_config/).
|
87
|
+
### Basic Units
|
88
|
+
```toml
|
89
|
+
version = "0.1"
|
90
|
+
length_unit = "um" # micrometers
|
91
|
+
time_unit = "ms" # milliseconds
|
92
|
+
diffusion_unit = "um^2/s" # diffusion coefficient units
|
93
|
+
```
|
94
|
+
|
95
|
+
### Key Configuration Sections
|
96
|
+
|
97
|
+
1. **Cell Parameters**
|
98
|
+
- Define cell space dimensions
|
99
|
+
- Set cell axial radius
|
100
|
+
|
101
|
+
2. **Molecule Parameters**
|
102
|
+
- Number of molecules per type
|
103
|
+
- Tracking types (constant/fbm)
|
104
|
+
- Diffusion coefficients
|
105
|
+
- State transition probabilities
|
106
|
+
|
107
|
+
3. **Global Parameters**
|
108
|
+
- Sample plane dimensions
|
109
|
+
- Cycle count -> Exposure time + Interval time
|
110
|
+
- Exposure and interval times
|
111
|
+
|
112
|
+
4. **Fluorophore Configuration**
|
113
|
+
- Any number of fluorophores
|
114
|
+
- Any number of States per fluorophore
|
115
|
+
- Fluorophore StateType: (bright, dark, bleached) -> All States must be one of these.
|
116
|
+
- Transition parameters
|
117
|
+
- Spectral properties
|
118
|
+
|
119
|
+
5. **Optical Configuration**
|
120
|
+
- PSF parameters
|
121
|
+
- Laser settings
|
122
|
+
- Channel configuration
|
123
|
+
- Camera settings
|
124
|
+
|
125
|
+
## Running Experiments
|
126
|
+
|
127
|
+
AMS-BP supports two types of experiments:
|
128
|
+
|
129
|
+
### 1. Time Series
|
130
|
+
```toml
|
131
|
+
[experiment]
|
132
|
+
experiment_type = "time-series"
|
133
|
+
z_position = 0.0
|
134
|
+
laser_names_active = ["red", "blue"]
|
135
|
+
laser_powers_active = [0.5, 0.05]
|
136
|
+
laser_positions_active = [[5, 5, 0], [5, 5, 0]]
|
137
|
+
```
|
138
|
+
|
139
|
+
### 2. Z-Stack
|
140
|
+
```toml
|
141
|
+
[experiment]
|
142
|
+
experiment_type = "z-stack"
|
143
|
+
z_position = [-0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.2, 0.3, 0.4, 0.5]
|
144
|
+
laser_names_active = ["red", "blue"]
|
145
|
+
laser_powers_active = [0.5, 0.05]
|
146
|
+
laser_positions_active = [[5, 5, 0], [5, 5, 0]]
|
147
|
+
```
|
148
|
+
|
149
|
+
## Advanced Usage
|
150
|
+
|
151
|
+
### Using AMS-BP as a Library
|
152
|
+
|
153
|
+
For programmatic control, you can import and use AMS-BP as a Python library:
|
154
|
+
|
155
|
+
```python
|
156
|
+
from AMS_BP.configio.convertconfig import ConfigLoader
|
157
|
+
|
158
|
+
# Configuration loader intialization
|
159
|
+
config_loader = ConfigLoader(config_path="path/to/config.toml")
|
160
|
+
|
161
|
+
# Setup microscope
|
162
|
+
setup_config = config_loader.setup_microscope()
|
163
|
+
microscope = setup_config["microscope"]
|
164
|
+
config_exp = setup_config["experiment_config"]
|
165
|
+
function_exp = setup_config["experiment_func"]
|
166
|
+
|
167
|
+
# Run simulation
|
168
|
+
frames, metadata = function_exp(microscope=microscope, config=config_exp)
|
169
|
+
|
170
|
+
# Save results
|
171
|
+
from AMS_BP.configio.saving import save_config_frames
|
172
|
+
save_config_frames(metadata, frames, setup_config["base_config"].OutputParameters)
|
173
|
+
```
|
ams_bp-0.0.2/README.md
ADDED
@@ -0,0 +1,152 @@
|
|
1
|
+
# AMS-BP
|
2
|
+
<p>
|
3
|
+
<img src="./docs/assets/icons/drawing.svg" alt="AMS-BP Logo" width="500" height="200">
|
4
|
+
</p>
|
5
|
+
## Advanced Fluorescence Microscopy Simulation Tool
|
6
|
+
|
7
|
+
AMS-BP is a powerful simulation tool for advanced fluorescence microscopy experiments. This guide covers both command-line usage and library integration.
|
8
|
+
|
9
|
+
> **_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.
|
10
|
+
|
11
|
+
## Table of Contents
|
12
|
+
- [Installation](#installation)
|
13
|
+
- [Command Line Interface](#command-line-interface)
|
14
|
+
- [Configuration File](#configuration-file)
|
15
|
+
- [Running Experiments](#running-experiments)
|
16
|
+
- [Advanced Usage](#advanced-usage)
|
17
|
+
|
18
|
+
## Installation
|
19
|
+
|
20
|
+
|
21
|
+
### ***Installing the CLI tool using UV***
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
1. [Install UV](https://docs.astral.sh/uv/getting-started/installation/).
|
27
|
+
2. Run the command:
|
28
|
+
```bash
|
29
|
+
uv tool install AMS_BP
|
30
|
+
```
|
31
|
+
3. You will have access to two CLI commands (using the uv interface):
|
32
|
+
- `run_AMS_BP runsim` : This is the main entry point for the simulation. (see `run_AMS_BP runsim --help` for more details)
|
33
|
+
- `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)
|
34
|
+
- Note: using `run_AMS_BP --help` will show you all the available commands.
|
35
|
+
4. You can now use these tools (they are isolated in their own env created by uv, which is cool).
|
36
|
+
|
37
|
+
### ***PyPi***
|
38
|
+
|
39
|
+
1. Run:
|
40
|
+
```bash
|
41
|
+
pip install AMS_BP
|
42
|
+
```
|
43
|
+
|
44
|
+
## Command Line Interface
|
45
|
+
|
46
|
+
AMS-BP provides a command-line interface with two main commands:
|
47
|
+
|
48
|
+
```bash
|
49
|
+
# Generate a default configuration file
|
50
|
+
run_AMS_BP config [OPTIONS]
|
51
|
+
|
52
|
+
# Run a simulation using a configuration file
|
53
|
+
run_AMS_BP runsim CONFIG_FILE
|
54
|
+
```
|
55
|
+
|
56
|
+
### Config Command Options
|
57
|
+
|
58
|
+
- `-o, --output_path PATH`: Specify the output directory for the configuration file
|
59
|
+
- `-r, --recursive_o`: Create output directory if it doesn't exist
|
60
|
+
|
61
|
+
## Configuration File
|
62
|
+
|
63
|
+
The configuration file (sim_config.toml) is divided into several key sections:
|
64
|
+
|
65
|
+
#### For a detailed description of the configuration file, refer to the [Configuration File Reference](https://joemans3.github.io/AMS_BP/API_Documentation/sim_config/).
|
66
|
+
### Basic Units
|
67
|
+
```toml
|
68
|
+
version = "0.1"
|
69
|
+
length_unit = "um" # micrometers
|
70
|
+
time_unit = "ms" # milliseconds
|
71
|
+
diffusion_unit = "um^2/s" # diffusion coefficient units
|
72
|
+
```
|
73
|
+
|
74
|
+
### Key Configuration Sections
|
75
|
+
|
76
|
+
1. **Cell Parameters**
|
77
|
+
- Define cell space dimensions
|
78
|
+
- Set cell axial radius
|
79
|
+
|
80
|
+
2. **Molecule Parameters**
|
81
|
+
- Number of molecules per type
|
82
|
+
- Tracking types (constant/fbm)
|
83
|
+
- Diffusion coefficients
|
84
|
+
- State transition probabilities
|
85
|
+
|
86
|
+
3. **Global Parameters**
|
87
|
+
- Sample plane dimensions
|
88
|
+
- Cycle count -> Exposure time + Interval time
|
89
|
+
- Exposure and interval times
|
90
|
+
|
91
|
+
4. **Fluorophore Configuration**
|
92
|
+
- Any number of fluorophores
|
93
|
+
- Any number of States per fluorophore
|
94
|
+
- Fluorophore StateType: (bright, dark, bleached) -> All States must be one of these.
|
95
|
+
- Transition parameters
|
96
|
+
- Spectral properties
|
97
|
+
|
98
|
+
5. **Optical Configuration**
|
99
|
+
- PSF parameters
|
100
|
+
- Laser settings
|
101
|
+
- Channel configuration
|
102
|
+
- Camera settings
|
103
|
+
|
104
|
+
## Running Experiments
|
105
|
+
|
106
|
+
AMS-BP supports two types of experiments:
|
107
|
+
|
108
|
+
### 1. Time Series
|
109
|
+
```toml
|
110
|
+
[experiment]
|
111
|
+
experiment_type = "time-series"
|
112
|
+
z_position = 0.0
|
113
|
+
laser_names_active = ["red", "blue"]
|
114
|
+
laser_powers_active = [0.5, 0.05]
|
115
|
+
laser_positions_active = [[5, 5, 0], [5, 5, 0]]
|
116
|
+
```
|
117
|
+
|
118
|
+
### 2. Z-Stack
|
119
|
+
```toml
|
120
|
+
[experiment]
|
121
|
+
experiment_type = "z-stack"
|
122
|
+
z_position = [-0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.2, 0.3, 0.4, 0.5]
|
123
|
+
laser_names_active = ["red", "blue"]
|
124
|
+
laser_powers_active = [0.5, 0.05]
|
125
|
+
laser_positions_active = [[5, 5, 0], [5, 5, 0]]
|
126
|
+
```
|
127
|
+
|
128
|
+
## Advanced Usage
|
129
|
+
|
130
|
+
### Using AMS-BP as a Library
|
131
|
+
|
132
|
+
For programmatic control, you can import and use AMS-BP as a Python library:
|
133
|
+
|
134
|
+
```python
|
135
|
+
from AMS_BP.configio.convertconfig import ConfigLoader
|
136
|
+
|
137
|
+
# Configuration loader intialization
|
138
|
+
config_loader = ConfigLoader(config_path="path/to/config.toml")
|
139
|
+
|
140
|
+
# Setup microscope
|
141
|
+
setup_config = config_loader.setup_microscope()
|
142
|
+
microscope = setup_config["microscope"]
|
143
|
+
config_exp = setup_config["experiment_config"]
|
144
|
+
function_exp = setup_config["experiment_func"]
|
145
|
+
|
146
|
+
# Run simulation
|
147
|
+
frames, metadata = function_exp(microscope=microscope, config=config_exp)
|
148
|
+
|
149
|
+
# Save results
|
150
|
+
from AMS_BP.configio.saving import save_config_frames
|
151
|
+
save_config_frames(metadata, frames, setup_config["base_config"].OutputParameters)
|
152
|
+
```
|