Commit ed6a1ff
fix: Support bare UV curve name in Cytiva Unicorn parser (#1200)
## Summary
- Fixes parsing failure for UNICORN 7.7 exports where the UV detector
curve is named just "UV" instead of "UV 1_280"
- Makes absorbance measurements optional (returns `None` gracefully)
instead of raising on missing curves — consistent with all other
measurement types
- Adds anonymized test file exercising the single-UV-detector format
## Context
Files from UNICORN 7.7.0.4016 system failed with:
> "Expected non-null value for Unable to find curve data for absorbance
measurement."
The file is a properly exported "Entire Result(s)" (has Result.xml,
Chrom.1.Xml, SystemData, etc.) — it simply has a single UV detector
whose curve is named "UV" without a wavelength suffix. The 30-file count
(vs 40+) is because this system has fewer detector modules, not because
it's a partial export.
## Test plan
- [x] Existing `unicorn_1.zip` test passes unchanged (UV 1_280 format)
- [x] New `unicorn_single_uv.zip` test covers bare "UV" curve name
- [x] Vendor discovery tests pass
- [x] Linting + mypy pass
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 7f4c250 commit ed6a1ff
3 files changed
Lines changed: 1055 additions & 18 deletions
File tree
- src/allotropy/parsers/cytiva_unicorn/structure/measurements
- tests/parsers/cytiva_unicorn/testdata
Lines changed: 17 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
63 | 71 | | |
| 72 | + | |
| 73 | + | |
64 | 74 | | |
65 | 75 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 76 | + | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| |||
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
96 | | - | |
| 95 | + | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
| |||
0 commit comments