@@ -153,8 +153,10 @@ def cp_geocode_meta(cfg, output_hdf5, dst):
153
153
f'{ ident_path } /{ dst_data } ' )
154
154
155
155
# Delete flag isGeocoded if exist, and assign it again
156
+ ident = dst_h5 [ident_path ]
157
+ if 'isGeocoded' in ident :
158
+ del ident ['isGeocoded' ]
156
159
is_geocoded = dst in ['GCOV' , 'GSLC' , 'GUNW' , 'GOFF' ]
157
-
158
160
dst_h5 [ident_path ].create_dataset ('isGeocoded' ,
159
161
data = np .string_ (str (is_geocoded )))
160
162
desc = "Flag to indicate radar geometry or geocoded product"
@@ -476,7 +478,7 @@ def prep_ds_insar(pcfg, dst, dst_h5):
476
478
'RUNW' ] else 'grids'
477
479
product_path = f'{ common_path } /{ dst } '
478
480
freq_path = f'{ product_path } /{ grid_swath } /frequency{ freq } '
479
- dst_h5 [product_path ].create_group (grid_swath )
481
+ dst_h5 [product_path ].require_group (grid_swath )
480
482
dst_h5 [f'{ product_path } /{ grid_swath } ' ].create_group (
481
483
f'frequency{ freq } ' )
482
484
@@ -939,17 +941,17 @@ def prep_ds_insar(pcfg, dst, dst_h5):
939
941
'crossCorrelationMethod' ,
940
942
descr = descr , units = None , data = lay_cfg .get ('cross_correlation_method' ),
941
943
long_name = 'cross correlation method' )
942
- # Add perpendicular and parallel baseline
943
- descr = "Perpendicular component of the InSAR baseline"
944
- _create_datasets (dst_h5 [grid_path ], igram_shape , np .float64 ,
945
- "perpendicularBaseline" ,
946
- descr = descr , units = "meters" ,
947
- long_name = 'perpendicular baseline' )
948
- _create_datasets (dst_h5 [grid_path ], igram_shape , np .float64 ,
949
- "parallelBaseline" ,
950
- descr = descr .replace ('Perpendicular' , 'Parallel' ),
951
- units = "meters" ,
952
- long_name = 'parallel baseline' )
944
+ # Add perpendicular and parallel baseline
945
+ descr = "Perpendicular component of the InSAR baseline"
946
+ _create_datasets (dst_h5 [grid_path ], igram_shape , np .float64 ,
947
+ "perpendicularBaseline" ,
948
+ descr = descr , units = "meters" ,
949
+ long_name = 'perpendicular baseline' )
950
+ _create_datasets (dst_h5 [grid_path ], igram_shape , np .float64 ,
951
+ "parallelBaseline" ,
952
+ descr = descr .replace ('Perpendicular' , 'Parallel' ),
953
+ units = "meters" ,
954
+ long_name = 'parallel baseline' )
953
955
954
956
955
957
def get_off_params (pcfg , param_name , is_roff = False , pattern = None ,
0 commit comments