Skip to content

Commit 2d38b9b

Browse files
authored
adding orbit direction attribute (#30)
* adding orbit direction attribute * apply rename
1 parent cc18d1d commit 2d38b9b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/s1reader/s1_burst_slc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def compute_az_carrier(burst, orbit, offset, position):
3535
fmt = "%Y-%m-%dT%H:%M:%S.%f"
3636
orbit_ref_epoch = datetime.datetime.strptime(orbit.reference_epoch.__str__()[:-3], fmt)
3737

38-
t_mid = burst.get_sensing_mid() - orbit_ref_epoch
38+
t_mid = burst.sensing_mid - orbit_ref_epoch
3939
_, v = orbit.interpolate(t_mid.total_seconds())
4040
vs = np.linalg.norm(v)
4141
ks = 2 * vs * burst.azimuth_steer_rate / burst.wavelength
@@ -184,6 +184,7 @@ class Sentinel1BurstSlc:
184184
center: tuple # {center lon, center lat} in degrees
185185
border: list # list of lon, lat coordinate tuples (in degrees) representing burst border
186186
orbit: isce3.core.Orbit
187+
orbit_direction: str
187188
# VRT params
188189
tiff_path: str # path to measurement tiff in SAFE/zip
189190
i_burst: int

src/s1reader/s1_reader.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ def burst_from_xml(annotation_path: str, orbit_path: str, tiff_path: str,
287287
azimuth_steer_rate = np.radians(float(product_info_element.find('azimuthSteeringRate').text))
288288
radar_freq = float(product_info_element.find('radarFrequency').text)
289289
range_sampling_rate = float(product_info_element.find('rangeSamplingRate').text)
290+
orbit_direction = product_info_element.find('pass').text
290291

291292
image_info_element = tree.find('imageAnnotation/imageInformation')
292293
azimuth_time_interval = float(image_info_element.find('azimuthTimeInterval').text)
@@ -379,8 +380,9 @@ def burst_from_xml(annotation_path: str, orbit_path: str, tiff_path: str,
379380
range_sampling_rate, range_pxl_spacing,
380381
(n_lines, n_samples), az_fm_rate, doppler,
381382
rng_processing_bandwidth, pol, burst_id,
382-
platform_id, center_pts[i], boundary_pts[i],
383-
orbit, tiff_path, i, first_valid_sample,
383+
platform_id, center_pts[i],
384+
boundary_pts[i], orbit, orbit_direction,
385+
tiff_path, i, first_valid_sample,
384386
last_sample, first_valid_line, last_line,
385387
range_window_type, range_window_coeff)
386388

0 commit comments

Comments
 (0)