diff --git a/src/s1reader/s1_reader.py b/src/s1reader/s1_reader.py index a2adb992..6ce152ca 100644 --- a/src/s1reader/s1_reader.py +++ b/src/s1reader/s1_reader.py @@ -12,7 +12,7 @@ from s1reader.s1_burst_slc import Doppler, Sentinel1BurstSlc -esa_track_burst_id_file = f"{os.path.dirname(os.path.realpath(__file__))}/data/sentinel1_track_burst_id.txt" +esa_track_burst_id_file = f"{os.path.dirname(os.path.realpath(__file__))}/data/sentinel1_track_burst_id.txt" # TODO evaluate if it make sense to combine below into a class def as_datetime(t_str, fmt = "%Y-%m-%dT%H:%M:%S.%f"): @@ -275,8 +275,8 @@ def burst_from_xml(annotation_path: str, orbit_path: str, tiff_path: str, List of Sentinel1BurstSlc objects found in annotation XML. ''' - # a 1D array where the indices are the Sentinel-1 track number - # and the data at each row are the corresponding cumulative ID + # a 1D array where the indices are the Sentinel-1 track number + # and the data at each row are the corresponding cumulative ID # number for the last burst of the given track (i.e., line number) # get last burst ID number of each track and prepend 0 tracks_burst_id = np.insert(np.loadtxt(esa_track_burst_id_file, @@ -366,12 +366,12 @@ def burst_from_xml(annotation_path: str, orbit_path: str, tiff_path: str, dt = sensing_times[i] - ascending_node_time id_burst = int((dt.seconds + dt.microseconds / 1e6) // burst_interval) - # To be consistent with ESA let's start the counter of the ID - # from 1 instead of from 0, i,e, the ID of the first burst of the + # To be consistent with ESA let's start the counter of the ID + # from 1 instead of from 0, i,e, the ID of the first burst of the # first track is 1 id_burst += 1 - # the IDs are currently local to one track. Let's adjust based on + # the IDs are currently local to one track. Let's adjust based on # the last ID of the previous track id_burst += tracks_burst_id[track_number-1] diff --git a/tests/data/S1A_IW_SLC__1SDV_20200511T135117_20200511T135144_032518_03C421_7768.zip b/tests/data/S1A_IW_SLC__1SDV_20200511T135117_20200511T135144_032518_03C421_7768.zip index 1c1ef448..becc3b56 100644 Binary files a/tests/data/S1A_IW_SLC__1SDV_20200511T135117_20200511T135144_032518_03C421_7768.zip and b/tests/data/S1A_IW_SLC__1SDV_20200511T135117_20200511T135144_032518_03C421_7768.zip differ diff --git a/tests/test_bursts.py b/tests/test_bursts.py index 849eeb71..06a85b40 100644 --- a/tests/test_bursts.py +++ b/tests/test_bursts.py @@ -28,7 +28,7 @@ def test_burst(bursts): [-2056.701472691132, 353389.9614836443, -54143009.57327797]] for i, burst in enumerate(bursts): - expected_burst_id = f't71_iw3_b{844 + i}' + expected_burst_id = f't71_{151200 + i}_iw3' assert burst.burst_id == expected_burst_id assert burst.i_burst == i