Installation¶
From PyPI¶
Pin a specific version
microsim changes quickly, and releases can break the API or change simulation results for the same parameters. For any project you want to reproduce later, pin the exact version:
You can check the installed version with microsim.__version__.
The [all] extra installs the plotting, file I/O, and data-download
dependencies used throughout these docs. The base package (pip install
microsim) can run every simulation, but cannot plot results, write TIFF files,
or fetch ground truth from OpenOrganelle.
What each extra installs
| Extra | Adds | Needed for |
|---|---|---|
view |
matplotlib, ndv | ortho_plot, Simulation.plot, interactive viewing |
io |
tifffile, imageio | writing .tif output |
cosem |
boto3, s3fs, supabase, imageio | CosemLabel ground truth |
jax |
jax | the jax backend |
torch |
torch | the torch backend |
all |
view, io, cosem, and rich |
Latest development version¶
The development version changes often.
GPU acceleration¶
Most of the computation time goes into PSF generation and convolution. These can run on a GPU through CuPy or JAX. Neither is installed by default; follow their installation instructions for your GPU and CUDA version, then select the backend:
See Settings for details. A torch
backend also exists, but is incomplete.
Development install¶
microsim uses uv for development:
To build these docs locally: