Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions enpt/model/metadata/metadata_sensorgeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,12 @@ def get_filename(matching_exp: str):

# read the band related information: wavelength, fwhm
self.nwvl = int(xml.find("product/image/%s/channels" % lbl).text)
# FIXME hardcoded - DLR does not provide any smile information
# => smile coefficients are set to zero until we have valid ones
# read smile coefficients
self.nsmile_coef = 5
self.smile_coef = np.zeros((self.nwvl, self.nsmile_coef), dtype=float)
for bindex, bID in enumerate(xml.findall("product/smileCorrection/%s/bandID" % lbl.upper())):
tmp = OrderedDict([(ele.tag.lower(), float(ele.text)) for ele in bID.findall('./')])
self.smile_coef[bindex, :] = np.array([v for k, v in tmp.items() if k.startswith('coeff')])

startband = 0 if self.detector_name == 'VNIR' else int(xml.find("product/image/vnir/channels").text)
subset = slice(startband, startband + self.nwvl)
Expand Down