Skip to content

Commit

Permalink
Merge pull request #6 from umr-lops/support_ew_sl2
Browse files Browse the repository at this point in the history
fix problem with alias to datatree
yreynaud authored Jun 8, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents b19aa13 + 37fbafd commit 580fddd
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion safe_s1/metadata.py
Original file line number Diff line number Diff line change
@@ -102,6 +102,7 @@ def __init__(self, name, backend_kwargs=None):
'noise_range_raw': self.get_noise_range_raw,
}
self.dt = datatree.DataTree.from_dict(self._dict)
assert self.dt==self.datatree

def load_digital_number(self, resolution=None, chunks=None, resampling=rasterio.enums.Resampling.rms):
"""
@@ -579,7 +580,7 @@ def get_noise_azi_raw(self):
for pol_code, xml_file in self.files['noise'].items():
pol = os.path.basename(xml_file).split('-')[4].upper()
pols.append(pol)
if self.product == 'SLC' or self.product=='SL2':
if self.product == 'SLC' or self.product == 'SL2':
noise_lut_azi_raw_ds = self.xml_parser.get_compound_var(xml_file, 'noise_lut_azi_raw_slc')
history.append(self.xml_parser.get_compound_var(xml_file, 'noise_lut_azi_raw_slc', describe=True))
else:
2 changes: 1 addition & 1 deletion safe_s1/sentinel1_xml_mappings.py
Original file line number Diff line number Diff line change
@@ -539,7 +539,7 @@ def image(product_type, line_time_range, line_size, sample_size, incidence_angle
-------
xarray.Dataset
"""
if product_type == 'SLC':
if product_type == 'SLC' or product_type == 'SL2':
pixel_sample_m = rangePixelSpacing / np.sin(np.radians(incidence_angle_mid_swath))
else:
pixel_sample_m = rangePixelSpacing

0 comments on commit 580fddd

Please sign in to comment.