diff --git a/src/xsar/base_dataset.py b/src/xsar/base_dataset.py index b774aa60..4791df14 100644 --- a/src/xsar/base_dataset.py +++ b/src/xsar/base_dataset.py @@ -1,3 +1,4 @@ +import pdb import warnings from abc import ABC from datetime import datetime @@ -300,10 +301,12 @@ def _local_gcps(self): # lon_s = lon_s.values # lat_s = lat_s.values cpt = 0 - for line in line_decimated: - for sample in sample_decimated: + for line in line_decimated.astype(int): + for sample in sample_decimated.astype(int): irow = np.argmin(np.abs(self.dataset.line.values - line)) + irow = int(irow) icol = np.argmin(np.abs(self.dataset.sample.values - sample)) + icol = int(icol) # if self.s1meta.product == 'SLC': # #lon, lat = self.coords2ll_SLC(line,sample) # lon = lon_s[cpt] diff --git a/src/xsar/radarsat2_dataset.py b/src/xsar/radarsat2_dataset.py index a1808a8e..e0001bfd 100644 --- a/src/xsar/radarsat2_dataset.py +++ b/src/xsar/radarsat2_dataset.py @@ -184,7 +184,7 @@ def __init__(self, dataset_id, resolution=None, # dataset no-pol template for function evaluation on coordinates (*no* values used) # what's matter here is the shape of the image, not the values. with warnings.catch_warnings(): - warnings.simplefilter("ignore", np.ComplexWarning) + # warnings.simplefilter("ignore", np.ComplexWarning) self._da_tmpl = xr.DataArray( dask.array.empty_like( self._dataset.digital_number.isel(pol=0).drop('pol'), diff --git a/src/xsar/rcm_dataset.py b/src/xsar/rcm_dataset.py index 339c0fab..cd175f4c 100644 --- a/src/xsar/rcm_dataset.py +++ b/src/xsar/rcm_dataset.py @@ -176,7 +176,7 @@ def __init__(self, dataset_id, resolution=None, # dataset no-pol template for function evaluation on coordinates (*no* values used) # what's matter here is the shape of the image, not the values. with warnings.catch_warnings(): - warnings.simplefilter("ignore", np.ComplexWarning) + # warnings.simplefilter("ignore", np.ComplexWarning) self._da_tmpl = xr.DataArray( dask.array.empty_like( self._dataset.digital_number.isel(pol=0).drop('pol'), diff --git a/src/xsar/sentinel1_dataset.py b/src/xsar/sentinel1_dataset.py index 84262e26..cae70979 100644 --- a/src/xsar/sentinel1_dataset.py +++ b/src/xsar/sentinel1_dataset.py @@ -250,7 +250,7 @@ def __init__(self, dataset_id, resolution=None, # dataset no-pol template for function evaluation on coordinates (*no* values used) # what's matter here is the shape of the image, not the values. with warnings.catch_warnings(): - warnings.simplefilter("ignore", np.ComplexWarning) + # warnings.simplefilter("ignore", np.ComplexWarning) # deprecated in numpy>=2.0.0 if self.sar_meta._bursts['burst'].size != 0: # SLC TOPS, tune the high res grid because of bursts overlapping # line_time = self._burst_azitime