Repository navigation
fix: Cytiva Unicorn - skip curves with no data points - #1275
Merged
Merged
Conversation
Unused curves (e.g. a UV channel set to 0 nm) are exported with an empty coordinate array. These produced data cubes with `dimensions: [[]]`, which fails ASM schema validation because an empty array matches every branch of the tBooleanArray/tStringArray/tNumberArray oneOf. Treat such curves as absent so the measurement is dropped like any other missing curve. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stephenworlow
approved these changes
Oct 7, 2026
ajcariaga16
approved these changes
Oct 7, 2026
nathan-stender
added a commit
that referenced
this pull request
Oct 7, 2026
### Fixed - Cytiva Unicorn - skip curves with no data points (#1275)
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.
Problem
UNICORN exports curves that recorded no data (e.g. UV 2/UV 3 set to 0 nm, or unused pH/pressure/flow sensors) with an empty coordinate array. The parser still built a data cube for each, emitting
dimensions: [[]]/measures: [[]]. An empty array satisfies all oftNumberArray,tBooleanArray, andtStringArray, so theoneOffails and conversion raisesAllotropeValidationError.Fix
UnicornMeasurement.get_data_cube_or_nonenow returnsNonefor a curve with no points, so it's handled like a missing curve. Existingis_valid/Nonechecks then drop measurements that have no populated cubes.Tests
unicorn_empty_curve.zip(8 KB), derived from the existing anonymizedunicorn_single_uv.zipwith the pH curve'sVolumes/Amplitudesreplaced by the empty-array serialization seen in a real export (byte-identical, no customer data).mainwith the sameoneOferror, and passes with the fix. Expected JSON generated with--overwrite; the pH measurement is omitted (4 measurements vs 5 in the base fixture).🤖 Generated with Claude Code