Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
47e79fd
dirty and non-working script attempt
nvladimus Jun 17, 2024
df63cd9
basic timelapse script works, but no way to stop after N time points …
nvladimus Jun 19, 2024
e1c3e05
increase exposure limits
nvladimus Jul 31, 2024
5420eea
Merge branch 'master' of https://github.com/mesoSPIM/mesoSPIM-control
nvladimus Jul 31, 2024
7e77155
change logging to thread name instead of ID
nvladimus Aug 6, 2024
37df42d
remove random noise from simulated image for speed (500 ms-> 50 ms)
nvladimus Aug 7, 2024
98d4c16
major: moved ImageWriter to separate thread
nvladimus Aug 7, 2024
06e0785
port to python 3.12, add garbage collection
nvladimus Aug 22, 2024
ee4d404
create basic TIFF writing speed test
nvladimus Aug 23, 2024
d106a3b
major: changed sharing data between camera and writer for `deque` in…
nvladimus Aug 23, 2024
81a3a15
revert mesoSPIM_State.py, cleanup
nvladimus Aug 26, 2024
66a5e05
pre-release cleanup
nvladimus Aug 26, 2024
0e0d341
update framerates to measured values
nvladimus Aug 26, 2024
46bb6e0
stop the acquisition in a thread-safe way, with signal/slot
nvladimus Aug 27, 2024
882c987
update dependencies to the latest (py3.7), except PyQt5 (avoid StateO…
nvladimus Sep 27, 2024
7d7a2b9
lower the camera and writer thread priorities
nvladimus Sep 27, 2024
9dde301
reverse PyQt5-sip upgrade
nvladimus Sep 27, 2024
8c16d17
reverse upgrade qdarkstyle
nvladimus Sep 27, 2024
88f15df
Migrate to py 3.12.
nvladimus Oct 24, 2024
8dac7a4
version bump and comments
nvladimus Oct 24, 2024
0e35e8a
change position timer period, update CHANGELOG and cleanup
nvladimus Oct 25, 2024
8e2eba4
debug message min and max values for DAQ error out-of-range troublesh…
nvladimus Oct 31, 2024
57ccf90
roll back ASI polling int to 250 ms
nvladimus Nov 7, 2024
33ab196
Revert "danger: potentially slow acquisitions, move_relative(... wait…
nvladimus Nov 7, 2024
5366148
clean up
nvladimus Nov 7, 2024
d62960e
Update README.md
nvladimus Nov 7, 2024
764107a
Update pyproject.toml
nvladimus Nov 7, 2024
7b71906
Merge branch 'release/candidate-py312' of https://github.com/mesoSPIM…
nvladimus Nov 7, 2024
144a583
UCL 5-colour config file
TchLenn Nov 8, 2024
2ccd607
no signals to shutter_left
TchLenn Nov 8, 2024
a440ace
cope with ao>9
TchLenn Nov 8, 2024
b63763c
cleanup and minor fix
nvladimus Nov 11, 2024
128d4cb
major fix: prevent mesoSPIM_StateSingleton reinitialization
nvladimus Nov 12, 2024
70e8b67
major fixes: self.state inherited form parent objects instead of bein…
nvladimus Nov 14, 2024
e1c6d24
update galvo aps via state request
nvladimus Nov 15, 2024
6c2d3a7
smooth update of spinbox parameters and state
nvladimus Nov 15, 2024
1483d7d
pause spinbox for 100 ms for update
nvladimus Nov 15, 2024
ecdb34b
Update mesoSPIM_MainWindow.py
nvladimus Nov 15, 2024
ebf26e8
freeze and fix dependencies
nvladimus Nov 15, 2024
3bc0ee6
Update mesoSPIM_Core.py
TchLenn Nov 15, 2024
9b0d5ad
Update pyproject.toml
nvladimus Nov 15, 2024
0ef3a5e
Revert "no signals to shutter_left"
nvladimus Nov 15, 2024
5cec23b
make ao string parsing more compact
nvladimus Nov 15, 2024
3c4a2fb
richer zoom & objective names. No state signal emission.
nvladimus Nov 18, 2024
0beeced
Merge branch 'pr/82' into release/candidate-py312
nvladimus Nov 18, 2024
fd0e776
#82 by @TchLenn
nvladimus Nov 18, 2024
06f2a3e
minor
nvladimus Nov 18, 2024
62583d6
revert core changes from #82
nvladimus Nov 19, 2024
490de27
fix: backward compatibility of zoom names with ETL files
nvladimus Nov 19, 2024
2dd1371
fix: jittery galvo amplitude and other spinboxes, remove 'galvo_r_amp…
nvladimus Nov 26, 2024
55d1118
feat: aut-checking of ETL .csv file, it will be populated from the GU…
nvladimus Nov 27, 2024
5811571
fix: re-enable spinbox after 250 ms to prevent looping between state-…
nvladimus Nov 27, 2024
a947784
GUI change: remove `Log` tab to avoid overhead
nvladimus Nov 29, 2024
996a1a6
update default config files
nvladimus Dec 6, 2024
785b593
GUI tooltips
nvladimus Dec 10, 2024
c5892c0
fix: parsing `'laser_task_line' : 'PXI6733/ao0:3'` or `'/PXI6733/ao0…
nvladimus Dec 12, 2024
0d7911f
python 3.12 badge
nvladimus Dec 12, 2024
e5f0f99
Update README.md
nvladimus Dec 12, 2024
634501f
Update README.md
nvladimus Dec 12, 2024
56a6f11
Update README.md
nvladimus Dec 12, 2024
c97da22
Update README.md
nvladimus Dec 12, 2024
9ea7bb1
Merge branch 'master' into timelapse
nvladimus Feb 5, 2025
77e6e75
timelapse via script with a defined number of time points
nvladimus Feb 5, 2025
91b763b
thread-safe execution via signal/slot
nvladimus Feb 5, 2025
5270704
Create timelapse-launch.png
nvladimus Feb 5, 2025
7f1a945
bugfix? flush h5 every 100 frames
nvladimus Feb 21, 2025
897693b
bugfix: 'MAX' projection, enable by default
nvladimus Feb 21, 2025
c39c391
move 'MAX_' to the start of file name
nvladimus Feb 22, 2025
3beb1d9
cleaner flush of H5
nvladimus Feb 25, 2025
218a820
breaking: move image updates to deque
nvladimus Feb 25, 2025
1db0392
remove deprecated subsampling of displayed images
nvladimus Feb 26, 2025
fcf6ee5
bugfix: explicit initialization of first raw in Acq Manager
nvladimus Mar 4, 2025
591ba2c
Update CHANGELOG.md
nvladimus Mar 10, 2025
528a113
fix the AF function
nvladimus Mar 18, 2025
93fe10b
safety UI for zoom change
nvladimus Apr 7, 2025
ad99ff8
disable feedback from camera to GUI, to avoid looping
nvladimus Apr 7, 2025
8993af2
disable unnecessary sig_update_gui_from_state to avoid feedback loops
nvladimus Apr 29, 2025
8059e5c
example file of exposure scaling
nvladimus Jun 11, 2025
d633744
restore screen subsampling
nvladimus Jun 27, 2025
3a0f028
fix LS markers and crosshairs positions
nvladimus Jul 1, 2025
b666f49
fix interactive subsampling ratios
nvladimus Jul 2, 2025
cfa0363
fix Box ROI
nvladimus Jul 2, 2025
ce54b7a
Update mesoSPIM_MainWindow.ui
nvladimus Jul 2, 2025
512472e
add user forum link and static badge
nvladimus Aug 21, 2025
b048ffb
Section rename (Further resources)
nvladimus Aug 21, 2025
e46466f
test new docs format
nvladimus Sep 4, 2025
aad7cd5
add CPU core id to debug info
nvladimus Sep 5, 2025
f23f760
clean up
nvladimus Sep 5, 2025
6f7a7f3
breaking change? Serial worker moved to Core thread.
nvladimus Sep 8, 2025
ffe58b2
major: return of temporal subsampling, minimize status messages, proc…
nvladimus Sep 9, 2025
ea63c35
minor fix
nvladimus Sep 9, 2025
acb8f85
Create config_HIFO-H45-PFI0-direct-connection.py
nvladimus Sep 23, 2025
a475d5b
Merge branch 'release/candidate-py312'
nvladimus Sep 26, 2025
881987c
Update CHANGELOG.md
nvladimus Sep 26, 2025
85f4807
version bump to 1.11.1
nvladimus Sep 30, 2025
fa7da41
implemented prototype for ome zarr export (multichannel is supported,…
severinothomasin Oct 17, 2025
94bfa2d
Added support for metadata handling
severinothomasin Oct 21, 2025
1604a00
revert [fa7da41be127de88261896776f8c369803700ed2] to remove linux fun…
nvladimus Oct 24, 2025
727e66e
add necessary changes from [fa7da41be127de88261896776f8c369803700ed2]
nvladimus Oct 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
## Release September 2025 [1.11.1]
:rocket: Overhaul of internal bootlnecks that hampered performance on some systems and caused GUI freezing / high CPU loads.
### Bugfixes :bug:
- fixed excessive communication between threads causing high CPU load on some systems.
- moved `serial_worker` into `core` thread to avoid conflicts of relative motion operations with GUI thread.
- added CPU core identifiers for different operations in `debug` mode or logging, to pinpoint performance issues.
- fixed autofocus (AF) function in the GUI.
- returned `'camera_display_live_subsampling': 2, `, `'camera_display_acquisition_subsampling': 2,` and `'camera_display_temporal_subsampling': 2,` into the config file, to reduce camera display load on older computers.
- fixed light-sheet markers and box ROI markers in the Camera window, which were not displayed correctly after zoom change.

## Release March 2025 [1.11.0].
### Performance :rocket:
- implementation of time lapse function via script. See example script at `mesoSPIM/scripts/timelapse.py` for details.
- images can now be displayed at full resolution during either live mode or acquisition, with no performance penalty. Deprecated config parameters:
``` python
'camera_display_live_subsampling': 2,
'camera_display_acquisition_subsampling': 2,
```
to enjoy full-resolution image in real time. The corresponding GUI elements for controlling the downsampling were removed.

### Bugfixes :bug:
- duplication of sub-stacks while writing large H5 files (>0.5 TB) and freezing at the end of acquisition. Fixed by replacing signal/slot mechanism for CameraWindow image update to deque mechanism. Boosted performance and stability.
- `MAX` projection is always on by default, if the dataset is asvaed in TIFF or RAW format. No need to check the box in the Image Processing Wizard. This generates maximum intensity projection as TIFF file for each stack in the acquisition list.
- explicit initialization of the first raw in Acquisition Manager, to avoid undefined GUI widget states.

## Release December 2024 [1.10.2].
### Performance :rocket:
- migration to Python 3.12 for better performance and compatibility with the latest libraries.
- faster loading and response time of the GUI
- subsampling of the camera image for less frequent rendering in the GUI (less CPU load) during acquisition, controlled by `'camera_display_temporal_subsampling': 2,` parameter in the config file. Value `1` means no subsampling (show every image during acquisition).
- change recommended package manager to `mamba` to avoid Anaconda license issues.
- change the default timer for stage position update from 50 ms to 100 ms, to reduce communication and logging overhead. ASI stages updated every 200 ms, PI stages every 100 ms.
- zoom dictionary can include multi-word names like `5x Mitutoyo` instead of `5x` for better UI and meta-infomation.
- spinboxes are limited in scroll speed to allow hardware catch up with UI in the interactive mode
- #82: uploading UCL-Bechtop config file `config/examples/config_benchtop_UCL_5laser.py` by @TchLenn and parsing of double-digit strings like `ao21:22` in config file.
- remove `Log` tab from the GUI, as it was not used by the users and was causing unnecessary overhead, esp. in DEBUG mode.

### User Interface :lollipop:
- ETL config files (.csv) are automatically checked and updated with the `laser`-`zoom` combination selected in GUI, to avoid errors in the acquisition. User can even start with an empty ETL config file, it will be auto-filled with the `laser`-`zoom` combinations on the go.
- more tooltips added to the GUI elements for better user experience.

### :wrench: system changes
- pip depenencies are frozen for staibilty
- `mesoSPIM_State` is only nominally a singleton, but actually inherited by classes from their parent class to ensure unique state and thread safety.
- no signal from `mesoSPIM_State` every time the state is updated. The GUI is updated from state by a separate signal/slot from member classes, on demand.
- bugfix: serial communication with ASI stages is now thread-safe, with no conflicts between GUI (Main) and Core threads.
- bugfix: parsing config file with either `'laser_task_line' : 'PXI6733/ao0:3'` or `'/PXI6733/ao0:3'` notation (Alan Watson).

## Release candidate August 2024 [1.10.0]. Cancelled due to performance issues on some setups.
### Performance :rocket:
- improved acquisition speed from 2.5 to 5 FPS, by moving image writing to a separate thread and using `collections.deque` mechanism for frame sharing between the camera and image writing threads, instead of less-performant `QThread` signal/slot mechanism.
- best writing speed and lowest CPU overhead is achieved with NVMe SSD disks, recommended.
- the option `buffering = {...}` in config file is deprecated from v.1.10.0 and will be ignored, due to improved program performance.
- dependencies are updated to the latest versions: `numpy`, `scipy`, `tifffile`, etc.

## Release July 2024 [1.9.0]
### User Interface :lollipop:
- :gem: "Auto L/R illumination" button in the Acquisition manager to select tile illumination based on its x-position.
Expand Down
53 changes: 29 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6109315.svg)](https://doi.org/10.5281/zenodo.6109315)
[![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)](https://www.python.org/downloads/release/python-370/)
[![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-312/)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Static Badge](https://img.shields.io/badge/user_forum-image.sc-blue)](https://forum.image.sc/tag/mesospim)

# mesoSPIM-control
Image acquisition software for [mesoSPIM](http://mesospim.org/) light-sheet microscopes.
A mesoSPIM (mesoscale selective plane illumination microscope) is optimized for fast imaging of large (many cm³) cleared tissue samples at near-isotropic resolution.
Currently, more than 20 mesoSPIM setups are operational [around the world](http://mesospim.org/setups/).

Parts lists, drawings, and instructions for building a mesoSPIM can be found in the [mesoSPIM wiki](https://github.com/mesoSPIM/mesoSPIM-hardware-documentation).
# mesoSPIM-control
Image acquisition software for [mesoSPIM](http://mesospim.org/) light-sheet microscopes. Compatible with all official versions of mesoSPIM hardware (Benchtop, v4, v5), and multple alternative configurations.

## Overview
The mesoSPIM is a versatile light-sheet microscope for imaging
cleared tissue samples. It is compatible with all major clearing approaches and optimized for quickly creating large-field-of-view overview datasets.
The mesoSPIM (mesoscale selective plane illumination microscope) is a family of versatile open-source microscopes optimized for fast imaging of large (many cm³) cleared tissue samples at near-isotropic resolution.
Currently, more than 30 mesoSPIM setups are operational [around the world](http://mesospim.org/setups/).
Parts lists, drawings, and instructions for building a mesoSPIM can be found in the wiki pages:
- [Benchtop mesoSPIM](https://github.com/mesoSPIM/benchtop-hardware)
- [mesoSPIM v4-5](https://github.com/mesoSPIM/mesoSPIM-hardware-documentation)

The `mesoSPIM-control` is python-based acquisition software with user-friendly GUI, based on PyQt5 framework.

## Installation

### Prerequisites
* Windows 7 or Windows 10, 64-bit
* Python >=3.7, we recommend [Anaconda](https://www.anaconda.com/download/)
* Windows >=7, 64-bit
* Python >=3.12, we recommend [Miniforge](https://github.com/conda-forge/miniforge) and `mamba` package manager that comes with it. The Anaconda distribution is not recommended since the change of its terms of service in 2020. If you have existing Anaconda installation, you can still use `conda` instead of `mamba` in the instructsions below.

### Device drivers
#### National Instruments DAQ devices
Expand All @@ -36,32 +39,32 @@ When installing the MS Visual C++ tools, make sure to check [C++ build tools](ht
* ASI stages: [ASI Tiger drivers](http://www.asiimaging.com/support/downloads/tiger-controller-console/).
If using USB connection, check ASI instructions on [USB support](http://www.asiimaging.com/support/downloads/usb-support-on-ms-2000-wk-controllers/)

## Installation steps
### Installation steps
1. Clone this repository either by via GitHub Desktop (recommended) or by downloading and unpacking the ZIP file into folder `C:/Users/Public/mesoSPIM-control`

![image](https://user-images.githubusercontent.com/10835134/198991579-df1e5acc-d246-425b-a345-03ba93a1f0bb.png)

2. Open Anaconda prompt, create and activate a new environment `mesoSPIM-py37`:
2. Open Miniforge prompt, create and activate a new environment `mesoSPIM-py312`:
```
conda create -p C:/Users/Public/conda/envs/mesoSPIM-py37 python=3.7
conda activate C:/Users/Public/conda/envs/mesoSPIM-py37
mamba create -p C:/Users/Public/mamba/envs/mesoSPIM-py312 python=3.12
mamba activate C:/Users/Public/mamba/envs/mesoSPIM-py312
```
3. Install mesoSPIM-specific libraries:
```
cd C:/Users/Public/mesoSPIM-control
pip install -r requirements-anaconda.txt
pip install -r requirements-conda-mamba.txt
```

## Launching

### Anaconda prompt
### Miniforge prompt
1. `cd C:/Users/Public/mesoSPIM-control/mesoSPIM`
2. `python mesoSPIM_Control.py` (with argument `-D` for demo mode)

### Desktop shortcut (fast launch)
From Anaconda prompt, type `where conda`, and enter the result (e.g. `C:\Users\Nikita\anaconda3\Scripts\activate.bat`) into line 10 of `mesoSPIM.bat` file:
From Miniforge prompt, type `where mamba`, and enter the result (e.g. `C:\Users\Nikita\miniforge3\Scripts\activate.bat`) into line 10 of `mesoSPIM.bat` file:
```
"%windir%\System32\cmd.exe" /k ""C:\Users\Nikita\anaconda3\Scripts\activate.bat" "C:\Users\Public\conda\envs\mesoSPIM-py37" && python "mesoSPIM_Control.py""
"%windir%\System32\cmd.exe" /k ""C:\Users\Nikita\miniforge3\Scripts\activate.bat" "C:\Users\Public\conda\envs\mesoSPIM-py312" && python "mesoSPIM_Control.py""
```
Save changes and double-click the `mesoSPIM.bat` file - this should launch the control software. If this does ot happen, check the Anaconda path. Once this works, create a shortcut and place it on your desktop for quick launching.

Expand All @@ -75,18 +78,20 @@ If you have multiple config files you will be prompted to choose one that corres
Once your hardware is connected and turned on, change the `Demo` devices to hardware-specific names, set their parameters, and test each device.
See [Wiki](https://github.com/mesoSPIM/mesoSPIM-hardware-documentation/wiki/mesoSPIM_configuration_file) for details.



## Updating existing installation
To ensure safe transition to a new version, we recommend fresh installation of each new version into a separate folder (e.g. `mesoSPIM-control-Nov2022`) using the steps above. In order to unlock all new features, please review and add new sections from the [demo config file](/mesoSPIM/config/demo_config.py) to your old configuration file.
To ensure safe transition to a new version, we recommend fresh installation of each new version into a separate folder (e.g. `mesoSPIM-control-Jan2025`) using the steps above. In order to unlock all new features, please review and add new sections from the [demo config file](/mesoSPIM/config/demo_config.py) to your old configuration file.

## Troubleshooting
Some errors during software startup and acquisition can be displayed in the mamba/conda terminal, while a highly detailed log will be recorded in the time-stamped file in `mesoSPIM/log` folder. This log file is individual for each session, named by date and time of software start-up, eg `mesoSPIM/log/20241210-154845.log`.

## Documentation for users
## Further resources
For instructions on how to use mesoSPIM-control, please check out the documentation:
* [PPT](https://github.com/mesoSPIM/mesoSPIM-powerpoint-documentation),
* ZMB (Univerity of Zurich) guides on [mesoSPIM start-up, setting up, and acquisition](https://zmb.dozuki.com/c/Lightsheet_microscopy#Section_MesoSPIM)
* [PPT](https://github.com/mesoSPIM/mesoSPIM-powerpoint-documentation) (outdated version),
* youtube [channel](https://www.youtube.com/c/mesoSPIM),
* subscribe to our [mailing list](http://eepurl.com/hPBRhj).
* join the discussion at the [image.cs user forum](https://forum.image.sc/tag/mesospim) (since August 2025)

If you have questions, contact the current core developer [Nikita Vladimirov](mailto:vladimirov@hifo.uzh.ch).

## How to cite this software
Fabian F. Voigt, Nikita Vladimirov, Christian Schulze, Rob Campbell, & Fritjof Helmchen. (2022). MesoSPIM control: An open-source acquisition software for light-sheet microscopy written in Python and Qt. Zenodo. https://doi.org/10.5281/zenodo.6109315
Expand Down
Loading