Skip to content

v1 CLARIOstar fluorescence: filter detection, filters by slot, z-profile of a well - #1527

Merged
BioCam merged 1 commit into
PyLabRobot:mainfrom
BioCam:bmg-clariostar-v1-fluorescence-filter-detection-and-focus
Oct 22, 2026
Merged

BioCam merged 1 commit into
PyLabRobot:mainfrom
BioCam:bmg-clariostar-v1-fluorescence-filter-detection-and-focus

Conversation

@BioCam

@BioCam BioCam commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

The Problem

A filter in the CLARIOstar's slides can only be used by building its OpticalFilter or DichroicFilter by hand, with band edges the user has to know - although the reader can scan its own filters. And there is no way to find the focal height of a sample: every read takes either the default (25 % of the well depth) or a height given explicitly, both guessed, while the signal can fall to half a few millimetres from its peak.

PR Content

  • Fluorescence.detect_all_filters() scans the reader's 11 filter positions and returns its three slides: excitation, dichroic, emission. Each position holds the filter found there with its band, or nothing if it is empty. The slides are also kept as excitation_filter_slide, dichroic_filter_slide and emission_filter_slide.

    detect_all_filters on our reader: the 11 positions, one filter per slide, and the bands the driver decodes

  • A FluorescenceChannel filter can then be given by its position on its slide (excitation_filter=1), or by the name of a filter assigned to the slide.

  • Fluorescence.measure_z_profile(fluorescence_channel, well=...) runs the reader's z-scan of one well, in 0.1 mm steps down from maximum_focal_height. The CLARIOstarZProfileResult holds the profile, the peak's counts and their percent of the detector's range, the timestamps, and peak_focal_height to pass to measure. With gain_target_percent the firmware also fits the gain at the peak.

  • measure and measure_spectrum point to measure_z_profile for the focal height with the most signal.

  • Cancelling a filter scan or a z-scan drains the reply in flight before STOP.

fluorescence = reader.fluorescence

# 1. detect the filters in the three slides, once per fitted set (about 4 minutes)
excitation_slide, dichroic_slide, emission_slide = await fluorescence.detect_all_filters()
excitation_slide[1]  # the filter at position 1 of the excitation slide, with its band

# 2. use them by their position: here position 1 of each slide
channel = FluorescenceChannel(excitation_filter=1, dichroic_filter=1, emission_filter=1)

# 3. find the focal height with the most signal, the gain fitted to 90 % of the detector's range
profile = await fluorescence.measure_z_profile(
    channel, well=plate.get_well("A1"), gain_target_percent=90
)

# 4. read the plate there
result = await fluorescence.measure(
    channel, gain=profile.gain, focal_height=profile.peak_focal_height
)

🤖 Generated with Claude Code

…-profile of a well

- `Fluorescence.detect_all_filters` scans the 11 filter positions and returns the three slides.
- A `FluorescenceChannel` filter can be given by slot or name on the slides.
- `Fluorescence.measure_z_profile` runs the reader's z-scan of one well, with the gain fit at the
  peak for a target.
- The filter scan and the z-scan drain the reply in flight before STOP when cancelled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BioCam
BioCam force-pushed the bmg-clariostar-v1-fluorescence-filter-detection-and-focus branch from edb9ee3 to 25545f0 Compare October 22, 2026 06:25
@BioCam
BioCam marked this pull request as ready for review October 22, 2026 06:30
@BioCam
BioCam requested a review from a team as a code owner October 22, 2026 06:30
@BioCam
BioCam merged commit 6d775b4 into PyLabRobot:main Oct 22, 2026
26 checks passed
@BioCam
BioCam deleted the bmg-clariostar-v1-fluorescence-filter-detection-and-focus branch October 22, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant