Replace polynomial with piecewise linear interpolation for MicroAmp plate#995
Merged
BioCam merged 4 commits intoPyLabRobot:mainfrom Apr 16, 2026
Merged
Conversation
…rpolation for MicroAmp plate The 5th-degree polynomial fits for `thermo_AB_96_wellplate_300ul_Vb_MicroAmp` did not round-trip correctly — `height_from_volume(50)` followed by `volume_from_height()` returned ~6 uL instead of 50 uL. The two polynomials were fitted independently and disagreed between calibration points. Replaced both with `interpolate_1d` using the original calibration data as a piecewise linear lookup. Round-trip error is now zero at all calibration points and negligible between them. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The well height (23.24 mm) exceeds the calibration data range (0-17.89 mm). Extrapolating linearly from the last segment gives reasonable estimates for the uncalibrated range, while clip would silently cap at 290 uL. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
thermo_AB_96_wellplate_300ul_Vb_MicroAmpdid not round-trip correctly —height_from_volume(50)followed byvolume_from_height()returned ~6 uL instead of 50 uL_compute_volume_from_heightand_compute_height_from_volumewithinterpolate_1dusing the original calibration data as piecewise linear lookupTest plan
Well.__init__max_volume computation succeeds (usescompute_volume_from_height(size_z)withbounds_handling="clip")🤖 Generated with Claude Code