Skip to content

Commit 0de2998

Browse files
author
agrouaze
committed
handle specific case for old IPF (e.g. 2.72) in which no azimuthTime is associated to the range noise LUT
1 parent 15287fa commit 0de2998

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

safe_s1/sentinel1_xml_mappings.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def or_ipf28(xpath):
118118
return xpath
119119

120120

121+
121122
def list_poly_from_list_string_coords(str_coords_list):
122123
footprints = []
123124
for gmlpoly in str_coords_list:
@@ -354,7 +355,10 @@ def noise_lut_range_raw(lines, samples, noiseLuts, azimuthTimes):
354355
ds['noise_lut'] = xr.DataArray(tmp_noise,
355356
coords={'line': lines, 'sample': samples[0][0:minimum_pts]},
356357
dims=['line', 'sample'])
357-
ds['azimuthTime'] = xr.DataArray(azimuthTimes,coords={'line': lines},dims=['line'])
358+
try:
359+
ds['azimuthTime'] = xr.DataArray(azimuthTimes,coords={'line': lines},dims=['line'])
360+
except: #for IPF2.72 for instance there is no azimuthTimes associated to the noise range LUT
361+
ds['azimuthTime'] = xr.DataArray(np.ones(len(lines))*np.nan, coords={'line': lines}, dims=['line'])
358362
# ds['sample'] = xr.DataArray(np.stack(normalized_samples), coords={'lines': lines, 'sample_index': np.arange(minimum_pts)},
359363
# dims=['lines', 'sample_index'])
360364

0 commit comments

Comments
 (0)