Light microscopy simulation in python
Project description
microsim
Light microscopy simulation in python.
The goal of this library is to generate highly realistic simulated data such as the following:
(this data was generated using segmentations from cell jrc_hela-3 at OpenOrganelle as the ground truth)
Installation
from PyPI
pip install microsim
from github
To get the bleeding edge version, which will change rapidly, you can install from github.
pip install git+https://github.com/tlambert03/microsim
If available, microsim can use either Jax or Cupy to accelerate computations. These are not installed by default, see the jax or cupy installation instructions, paying attention to your GPU requirements. Support for torch is planned.
Usage
Construct and run a
microsim.Simulation
object.
from microsim import schema as ms
from microsim.util import ortho_plot
# define the parameters of the simulation
sim = ms.Simulation(
truth_space=ms.ShapeScaleSpace(shape=(128, 512, 512), scale=(0.02, 0.01, 0.01)),
output_space={'downscale': 8},
sample=ms.Sample(
labels=[ms.MatsLines(density=0.5, length=30, azimuth=5, max_r=1)]
),
modality=ms.Confocal(pinhole_au=0.2),
output_path="au02.tiff",
)
# run it
result = sim.run()
# optionally plot the result
ortho_plot(result)
Documentation
See the API Reference (https://tlambert03.github.io/microsim/api/) for details
on the Simulation
object and options for all of the fields.
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
Built Distribution
File details
Details for the file microsim-0.0.4.tar.gz
.
File metadata
- Download URL: microsim-0.0.4.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac0841fbbc425ae4ed255ddf2a26a33789406a79e810a7e2daff7c23ab6571b1 |
|
MD5 | f5163446fac42d866454b16b105e3441 |
|
BLAKE2b-256 | 4d3c3bebc32a19a9fb2721678a0f2dae7b6b3d9aec40382a56637fee04ce1a93 |
File details
Details for the file microsim-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: microsim-0.0.4-py3-none-any.whl
- Upload date:
- Size: 94.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88546f81ea5b05624cf8d522de76cc9cce6114017ab8e1a7070d82135f5c1966 |
|
MD5 | 3e74bfca45b4461fb2d86821e1153ff5 |
|
BLAKE2b-256 | eb57b6ecd3c44177a58c277e3eb629fd8008093b41ea34f4643f2f2f5ca800a3 |