Skip to main content

muscopy

muscopy is a Python library for label-free microscopy analysis, such as quantitative phase imaging (QPI), digital holography, optical diffraction tomography, intensity diffraction tomography, phasor analysis, and related workflows. The package has been developed and maintained by the Ideguchi-Lab at the University of Tokyo, Japan.

How to install

Install from PyPI (Python 3.11–3.14).

pip install muscopy

For a compatible NVIDIA GPU and CUDA 12 environment:

pip install "muscopy[cuda]"

For source development, clone the repository and use uv.

git clone https://github.com/Ideguchi-Lab/muscopy.git
cd muscopy
uv sync

If you are willing to contribute, install the development dependencies.

uv sync --extra dev

Install documentation dependencies when building docs locally.

uv sync --extra doc

Optional MLB simulation examples

examples/odt_with_mlb_simulation.py and examples/idt_with_mlb_simulation.py require muscopy-mlbsim, a private package available only to users with access to the Ideguchi-Lab repository. It is not included in muscopy or its PyPI extras. These two examples skip execution when the simulator is unavailable; muscopy's reconstruction APIs and the other examples do not require it.

See the separate MLB installation guide for access requirements, installation commands, and how to run these examples. This replaces the former uv sync --extra extra installation method.

Public API compatibility

For v1.0, muscopy's stable import contract is submodule-based. Import stable functions and classes from their documented modules, for example:

from muscopy.qpi import qpi
from muscopy.odt import ODTConfig, odt
from muscopy.idt import IDTConfig, compute_idt

The stable v1.0 modules are muscopy.cfg, muscopy.dh, muscopy.qpi, muscopy.qpi_utils, muscopy.odt, muscopy.idt, muscopy.phasor, muscopy.phase_noise, and muscopy.dir_parser. Public names listed in each module's __all__ are covered by compatibility guarantees.

muscopy.image_checker is experimental and is not covered by the v1.0 compatibility guarantee. Private names beginning with _, examples, generated documentation files, and implementation constants are also outside the stable API.

After v1.0, removing or changing a stable public API requires a deprecation notice, migration guidance, and a changelog entry before removal in a future major release. Experimental APIs may change with changelog notice.

Linter guide

The linter and type checker configuration is in pyproject.toml.

uv run ruff check ./muscopy ./tests ./examples
uv run ruff format ./muscopy ./tests ./examples
uv run mypy
uv run pyright

Docs

You can build the documentation with the following command.

uv sync --extra doc
uv run sphinx-build -W docs/source docs/build

Then, you can find the documentation in docs/build/index.html.

Authors and license

Authors: Masato Fukushima, Kohki Horie, and Takuro Ideguchi.

Copyright (c) 2024–2026 Ideguchi-Lab. Starting with version 1.0.2, muscopy is distributed under the MIT License.

Acknowledgments

We thank Zinan Zhou and Atsuko Price for their contributions to muscopy.

Metadata

Release files for muscopy 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for muscopy 1.0.2
File Size Uploaded
muscopy-1.0.2.tar.gz 51.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for muscopy 1.0.2
File Interpreter ABI Platform
muscopy-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 87.7 kB

Release files / muscopy-1.0.2.tar.gz

Download URL muscopy-1.0.2.tar.gz
Size 51.8 kB
Tags Source
SHA-256 checksum
How to use checksums
41305fc6033f4865936f9314c56ec5cfbd6eefabe3e8cef78b7e3746601321ed
BLAKE2b-256 checksum
How to use checksums
a71b09e5f153369d3c85fef74d88a51aedfb5183d6671ccbb4766d18cb7c2f9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Release files / muscopy-1.0.2-py3-none-any.whl

Download URL muscopy-1.0.2-py3-none-any.whl
Size 35.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60087675663e06a60ee39eac15334614cda3a75879bcc7a4b050d18572cffd43
BLAKE2b-256 checksum
How to use checksums
f2e479beb7a2f5ce56d25b216bb42b6d5c1b3aa689634af963464f1f5a459810
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page