Skip to content

enh: add the fluorescence baseline offset to the Quick View traces - #247

Merged
paulmueller merged 1 commit into
DC-analysis:mainfrom
paulmueller-agent:enh/trace-baseline-offset
Nov 20, 2026
Merged

paulmueller merged 1 commit into
DC-analysis:mainfrom
paulmueller-agent:enh/trace-baseline-offset

Conversation

@paulmueller-agent

Copy link
Copy Markdown
Contributor

Closes #81

dclab defines the configuration keys [fluorescence]: baseline 1 offset (also 2 and 3). According to dclab.definitions.meta_const, the offset "is added to the trace data to obtain the actual signal used for data processing (e.g. obtaining the fl1_max feature)". The traces in RT-DC files are stored without the offset (DCKit can set it without modifying the trace data, see DCKit#11, dclab#101).

Changes

  • QuickView.get_trace_baseline_offset(channel) returns the offset of a channel (0 if the key is not set).
  • QuickView.show_traces adds the offset to the raw and median traces of each channel before plotting (as float, to avoid integer overflows with the int16 trace data). The y range is computed from the corrected traces.

Test: test_trace_baseline_offset_issue_81 sets fluorescence:baseline 1 offset = 17 in a copy of calibration_beads_47.rtdc. It checks that the plotted FL-1 trace equals the stored trace + 17 and that FL-2 (no offset) is unchanged. The test fails without the change; the Quick View tests pass.

🤖 Generated with Claude Code

…C-analysis#81)

The baseline offset ([fluorescence]: "baseline N offset") is added to
the trace data to obtain the actual signal (e.g. used for computing
fl1_max), see dclab.definitions.meta_const.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paulmueller
paulmueller merged commit c7192ed into DC-analysis:main Nov 20, 2026
2 of 3 checks passed
@codecov

codecov Bot commented Nov 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 76.79%. Comparing base (c085f27) to head (561c76f).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dcscope/gui/quick_view/qv_main.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #247      +/-   ##
==========================================
- Coverage   76.79%   76.79%   -0.01%     
==========================================
  Files          76       76              
  Lines        8507     8514       +7     
==========================================
+ Hits         6533     6538       +5     
- Misses       1974     1976       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Fluorescence trace offset correction from configuration

2 participants