Summary
ALE has MroHiRiseIsisLabelNaifSpiceDriver but no PDS3 label variant. This means HiRISE EDR files cannot be used directly with ALE — they must first go through ISIS hi2isis + spiceinit to create a cube with an ISIS label.
CTX already has both variants (MroCtxIsisLabelNaifSpiceDriver + MroCtxPds3LabelNaifSpiceDriver), enabling fully ISIS-free processing from raw PDS EDR to ISD.
Motivation
We're building a Python-native HiRISE calibration pipeline (isistools/hirisepipe) that replaces hical + histitch + cubenorm in pure Python. The last remaining ISIS dependency is hi2isis + spiceinit to create a cube for ALE's camera model. A PDS3 driver would eliminate this entirely.
With the existing MroCtxPds3LabelNaifSpiceDriver + props={'web': True} (SpiceQL web service), CTX processing is already fully ISIS-free from raw EDR to map-projected GeoTIFF. The same should be possible for HiRISE.
What's needed
A new class MroHiRisePds3LabelNaifSpiceDriver in ale/drivers/mro_drivers.py that:
- Parses the HiRISE PDS3 EDR label (groups:
TIME_PARAMETERS, INSTRUMENT_SETTING_PARAMETERS, TEMPERATURE_PARAMETERS, IMAGE, CALIBRATION_IMAGE)
- Extracts instrument parameters:
MRO:CPMM_NUMBER, MRO:CHANNEL_NUMBER, MRO:TDI, MRO:BINNING, MRO:SCAN_EXPOSURE_DURATION, MRO:TRIM_LINES
- Maps CPMM → CCD → NAIF frame code (the CPMM-to-CCD mapping is non-trivial:
[0,1,2,3,12,4,10,11,5,13,6,7,8,9])
- Handles the
LINE_SAMPLES difference (PDS3 reports 5056 including prefix/suffix, science image is 1024)
The existing MroHiRiseIsisLabelNaifSpiceDriver can serve as the reference implementation — the PDS3 variant just needs different label keyword paths.
PDS3 vs ISIS label keyword mapping
| Parameter |
ISIS label path |
PDS3 label path |
| CPMM number |
Instrument.CpmmNumber |
INSTRUMENT_SETTING_PARAMETERS.MRO:CPMM_NUMBER |
| Channel |
Instrument.ChannelNumber |
INSTRUMENT_SETTING_PARAMETERS.MRO:CHANNEL_NUMBER |
| TDI |
Instrument.Tdi |
INSTRUMENT_SETTING_PARAMETERS.MRO:TDI |
| Binning |
Instrument.Summing |
INSTRUMENT_SETTING_PARAMETERS.MRO:BINNING |
| Start time |
Instrument.StartTime |
TIME_PARAMETERS.START_TIME |
| SCLK |
Instrument.SpacecraftClockStartCount |
TIME_PARAMETERS.SPACECRAFT_CLOCK_START_COUNT |
| Exposure |
Instrument.ScanExposureDuration |
INSTRUMENT_SETTING_PARAMETERS.MRO:SCAN_EXPOSURE_DURATION |
| Lines |
Dimensions.Lines |
IMAGE.LINES |
| Samples |
Dimensions.Samples |
IMAGE.LINE_SAMPLES (note: includes prefix/suffix) |
| Target |
Instrument.TargetName |
TARGET_NAME |
Impact
This would enable fully ISIS-free HiRISE processing pipelines — from PDS EDR download to calibrated, map-projected GeoTIFF — using only Python packages (ale + usgscsm + csmapi).
Summary
ALE has
MroHiRiseIsisLabelNaifSpiceDriverbut no PDS3 label variant. This means HiRISE EDR files cannot be used directly with ALE — they must first go through ISIShi2isis+spiceinitto create a cube with an ISIS label.CTX already has both variants (
MroCtxIsisLabelNaifSpiceDriver+MroCtxPds3LabelNaifSpiceDriver), enabling fully ISIS-free processing from raw PDS EDR to ISD.Motivation
We're building a Python-native HiRISE calibration pipeline (isistools/hirisepipe) that replaces hical + histitch + cubenorm in pure Python. The last remaining ISIS dependency is
hi2isis+spiceinitto create a cube for ALE's camera model. A PDS3 driver would eliminate this entirely.With the existing
MroCtxPds3LabelNaifSpiceDriver+props={'web': True}(SpiceQL web service), CTX processing is already fully ISIS-free from raw EDR to map-projected GeoTIFF. The same should be possible for HiRISE.What's needed
A new class
MroHiRisePds3LabelNaifSpiceDriverinale/drivers/mro_drivers.pythat:TIME_PARAMETERS,INSTRUMENT_SETTING_PARAMETERS,TEMPERATURE_PARAMETERS,IMAGE,CALIBRATION_IMAGE)MRO:CPMM_NUMBER,MRO:CHANNEL_NUMBER,MRO:TDI,MRO:BINNING,MRO:SCAN_EXPOSURE_DURATION,MRO:TRIM_LINES[0,1,2,3,12,4,10,11,5,13,6,7,8,9])LINE_SAMPLESdifference (PDS3 reports 5056 including prefix/suffix, science image is 1024)The existing
MroHiRiseIsisLabelNaifSpiceDrivercan serve as the reference implementation — the PDS3 variant just needs different label keyword paths.PDS3 vs ISIS label keyword mapping
Instrument.CpmmNumberINSTRUMENT_SETTING_PARAMETERS.MRO:CPMM_NUMBERInstrument.ChannelNumberINSTRUMENT_SETTING_PARAMETERS.MRO:CHANNEL_NUMBERInstrument.TdiINSTRUMENT_SETTING_PARAMETERS.MRO:TDIInstrument.SummingINSTRUMENT_SETTING_PARAMETERS.MRO:BINNINGInstrument.StartTimeTIME_PARAMETERS.START_TIMEInstrument.SpacecraftClockStartCountTIME_PARAMETERS.SPACECRAFT_CLOCK_START_COUNTInstrument.ScanExposureDurationINSTRUMENT_SETTING_PARAMETERS.MRO:SCAN_EXPOSURE_DURATIONDimensions.LinesIMAGE.LINESDimensions.SamplesIMAGE.LINE_SAMPLES(note: includes prefix/suffix)Instrument.TargetNameTARGET_NAMEImpact
This would enable fully ISIS-free HiRISE processing pipelines — from PDS EDR download to calibrated, map-projected GeoTIFF — using only Python packages (ale + usgscsm + csmapi).