Skip to content

Commit 9398368

Browse files
authored
extract rank and prf (#31)
* extract rank and prf * less call * clean whitespaces
1 parent 2d38b9b commit 9398368

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/s1reader/s1_burst_slc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ class Sentinel1BurstSlc:
195195
# window parameters
196196
range_window_type: str
197197
range_window_coefficient: float
198-
198+
rank: int # The number of PRI between transmitted pulse and return echo.
199+
prf_raw_data: float # Pulse repetition frequency (PRF) of the raw data [Hz]
199200

200201
def as_isce3_radargrid(self):
201202
'''Init and return isce3.product.RadarGridParameters.

src/s1reader/s1_reader.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,10 @@ def burst_from_xml(annotation_path: str, orbit_path: str, tiff_path: str,
294294
slant_range_time = float(image_info_element.find('slantRangeTime').text)
295295
ascending_node_time = as_datetime(image_info_element.find('ascendingNodeTime').text)
296296

297+
downlink_element = tree.find('generalAnnotation/downlinkInformationList/downlinkInformation')
298+
prf_raw_data = float(downlink_element.find('prf').text)
299+
rank = int(downlink_element.find('downlinkValues/rank').text)
300+
297301
n_lines = int(tree.find('swathTiming/linesPerBurst').text)
298302
n_samples = int(tree.find('swathTiming/samplesPerBurst').text)
299303

@@ -384,7 +388,8 @@ def burst_from_xml(annotation_path: str, orbit_path: str, tiff_path: str,
384388
boundary_pts[i], orbit, orbit_direction,
385389
tiff_path, i, first_valid_sample,
386390
last_sample, first_valid_line, last_line,
387-
range_window_type, range_window_coeff)
391+
range_window_type, range_window_coeff,
392+
rank, prf_raw_data)
388393

389394
return bursts
390395

0 commit comments

Comments
 (0)