Commit 938a1a2
fix: Support new PkN column format in Stunner parser (#1205)
## Summary
- Stunner parser now recognizes both old (`Peak N ...`) and new (`PkN
...`) column naming conventions for peak data
- PkOI (Peak of Interest) columns are consumed but not emitted as a
separate peak entry, eliminating the duplicate column issue customers
reported
- Peak data (mean diameter, intensity area, mass area, est. MW, rayleigh
ratio) is now properly structured under `peak_list` in the output
instead of leaking as raw columns in `custom_information_document`
## Context
Customer reported duplicate columns in connector output — e.g. two "Pk1
Intensity Area (%)" columns where one was empty. Root cause: newer
Stunner exports use `PkN` prefix instead of `Peak N`, and `PkOI` (Peak
of Interest) duplicates the primary peak's data.
## Test plan
- [x] All 32 existing Stunner/Lunatic tests pass
- [x] All 10 Lunatic discovery tests pass
- [x] Verified customer file: 60/85 measurements correctly produce
structured peak data
- [x] Verified no pk*/pkoi columns leak into measurement_custom_info
- [x] Lint clean
Generated with Claude Code
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 75870b0 commit 938a1a2
3 files changed
Lines changed: 1718 additions & 29 deletions
File tree
- src/allotropy/parsers/unchained_labs_lunatic_stunner
- tests/parsers/unchained_labs_lunatic_stunner/testdata
Lines changed: 54 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
59 | 95 | | |
60 | 96 | | |
61 | 97 | | |
62 | 98 | | |
63 | | - | |
64 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
65 | 104 | | |
66 | 105 | | |
67 | | - | |
68 | | - | |
| 106 | + | |
| 107 | + | |
69 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
70 | 112 | | |
71 | 113 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 114 | + | |
| 115 | + | |
97 | 116 | | |
98 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
99 | 124 | | |
100 | 125 | | |
101 | 126 | | |
| |||
0 commit comments