Commit 9daf06b
fix: normalize PVL sidecar longitudes to declared [0, 360) domain
The PVL sidecar declares LongitudeDomain=360 but the lon values
written could be outside [0, 360) — e.g. _derive_ground_range
returns lon_max=181.5 for an antimeridian-crossing strip. ISIS tools
reading the sidecar expect values consistent with the declared domain.
Now lon_min, lon_max, and CenterLongitude are all normalized via
mod 360 before writing. If wraparound makes max < min (e.g. 359 to
1), that's correct for the 360 domain — ISIS interprets it as
crossing 0°.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 5c20610 commit 9daf06b
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
149 | 159 | | |
150 | 160 | | |
151 | 161 | | |
| |||
156 | 166 | | |
157 | 167 | | |
158 | 168 | | |
159 | | - | |
| 169 | + | |
160 | 170 | | |
161 | 171 | | |
162 | | - | |
163 | | - | |
| 172 | + | |
| 173 | + | |
164 | 174 | | |
165 | 175 | | |
166 | 176 | | |
| |||
0 commit comments