Skip to content

Commit

Permalink
add azimuthTime for calibration lut as well
Browse files Browse the repository at this point in the history
  • Loading branch information
agrouaze committed Dec 7, 2023
1 parent 0de2998 commit 428a561
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions safe_s1/sentinel1_xml_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ def list_poly_from_list_string_coords(str_coords_list):
'sample': (int_1Darray_from_string, '//calibration/calibrationVectorList/calibrationVector[1]/pixel'),
'sigma0_lut': (
float_2Darray_from_string_list, '//calibration/calibrationVectorList/calibrationVector/sigmaNought'),
'gamma0_lut': (float_2Darray_from_string_list, '//calibration/calibrationVectorList/calibrationVector/gamma')
'gamma0_lut': (float_2Darray_from_string_list, '//calibration/calibrationVectorList/calibrationVector/gamma'),
'azimuthTime': (datetime64_array, '/calibration/calibrationVectorList/calibrationVector/azimuthTime')
},
'noise': {
'mode': (scalar, '/noise/adsHeader/mode'),
Expand Down Expand Up @@ -311,12 +312,14 @@ def list_poly_from_list_string_coords(str_coords_list):
}


def signal_lut_raw(line, sample, lut_sigma0, lut_gamma0):
def signal_lut_raw(line, sample, lut_sigma0, lut_gamma0,azimuth_times):
ds = xr.Dataset()
ds['sigma0_lut'] = xr.DataArray(lut_sigma0, dims=['line', 'sample'], coords={'line': line, 'sample': sample},
name='sigma0', attrs={'description': 'look up table sigma0'})
ds['gamma0_lut'] = xr.DataArray(lut_gamma0, dims=['line', 'sample'], coords={'line': line, 'sample': sample},
name='gamma0', attrs={'description': 'look up table gamma0'})
ds['azimuthTime'] = xr.DataArray(azimuth_times, dims=['line'],coords={'line': line},
attrs={'description': 'azimuth times associated to the signal look up table'})

return ds

Expand Down Expand Up @@ -757,7 +760,8 @@ def geolocation_grid(line, sample, values):
},
'luts_raw': {
'func': signal_lut_raw,
'args': ('calibration.line', 'calibration.sample', 'calibration.sigma0_lut', 'calibration.gamma0_lut')
'args': ('calibration.line', 'calibration.sample', 'calibration.sigma0_lut', 'calibration.gamma0_lut',
'calibration.azimuthTime')
},
'noise_lut_range_raw': {
'func': noise_lut_range_raw,
Expand Down

0 comments on commit 428a561

Please sign in to comment.