Skip to content

Commit 6ad55e8

Browse files
committed
Merge branch 'main' of https://github.com/mehta-lab/recOrder into tscope
2 parents a28c547 + 96dca01 commit 6ad55e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2429
-3641
lines changed

.github/workflows/pytests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ['3.8', '3.9', '3.10']
14+
python-version: ['3.9', '3.10']
1515

1616
steps:
1717
- name: Checkout repo

.github/workflows/test_and_deploy.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- "*"
1212
pull_request:
1313
branches:
14-
- main
14+
- "*"
1515
workflow_dispatch:
1616

1717
jobs:
@@ -21,13 +21,13 @@ jobs:
2121
strategy:
2222
matrix:
2323
platform: [ubuntu-latest, windows-latest, macos-latest]
24-
python-version: ['3.8', '3.9', '3.10']
24+
python-version: ['3.9', '3.10']
2525

2626
steps:
27-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v3
2828

2929
- name: Set up Python ${{ matrix.python-version }}
30-
uses: actions/setup-python@v2
30+
uses: actions/setup-python@v4
3131
with:
3232
python-version: ${{ matrix.python-version }}
3333

@@ -50,16 +50,14 @@ jobs:
5050
python -m pip install --upgrade pip
5151
python -m pip install setuptools tox tox-gh-actions
5252
53-
# this runs the platform-specific tests declared in tox.ini
54-
- name: Test with tox
55-
uses: GabrielBB/xvfb-action@v1
53+
# https://github.com/napari/cookiecutter-napari-plugin/commit/cb9a8c152b68473e8beabf44e7ab11fc46483b5d
54+
- name: Test
55+
uses: aganders3/headless-gui@v1
5656
with:
5757
run: python -m tox
58-
env:
59-
PLATFORM: ${{ matrix.platform }}
6058

6159
- name: Coverage
62-
uses: codecov/codecov-action@v2
60+
uses: codecov/codecov-action@v3
6361

