- Home
- Documentation
- API reference
- Readers
- hyperproc.readers.desis
hyperproc.readers.desis¶
Source-derived reference
Generated from the current hyperproc 0.1.2 checkout.
Implementation: hyperproc/readers/desis.py. Signatures, defaults, docstrings, and expandable source are extracted statically; the module is not imported or executed. Names beginning with _ are implementation details, not a stable public API.
Use the function signature as the authority for individual parameter defaults and return annotations. Original docstrings sometimes group parameter names or wrap return descriptions across lines; these descriptions are preserved rather than inferred or rewritten.
DESIS (DLR Earth Sensing Imaging Spectrometer) reader for L1B / L1C / L2A.
DESIS flew on the ISS MUSES platform from 2018 until the mission ended on 2023-12-31, so these are archive products. It is a VNIR-only instrument: 235 bands from 401 to 1000 nm, 30 m, with no SWIR at all.
Each product is a plain GeoTIFF of int16 DN plus an XML sidecar, so unlike
EMIT or PRISMA nothing is self-describing - the wavelengths, the per-band
scaling and every viewing angle live in *-METADATA.xml:
value = DN * gainOfBand + offsetOfBand
L2A uses a single gain of 1e-4 with zero offset. L1B and L1C carry a different gain and a different offset for every one of the 235 bands, so applying a scene-wide scale factor - the obvious shortcut - is wrong there.
============ ========================= ============= ================== level grid variable georeferencing ============ ========================= ============= ================== L1B 1024 x 1024 sensor grid radiance none L1C 1493 x 1493 UTM, 30 m radiance EPSG + transform L2A 1493 x 1493 UTM, 30 m reflectance EPSG + transform ============ ========================= ============= ==================
Angles are scene-level scalars, not per-pixel rasters, and land in
ds.attrs: DESIS ships no equivalent of EMIT's OBS file.
NODATA = -32768
module-attribute
¶
LEVEL_SPEC = {'L1B': ('radiance', 'mW/cm^2/sr/um', 'at-sensor TOA radiance'), 'L1C': ('radiance', 'mW/cm^2/sr/um', 'at-sensor TOA radiance, orthorectified'), 'L2A': ('reflectance', '1', 'surface reflectance')}
module-attribute
¶
QUALITY_FLAGS = {'shadow': 0, 'land': 1, 'snow': 2, 'haze_land': 3, 'haze_water': 4, 'cloud_land': 5, 'cloud_water': 6, 'water': 7}
module-attribute
¶
QUALITY_VALUES = {'aot550': (8, 0.01), 'wv_cm': (9, 1.0 / 42.0)}
module-attribute
¶
SCENE_TAGS = {'sunZenithAngle': 'sun_zenith', 'sunAzimuthAngle': 'sun_azimuth', 'sceneIncidenceAngle': 'view_zenith', 'sceneAzimuthAngle': 'scene_azimuth_angle', 'startTime': 'datetime', 'pointingMirrorAngle': 'pointing_mirror_angle', 'percentageClouds': 'cloudy_pixels_pct', 'percentageCloudShadow': 'cloud_shadow_pct'}
module-attribute
¶
_GRANULE = re.compile('^DESIS-HSI-(?P<level>L1B|L1C|L2A)-(?P<rest>.+)-SPECTRAL_IMAGE\\.tif$', re.IGNORECASE)
module-attribute
¶
open_desis(path: str | Path, wl_range: tuple[float, float] | None = None, quality: bool = True, band_quality: bool = False, apply_scale: bool = True) -> xr.Dataset
¶
Open a DESIS granule.
| PARAMETER | DESCRIPTION |
|---|---|
path
|
the
TYPE:
|
wl_range
|
TYPE:
|
quality
|
attach the L2A
TYPE:
|
band_quality
|
attach the 235-band per-band quality raster as
TYPE:
|
apply_scale
|
convert DN to physical units with the per-band gain and
offset.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Dataset
|
Dataset with |
Dataset
|
and |
Source code in hyperproc/readers/desis.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | |
_sibling(path: Path, suffix: str) -> Path | None
¶
_parse_metadata(path: Path)
¶
Wavelengths, FWHM, per-band gain/offset and the scene-level scalars.
<band> appears under two parents in DESIS metadata - bandCharacterisation
(spectral) and interiorOrientation (geometric) - so the search is scoped
to the former. Reading them unscoped silently doubles the band count.
Source code in hyperproc/readers/desis.py
_add_quality(ds: xr.Dataset, path: Path) -> None
¶
The 10-band L2A quality raster. L1B/L1C do not ship one.