Skip to main content

VLab4Mic: A Virtual Laboratory for Microscopy

A friendly toolkit to help researchers simulate fluorescence microscopy images, no coding required.

PyPI Python Version Downloads License Tests Coverage Contributors GitHub stars GitHub forks

VLab4Mic lets you explore, test, and validate imaging experiments before stepping into the microscope room.
Whether you are new to Python or an experienced bioimage researcher, VLab4Mic provides a safe sandbox to:

  • Build virtual samples from PDB/CIF structures
  • Apply direct or indirect fluorescent labeling
  • Introduce Structural integrity, crowding, and structural variation
  • Simulate image acquisition across modalities
  • Run parameter sweeps to explore experimental conditions
  • Compare noiseless vs. realistic acquisitions

This README is written to be friendly for beginners while maintaining the technical depth experienced users expect.

Who Is This Tool For?

  • New microscopy users: to gain intuitive understanding without coding
  • Researchers designing experiments: testing probes, PSFs, exposure times
  • Microscopy experts: benchmarking reconstruction methods or PSFs

🚀 Quick Start Options

Option Skills Needed Best For
1. Google Colab None Beginners, teaching, quick experiments
2. Local Jupyter Notebooks Basic installation Smooth widget-based use
3. Python Scripts Comfortable with code Full flexibility & automation

🟢 Option 1 — Google Colab (No Installation Needed)

The easiest way to start.

✔ No installation
✔ No configuration
✔ Works in browser
✔ Always up to date

👉 Click to open the main notebook:

Category Description Notebook Colab
Main Interface Create virtual samples & simulate imaging Notebook Open in Colab
Parameter Sweeps Configure & run simulation sweeps Notebook Open in Colab

If the Colab link fails:

  1. Click the Jupyter badge (opens the raw notebook)
  2. Download the .ipynb file
  3. Open Google Colab → File → Upload notebook

🔵 Option 2 — Local Installation (Beginner-Friendly)

1️⃣ Create a virtual environment

You may use Conda or similar.

Using Conda:

Run the following command (replace MYENV with your desired environment name):

conda create --name MYENV python=3.11

Then activate it:

conda activate MYENV

2️⃣ Install VLab4Mic and its associated library to use the codeless jupyter notebooks

pip install vlab4mic vlab4micjupyter

3️⃣ Launch Jupyter Lab

jupyter lab

4️⃣ Download and open notebooks

From:
https://github.com/HenriquesLab/VLab4Mic/tree/main/notebooks


🔴 Option 3 — Use VLab4Mic as a Python Library (Advanced)

Example script:

from vlab4mic.experiments import image_vsample
import matplotlib.pyplot as plt

modalities = ["Widefield", "Confocal", "STED"]

images, noiseless, experiment = image_vsample(
    structure="7R5K",
    probe_template="Antibody",
    probe_target_type="Sequence",
    probe_target_value="ELAVGSL",
    multimodal=modalities,
    number_of_particles=10,
    run_simulation=True,
)

fig, axs = plt.subplots(1, len(modalities))
for i, mod in enumerate(modalities):
    axs[i].imshow(images[mod][0], cmap="magma")
    axs[i].set_title(mod)
plt.show()

For more examples see /examples.


Documentation & Manual


Core Features

✔ Structural modelling

✔ Virtual sample creation

✔ Imaging simulations

✔ Parameter sweeps

✔ Widget-based GUI

✔ Flexible Python API


Troubleshooting

Jupyter won't open → Environment not activated.
ImportError → Install VLab4Mic inside the active environment.
Colab won't load → Upload notebook manually.

If issues persist, open an issue!


Contributing

Contributions welcome!
See: https://github.com/HenriquesLab/VLab4Mic/blob/main/CONTRIBUTING.md

Support

Metadata

Release files for vlab4mic 0.0.19

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

Source distribution (sdist)

Source distribution for vlab4mic 0.0.19
File Size Uploaded
vlab4mic-0.0.19.tar.gz 118.3 kB Details

Built distribution (wheel)

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

Total release size: 253.4 kB

Release files / vlab4mic-0.0.19.tar.gz

Download URL vlab4mic-0.0.19.tar.gz
Size 118.3 kB
Tags Source
SHA-256 checksum
How to use checksums
055d1f7503a88e5ef4f4fe50c3232158a16fed30330a7c868f747aabfa788b62
BLAKE2b-256 checksum
How to use checksums
cacb2b8c4ea913605ab840d723194374f82870f76ff54d8bdc519fbcd817a468
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / vlab4mic-0.0.19-py3-none-any.whl

Download URL vlab4mic-0.0.19-py3-none-any.whl
Size 135.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62c6f97ce8811f2836986516a610c26e12ecf7915703a0b2115e5795b69e1f78
BLAKE2b-256 checksum
How to use checksums
5485bb7ccfedd86e44ed5efe5a16a5220ba5e0311daa59289ff441f5aa8dad65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release history Release notifications | RSS feed

0.1.1

2 release files

0.1.0

2 release files

0.0.21

2 release files

This release

0.0.19 This release

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

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