Repository navigation
enh: show Young's modulus warnings in the plots - #250
Merged
paulmueller merged 1 commit intoNov 20, 2026
Merged
Conversation
When the Young's modulus is plotted (axis or marker hue), the plots show the warnings that dclab issues when computing the Young's modulus (dclab caches the Young's modulus, so the warnings are deduced from the data): - "N% of events outside LUT" if more than 10% of the events are not covered by the look-up table - "Temperature out of range" if the temperature is outside of the valid range of the viscosity model The labels are shown like "Please reduce KDE spacing" and have the detailed description as tooltip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #250 +/- ##
==========================================
+ Coverage 76.89% 77.01% +0.11%
==========================================
Files 76 76
Lines 8535 8582 +47
==========================================
+ Hits 6563 6609 +46
- Misses 1972 1973 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
paulmueller
approved these changes
Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #144
When the Young's modulus is plotted (as an axis or as feature-based marker hue), the plots now show warnings about inaccurate Young's modulus data. They are shown directly in the plots like "Please reduce KDE spacing" (red, bottom left, above that label), with a detailed description as tooltip.
Warnings
87% of events outside LUTYoungsModulusLookupTableExceededWarning)Temperature out of rangetempfeature) is outside of the valid range of the viscosity model (dclab'sTemperatureOutOfRangeWarning, known media only)[22, 37] degCdclab caches the Young's modulus, so its warnings are only issued when the Young's modulus is computed for the first time. Capturing them during plotting would therefore not work reliably (the labels would disappear on the next redraw). Instead,
pipeline_plot_compute.get_emodulus_warnings(rtdc_ds, plot_state)deduces both conditions from the data (fraction of nan values) and by evaluating the viscosity model for the temperatures.Implementation
PipelinePlotItem.add_warning_labelsshows each warning once per plot item (e.g. for merged plots with several datasets). It is called by the scatter and contour handlers.add_labelnow returns the label item (for setting the tooltip).Tests:
tests/test_gui_pipeline_plot_compute.py(LUT exceeded, marker hue, temperature out of range, filtered events, no warnings) andtest_emodulus_warning_in_plot_issue_144(extreme_shear.rtdc, 87% of events outside the LUT; label in the scatter and the contour plot). The full test suite passes locally.🤖 Generated with Claude Code