@@ -472,8 +472,7 @@ def get_track_burst_num(track_burst_num_file: str = esa_track_burst_id_file):
472
472
473
473
def burst_from_xml (annotation_path : str , orbit_path : str , tiff_path : str ,
474
474
iw2_annotation_path : str , open_method = open ,
475
- flag_apply_eap : bool = True ,
476
- mitigate_az_fmrate_mismatch : bool = True ):
475
+ flag_apply_eap : bool = True ):
477
476
'''Parse bursts in Sentinel-1 annotation XML.
478
477
479
478
Parameters:
@@ -491,9 +490,7 @@ def burst_from_xml(annotation_path: str, orbit_path: str, tiff_path: str,
491
490
Function used to open annotation file.
492
491
flag_apply_eqp: bool
493
492
Flag to turn on/off EAP related functionality
494
- mitigate_az_fmrate_mismatch:
495
- Turn on/off the features related to azimuth FM rate mismatch mitigation
496
-
493
+
497
494
Returns:
498
495
--------
499
496
bursts : list
@@ -648,10 +645,11 @@ def burst_from_xml(annotation_path: str, orbit_path: str, tiff_path: str,
648
645
azimuth_time_interval )
649
646
doppler = Doppler (poly1d , lut2d )
650
647
648
+ sensing_duration = datetime .timedelta (
649
+ seconds = n_lines * azimuth_time_interval )
651
650
if len (osv_list ) > 0 :
652
651
# get orbit from state vector list/element tree
653
- sensing_duration = datetime .timedelta (
654
- seconds = n_lines * azimuth_time_interval )
652
+
655
653
orbit = get_burst_orbit (sensing_start , sensing_start + sensing_duration ,
656
654
osv_list )
657
655
else :
@@ -676,12 +674,15 @@ def burst_from_xml(annotation_path: str, orbit_path: str, tiff_path: str,
676
674
burst_calibration = None
677
675
else :
678
676
burst_calibration = BurstCalibration .from_calibration_annotation (calibration_annotation ,
679
- sensing_start )
677
+ sensing_start )
680
678
if noise_annotation is None :
681
679
burst_noise = None
682
680
else :
683
- burst_noise = BurstNoise .from_noise_annotation (noise_annotation , sensing_start ,
684
- i * n_lines , (i + 1 )* n_lines - 1 , ipf_version )
681
+ burst_noise = BurstNoise .from_noise_annotation (noise_annotation ,
682
+ sensing_start ,
683
+ i * n_lines ,
684
+ (i + 1 )* n_lines - 1 ,
685
+ ipf_version )
685
686
if aux_cal_subswath is None :
686
687
# Not applying EAP correction; (IPF high enough or user turned that off)
687
688
# No need to fill in `burst_aux_cal`
@@ -692,15 +693,11 @@ def burst_from_xml(annotation_path: str, orbit_path: str, tiff_path: str,
692
693
sensing_start )
693
694
694
695
# Extended FM and DC coefficient information
695
- if mitigate_az_fmrate_mismatch :
696
- extended_coeffs = \
697
- BurstExtendedCoeffs .from_polynomial_lists (az_fm_rate_list ,
698
- doppler_list ,
699
- sensing_start ,
700
- sensing_start + sensing_duration )
701
- else :
702
- extended_coeffs = None
703
-
696
+ extended_coeffs = BurstExtendedCoeffs .from_polynomial_lists (az_fm_rate_list ,
697
+ doppler_list ,
698
+ sensing_start ,
699
+ sensing_start + sensing_duration )
700
+
704
701
bursts [i ] = Sentinel1BurstSlc (ipf_version , sensing_start , radar_freq , wavelength ,
705
702
azimuth_steer_rate , azimuth_time_interval ,
706
703
slant_range_time , starting_range , iw2_mid_range ,
@@ -743,8 +740,7 @@ def _is_zip_annotation_xml(path: str, id_str: str) -> bool:
743
740
744
741
def load_bursts (path : str , orbit_path : str , swath_num : int , pol : str = 'vv' ,
745
742
burst_ids : list [Union [str , S1BurstId ]] = None ,
746
- flag_apply_eap : bool = True ,
747
- mitigate_az_fmrate_mismatch = True ):
743
+ flag_apply_eap : bool = True ):
748
744
'''Find bursts in a Sentinel-1 zip file or a SAFE structured directory.
749
745
750
746
Parameters:
@@ -764,10 +760,7 @@ def load_bursts(path: str, orbit_path: str, swath_num: int, pol: str = 'vv',
764
760
returned (empty list if none are found).
765
761
flag_apply_eap: bool
766
762
Turn on/off EAP related features (AUX_CAL loader)
767
- mitigate_az_fmrate_mismatch:
768
- Turn on/off the features related to azimuth FM rate mismatch mitigation
769
-
770
-
763
+
771
764
Returns:
772
765
--------
773
766
bursts : list
@@ -795,12 +788,10 @@ def load_bursts(path: str, orbit_path: str, swath_num: int, pol: str = 'vv',
795
788
raise FileNotFoundError (f'{ path } not found' )
796
789
elif os .path .isdir (path ):
797
790
bursts = _burst_from_safe_dir (path , id_str , orbit_path ,
798
- flag_apply_eap ,
799
- mitigate_az_fmrate_mismatch )
791
+ flag_apply_eap )
800
792
elif os .path .isfile (path ):
801
793
bursts = _burst_from_zip (path , id_str , orbit_path ,
802
- flag_apply_eap ,
803
- mitigate_az_fmrate_mismatch )
794
+ flag_apply_eap )
804
795
else :
805
796
raise ValueError (f'{ path } is unsupported' )
806
797
@@ -826,8 +817,7 @@ def load_bursts(path: str, orbit_path: str, swath_num: int, pol: str = 'vv',
826
817
827
818
828
819
def _burst_from_zip (zip_path : str , id_str : str , orbit_path : str ,
829
- flag_apply_eap : bool ,
830
- mitigate_az_fmrate_mismatch : bool ):
820
+ flag_apply_eap : bool ):
831
821
'''Find bursts in a Sentinel-1 zip file.
832
822
833
823
Parameters:
@@ -840,10 +830,7 @@ def _burst_from_zip(zip_path: str, id_str: str, orbit_path: str,
840
830
Path the orbit file.
841
831
flag_apply_eap: bool
842
832
Turn on/off EAP related features (AUX_CAL loader)
843
- mitigate_az_fmrate_mismatch:
844
- Turn on/off the features related to azimuth FM rate mismatch mitigation
845
-
846
-
833
+
847
834
Returns:
848
835
--------
849
836
bursts : list
@@ -871,13 +858,11 @@ def _burst_from_zip(zip_path: str, id_str: str, orbit_path: str,
871
858
f_tiff = f'/vsizip/{ zip_path } /{ f_tiff [0 ]} ' if f_tiff else ''
872
859
873
860
bursts = burst_from_xml (f_annotation , orbit_path , f_tiff , iw2_f_annotation , z_file .open ,
874
- flag_apply_eap = flag_apply_eap ,
875
- mitigate_az_fmrate_mismatch = mitigate_az_fmrate_mismatch )
861
+ flag_apply_eap = flag_apply_eap )
876
862
return bursts
877
863
878
864
def _burst_from_safe_dir (safe_dir_path : str , id_str : str , orbit_path : str ,
879
- flag_apply_eap : bool ,
880
- mitigate_az_fmrate_mismatch : bool ):
865
+ flag_apply_eap : bool ):
881
866
'''Find bursts in a Sentinel-1 SAFE structured directory.
882
867
883
868
Parameters:
@@ -890,9 +875,7 @@ def _burst_from_safe_dir(safe_dir_path: str, id_str: str, orbit_path: str,
890
875
Path the orbit file.
891
876
flag_apply_eap: bool
892
877
Turn on/off EAP related features (AUX_CAL loader)
893
- mitigate_az_fmrate_mismatch:
894
- Turn on/off the features related to azimuth FM rate mismatch mitigation
895
-
878
+
896
879
Returns:
897
880
--------
898
881
bursts : list
@@ -926,6 +909,5 @@ def _burst_from_safe_dir(safe_dir_path: str, id_str: str, orbit_path: str,
926
909
f_tiff = ''
927
910
928
911
bursts = burst_from_xml (f_annotation , orbit_path , f_tiff , iw2_f_annotation ,
929
- flag_apply_eap = flag_apply_eap ,
930
- mitigate_az_fmrate_mismatch = mitigate_az_fmrate_mismatch )
912
+ flag_apply_eap = flag_apply_eap )
931
913
return bursts
0 commit comments