6462
deploy:
6563
# this will run when you have tagged a commit with a version number

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,6 @@ dmypy.json
145145
*/_version.py
146146
recOrder/_version.py
147147
*.autosave
148+
149+
# example data
150+
/examples/data_temp/*

README.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The acquisition, calibration, background correction, reconstruction, and applica
1414
Syuan-Ming Guo, Li-Hao Yeh, Jenny Folkesson, Ivan E Ivanov, Anitha P Krishnan, Matthew G Keefe, Ezzat Hashemi, David Shin, Bryant B Chhun, Nathan H Cho, Manuel D Leonetti, May H Han, Tomasz J Nowakowski, Shalin B Mehta, "Revealing architectural order with quantitative label-free imaging and deep learning," eLife 2020;9:e55502 DOI: 10.7554/eLife.55502 (2020).
1515
```
1616

17-
`recOrder` is to be used alongside a conventional widefield microscope fitted with a universal polarizer (Panel A below). The universal polarizer allows for the collection of label-free information including the intrinsic anisotropy of the sample and its relative phase (density). These measurements are collected by acquiring data under calibrated, polarization-diverse illumination followed by a computational reconstruction. The overall structure of `recOrder` is shown in Panel B, highlighting the two different usage modes and their features: graphical user interface (GUI) through a napari plugin, and a command line interface (CLI).
17+
`recOrder` is to be used alongside a conventional widefield microscope fitted with a universal polarizer (Panel A below). The universal polarizer allows for the collection of label-free information including the intrinsic anisotropy of the sample and its relative phase (density). These measurements are collected by acquiring data under calibrated, polarization-diverse illumination followed by a computational reconstruction. The overall structure of `recOrder` is shown in Panel B, highlighting the structure of the graphical user interface (GUI) through a napari plugin.
1818

1919
![Flow Chart](https://github.com/mehta-lab/recOrder/blob/main/docs/images/recOrder_Fig1_Overview.png?raw=true)
2020

@@ -34,13 +34,6 @@ conda create -y -n recOrder python=3.9
3434
conda activate recOrder
3535
```
3636

37-
> *Apple Silicon users please use*:
38-
>
39-
> ```sh
40-
> CONDA_SUBDIR=osx-64 conda create -y -n recOrder python=3.9
41-
> conda activate recOrder
42-
> ```
43-
4437
Install `recOrder-napari`:
4538

4639
```sh
@@ -53,10 +46,5 @@ Open `napari` with `recOrder-napari`:
5346
napari -w recOrder-napari
5447
```
5548

56-
View command-line help by running
57-
58-
```sh
59-
recOrder.help
60-
```
61-
62-
For more help, see [`recOrder`s documentation](./docs).
49+
For more help, see [`recOrder`'s documentation](https://github.com/mehta-lab/recOrder/tree/main/docs). To install `recOrder`
50+
on a microscope, see the [microscope installation guide](https://github.com/mehta-lab/recOrder/blob/main/docs/microscope-installation-guide.md).

docs/development-guide.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,6 @@
99
conda activate recOrder
1010
```
1111

12-
> *Apple Silicon users please use*:
13-
>
14-
> ```sh
15-
> CONDA_SUBDIR=osx-64 conda create -y -n recOrder python=3.9
16-
> conda activate recOrder
17-
> ```
18-
>
19-
> Reason: `napari` requires `PyQt5` which is not available for `arm64` from PyPI wheels.
20-
> Specifying `CONDA_SUBDIR=osx-64` will install an `x86_64` version of `python` which has `PyQt5` wheels available.
21-
2212
2. Clone the `recOrder` directory:
2313

2414
```sh

docs/images/cli_structure.png

62.6 KB
Loading
-53.1 KB
Loading

docs/microscope-installation-guide.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@ This guide will walk through a complete recOrder installation consisting of:
77

88
Before you start you will need a machine with Windows 10, a Meadowlark DS5020 connected to a liquid crystal device, and a microscope system compatible with `Micromanager`.
99

10+
## Install Meadowlark DS5020 and liquid crystals
11+
12+
Start by installing the Meadowlark DS5020 and liquid crystals using the software on the USB stick provided by Meadowlark. You will need to install the USB drivers and CellDrive5000.
13+
14+
**Check your installation versions** by opening CellDrive5000 and double clicking the Meadowlark Optics logo. **We have tested `recOrder == 0.4.0` with "PC software version 1.08" and "Controller firmware version 1.04",** and you will need to upgrade if your software and firmware versions are older.
15+
16+
To upgrade your "PC software version" use these steps:
17+
18+
- From "Add and remove programs", remove CellDrive5000 and "National Instruments Software".
19+
- From "Device manager", open the "Meadowlark Optics" group, right click `mlousb`, click "Uninstall device", check "Delete the driver software for this device", and click "Uninstall". Uninstall `Meadowlark Optics D5020 LC Driver` following the same steps.
20+
- Using the USB stick provided by Meadowlark, reinstall the USB drivers and CellDrive5000.
21+
- Confirm that "PC software version" == 1.08
22+
- **Upgrading users:** you will need to reinstall the Meadowlark device to your micromanager configuration file, because the device driver's name has changed to `MeadowlarkLC`.
23+
24+
To upgrade your DS5020's firmware, use Meadowlark's "Firmware Updater".
25+
1026
## Install recOrder software
1127

1228
(Optional but recommended) install [anaconda](https://www.anaconda.com/products/distribution) and create a virtual environment
@@ -27,11 +43,11 @@ should launch napari (may take 15 seconds on a fresh installation) with the recO
2743

2844
## Install and configure `Micromanager`
2945

30-
Install `Micromanager 2.0` nightly build `20220920` (https://micro-manager.org/Micro-Manager_Nightly_Builds).
46+
Download and install [`Micromanager 2.0` nightly build `20230426` (~150 MB link).](https://download.micro-manager.org/nightly/2.0/Windows/MMSetup_64bit_2.0.1_20230426.exe)
3147

32-
**Note:** We have tested recOrder with `20220920`, but most features will work with newer builds. We recommend testing a minimal installation with `20220920` before testing with a different nightly build or additional device drivers.
48+
**Note:** We have tested recOrder with `20230426`, but most features will work with newer builds. We recommend testing a minimal installation with `20230426` before testing with a different nightly build or additional device drivers.
3349

34-
Before launching `Micromanager`, download the Meadowlark device adapters and calibration files from the [release page](https://github.com/mehta-lab/recOrder/releases/) and place these three unzipped files into your `Micromanager` folder (likely `C:\Program Files\Micro-Manager` or similar).
50+
Before launching `Micromanager`, download the USB driver dll from the [release page](https://github.com/mehta-lab/recOrder/releases/) and place this pair of unzipped files into your `Micromanager` folder (likely `C:\Program Files\Micro-Manager` or similar).
3551

3652
Launch `Micromanager`, open `Devices > Hardware Configuration Wizard...`, and add the `MeadowlarkLcOpenSource` device to your configuration. Confirm your installation by opening `Devices > Device Property Browser...` and confirming that `MeadowlarkLCOpenSource` properties appear.
3753

@@ -72,4 +88,4 @@ Finally, enable port access so that `Micromanager` can communicate with recOrder
7288

7389
From the `recOrder` window, click `Switch to Online`. If you see `Success`, your installation is complete and you can [proceed to the napari plugin guide](./napari-plugin-guide.md).
7490

75-
If you you see `Failed`, check that `Micromanager` is open, check that you've enabled `Run server on port 4827`. If the connection continues to fail, report an issue with you stack trace for support.
91+
If you you see `Failed`, check that `Micromanager` is open, check that you've enabled `Run server on port 4827`. If the connection continues to fail, report an issue with your stack trace for support.

docs/reconstruction-guide.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
# Automating reconstructions
22

3-
`recOrder` is undergoing changes to the way that it handles automated reconstructions.
3+
`recOrder` uses a configuration-file-based command-line interface (CLI) to perform all reconstructions.
44

5-
`recOrder==0.2.0` had an offline mode with `config.yml` files that were used to configure reconstructions. These config files could be generated and saved via the GUI, and the reconstructions could be run via GUI or CLI.
5+
## How can I use `recOrder`'s CLI to perform reconstructions?
6+
`recOrder`'s CLI is summarized in the following figure:
7+
<img src="./images/cli_structure.png" align="center">
68

7-
Although the offline mode had many valuable and convenient features, we found that it had diverged from the online mode and it was difficult to recreate results between online and offline modes. These design limitations led us to the following plan for our upcoming releases:
9+
The main command `reconstruct` command is composed of two subcommands: `compute-tf` and `apply-inv-tf`.
810

9-
`recOrder==0.3.0` (release candidate in the coming weeks) will remove the offline mode and use a set of scripts instead. We recommend modifying the reconstruction scripts in `recOrder/examples/` to recreate and automate reconstructions.
11+
A reconstruction can be performed with a single `reconstruct` call. For example:
12+
```
13+
recorder reconstruct data.zarr/0/0/0 -c config.yml -o reconstruction.zarr
14+
```
15+
Equivalently, a reconstruction can be performed with a `compute-tf` call followed by an `apply-inv-tf` call. For example:
16+
```
17+
recorder compute-tf data.zarr/0/0/0 -c config.yml -o tf.zarr
18+
recorder apply-inv-tf data.zarr/0/0/0 tf.zarr -c config.yml -o reconstruction.zarr
19+
```
20+
Computing the transfer function is typically the most expensive part of the reconstruction, so saving a transfer function then applying it to many datasets can save time.
1021

11-
Although these scripts are not as user friendly as a GUI+CLI solution, we are preparing for a much cleaner solution in `1.0.0`, and we appreciate your patience as we go through this change. We ask users who are having any difficulty with the scripts to [open an issue](https://github.com/mehta-lab/recOrder/issues/new/choose) or [send us an email](mailto:shalin.mehta@czbiohub.org,talon.chandler@czbiohub.org).
22+
## What types of reconstructions are supported?
23+
See `/recOrder/examples/` for a list of example configuration files.
1224

13-
`recOrder==1.0.0` will use a single mode to acquire and reconstruct the data. We are currently planning a refactor that will enable an "acquire once, quickly iterate your reconstruction" workflow, an "acquire now, reconstruct later" workflow, and a "live acquisition, live reconstruction" workflow, among others.
25+
TODO: Expand this documentation...need docs for each reconstruction type and parameter.

examples/3D-bf-to-2D-phase.py

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)