> ## Documentation Index
> Fetch the complete documentation index at: https://docs.biohub.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# WaveOrder microscopy data reconstruction

> Use the Biohub MCP `waveorder-tutorial` Skill to reconstruct your own microscopy data.

[WaveOrder](https://github.com/mehta-lab/waveorder) performs physics-informed reconstructions of labelfree and fluorescence microscopy data, which can sharpen, denoise, improve contrast, and improve interpretability for downstream tasks. Use the `waveorder-tutorial` Skill to run a WaveOrder reconstruction on your own microscopy data, or on a small sample dataset from Zenodo. The Skill works one step at a time and requires additional user input, so expect a conversation rather than a single answer.

> [!NOTE]
>
> This Skill calls no Biohub tools, so none of your microscopy data reaches Biohub.
> Your AI client runs the `wo` command, napari, and the Skill's scripts on your own computer.
> A first reconstruction usually takes a couple of hours of tuning.

## Before you begin

Before you run the Skill, ensure you have the following set up:

* Biohub MCP connected to a client that can run commands on your computer, such as Claude Code, Codex, or Cursor. See [Quickstart](https://docs.biohub.ai/biohub-mcp/quickstart.md) for setup instructions.
* [uv](https://docs.astral.sh/uv/) installed. The Skill uses to install WaveOrder and napari and to run its scripts.
* Computer with a display. The Skill displays results in a napari window.
* Appropriate dataset. WaveOrder works best on volumetric labelfree and fluorescence microscopy data acquired from weakly scattering samples, which means relatively thin and transparent biological specimens. Data can be in TIFF, NumPy, or plain zarr formats. You can also let the Skill download its sample dataset to demonstrate the reconstruction.

## Run the Skill

Try WaveOrder on its sample data

Using the Biohub MCP waveorder-tutorial Skill, I want to try waveorder but I don't have any data yet. Can you show me what it does?

Reconstruct your own data

Using the Biohub MCP waveorder-tutorial Skill, help me reconstruct the microscopy data at (path to your dataset).

If your client answers without the Skill, ask it to read `skill://waveorder-tutorial/SKILL.md` and follow it, or see [The assistant ignores a Skill](https://docs.biohub.ai/biohub-mcp/troubleshooting.md#the-assistant-ignores-a-skill).

## What the Skill guides

1. It explains what WaveOrder does, checks that it suits your sample, and installs WaveOrder and napari with uv once you agree.
2. It requires the dimensions, contrast type, voxel size, and imaging conditions of the data, one at a time and starting from the file's metadata.
   It stops if the data is a single 2D image, because WaveOrder needs a Z stack.
3. It converts TIFF, NumPy, or plain zarr data to the OME-Zarr format.
   It then crops one position and one time point (and one cell when it is much smaller than the field of view) into `roi.zarr` for fast iteration.
4. It drafts 2D or 3D phase or fluorescence configs, including both signs of `invert_phase_contrast` for label-free data.
5. It tunes the forward model on `roi.zarr` with parameter sweeps shown side by side in napari, and raises regularization last.
6. It tests the tuned config on other positions, tries automatic tuning for parameters that drift, and estimates what the full dataset needs.

## Expected result

The result of your Skill exploration includes:

* A working folder with the converted data, draft configs, sweeps, and the final config.
* For each config parameter, where its value came from: metadata, you, a manual sweep, or automatic tuning.
* A wall-time, memory, and storage estimate for reconstructing the full dataset.

> [!WARNING]
>
> The Skill displays every result in napari, but does not provide an evaluation of the results.

## What runs on your computer

This Skill requires a few commands and downloads to be run on your computer and include the following:

* If the `wo` command is missing, the Skill installs `waveorder[all]`, which includes napari, with `uv pip install`.
* For the sample data, it downloads a brightfield defocus dataset of about 24 MB from Zenodo into `~/.waveorder_tutorial_data`.
* It saves a copy of each bundled script it needs, such as the OME-Zarr converter and the parameter sweep, into your working folder and runs it there.

## Skill files

| Resource | URI |
| - | - |
| Instructions | `skill://waveorder-tutorial/SKILL.md` |
| File list | `skill://waveorder-tutorial/_manifest` |
| License (BSD 3-Clause) | `skill://waveorder-tutorial/LICENSE.md` |

## Related documentation

* [WaveOrder transfer function tutorial](https://docs.biohub.ai/biohub-mcp/skills/waveorder-visualize-otf.md)
* [Skills overview](https://docs.biohub.ai/biohub-mcp/skills/overview.md)
* [Security and privacy](https://docs.biohub.ai/biohub-mcp/security.md)
* [WaveOrder on GitHub](https://github.com/mehta-lab/waveorder)


## Related topics

- [WaveOrder transfer function](https://docs.biohub.ai/biohub-mcp/skills/waveorder-visualize-otf.md)
- [Biohub MCP Skills](https://docs.biohub.ai/biohub-mcp/skills/overview.md)
- [Biohub MCP server](https://docs.biohub.ai/biohub-mcp/overview.md)
- [Welcome to the Biohub Docs](https://docs.biohub.ai/index.md)
- [Connect to the Biohub MCP and run your first query](https://docs.biohub.ai/biohub-mcp/quickstart.md)
