Skip to content

Commit

Permalink
Merge pull request #29 from umr-lops/fixesMay24
Browse files Browse the repository at this point in the history
add missing history for noise_lut_range_raw
  • Loading branch information
agrouaze authored May 16, 2024
2 parents c316c33 + 9c6239c commit 5f84358
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion safe_s1/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def __init__(self, name, backend_kwargs=None):
assert self.dt==self.datatree
else:
print('multidataset')
# raise Exception()
# there is no error raised here, because we want to let the user access the metadata for multidatasets

def load_digital_number(self, resolution=None, chunks=None, resampling=rasterio.enums.Resampling.rms):
"""
Expand Down Expand Up @@ -646,6 +646,7 @@ def get_noise_range_raw(self):
"""
tmp = []
pols = []
history = []
for pol_code, xml_file in self.files['noise'].items():
#pol = self.files['polarization'].cat.categories[pol_code - 1]
pol = os.path.basename(xml_file).split('-')[4].upper()
Expand All @@ -657,8 +658,10 @@ def get_noise_range_raw(self):
hihi = self.xml_parser.get_var(self.files['noise'].iloc[0], 'noise.range.%s' % varitmp,
describe=True)
noise_lut_range_raw_ds[vari].attrs['description'] = hihi
history.append(self.xml_parser.get_compound_var(xml_file, 'noise_lut_range_raw', describe=True))
tmp.append(noise_lut_range_raw_ds)
ds = xr.concat(tmp, pd.Index(pols, name="pol"))
ds.attrs['history'] = '\n'.join(history)
return ds

def get_noise_azi_initial_parameters(self, pol):
Expand Down

0 comments on commit 5f84358

Please sign in to comment.