From 348e6c2ff4887ceb781fffefe234cbaeb3b3774c Mon Sep 17 00:00:00 2001 From: vbrancat Date: Mon, 13 Feb 2023 08:03:00 -0800 Subject: [PATCH 01/34] Add geometry functionalities --- src/compass/utils/geometry_utils.py | 166 ++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 src/compass/utils/geometry_utils.py diff --git a/src/compass/utils/geometry_utils.py b/src/compass/utils/geometry_utils.py new file mode 100644 index 00000000..0ef578bd --- /dev/null +++ b/src/compass/utils/geometry_utils.py @@ -0,0 +1,166 @@ +import numpy as np + + +def los2orbit_azimuth_angle(los_az_angle, look_direction='right'): + """Convert the azimuth angle of the LOS vector to the one of the orbit flight vector. + Parameters: los_az_angle - np.ndarray or float, azimuth angle of the LOS vector from the ground to the SAR platform + measured from the north with anti-clockwise direction as positive, in the unit of degrees + Returns: orb_az_angle - np.ndarray or float, azimuth angle of the SAR platform along track/orbit direction + measured from the north with anti-clockwise direction as positive, in the unit of degrees + """ + if look_direction == 'right': + orb_az_angle = los_az_angle - 90 + else: + orb_az_angle = los_az_angle + 90 + orb_az_angle -= np.round(orb_az_angle / 360.) * 360. + return orb_az_angle + + +def azimuth2heading_angle(az_angle, look_direction='right'): + """Convert azimuth angle from ISCE los.rdr band2 into satellite orbit heading angle + ISCE-2 los.* file band2 is azimuth angle of LOS vector from ground target to the satellite + measured from the north in anti-clockwise as positive + Below are typical values in deg for satellites with near-polar orbit: + ascending orbit: heading angle of -12 and azimuth angle of 102 + descending orbit: heading angle of -168 and azimuth angle of -102 + """ + if look_direction == 'right': + head_angle = (az_angle - 90) * -1 + else: + head_angle = (az_angle + 90) * -1 + head_angle -= np.round(head_angle / 360.) * 360. + return head_angle + + +def heading2azimuth_angle(head_angle, look_direction='right'): + """Convert satellite orbit heading angle into azimuth angle as defined in ISCE-2.""" + if look_direction == 'right': + az_angle = (head_angle - 90) * -1 + else: + az_angle = (head_angle + 90) * -1 + az_angle -= np.round(az_angle / 360.) * 360. + return az_angle + + +def enu2los(v_e, v_n, v_u, inc_angle, head_angle=None, az_angle=None): + """Project east/north/up motion into the line-of-sight (LOS) direction defined by incidence/azimuth angle. + Parameters: v_e - np.ndarray or float, displacement in east-west direction, east as positive + v_n - np.ndarray or float, displacement in north-south direction, north as positive + v_u - np.ndarray or float, displacement in vertical direction, up as positive + inc_angle - np.ndarray or float, incidence angle from vertical, in the unit of degrees + head_angle - np.ndarray or float, azimuth angle of the SAR platform along track direction + measured from the north with clockwise direction as positive, in the unit of degrees + az_angle - np.ndarray or float, azimuth angle of the LOS vector from the ground to the SAR platform + measured from the north with anti-clockwise direction as positive, in the unit of degrees + head_angle = 90 - az_angle + Returns: v_los - np.ndarray or float, displacement in LOS direction, motion toward satellite as positive + """ + # unite (los_)head/az_angle into (los_)az_angle + if az_angle is None: + if head_angle is not None: + az_angle = heading2azimuth_angle(head_angle) + else: + raise ValueError(f'invalid az_angle: {az_angle}!') + + # project ENU onto LOS + v_los = ( v_e * np.sin(np.deg2rad(inc_angle)) * np.sin(np.deg2rad(az_angle)) * -1 + + v_n * np.sin(np.deg2rad(inc_angle)) * np.cos(np.deg2rad(az_angle)) + + v_u * np.cos(np.deg2rad(inc_angle))) + + return v_los + + +def en2az(v_e, v_n, orb_az_angle): + """Project east/north motion into the radar azimuth direction. + Parameters: v_e - np.ndarray or float, displacement in east-west direction, east as positive + v_n - np.ndarray or float, displacement in north-south direction, north as positive + orb_az_angle - np.ndarray or float, azimuth angle of the SAR platform along track/orbit direction + measured from the north with anti-clockwise direction as positive, in the unit of degrees + orb_az_angle = los_az_angle + 90 for right-looking radar. + Returns: v_az - np.ndarray or float, displacement in azimuth direction, + motion along flight direction as positive + """ + # project EN onto azimuth + v_az = ( v_e * np.sin(np.deg2rad(orb_az_angle)) * -1 + + v_n * np.cos(np.deg2rad(orb_az_angle))) + return v_az + + +def calc_azimuth_from_east_north_obs(east, north): + """Calculate the azimuth angle of the given horizontal observation (in east and north) + Parameters: east - float, eastward motion + north - float, northward motion + Returns: az_angle - float, azimuth angle in degree + measured from the north with anti-clockwise as positive + """ + az_angle = -1 * np.rad2deg(np.arctan2(east, north)) % 360 + return az_angle + + +def get_unit_vector4component_of_interest(los_inc_angle, los_az_angle, comp='enu2los', horz_az_angle=None): + """Get the unit vector for the component of interest. + Parameters: los_inc_angle - np.ndarray or float, incidence angle from vertical, in the unit of degrees + los_az_angle - np.ndarray or float, azimuth angle of the LOS vector from the ground to the SAR platform + measured from the north with anti-clockwise direction as positive, in the unit of degrees + comp - str, component of interest, choose among the following values: + enu2los, en2los, hz2los, u2los, up2los, orb(it)_az, vert, horz + horz_az_angle - np.ndarray or float, azimuth angle of the horizontal direction of interest + measured from the north with anti-clockwise direction as positive, in the unit of degrees + Returns: unit_vec - list(np.ndarray/float), unit vector of the ENU component for the component of interest + """ + # check input arguments + comps = [ + 'enu2los', 'en2los', 'hz2los', 'horz2los', 'u2los', 'vert2los', # radar LOS / cross-track + 'en2az', 'hz2az', 'orb_az', 'orbit_az', # radar azimuth / along-track + 'vert', 'vertical', 'horz', 'horizontal', # vertical / arbitraty horizontal + ] + + if comp not in comps: + raise ValueError(f'un-recognized comp input: {comp}.\nchoose from: {comps}') + + if comp == 'horz' and horz_az_angle is None: + raise ValueError('comp=horz requires horz_az_angle input!') + + # initiate output + unit_vec = None + + if comp in ['enu2los']: + unit_vec = [ + np.sin(np.deg2rad(los_inc_angle)) * np.sin(np.deg2rad(los_az_angle)) * -1, + np.sin(np.deg2rad(los_inc_angle)) * np.cos(np.deg2rad(los_az_angle)), + np.cos(np.deg2rad(los_inc_angle)), + ] + + elif comp in ['en2los', 'hz2los', 'horz2los']: + unit_vec = [ + np.sin(np.deg2rad(los_inc_angle)) * np.sin(np.deg2rad(los_az_angle)) * -1, + np.sin(np.deg2rad(los_inc_angle)) * np.cos(np.deg2rad(los_az_angle)), + np.zeros_like(los_inc_angle), + ] + + elif comp in ['u2los', 'vert2los']: + unit_vec = [ + np.zeros_like(los_inc_angle), + np.zeros_like(los_inc_angle), + np.cos(np.deg2rad(los_inc_angle)), + ] + + elif comp in ['en2az', 'hz2az', 'orb_az', 'orbit_az']: + orb_az_angle = los2orbit_azimuth_angle(los_az_angle) + unit_vec = [ + np.sin(np.deg2rad(orb_az_angle)) * -1, + np.cos(np.deg2rad(orb_az_angle)), + np.zeros_like(orb_az_angle), + ] + + elif comp in ['vert', 'vertical']: + unit_vec = [0, 0, 1] + + elif comp in ['horz', 'horizontal']: + unit_vec = [ + np.sin(np.deg2rad(horz_az_angle)) * -1, + np.cos(np.deg2rad(horz_az_angle)), + np.zeros_like(horz_az_angle), + ] + + return unit_vec From 08410beb999f392b88225e85f175c8ccd6213170 Mon Sep 17 00:00:00 2001 From: vbrancat Date: Mon, 13 Feb 2023 08:04:01 -0800 Subject: [PATCH 02/34] Add SET functionality --- src/compass/utils/lut.py | 207 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 206 insertions(+), 1 deletion(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 06ab402a..209bbe3a 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -3,6 +3,13 @@ ''' import os import isce3 +import numpy as np +import pysolid + +from compass.utils.geometry_utils import enu2los, en2az +from scipy.interpolate import RegularGridInterpolator as RGI +from osgeo import gdal +from skimage.transform import resize def cumulative_correction_luts(burst, dem_path, @@ -39,7 +46,8 @@ def cumulative_correction_luts(burst, dem_path, compute_geocoding_correction_luts(burst, dem_path=dem_path, rg_step=rg_step, - az_step=az_step) + az_step=az_step, + scratch_path=scratch_path) # Convert to geometrical doppler from range time (seconds) to range (m) rg_lut_data = \ @@ -117,4 +125,201 @@ def compute_geocoding_correction_luts(burst, dem_path, range_step=rg_step, az_step=az_step) + # compute Solid Earth Tides (using pySolid) + rg_set_temp, az_set_temp = solid_earth_tides(burst, dem_path, scratch_path) + + # Resize SET to the size of the correction grid + out_shape = bistatic_delay.data.shape + kwargs = dict(order=1, mode='edge', anti_aliasing=True, + preserve_range=True) + rg_set = resize(rg_set_temp, out_shape, **kwargs) + az_set = resize(az_set_temp, out_shape, **kwargs) + + # Azimuth set is in meters and need to be converted in seconds + + return geometrical_steering_doppler, bistatic_delay, az_fm_mismatch + + +def solid_earth_tides(burst, dem_path, scratchdir): + ''' + Compute displacement due to Solid Earth Tides (SET) + in slant range and azimuth directions + + Parameters + --------- + burst: Sentinel1Slc + S1-A/B burst object + dem_path: str + File path to available DEM + scratchdir: str + Path to scratch directory + + Returns + ------ + rg_set: np.ndarray + 2D array with SET displacement along LOS + az_set: np.ndarray + 2D array with SET displacement along azimuth + ''' + # Some ancillary inputs + dem_raster = isce3.io.Raster(dem_path) + epsg = dem_raster.get_epsg() + proj = isce3.core.make_projection(epsg) + ellipsoid = proj.ellipsoid + + # Create directory to store SET temp results + output_path = f'{scratchdir}/solid_earth_tides' + os.makedirs(output_path, exist_ok=True) + + # Extract top-left coordinates from burst polygon + lon_min, lat_min, _, _ = burst.border[0].bounds + + # Generate the atr object to run pySolid. We compute SET on a + # 2.5 km x 2.5 km coarse grid + margin = 0.1 + lat_start = lat_min - margin + lon_start = lon_min - margin + + atr = { + 'LENGTH': 25, + 'WIDTH': 100, + 'X_FIRST': lon_start, + 'Y_FIRST': lat_start, + 'X_STEP': 0.023, + 'Y_STEP': 0.023 + } + + # Run pySolid and get SET in ENU coordinate system + (set_e, + set_n, + set_u) = pysolid.calc_solid_earth_tides_grid(burst.sensing_start, atr, + display=False, verbose=True) + # # Compute topo layers to convert SET from ENU to radar coordinates + compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path) + + # Resample SET from geographical grid to radar grid + # Generate the lat/lon arrays for the SET geogrid + lat_geo_array = np.linspace(atr['Y_FIRST'], + lat_start + atr['Y_STEP'] * atr['LENGTH'], + num=atr['LENGTH']) + lon_geo_array = np.linspace(atr['X_FIRST'], + lon_start + atr['X_STEP'] * atr['WIDTH'], + num=atr['WIDTH']) + + # Get lat/lon grid for grids for radar coordinates (from rdr2geo) + lat_radar_grid = open_raster(f'{output_path}/y.rdr') + lon_radar_grid = open_raster(f'{output_path}/x.rdr') + + # Use scipy RGI to resample SET from geocoded to radar coordinates + pts_src = (np.flipud(lat_geo_array), lon_geo_array) + pts_dst = (lat_radar_grid.flatten(), lon_radar_grid.flatten()) + + rdr_set_e = resample_set(set_e, pts_src, pts_dst).reshape( + lat_radar_grid.shape) + rdr_set_n = resample_set(set_n, pts_src, pts_dst).reshape( + lat_radar_grid.shape) + rdr_set_u = resample_set(set_u, pts_src, pts_dst).reshape( + lat_radar_grid.shape) + + # Convert SET from ENU to range/azimuth coordinates + # Note: rdr2geo heading angle is measured wrt to the East and it is positive + # anti-clockwise. To convert ENU to LOS, we need the azimuth angle which is + # measured from the north and positive anti-clockwise + # azimuth_angle = heading + 90 + inc_angle = open_raster(f'{output_path}/incidence_angle.rdr') + head_angle = open_raster(f'{output_path}/heading_angle.rdr') + set_rg = enu2los(rdr_set_e, rdr_set_n, rdr_set_u, inc_angle, + az_angle=head_angle + 90.0) + set_az = en2az(rdr_set_e, rdr_set_n, head_angle+ 90.0) + + return set_rg, set_az + + +def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path): + ''' + Get latitude, longitude, incidence and + azimuth angle on multi-looked radar grid + Parameters + ---------- + burst: Sentinel1Slc + S1-A/B burst object + ellipsoid: isce3.ext.isce3.core + ISCE3 Ellipsoid object + dem_raster: isce3.io.Raster + ISCE3 object including DEM raster + output_path: str + Path where to save output rasters + ''' + + # Get radar and doppler grid + rdr_grid = burst.as_isce3_radargrid() + coarse_rdr_grid = rdr_grid.multilook(64, 429) + grid_doppler = isce3.core.LUT2d() + + # Initialize the rdr2geo object + rdr2geo_obj = isce3.geometry.Rdr2Geo(coarse_rdr_grid, burst.orbit, + ellipsoid, grid_doppler, + threshold=1.0e8) + + # Get the rdr2geo raster needed for SET computation + topo_output = {'x': (True, gdal.GDT_Float64), + 'y': (True, gdal.GDT_Float64), + 'incidence_angle': (True, gdal.GDT_Float32), + 'heading_angle': (True, gdal.GDT_Float32)} + raster_list = [ + isce3.io.Raster(f'{output_path}/{fname}.rdr', coarse_rdr_grid.width, + coarse_rdr_grid.length, 1, dtype, 'ENVI') + if enabled else None + for fname, (enabled, dtype) in topo_output.items()] + x_raster, y_raster, incidence_raster, heading_raster = raster_list + + # Run rdr2geo on coarse radar grid + rdr2geo_obj.topo(dem_raster, x_raster, y_raster, + incidence_angle_raster=incidence_raster, + heading_angle_raster=heading_raster) + + +def open_raster(filename, band=1): + ''' + Return band as numpy array from gdal-friendly raster + Parameters + ---------- + filename: str + Path where is stored GDAL raster to open + band: int + Band number to open + Returns + ------- + raster: np.ndarray + Numpy array containing the raster band to open + ''' + + ds = gdal.Open(filename, gdal.GA_ReadOnly) + raster = ds.GetRasterBand(band).ReadAsArray() + return raster + + +def resample_set(geo_tide, pts_src, pts_dest): + ''' + Use scipy RegularGridInterpolator to resample geo_tide + from a geographical to a radar grid + Parameters + ---------- + geo_tide: np.ndarray + Tide displacement component on geographical grid + pts_src: tuple of ndarray + Points defining the source rectangular regular grid for resampling + pts_dest: tuple of ndarray + Points defining the destination grid for resampling + Returns + ------- + rdr_tide: np.ndarray + Tide displacement component resampled on radar grid + ''' + # Flip tide displacement component to be consistent with flipped latitudes + geo_tide = np.flipud(geo_tide) + rgi_func = RGI(pts_src, geo_tide, method='nearest', + bounds_error=False, fill_value=0) + rdr_tide = rgi_func(pts_dest) + return rdr_tide From 046bc1db7609978af9b249ba0ebecd22eb1a5c89 Mon Sep 17 00:00:00 2001 From: vbrancat Date: Mon, 13 Feb 2023 08:12:30 -0800 Subject: [PATCH 03/34] Pep8 notation --- src/compass/utils/lut.py | 46 ++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 209bbe3a..ba73f090 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -135,7 +135,7 @@ def compute_geocoding_correction_luts(burst, dem_path, rg_set = resize(rg_set_temp, out_shape, **kwargs) az_set = resize(az_set_temp, out_shape, **kwargs) - # Azimuth set is in meters and need to be converted in seconds + # TO DO, azimuth SET is in meter and it should be converted in seconds return geometrical_steering_doppler, bistatic_delay, az_fm_mismatch @@ -143,24 +143,24 @@ def compute_geocoding_correction_luts(burst, dem_path, def solid_earth_tides(burst, dem_path, scratchdir): ''' - Compute displacement due to Solid Earth Tides (SET) - in slant range and azimuth directions - - Parameters - --------- - burst: Sentinel1Slc - S1-A/B burst object - dem_path: str - File path to available DEM - scratchdir: str - Path to scratch directory - - Returns - ------ - rg_set: np.ndarray - 2D array with SET displacement along LOS - az_set: np.ndarray - 2D array with SET displacement along azimuth + Compute displacement due to Solid Earth Tides (SET) + in slant range and azimuth directions + + Parameters + --------- + burst: Sentinel1Slc + S1-A/B burst object + dem_path: str + File path to available DEM + scratchdir: str + Path to scratch directory + + Returns + ------ + rg_set: np.ndarray + 2D array with SET displacement along LOS + az_set: np.ndarray + 2D array with SET displacement along azimuth ''' # Some ancillary inputs dem_raster = isce3.io.Raster(dem_path) @@ -195,7 +195,8 @@ def solid_earth_tides(burst, dem_path, scratchdir): set_n, set_u) = pysolid.calc_solid_earth_tides_grid(burst.sensing_start, atr, display=False, verbose=True) - # # Compute topo layers to convert SET from ENU to radar coordinates + + # Compute topo layers (necessary for ENU to radar geometry conversion) compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path) # Resample SET from geographical grid to radar grid @@ -231,7 +232,7 @@ def solid_earth_tides(burst, dem_path, scratchdir): head_angle = open_raster(f'{output_path}/heading_angle.rdr') set_rg = enu2los(rdr_set_e, rdr_set_n, rdr_set_u, inc_angle, az_angle=head_angle + 90.0) - set_az = en2az(rdr_set_e, rdr_set_n, head_angle+ 90.0) + set_az = en2az(rdr_set_e, rdr_set_n, head_angle + 90.0) return set_rg, set_az @@ -240,6 +241,7 @@ def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path): ''' Get latitude, longitude, incidence and azimuth angle on multi-looked radar grid + Parameters ---------- burst: Sentinel1Slc @@ -304,6 +306,7 @@ def resample_set(geo_tide, pts_src, pts_dest): ''' Use scipy RegularGridInterpolator to resample geo_tide from a geographical to a radar grid + Parameters ---------- geo_tide: np.ndarray @@ -317,6 +320,7 @@ def resample_set(geo_tide, pts_src, pts_dest): rdr_tide: np.ndarray Tide displacement component resampled on radar grid ''' + # Flip tide displacement component to be consistent with flipped latitudes geo_tide = np.flipud(geo_tide) rgi_func = RGI(pts_src, geo_tide, method='nearest', From e9a122126fabe3762d4f2a137e3c812b059d113d Mon Sep 17 00:00:00 2001 From: vbrancat Date: Mon, 13 Feb 2023 08:35:39 -0800 Subject: [PATCH 04/34] Keep only LOS SET --- src/compass/utils/lut.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index ba73f090..00ffd07d 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -42,7 +42,7 @@ def cumulative_correction_luts(burst, dem_path, and slant range ''' # Get individual LUTs - geometrical_steer_doppler, bistatic_delay, az_fm_mismatch = \ + geometrical_steer_doppler, bistatic_delay, az_fm_mismatch, rg_set = \ compute_geocoding_correction_luts(burst, dem_path=dem_path, rg_step=rg_step, @@ -51,7 +51,7 @@ def cumulative_correction_luts(burst, dem_path, # Convert to geometrical doppler from range time (seconds) to range (m) rg_lut_data = \ - geometrical_steer_doppler.data * isce3.core.speed_of_light / 2.0 + geometrical_steer_doppler.data * isce3.core.speed_of_light / 2.0 + rg_set # Invert signs to correct for convention az_lut_data = -(bistatic_delay.data + az_fm_mismatch.data) @@ -111,6 +111,12 @@ def compute_geocoding_correction_luts(burst, dem_path, in seconds as the function of the azimuth time and slant range. This correction needs to be added to the SLC tagged azimuth time to get the corrected azimuth times. + + rg_set: np.ndarray + numpy array containing the Solid Earth Tide displacement along the + slant range in meters. Solid Earth Tides are computed using pySolid + and the acquisition date of the burst. This correction needs to be + added to the SLC tagged range time to get the corrected range times ''' geometrical_steering_doppler = \ burst.doppler_induced_range_shift(range_step=rg_step, az_step=az_step) @@ -133,12 +139,12 @@ def compute_geocoding_correction_luts(burst, dem_path, kwargs = dict(order=1, mode='edge', anti_aliasing=True, preserve_range=True) rg_set = resize(rg_set_temp, out_shape, **kwargs) - az_set = resize(az_set_temp, out_shape, **kwargs) + #az_set = resize(az_set_temp, out_shape, **kwargs) # TO DO, azimuth SET is in meter and it should be converted in seconds - return geometrical_steering_doppler, bistatic_delay, az_fm_mismatch + return geometrical_steering_doppler, bistatic_delay, az_fm_mismatch, rg_set def solid_earth_tides(burst, dem_path, scratchdir): From 8789629d999fbf4237df53d1d06813947c5732ce Mon Sep 17 00:00:00 2001 From: vbrancat Date: Mon, 13 Feb 2023 08:36:07 -0800 Subject: [PATCH 05/34] Add SET in CSLC product --- src/compass/utils/h5_helpers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compass/utils/h5_helpers.py b/src/compass/utils/h5_helpers.py index 22dda3ba..cf77d088 100644 --- a/src/compass/utils/h5_helpers.py +++ b/src/compass/utils/h5_helpers.py @@ -566,7 +566,7 @@ def corrections_to_h5group(parent_group, burst, cfg): # If enabled, save the correction LUTs if cfg.lut_params.enabled: - geometrical_steering_doppler, bistatic_delay_lut, az_fm_mismatch = \ + geometrical_steering_doppler, bistatic_delay_lut, az_fm_mismatch, rg_set = \ compute_geocoding_correction_luts(burst, dem_path=cfg.dem, rg_step=cfg.lut_params.range_spacing, @@ -599,6 +599,8 @@ def corrections_to_h5group(parent_group, burst, cfg): Meta('azimuth_fm_rate_mismatch', az_fm_mismatch.data, f'azimuth FM rate mismatch mitigation (azimuth) {desc}', {'units': 'seconds'}), + Meta('los_solid_earth_tides'), rg_set, + f'solid Earth tides (range) {desc}', ] for meta_item in correction_items: add_dataset_and_attrs(correction_group, meta_item) From 2fc5527ea4a62ad0a35dee31e61e05535bdf3724 Mon Sep 17 00:00:00 2001 From: vbrancat Date: Mon, 13 Feb 2023 11:03:55 -0800 Subject: [PATCH 06/34] Fix metadata allocation for RG SET --- src/compass/utils/h5_helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compass/utils/h5_helpers.py b/src/compass/utils/h5_helpers.py index cf77d088..1e69787e 100644 --- a/src/compass/utils/h5_helpers.py +++ b/src/compass/utils/h5_helpers.py @@ -599,8 +599,9 @@ def corrections_to_h5group(parent_group, burst, cfg): Meta('azimuth_fm_rate_mismatch', az_fm_mismatch.data, f'azimuth FM rate mismatch mitigation (azimuth) {desc}', {'units': 'seconds'}), - Meta('los_solid_earth_tides'), rg_set, + Meta('los_solid_earth_tides', rg_set, f'solid Earth tides (range) {desc}', + {'units': 'meters'}), ] for meta_item in correction_items: add_dataset_and_attrs(correction_group, meta_item) From afa1b2804d44df9b84d131e1ba4f9a640ebab10f Mon Sep 17 00:00:00 2001 From: vbrancat Date: Mon, 13 Feb 2023 13:00:40 -0800 Subject: [PATCH 07/34] Add SET component in az direction --- src/compass/utils/lut.py | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 00ffd07d..a99f6180 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -42,7 +42,7 @@ def cumulative_correction_luts(burst, dem_path, and slant range ''' # Get individual LUTs - geometrical_steer_doppler, bistatic_delay, az_fm_mismatch, rg_set = \ + geometrical_steer_doppler, bistatic_delay, az_fm_mismatch, set = \ compute_geocoding_correction_luts(burst, dem_path=dem_path, rg_step=rg_step, @@ -51,10 +51,12 @@ def cumulative_correction_luts(burst, dem_path, # Convert to geometrical doppler from range time (seconds) to range (m) rg_lut_data = \ - geometrical_steer_doppler.data * isce3.core.speed_of_light / 2.0 + rg_set + geometrical_steer_doppler.data * isce3.core.speed_of_light / 2.0 + set[0] # Invert signs to correct for convention - az_lut_data = -(bistatic_delay.data + az_fm_mismatch.data) + # Note azimuth SET are in meters, need to convert in seconds to form LUT + az_lut_data = -(bistatic_delay.data + az_fm_mismatch.data + set[ + 1] * isce3.core.speed_of_light) rg_lut = isce3.core.LUT2d(bistatic_delay.x_start, bistatic_delay.y_start, @@ -112,11 +114,10 @@ def compute_geocoding_correction_luts(burst, dem_path, This correction needs to be added to the SLC tagged azimuth time to get the corrected azimuth times. - rg_set: np.ndarray - numpy array containing the Solid Earth Tide displacement along the - slant range in meters. Solid Earth Tides are computed using pySolid - and the acquisition date of the burst. This correction needs to be - added to the SLC tagged range time to get the corrected range times + set: list, np.ndarray + List of numpy.ndarray containing SET in slant range and azimuth directions + in meters. These corrections need to be added to the slC tagged azimuth + and slant range times. ''' geometrical_steering_doppler = \ burst.doppler_induced_range_shift(range_step=rg_step, az_step=az_step) @@ -139,12 +140,9 @@ def compute_geocoding_correction_luts(burst, dem_path, kwargs = dict(order=1, mode='edge', anti_aliasing=True, preserve_range=True) rg_set = resize(rg_set_temp, out_shape, **kwargs) - #az_set = resize(az_set_temp, out_shape, **kwargs) - - # TO DO, azimuth SET is in meter and it should be converted in seconds - + az_set = resize(az_set_temp, out_shape, **kwargs) - return geometrical_steering_doppler, bistatic_delay, az_fm_mismatch, rg_set + return geometrical_steering_doppler, bistatic_delay, az_fm_mismatch, [rg_set, az_set] def solid_earth_tides(burst, dem_path, scratchdir): From b7afe0d96f7cc6442bfc054ac508f3c0c49ebebe Mon Sep 17 00:00:00 2001 From: vbrancat Date: Wed, 15 Feb 2023 07:55:22 -0800 Subject: [PATCH 08/34] Numpy docstring for geometry_utils.py --- src/compass/utils/geometry_utils.py | 178 +++++++++++++++++++++------- 1 file changed, 135 insertions(+), 43 deletions(-) diff --git a/src/compass/utils/geometry_utils.py b/src/compass/utils/geometry_utils.py index 0ef578bd..9ea068ff 100644 --- a/src/compass/utils/geometry_utils.py +++ b/src/compass/utils/geometry_utils.py @@ -2,12 +2,22 @@ def los2orbit_azimuth_angle(los_az_angle, look_direction='right'): - """Convert the azimuth angle of the LOS vector to the one of the orbit flight vector. - Parameters: los_az_angle - np.ndarray or float, azimuth angle of the LOS vector from the ground to the SAR platform - measured from the north with anti-clockwise direction as positive, in the unit of degrees - Returns: orb_az_angle - np.ndarray or float, azimuth angle of the SAR platform along track/orbit direction - measured from the north with anti-clockwise direction as positive, in the unit of degrees """ + Convert the azimuth angle of the LOS vector to the one of the orbit flight vector. + + Parameters + ---------- + los_az_angle: np.ndarray or float + Azimuth angle of the LOS vector from the ground to the SAR platform measured from + the north with anti-clockwise direction as positive, in the unit of degrees + + Returns + ------- + orb_az_angle: np.ndarray or float + Azimuth angle of the SAR platform along track/orbit direction measured from + the north with anti-clockwise direction as positive, in the unit of degrees + """ + if look_direction == 'right': orb_az_angle = los_az_angle - 90 else: @@ -17,13 +27,30 @@ def los2orbit_azimuth_angle(los_az_angle, look_direction='right'): def azimuth2heading_angle(az_angle, look_direction='right'): - """Convert azimuth angle from ISCE los.rdr band2 into satellite orbit heading angle + """ + Convert azimuth angle from ISCE los.rdr band2 into satellite orbit heading angle ISCE-2 los.* file band2 is azimuth angle of LOS vector from ground target to the satellite - measured from the north in anti-clockwise as positive + measured from the north in anti-clockwise as positive. + Below are typical values in deg for satellites with near-polar orbit: ascending orbit: heading angle of -12 and azimuth angle of 102 descending orbit: heading angle of -168 and azimuth angle of -102 + + Parameters + ---------- + az_angle: np.ndarray or float + Measured from North in anti-clockwise direction. Same definition + as ISCE2 azimmuth angle (second band of *los raster) + look_direction: str + Satellite look direction. S1-A/B is right; NISAR is left + + Returns + ------- + head_angle: np.ndarray or float + Azimuth angle from ground target to the satellite measured + from the North in anti-clockwise direction as positive """ + if look_direction == 'right': head_angle = (az_angle - 90) * -1 else: @@ -33,7 +60,23 @@ def azimuth2heading_angle(az_angle, look_direction='right'): def heading2azimuth_angle(head_angle, look_direction='right'): - """Convert satellite orbit heading angle into azimuth angle as defined in ISCE-2.""" + """ + Convert satellite orbit heading angle into azimuth angle as defined in ISCE-2 + + Parameters + ---------- + head_angle: np.ndarray or float + Azimuth angle from ground target to the satellite measured + from the North in anti-clockwise direction as positive + look_direction: str + Satellite look direction. S1-A/B is right; NISAR is left + + Returns + ------- + az_angle: np.ndarray or float + Measured from the North in anti-clockwise direction. Same definition + as ISCE2 azimuth angle (second band of *los raster) + """ if look_direction == 'right': az_angle = (head_angle - 90) * -1 else: @@ -43,19 +86,34 @@ def heading2azimuth_angle(head_angle, look_direction='right'): def enu2los(v_e, v_n, v_u, inc_angle, head_angle=None, az_angle=None): - """Project east/north/up motion into the line-of-sight (LOS) direction defined by incidence/azimuth angle. - Parameters: v_e - np.ndarray or float, displacement in east-west direction, east as positive - v_n - np.ndarray or float, displacement in north-south direction, north as positive - v_u - np.ndarray or float, displacement in vertical direction, up as positive - inc_angle - np.ndarray or float, incidence angle from vertical, in the unit of degrees - head_angle - np.ndarray or float, azimuth angle of the SAR platform along track direction - measured from the north with clockwise direction as positive, in the unit of degrees - az_angle - np.ndarray or float, azimuth angle of the LOS vector from the ground to the SAR platform - measured from the north with anti-clockwise direction as positive, in the unit of degrees - head_angle = 90 - az_angle - Returns: v_los - np.ndarray or float, displacement in LOS direction, motion toward satellite as positive """ - # unite (los_)head/az_angle into (los_)az_angle + Project East/North/Up motion into the line-of-sight (LOS) + direction defined by incidence/azimuth angle. + + Parameters + ---------- + v_e: np.ndarray or float + displacement in East-West direction, East as positive + v_n: np.ndarray or float + displacement in North-South direction, North as positive + v_u: np.ndarray or float + displacement in vertical direction, Up as positive + inc_angle: np.ndarray or float + incidence angle from vertical, in the unit of degrees + head_angle: np.ndarray or float + azimuth angle of the SAR platform along track direction measured from + the North with clockwise direction as positive, in the unit of degrees + az_angle: np.ndarray or float + azimuth angle of the LOS vector from the ground to the SAR platform + measured from the north with anti-clockwise direction as positive, in the unit of degrees + head_angle = 90 - az_angle + + Returns + ------- + v_los: np.ndarray or float + displacement in LOS direction, motion toward satellite as positive + """ + if az_angle is None: if head_angle is not None: az_angle = heading2azimuth_angle(head_angle) @@ -71,14 +129,24 @@ def enu2los(v_e, v_n, v_u, inc_angle, head_angle=None, az_angle=None): def en2az(v_e, v_n, orb_az_angle): - """Project east/north motion into the radar azimuth direction. - Parameters: v_e - np.ndarray or float, displacement in east-west direction, east as positive - v_n - np.ndarray or float, displacement in north-south direction, north as positive - orb_az_angle - np.ndarray or float, azimuth angle of the SAR platform along track/orbit direction - measured from the north with anti-clockwise direction as positive, in the unit of degrees - orb_az_angle = los_az_angle + 90 for right-looking radar. - Returns: v_az - np.ndarray or float, displacement in azimuth direction, - motion along flight direction as positive + """ + Project east/north motion into the radar azimuth direction. + Parameters + ---------- + v_e: np.ndarray or float + displacement in East-West direction, East as positive + v_n: np.ndarray or float + displacement in North-South direction, North as positive + orb_az_angle: np.ndarray or float + azimuth angle of the SAR platform along track/orbit direction + measured from the north with anti-clockwise direction as positive, in the unit of degrees + orb_az_angle = los_az_angle + 90 for right-looking radar. + + Returns + ------- + v_az: np.ndarray or float + displacement in azimuth direction, + motion along flight direction as positive """ # project EN onto azimuth v_az = ( v_e * np.sin(np.deg2rad(orb_az_angle)) * -1 @@ -87,32 +155,56 @@ def en2az(v_e, v_n, orb_az_angle): def calc_azimuth_from_east_north_obs(east, north): - """Calculate the azimuth angle of the given horizontal observation (in east and north) - Parameters: east - float, eastward motion - north - float, northward motion - Returns: az_angle - float, azimuth angle in degree - measured from the north with anti-clockwise as positive """ + Calculate the azimuth angle of the given horizontal observation (in East and North) + + Parameters + ---------- + east: float + eastward motion + north: float + northward motion + + Returns + ------- + az_angle: float + azimuth angle in degree measured from the north + with anti-clockwise as positive + """ + az_angle = -1 * np.rad2deg(np.arctan2(east, north)) % 360 return az_angle def get_unit_vector4component_of_interest(los_inc_angle, los_az_angle, comp='enu2los', horz_az_angle=None): - """Get the unit vector for the component of interest. - Parameters: los_inc_angle - np.ndarray or float, incidence angle from vertical, in the unit of degrees - los_az_angle - np.ndarray or float, azimuth angle of the LOS vector from the ground to the SAR platform - measured from the north with anti-clockwise direction as positive, in the unit of degrees - comp - str, component of interest, choose among the following values: - enu2los, en2los, hz2los, u2los, up2los, orb(it)_az, vert, horz - horz_az_angle - np.ndarray or float, azimuth angle of the horizontal direction of interest - measured from the north with anti-clockwise direction as positive, in the unit of degrees - Returns: unit_vec - list(np.ndarray/float), unit vector of the ENU component for the component of interest """ + Get the unit vector for the component of interest. + + Parameters + ---------- + los_inc_angle: np.ndarray or float + incidence angle from vertical, in the unit of degrees + los_az_angle: np.ndarray or float + azimuth angle of the LOS vector from the ground to the SAR platform + measured from the north with anti-clockwise direction as positive, in the unit of degrees + comp: str + component of interest. It can be one of the following values + enu2los, en2los, hz2los, u2los, up2los, orb(it)_az, vert, horz + horz_az_angle: np.ndarray or float + azimuth angle of the horizontal direction of interest measured from + the north with anti-clockwise direction as positive, in the unit of degrees + + Returns + ------- + unit_vec: list(np.ndarray/float) + unit vector of the ENU component for the component of interest + """ + # check input arguments comps = [ 'enu2los', 'en2los', 'hz2los', 'horz2los', 'u2los', 'vert2los', # radar LOS / cross-track 'en2az', 'hz2az', 'orb_az', 'orbit_az', # radar azimuth / along-track - 'vert', 'vertical', 'horz', 'horizontal', # vertical / arbitraty horizontal + 'vert', 'vertical', 'horz', 'horizontal', # vertical / horizontal ] if comp not in comps: From fb774b6f456f14bebff824da68bb61e4d0349f1a Mon Sep 17 00:00:00 2001 From: vbrancat Date: Wed, 15 Feb 2023 08:10:11 -0800 Subject: [PATCH 09/34] Move open_raster in helper.py --- src/compass/utils/helpers.py | 24 ++++++++++++++++++++++++ src/compass/utils/lut.py | 21 +-------------------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/compass/utils/helpers.py b/src/compass/utils/helpers.py index 3e8a6e1f..b9344184 100644 --- a/src/compass/utils/helpers.py +++ b/src/compass/utils/helpers.py @@ -318,3 +318,27 @@ def burst_bboxes_from_db(burst_ids, burst_db_file=None, burst_db_conn=None): # TODO add warning if not all burst bounding boxes found return dict(zip(burst_ids, zip(epsgs, bboxes))) + + +def open_raster(filename, band=1): + ''' + Return band as numpy array from gdal-friendly raster + Parameters + ---------- + filename: str + Path where is stored GDAL raster to open + band: int + Band number to open + + Returns + ------- + raster: np.ndarray + Numpy array containing the raster band to open + data_type: str + Band data type + ''' + + ds = gdal.Open(filename, gdal.GA_ReadOnly) + raster = ds.GetRasterBand(band).ReadAsArray() + data_type = ds.GetRasterBand(band).DataType + return raster, data_type diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index a99f6180..3bf802f4 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -7,6 +7,7 @@ import pysolid from compass.utils.geometry_utils import enu2los, en2az +from compass.utils.helpers import open_raster from scipy.interpolate import RegularGridInterpolator as RGI from osgeo import gdal from skimage.transform import resize @@ -286,26 +287,6 @@ def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path): heading_angle_raster=heading_raster) -def open_raster(filename, band=1): - ''' - Return band as numpy array from gdal-friendly raster - Parameters - ---------- - filename: str - Path where is stored GDAL raster to open - band: int - Band number to open - Returns - ------- - raster: np.ndarray - Numpy array containing the raster band to open - ''' - - ds = gdal.Open(filename, gdal.GA_ReadOnly) - raster = ds.GetRasterBand(band).ReadAsArray() - return raster - - def resample_set(geo_tide, pts_src, pts_dest): ''' Use scipy RegularGridInterpolator to resample geo_tide From 254ea3d9996a56ea08bcfbfac0fa80ccf1e10c96 Mon Sep 17 00:00:00 2001 From: vbrancat Date: Thu, 16 Feb 2023 17:30:27 -0800 Subject: [PATCH 10/34] Have rdr2geo outside the SET computation --- src/compass/s1_geocode_slc.py | 18 +++++----- src/compass/utils/lut.py | 68 +++++++++++++++++++++-------------- 2 files changed, 51 insertions(+), 35 deletions(-) diff --git a/src/compass/s1_geocode_slc.py b/src/compass/s1_geocode_slc.py index dfab26dc..ce19f8a5 100755 --- a/src/compass/s1_geocode_slc.py +++ b/src/compass/s1_geocode_slc.py @@ -71,16 +71,25 @@ def run(cfg: GeoRunConfig): date_str = burst.sensing_start.strftime("%Y%m%d") geo_grid = cfg.geogrids[burst_id] + # Get output paths for current burst + burst_id_date_key = (burst_id, date_str) + out_paths = cfg.output_paths[burst_id_date_key] + + # Create scratch as needed + scratch_path = out_paths.scratch_directory + # If enabled, get range and azimuth LUTs if cfg.lut_params.enabled: rg_lut, az_lut = cumulative_correction_luts(burst, dem_path=cfg.dem, rg_step=cfg.lut_params.range_spacing, - az_step=cfg.lut_params.azimuth_spacing) + az_step=cfg.lut_params.azimuth_spacing, + scratch_path=scratch_path) else: rg_lut = isce3.core.LUT2d() az_lut = isce3.core.LUT2d() + # Get radar grid, doppler, and orbit radar_grid = burst.as_isce3_radargrid() native_doppler = burst.doppler.lut2d orbit = burst.orbit @@ -94,13 +103,6 @@ def run(cfg: GeoRunConfig): if cfg.rdr2geo_params.geocode_metadata_layers: s1_geocode_metadata.run(cfg, burst, fetch_from_scratch=True) - # Get output paths for current burst - burst_id_date_key = (burst_id, date_str) - out_paths = cfg.output_paths[burst_id_date_key] - - # Create scratch as needed - scratch_path = out_paths.scratch_directory - # Extract burst boundaries b_bounds = np.s_[burst.first_valid_line:burst.last_valid_line, burst.first_valid_sample:burst.last_valid_sample] diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 3bf802f4..181fd8b2 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -120,21 +120,45 @@ def compute_geocoding_correction_luts(burst, dem_path, in meters. These corrections need to be added to the slC tagged azimuth and slant range times. ''' + if not os.path.exists(dem_path): + raise FileNotFoundError(f'Cannot find the dem file: {dem_path}') + + # Some ancillary inputs + dem_raster = isce3.io.Raster(dem_path) + epsg = dem_raster.get_epsg() + proj = isce3.core.make_projection(epsg) + ellipsoid = proj.ellipsoid + + # Create output directory to store temporary results + output_path = f'{scratch_path}/corrections' + os.makedirs(output_path, exist_ok=True) + + # Compute geometrical steering doppler geometrical_steering_doppler = \ burst.doppler_induced_range_shift(range_step=rg_step, az_step=az_step) + # Bistatic delay bistatic_delay = burst.bistatic_delay(range_step=rg_step, az_step=az_step) - if not os.path.exists(dem_path): - raise FileNotFoundError(f'Cannot find the dem file: {dem_path}') - + # Compute azimuth FM-rate mismatch az_fm_mismatch = burst.az_fm_rate_mismatch_mitigation(dem_path, scratch_path, range_step=rg_step, az_step=az_step) - # compute Solid Earth Tides (using pySolid) - rg_set_temp, az_set_temp = solid_earth_tides(burst, dem_path, scratch_path) + # Compute Solid Earth Tides (using pySolid) + # 1. Run rdr2geo on a coarse radar grid + compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, + azimuth_looks=64, range_looks=429) + + # Open individual arrays and pass them to SET + lat_radar, _ = open_raster(f'{output_path}/y.rdr') + lon_radar, _ = open_raster(f'{output_path}/x.rdr') + inc_angle, _ = open_raster(f'{output_path}/incidence_angle.rdr') + head_angle, _ = open_raster(f'{output_path}/heading_angle.rdr') + + rg_set_temp, az_set_temp = solid_earth_tides(burst, lat_radar, lon_radar, + inc_angle, head_angle) # Resize SET to the size of the correction grid out_shape = bistatic_delay.data.shape @@ -146,7 +170,8 @@ def compute_geocoding_correction_luts(burst, dem_path, return geometrical_steering_doppler, bistatic_delay, az_fm_mismatch, [rg_set, az_set] -def solid_earth_tides(burst, dem_path, scratchdir): +def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, + inc_angle, head_angle): ''' Compute displacement due to Solid Earth Tides (SET) in slant range and azimuth directions @@ -155,8 +180,8 @@ def solid_earth_tides(burst, dem_path, scratchdir): --------- burst: Sentinel1Slc S1-A/B burst object - dem_path: str - File path to available DEM + lat_radar_grid: np.ndarray + numpy scratchdir: str Path to scratch directory @@ -167,15 +192,8 @@ def solid_earth_tides(burst, dem_path, scratchdir): az_set: np.ndarray 2D array with SET displacement along azimuth ''' - # Some ancillary inputs - dem_raster = isce3.io.Raster(dem_path) - epsg = dem_raster.get_epsg() - proj = isce3.core.make_projection(epsg) - ellipsoid = proj.ellipsoid - # Create directory to store SET temp results - output_path = f'{scratchdir}/solid_earth_tides' - os.makedirs(output_path, exist_ok=True) + # Extract top-left coordinates from burst polygon lon_min, lat_min, _, _ = burst.border[0].bounds @@ -201,9 +219,6 @@ def solid_earth_tides(burst, dem_path, scratchdir): set_u) = pysolid.calc_solid_earth_tides_grid(burst.sensing_start, atr, display=False, verbose=True) - # Compute topo layers (necessary for ENU to radar geometry conversion) - compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path) - # Resample SET from geographical grid to radar grid # Generate the lat/lon arrays for the SET geogrid lat_geo_array = np.linspace(atr['Y_FIRST'], @@ -213,10 +228,6 @@ def solid_earth_tides(burst, dem_path, scratchdir): lon_start + atr['X_STEP'] * atr['WIDTH'], num=atr['WIDTH']) - # Get lat/lon grid for grids for radar coordinates (from rdr2geo) - lat_radar_grid = open_raster(f'{output_path}/y.rdr') - lon_radar_grid = open_raster(f'{output_path}/x.rdr') - # Use scipy RGI to resample SET from geocoded to radar coordinates pts_src = (np.flipud(lat_geo_array), lon_geo_array) pts_dst = (lat_radar_grid.flatten(), lon_radar_grid.flatten()) @@ -233,8 +244,6 @@ def solid_earth_tides(burst, dem_path, scratchdir): # anti-clockwise. To convert ENU to LOS, we need the azimuth angle which is # measured from the north and positive anti-clockwise # azimuth_angle = heading + 90 - inc_angle = open_raster(f'{output_path}/incidence_angle.rdr') - head_angle = open_raster(f'{output_path}/heading_angle.rdr') set_rg = enu2los(rdr_set_e, rdr_set_n, rdr_set_u, inc_angle, az_angle=head_angle + 90.0) set_az = en2az(rdr_set_e, rdr_set_n, head_angle + 90.0) @@ -242,7 +251,8 @@ def solid_earth_tides(burst, dem_path, scratchdir): return set_rg, set_az -def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path): +def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, + range_looks, azimuth_looks): ''' Get latitude, longitude, incidence and azimuth angle on multi-looked radar grid @@ -257,11 +267,15 @@ def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path): ISCE3 object including DEM raster output_path: str Path where to save output rasters + range_looks: int + Number of range looks to multilook radar grid + azimuth_looks: int + Number of azimuth looks to multilook radar grid ''' # Get radar and doppler grid rdr_grid = burst.as_isce3_radargrid() - coarse_rdr_grid = rdr_grid.multilook(64, 429) + coarse_rdr_grid = rdr_grid.multilook(azimuth_looks, range_looks) grid_doppler = isce3.core.LUT2d() # Initialize the rdr2geo object From 1595bb42d6750222c774a850dbcb27db94adeca7 Mon Sep 17 00:00:00 2001 From: vbrancat Date: Thu, 16 Feb 2023 17:41:57 -0800 Subject: [PATCH 11/34] Compute radar grid using rg_step and az_step from runconfig --- src/compass/utils/lut.py | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 181fd8b2..63d9e43e 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -149,7 +149,7 @@ def compute_geocoding_correction_luts(burst, dem_path, # Compute Solid Earth Tides (using pySolid) # 1. Run rdr2geo on a coarse radar grid compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, - azimuth_looks=64, range_looks=429) + rg_step, az_step) # Open individual arrays and pass them to SET lat_radar, _ = open_raster(f'{output_path}/y.rdr') @@ -193,8 +193,6 @@ def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, 2D array with SET displacement along azimuth ''' - - # Extract top-left coordinates from burst polygon lon_min, lat_min, _, _ = burst.border[0].bounds @@ -252,7 +250,7 @@ def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, - range_looks, azimuth_looks): + rg_step, az_step): ''' Get latitude, longitude, incidence and azimuth angle on multi-looked radar grid @@ -267,19 +265,30 @@ def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, ISCE3 object including DEM raster output_path: str Path where to save output rasters - range_looks: int - Number of range looks to multilook radar grid - azimuth_looks: int - Number of azimuth looks to multilook radar grid + rg_step: float + Slant range spacing of the radar grid + az_step: float + Along track spacing of the radar grid ''' + grid_doppler = isce3.core.LUT2d() # Get radar and doppler grid - rdr_grid = burst.as_isce3_radargrid() - coarse_rdr_grid = rdr_grid.multilook(azimuth_looks, range_looks) - grid_doppler = isce3.core.LUT2d() + width_radargrid, length_radargrid = \ + [vec.size for vec in burst._steps_to_vecs(rg_step, az_step)] + + rdr_grid = isce3.product.RadarGridParameters( + burst.as_isce3_radargrid().sensing_start, + burst.wavelength, + 1.0/az_step, + burst.starting_range, + rg_step, + isce3.core.LookSide.Right, + length_radargrid, + width_radargrid, + ) # Initialize the rdr2geo object - rdr2geo_obj = isce3.geometry.Rdr2Geo(coarse_rdr_grid, burst.orbit, + rdr2geo_obj = isce3.geometry.Rdr2Geo(rdr_grid, burst.orbit, ellipsoid, grid_doppler, threshold=1.0e8) @@ -289,8 +298,8 @@ def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, 'incidence_angle': (True, gdal.GDT_Float32), 'heading_angle': (True, gdal.GDT_Float32)} raster_list = [ - isce3.io.Raster(f'{output_path}/{fname}.rdr', coarse_rdr_grid.width, - coarse_rdr_grid.length, 1, dtype, 'ENVI') + isce3.io.Raster(f'{output_path}/{fname}.rdr', rdr_grid.width, + rdr_grid.length, 1, dtype, 'ENVI') if enabled else None for fname, (enabled, dtype) in topo_output.items()] x_raster, y_raster, incidence_raster, heading_raster = raster_list From 2c5953a427ce39db11c1ad84e1212461b53a84ba Mon Sep 17 00:00:00 2001 From: vbrancat Date: Thu, 16 Feb 2023 21:03:48 -0800 Subject: [PATCH 12/34] Revert "Compute radar grid using rg_step and az_step from runconfig" This reverts commit 1595bb42d6750222c774a850dbcb27db94adeca7. --- src/compass/utils/lut.py | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 63d9e43e..181fd8b2 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -149,7 +149,7 @@ def compute_geocoding_correction_luts(burst, dem_path, # Compute Solid Earth Tides (using pySolid) # 1. Run rdr2geo on a coarse radar grid compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, - rg_step, az_step) + azimuth_looks=64, range_looks=429) # Open individual arrays and pass them to SET lat_radar, _ = open_raster(f'{output_path}/y.rdr') @@ -193,6 +193,8 @@ def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, 2D array with SET displacement along azimuth ''' + + # Extract top-left coordinates from burst polygon lon_min, lat_min, _, _ = burst.border[0].bounds @@ -250,7 +252,7 @@ def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, - rg_step, az_step): + range_looks, azimuth_looks): ''' Get latitude, longitude, incidence and azimuth angle on multi-looked radar grid @@ -265,30 +267,19 @@ def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, ISCE3 object including DEM raster output_path: str Path where to save output rasters - rg_step: float - Slant range spacing of the radar grid - az_step: float - Along track spacing of the radar grid + range_looks: int + Number of range looks to multilook radar grid + azimuth_looks: int + Number of azimuth looks to multilook radar grid ''' - grid_doppler = isce3.core.LUT2d() # Get radar and doppler grid - width_radargrid, length_radargrid = \ - [vec.size for vec in burst._steps_to_vecs(rg_step, az_step)] - - rdr_grid = isce3.product.RadarGridParameters( - burst.as_isce3_radargrid().sensing_start, - burst.wavelength, - 1.0/az_step, - burst.starting_range, - rg_step, - isce3.core.LookSide.Right, - length_radargrid, - width_radargrid, - ) + rdr_grid = burst.as_isce3_radargrid() + coarse_rdr_grid = rdr_grid.multilook(azimuth_looks, range_looks) + grid_doppler = isce3.core.LUT2d() # Initialize the rdr2geo object - rdr2geo_obj = isce3.geometry.Rdr2Geo(rdr_grid, burst.orbit, + rdr2geo_obj = isce3.geometry.Rdr2Geo(coarse_rdr_grid, burst.orbit, ellipsoid, grid_doppler, threshold=1.0e8) @@ -298,8 +289,8 @@ def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, 'incidence_angle': (True, gdal.GDT_Float32), 'heading_angle': (True, gdal.GDT_Float32)} raster_list = [ - isce3.io.Raster(f'{output_path}/{fname}.rdr', rdr_grid.width, - rdr_grid.length, 1, dtype, 'ENVI') + isce3.io.Raster(f'{output_path}/{fname}.rdr', coarse_rdr_grid.width, + coarse_rdr_grid.length, 1, dtype, 'ENVI') if enabled else None for fname, (enabled, dtype) in topo_output.items()] x_raster, y_raster, incidence_raster, heading_raster = raster_list From c28a32e276654da34e5040cebb75835b06c13ab1 Mon Sep 17 00:00:00 2001 From: vbrancat Date: Thu, 16 Feb 2023 21:04:09 -0800 Subject: [PATCH 13/34] Revert "Have rdr2geo outside the SET computation" This reverts commit 254ea3d9996a56ea08bcfbfac0fa80ccf1e10c96. --- src/compass/s1_geocode_slc.py | 18 +++++----- src/compass/utils/lut.py | 68 ++++++++++++++--------------------- 2 files changed, 35 insertions(+), 51 deletions(-) diff --git a/src/compass/s1_geocode_slc.py b/src/compass/s1_geocode_slc.py index ce19f8a5..dfab26dc 100755 --- a/src/compass/s1_geocode_slc.py +++ b/src/compass/s1_geocode_slc.py @@ -71,25 +71,16 @@ def run(cfg: GeoRunConfig): date_str = burst.sensing_start.strftime("%Y%m%d") geo_grid = cfg.geogrids[burst_id] - # Get output paths for current burst - burst_id_date_key = (burst_id, date_str) - out_paths = cfg.output_paths[burst_id_date_key] - - # Create scratch as needed - scratch_path = out_paths.scratch_directory - # If enabled, get range and azimuth LUTs if cfg.lut_params.enabled: rg_lut, az_lut = cumulative_correction_luts(burst, dem_path=cfg.dem, rg_step=cfg.lut_params.range_spacing, - az_step=cfg.lut_params.azimuth_spacing, - scratch_path=scratch_path) + az_step=cfg.lut_params.azimuth_spacing) else: rg_lut = isce3.core.LUT2d() az_lut = isce3.core.LUT2d() - # Get radar grid, doppler, and orbit radar_grid = burst.as_isce3_radargrid() native_doppler = burst.doppler.lut2d orbit = burst.orbit @@ -103,6 +94,13 @@ def run(cfg: GeoRunConfig): if cfg.rdr2geo_params.geocode_metadata_layers: s1_geocode_metadata.run(cfg, burst, fetch_from_scratch=True) + # Get output paths for current burst + burst_id_date_key = (burst_id, date_str) + out_paths = cfg.output_paths[burst_id_date_key] + + # Create scratch as needed + scratch_path = out_paths.scratch_directory + # Extract burst boundaries b_bounds = np.s_[burst.first_valid_line:burst.last_valid_line, burst.first_valid_sample:burst.last_valid_sample] diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 181fd8b2..3bf802f4 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -120,45 +120,21 @@ def compute_geocoding_correction_luts(burst, dem_path, in meters. These corrections need to be added to the slC tagged azimuth and slant range times. ''' - if not os.path.exists(dem_path): - raise FileNotFoundError(f'Cannot find the dem file: {dem_path}') - - # Some ancillary inputs - dem_raster = isce3.io.Raster(dem_path) - epsg = dem_raster.get_epsg() - proj = isce3.core.make_projection(epsg) - ellipsoid = proj.ellipsoid - - # Create output directory to store temporary results - output_path = f'{scratch_path}/corrections' - os.makedirs(output_path, exist_ok=True) - - # Compute geometrical steering doppler geometrical_steering_doppler = \ burst.doppler_induced_range_shift(range_step=rg_step, az_step=az_step) - # Bistatic delay bistatic_delay = burst.bistatic_delay(range_step=rg_step, az_step=az_step) - # Compute azimuth FM-rate mismatch + if not os.path.exists(dem_path): + raise FileNotFoundError(f'Cannot find the dem file: {dem_path}') + az_fm_mismatch = burst.az_fm_rate_mismatch_mitigation(dem_path, scratch_path, range_step=rg_step, az_step=az_step) - # Compute Solid Earth Tides (using pySolid) - # 1. Run rdr2geo on a coarse radar grid - compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, - azimuth_looks=64, range_looks=429) - - # Open individual arrays and pass them to SET - lat_radar, _ = open_raster(f'{output_path}/y.rdr') - lon_radar, _ = open_raster(f'{output_path}/x.rdr') - inc_angle, _ = open_raster(f'{output_path}/incidence_angle.rdr') - head_angle, _ = open_raster(f'{output_path}/heading_angle.rdr') - - rg_set_temp, az_set_temp = solid_earth_tides(burst, lat_radar, lon_radar, - inc_angle, head_angle) + # compute Solid Earth Tides (using pySolid) + rg_set_temp, az_set_temp = solid_earth_tides(burst, dem_path, scratch_path) # Resize SET to the size of the correction grid out_shape = bistatic_delay.data.shape @@ -170,8 +146,7 @@ def compute_geocoding_correction_luts(burst, dem_path, return geometrical_steering_doppler, bistatic_delay, az_fm_mismatch, [rg_set, az_set] -def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, - inc_angle, head_angle): +def solid_earth_tides(burst, dem_path, scratchdir): ''' Compute displacement due to Solid Earth Tides (SET) in slant range and azimuth directions @@ -180,8 +155,8 @@ def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, --------- burst: Sentinel1Slc S1-A/B burst object - lat_radar_grid: np.ndarray - numpy + dem_path: str + File path to available DEM scratchdir: str Path to scratch directory @@ -192,8 +167,15 @@ def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, az_set: np.ndarray 2D array with SET displacement along azimuth ''' + # Some ancillary inputs + dem_raster = isce3.io.Raster(dem_path) + epsg = dem_raster.get_epsg() + proj = isce3.core.make_projection(epsg) + ellipsoid = proj.ellipsoid - + # Create directory to store SET temp results + output_path = f'{scratchdir}/solid_earth_tides' + os.makedirs(output_path, exist_ok=True) # Extract top-left coordinates from burst polygon lon_min, lat_min, _, _ = burst.border[0].bounds @@ -219,6 +201,9 @@ def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, set_u) = pysolid.calc_solid_earth_tides_grid(burst.sensing_start, atr, display=False, verbose=True) + # Compute topo layers (necessary for ENU to radar geometry conversion) + compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path) + # Resample SET from geographical grid to radar grid # Generate the lat/lon arrays for the SET geogrid lat_geo_array = np.linspace(atr['Y_FIRST'], @@ -228,6 +213,10 @@ def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, lon_start + atr['X_STEP'] * atr['WIDTH'], num=atr['WIDTH']) + # Get lat/lon grid for grids for radar coordinates (from rdr2geo) + lat_radar_grid = open_raster(f'{output_path}/y.rdr') + lon_radar_grid = open_raster(f'{output_path}/x.rdr') + # Use scipy RGI to resample SET from geocoded to radar coordinates pts_src = (np.flipud(lat_geo_array), lon_geo_array) pts_dst = (lat_radar_grid.flatten(), lon_radar_grid.flatten()) @@ -244,6 +233,8 @@ def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, # anti-clockwise. To convert ENU to LOS, we need the azimuth angle which is # measured from the north and positive anti-clockwise # azimuth_angle = heading + 90 + inc_angle = open_raster(f'{output_path}/incidence_angle.rdr') + head_angle = open_raster(f'{output_path}/heading_angle.rdr') set_rg = enu2los(rdr_set_e, rdr_set_n, rdr_set_u, inc_angle, az_angle=head_angle + 90.0) set_az = en2az(rdr_set_e, rdr_set_n, head_angle + 90.0) @@ -251,8 +242,7 @@ def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, return set_rg, set_az -def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, - range_looks, azimuth_looks): +def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path): ''' Get latitude, longitude, incidence and azimuth angle on multi-looked radar grid @@ -267,15 +257,11 @@ def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, ISCE3 object including DEM raster output_path: str Path where to save output rasters - range_looks: int - Number of range looks to multilook radar grid - azimuth_looks: int - Number of azimuth looks to multilook radar grid ''' # Get radar and doppler grid rdr_grid = burst.as_isce3_radargrid() - coarse_rdr_grid = rdr_grid.multilook(azimuth_looks, range_looks) + coarse_rdr_grid = rdr_grid.multilook(64, 429) grid_doppler = isce3.core.LUT2d() # Initialize the rdr2geo object From 47e3b1ac8df4b6dbdda9a8e15e88b4901d60d1e1 Mon Sep 17 00:00:00 2001 From: vbrancat Date: Thu, 16 Feb 2023 21:23:09 -0800 Subject: [PATCH 14/34] Remove azimut SET for testing --- src/compass/utils/lut.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 3bf802f4..0f19adf4 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -43,7 +43,7 @@ def cumulative_correction_luts(burst, dem_path, and slant range ''' # Get individual LUTs - geometrical_steer_doppler, bistatic_delay, az_fm_mismatch, set = \ + geometrical_steer_doppler, bistatic_delay, az_fm_mismatch, tides = \ compute_geocoding_correction_luts(burst, dem_path=dem_path, rg_step=rg_step, @@ -52,12 +52,11 @@ def cumulative_correction_luts(burst, dem_path, # Convert to geometrical doppler from range time (seconds) to range (m) rg_lut_data = \ - geometrical_steer_doppler.data * isce3.core.speed_of_light / 2.0 + set[0] + geometrical_steer_doppler.data * isce3.core.speed_of_light / 2.0 + tides[0] # Invert signs to correct for convention - # Note azimuth SET are in meters, need to convert in seconds to form LUT - az_lut_data = -(bistatic_delay.data + az_fm_mismatch.data + set[ - 1] * isce3.core.speed_of_light) + # TO DO: add azimuth SET to LUT + az_lut_data = -(bistatic_delay.data + az_fm_mismatch.data) rg_lut = isce3.core.LUT2d(bistatic_delay.x_start, bistatic_delay.y_start, @@ -214,8 +213,8 @@ def solid_earth_tides(burst, dem_path, scratchdir): num=atr['WIDTH']) # Get lat/lon grid for grids for radar coordinates (from rdr2geo) - lat_radar_grid = open_raster(f'{output_path}/y.rdr') - lon_radar_grid = open_raster(f'{output_path}/x.rdr') + lat_radar_grid, _ = open_raster(f'{output_path}/y.rdr') + lon_radar_grid, _ = open_raster(f'{output_path}/x.rdr') # Use scipy RGI to resample SET from geocoded to radar coordinates pts_src = (np.flipud(lat_geo_array), lon_geo_array) @@ -233,8 +232,8 @@ def solid_earth_tides(burst, dem_path, scratchdir): # anti-clockwise. To convert ENU to LOS, we need the azimuth angle which is # measured from the north and positive anti-clockwise # azimuth_angle = heading + 90 - inc_angle = open_raster(f'{output_path}/incidence_angle.rdr') - head_angle = open_raster(f'{output_path}/heading_angle.rdr') + inc_angle, _ = open_raster(f'{output_path}/incidence_angle.rdr') + head_angle, _ = open_raster(f'{output_path}/heading_angle.rdr') set_rg = enu2los(rdr_set_e, rdr_set_n, rdr_set_u, inc_angle, az_angle=head_angle + 90.0) set_az = en2az(rdr_set_e, rdr_set_n, head_angle + 90.0) From aaaa181a35c85a19cf989678be46ea69f4b944fc Mon Sep 17 00:00:00 2001 From: vbrancat Date: Thu, 16 Feb 2023 21:48:44 -0800 Subject: [PATCH 15/34] move rdr2geo computation outside SET --- src/compass/s1_geocode_slc.py | 17 ++++---- src/compass/utils/lut.py | 76 ++++++++++++++++++++++------------- 2 files changed, 56 insertions(+), 37 deletions(-) diff --git a/src/compass/s1_geocode_slc.py b/src/compass/s1_geocode_slc.py index dfab26dc..a064cd75 100755 --- a/src/compass/s1_geocode_slc.py +++ b/src/compass/s1_geocode_slc.py @@ -71,12 +71,20 @@ def run(cfg: GeoRunConfig): date_str = burst.sensing_start.strftime("%Y%m%d") geo_grid = cfg.geogrids[burst_id] + # Get output paths for current burst + burst_id_date_key = (burst_id, date_str) + out_paths = cfg.output_paths[burst_id_date_key] + + # Create scratch as needed + scratch_path = out_paths.scratch_directory + # If enabled, get range and azimuth LUTs if cfg.lut_params.enabled: rg_lut, az_lut = cumulative_correction_luts(burst, dem_path=cfg.dem, rg_step=cfg.lut_params.range_spacing, - az_step=cfg.lut_params.azimuth_spacing) + az_step=cfg.lut_params.azimuth_spacing, + scratch_path=scratch_path) else: rg_lut = isce3.core.LUT2d() az_lut = isce3.core.LUT2d() @@ -94,13 +102,6 @@ def run(cfg: GeoRunConfig): if cfg.rdr2geo_params.geocode_metadata_layers: s1_geocode_metadata.run(cfg, burst, fetch_from_scratch=True) - # Get output paths for current burst - burst_id_date_key = (burst_id, date_str) - out_paths = cfg.output_paths[burst_id_date_key] - - # Create scratch as needed - scratch_path = out_paths.scratch_directory - # Extract burst boundaries b_bounds = np.s_[burst.first_valid_line:burst.last_valid_line, burst.first_valid_sample:burst.last_valid_sample] diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 0f19adf4..2a9f89d0 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -119,21 +119,44 @@ def compute_geocoding_correction_luts(burst, dem_path, in meters. These corrections need to be added to the slC tagged azimuth and slant range times. ''' + + # Some ancillary inputs + dem_raster = isce3.io.Raster(dem_path) + epsg = dem_raster.get_epsg() + proj = isce3.core.make_projection(epsg) + ellipsoid = proj.ellipsoid + + # Create directory to store SET temp results + output_path = f'{scratch_path}/corrections' + os.makedirs(output_path, exist_ok=True) + + # Compute Geometrical Steering Doppler geometrical_steering_doppler = \ burst.doppler_induced_range_shift(range_step=rg_step, az_step=az_step) + # Compute bistatic delay bistatic_delay = burst.bistatic_delay(range_step=rg_step, az_step=az_step) - if not os.path.exists(dem_path): - raise FileNotFoundError(f'Cannot find the dem file: {dem_path}') - + # Compute azimuth FM-rate mismatch az_fm_mismatch = burst.az_fm_rate_mismatch_mitigation(dem_path, scratch_path, range_step=rg_step, az_step=az_step) + # Get solid Earth tides on a very coarse grid + # Run rdr2geo on a very coarse grid + compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, + rg_step*10, az_step*10) + + # Open rdr2geo layers and feed them to SET computation + lat, _ = open_raster(f'{output_path}/y.rdr') + lon, _ = open_raster(f'{output_path}/x.rdr') + inc_angle, _ = open_raster(f'{output_path}/incidence_angle.rdr') + head_angle, _ = open_raster(f'{output_path}/heading_angle.rdr') + # compute Solid Earth Tides (using pySolid) - rg_set_temp, az_set_temp = solid_earth_tides(burst, dem_path, scratch_path) + rg_set_temp, az_set_temp = solid_earth_tides(burst, lat, lon, + inc_angle, head_angle) # Resize SET to the size of the correction grid out_shape = bistatic_delay.data.shape @@ -145,7 +168,7 @@ def compute_geocoding_correction_luts(burst, dem_path, return geometrical_steering_doppler, bistatic_delay, az_fm_mismatch, [rg_set, az_set] -def solid_earth_tides(burst, dem_path, scratchdir): +def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, inc_angle, head_angle): ''' Compute displacement due to Solid Earth Tides (SET) in slant range and azimuth directions @@ -166,15 +189,6 @@ def solid_earth_tides(burst, dem_path, scratchdir): az_set: np.ndarray 2D array with SET displacement along azimuth ''' - # Some ancillary inputs - dem_raster = isce3.io.Raster(dem_path) - epsg = dem_raster.get_epsg() - proj = isce3.core.make_projection(epsg) - ellipsoid = proj.ellipsoid - - # Create directory to store SET temp results - output_path = f'{scratchdir}/solid_earth_tides' - os.makedirs(output_path, exist_ok=True) # Extract top-left coordinates from burst polygon lon_min, lat_min, _, _ = burst.border[0].bounds @@ -200,9 +214,6 @@ def solid_earth_tides(burst, dem_path, scratchdir): set_u) = pysolid.calc_solid_earth_tides_grid(burst.sensing_start, atr, display=False, verbose=True) - # Compute topo layers (necessary for ENU to radar geometry conversion) - compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path) - # Resample SET from geographical grid to radar grid # Generate the lat/lon arrays for the SET geogrid lat_geo_array = np.linspace(atr['Y_FIRST'], @@ -212,10 +223,6 @@ def solid_earth_tides(burst, dem_path, scratchdir): lon_start + atr['X_STEP'] * atr['WIDTH'], num=atr['WIDTH']) - # Get lat/lon grid for grids for radar coordinates (from rdr2geo) - lat_radar_grid, _ = open_raster(f'{output_path}/y.rdr') - lon_radar_grid, _ = open_raster(f'{output_path}/x.rdr') - # Use scipy RGI to resample SET from geocoded to radar coordinates pts_src = (np.flipud(lat_geo_array), lon_geo_array) pts_dst = (lat_radar_grid.flatten(), lon_radar_grid.flatten()) @@ -232,8 +239,6 @@ def solid_earth_tides(burst, dem_path, scratchdir): # anti-clockwise. To convert ENU to LOS, we need the azimuth angle which is # measured from the north and positive anti-clockwise # azimuth_angle = heading + 90 - inc_angle, _ = open_raster(f'{output_path}/incidence_angle.rdr') - head_angle, _ = open_raster(f'{output_path}/heading_angle.rdr') set_rg = enu2los(rdr_set_e, rdr_set_n, rdr_set_u, inc_angle, az_angle=head_angle + 90.0) set_az = en2az(rdr_set_e, rdr_set_n, head_angle + 90.0) @@ -241,7 +246,8 @@ def solid_earth_tides(burst, dem_path, scratchdir): return set_rg, set_az -def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path): +def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, + rg_step, az_step): ''' Get latitude, longitude, incidence and azimuth angle on multi-looked radar grid @@ -259,12 +265,24 @@ def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path): ''' # Get radar and doppler grid - rdr_grid = burst.as_isce3_radargrid() - coarse_rdr_grid = rdr_grid.multilook(64, 429) + width_rdr_grid, length_rdr_grid = [vec.size for vec in burst._steps_to_vecs(rg_step, az_step)] + + rdr_grid = isce3.product.RadarGridParameters( + burst.as_isce3_radargrid().sensing_start, + burst.wavelength, + 1.0 / az_step, + burst.starting_range, + rg_step, + isce3.core.LookSide.Right, + length_rdr_grid, + width_rdr_grid, + burst.as_isce3_radargrid().ref_epoch + ) + grid_doppler = isce3.core.LUT2d() # Initialize the rdr2geo object - rdr2geo_obj = isce3.geometry.Rdr2Geo(coarse_rdr_grid, burst.orbit, + rdr2geo_obj = isce3.geometry.Rdr2Geo(rdr_grid, burst.orbit, ellipsoid, grid_doppler, threshold=1.0e8) @@ -274,8 +292,8 @@ def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path): 'incidence_angle': (True, gdal.GDT_Float32), 'heading_angle': (True, gdal.GDT_Float32)} raster_list = [ - isce3.io.Raster(f'{output_path}/{fname}.rdr', coarse_rdr_grid.width, - coarse_rdr_grid.length, 1, dtype, 'ENVI') + isce3.io.Raster(f'{output_path}/{fname}.rdr', rdr_grid.width, + rdr_grid.length, 1, dtype, 'ENVI') if enabled else None for fname, (enabled, dtype) in topo_output.items()] x_raster, y_raster, incidence_raster, heading_raster = raster_list From 23eae01181bebcd901f4893689878e48a946650a Mon Sep 17 00:00:00 2001 From: vbrancat Date: Thu, 16 Feb 2023 21:56:46 -0800 Subject: [PATCH 16/34] pep8 formatting and numpy docstring --- src/compass/utils/lut.py | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 2a9f89d0..b2415af9 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -52,7 +52,8 @@ def cumulative_correction_luts(burst, dem_path, # Convert to geometrical doppler from range time (seconds) to range (m) rg_lut_data = \ - geometrical_steer_doppler.data * isce3.core.speed_of_light / 2.0 + tides[0] + geometrical_steer_doppler.data * isce3.core.speed_of_light / 2.0 + \ + tides[0] # Invert signs to correct for convention # TO DO: add azimuth SET to LUT @@ -114,7 +115,7 @@ def compute_geocoding_correction_luts(burst, dem_path, This correction needs to be added to the SLC tagged azimuth time to get the corrected azimuth times. - set: list, np.ndarray + [rg_set, az_se]: list, np.ndarray List of numpy.ndarray containing SET in slant range and azimuth directions in meters. These corrections need to be added to the slC tagged azimuth and slant range times. @@ -146,7 +147,7 @@ def compute_geocoding_correction_luts(burst, dem_path, # Get solid Earth tides on a very coarse grid # Run rdr2geo on a very coarse grid compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, - rg_step*10, az_step*10) + rg_step * 10, az_step * 10) # Open rdr2geo layers and feed them to SET computation lat, _ = open_raster(f'{output_path}/y.rdr') @@ -165,10 +166,12 @@ def compute_geocoding_correction_luts(burst, dem_path, rg_set = resize(rg_set_temp, out_shape, **kwargs) az_set = resize(az_set_temp, out_shape, **kwargs) - return geometrical_steering_doppler, bistatic_delay, az_fm_mismatch, [rg_set, az_set] + return geometrical_steering_doppler, bistatic_delay, az_fm_mismatch, [ + rg_set, az_set] -def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, inc_angle, head_angle): +def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, inc_angle, + head_angle): ''' Compute displacement due to Solid Earth Tides (SET) in slant range and azimuth directions @@ -177,10 +180,14 @@ def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, inc_angle, head_ang --------- burst: Sentinel1Slc S1-A/B burst object - dem_path: str - File path to available DEM - scratchdir: str - Path to scratch directory + lat_radar_grid: np.ndarray + Latitude array on burst radargrid + lon_radar_grid: np.ndarray + Longitude array on burst radargrid + inc_angle: np.ndarray + Incident angle raster + head_angle: np.ndaaray + Heading angle raster Returns ------ @@ -262,10 +269,15 @@ def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, ISCE3 object including DEM raster output_path: str Path where to save output rasters + rg_step: float + Spacing of radar grid along slant range + az_step: float + Spacing of the radar grid along azimuth ''' # Get radar and doppler grid - width_rdr_grid, length_rdr_grid = [vec.size for vec in burst._steps_to_vecs(rg_step, az_step)] + width_rdr_grid, length_rdr_grid = [vec.size for vec in + burst._steps_to_vecs(rg_step, az_step)] rdr_grid = isce3.product.RadarGridParameters( burst.as_isce3_radargrid().sensing_start, From 0f99be1bee24d2327a7f548ac9898e95ff740e4d Mon Sep 17 00:00:00 2001 From: vbrancat Date: Sat, 18 Feb 2023 17:10:57 -0800 Subject: [PATCH 17/34] improve numpy docstring and change division of geometry doppler --- src/compass/utils/lut.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index b2415af9..02c095e5 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -52,7 +52,7 @@ def cumulative_correction_luts(burst, dem_path, # Convert to geometrical doppler from range time (seconds) to range (m) rg_lut_data = \ - geometrical_steer_doppler.data * isce3.core.speed_of_light / 2.0 + \ + geometrical_steer_doppler.data * isce3.core.speed_of_light * 0.5 + \ tides[0] # Invert signs to correct for convention @@ -185,9 +185,9 @@ def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, inc_angle, lon_radar_grid: np.ndarray Longitude array on burst radargrid inc_angle: np.ndarray - Incident angle raster + Incident angle raster in unit of degrees head_angle: np.ndaaray - Heading angle raster + Heading angle raster in unit of degrees Returns ------ From 56fcb3c1ad12996998699cb825af765f6cde0223 Mon Sep 17 00:00:00 2001 From: vbrancat Date: Tue, 21 Feb 2023 08:33:45 -0800 Subject: [PATCH 18/34] correct sign of heading angle --- src/compass/utils/lut.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 02c095e5..e486005a 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -115,7 +115,7 @@ def compute_geocoding_correction_luts(burst, dem_path, This correction needs to be added to the SLC tagged azimuth time to get the corrected azimuth times. - [rg_set, az_se]: list, np.ndarray + [rg_set, az_set]: list, np.ndarray List of numpy.ndarray containing SET in slant range and azimuth directions in meters. These corrections need to be added to the slC tagged azimuth and slant range times. @@ -248,7 +248,7 @@ def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, inc_angle, # azimuth_angle = heading + 90 set_rg = enu2los(rdr_set_e, rdr_set_n, rdr_set_u, inc_angle, az_angle=head_angle + 90.0) - set_az = en2az(rdr_set_e, rdr_set_n, head_angle + 90.0) + set_az = en2az(rdr_set_e, rdr_set_n, head_angle - 90.0) return set_rg, set_az From 4cb12f927f6d87055060a84e3740fede1e73df3c Mon Sep 17 00:00:00 2001 From: vbrancat Date: Tue, 21 Feb 2023 08:48:29 -0800 Subject: [PATCH 19/34] Remove datatype return from open_raster function --- src/compass/utils/helpers.py | 6 ++---- src/compass/utils/lut.py | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/compass/utils/helpers.py b/src/compass/utils/helpers.py index b9344184..8914a247 100644 --- a/src/compass/utils/helpers.py +++ b/src/compass/utils/helpers.py @@ -334,11 +334,9 @@ def open_raster(filename, band=1): ------- raster: np.ndarray Numpy array containing the raster band to open - data_type: str - Band data type ''' ds = gdal.Open(filename, gdal.GA_ReadOnly) raster = ds.GetRasterBand(band).ReadAsArray() - data_type = ds.GetRasterBand(band).DataType - return raster, data_type + + return raster diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index e486005a..a98f426e 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -150,10 +150,10 @@ def compute_geocoding_correction_luts(burst, dem_path, rg_step * 10, az_step * 10) # Open rdr2geo layers and feed them to SET computation - lat, _ = open_raster(f'{output_path}/y.rdr') - lon, _ = open_raster(f'{output_path}/x.rdr') - inc_angle, _ = open_raster(f'{output_path}/incidence_angle.rdr') - head_angle, _ = open_raster(f'{output_path}/heading_angle.rdr') + lat = open_raster(f'{output_path}/y.rdr') + lon = open_raster(f'{output_path}/x.rdr') + inc_angle = open_raster(f'{output_path}/incidence_angle.rdr') + head_angle = open_raster(f'{output_path}/heading_angle.rdr') # compute Solid Earth Tides (using pySolid) rg_set_temp, az_set_temp = solid_earth_tides(burst, lat, lon, From 3b622599c4b49d39deb7f6b13734be61b9f02624 Mon Sep 17 00:00:00 2001 From: vbrancat Date: Tue, 21 Feb 2023 09:07:15 -0800 Subject: [PATCH 20/34] Move ellipsoid params inside rdr2geo function --- src/compass/utils/lut.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index a98f426e..055747e8 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -120,12 +120,8 @@ def compute_geocoding_correction_luts(burst, dem_path, in meters. These corrections need to be added to the slC tagged azimuth and slant range times. ''' - - # Some ancillary inputs + # Get DEM raster dem_raster = isce3.io.Raster(dem_path) - epsg = dem_raster.get_epsg() - proj = isce3.core.make_projection(epsg) - ellipsoid = proj.ellipsoid # Create directory to store SET temp results output_path = f'{scratch_path}/corrections' @@ -146,7 +142,7 @@ def compute_geocoding_correction_luts(burst, dem_path, # Get solid Earth tides on a very coarse grid # Run rdr2geo on a very coarse grid - compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, + compute_rdr2geo_rasters(burst, dem_raster, output_path, rg_step * 10, az_step * 10) # Open rdr2geo layers and feed them to SET computation @@ -253,7 +249,7 @@ def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, inc_angle, return set_rg, set_az -def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, +def compute_rdr2geo_rasters(burst, dem_raster, output_path, rg_step, az_step): ''' Get latitude, longitude, incidence and @@ -263,8 +259,6 @@ def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, ---------- burst: Sentinel1Slc S1-A/B burst object - ellipsoid: isce3.ext.isce3.core - ISCE3 Ellipsoid object dem_raster: isce3.io.Raster ISCE3 object including DEM raster output_path: str @@ -275,6 +269,11 @@ def compute_rdr2geo_rasters(burst, ellipsoid, dem_raster, output_path, Spacing of the radar grid along azimuth ''' + # Some ancillary inputs + epsg = dem_raster.get_epsg() + proj = isce3.core.make_projection(epsg) + ellipsoid = proj.ellipsoid + # Get radar and doppler grid width_rdr_grid, length_rdr_grid = [vec.size for vec in burst._steps_to_vecs(rg_step, az_step)] From 0e79b52bd179059b963e53d4db5836e79c034c4f Mon Sep 17 00:00:00 2001 From: vbrancat Date: Tue, 21 Feb 2023 09:39:50 -0800 Subject: [PATCH 21/34] Return paths to rdr2geo rasters --- src/compass/utils/lut.py | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 055747e8..e8ab78f6 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -142,14 +142,15 @@ def compute_geocoding_correction_luts(burst, dem_path, # Get solid Earth tides on a very coarse grid # Run rdr2geo on a very coarse grid - compute_rdr2geo_rasters(burst, dem_raster, output_path, - rg_step * 10, az_step * 10) + lon_path, lat_path, inc_path, head_path = \ + compute_rdr2geo_rasters(burst, dem_raster, output_path, + rg_step * 10, az_step * 10) # Open rdr2geo layers and feed them to SET computation - lat = open_raster(f'{output_path}/y.rdr') - lon = open_raster(f'{output_path}/x.rdr') - inc_angle = open_raster(f'{output_path}/incidence_angle.rdr') - head_angle = open_raster(f'{output_path}/heading_angle.rdr') + lat = open_raster(lat_path) + lon = open_raster(lon_path) + inc_angle = open_raster(inc_path) + head_angle = open_raster(head_path) # compute Solid Earth Tides (using pySolid) rg_set_temp, az_set_temp = solid_earth_tides(burst, lat, lon, @@ -267,6 +268,17 @@ def compute_rdr2geo_rasters(burst, dem_raster, output_path, Spacing of radar grid along slant range az_step: float Spacing of the radar grid along azimuth + + Returns + ------- + x_path: str + Path to longitude raster + y_path: str + Path to latitude raster + inc_path: str + Path to incidence angle raster + head_path: str + Path to heading angle raster ''' # Some ancillary inputs @@ -314,6 +326,11 @@ def compute_rdr2geo_rasters(burst, dem_raster, output_path, incidence_angle_raster=incidence_raster, heading_angle_raster=heading_raster) + # Return file path to rdr2geo layers + paths = [f'{output_path}/{fname}.rdr' for fname in topo_output.keys()] + + return paths[0], paths[1], paths[2], paths[3] + def resample_set(geo_tide, pts_src, pts_dest): ''' From 2405f9f7689b41bd74f2b659cbaf374a2a73227e Mon Sep 17 00:00:00 2001 From: vbrancat Date: Tue, 21 Feb 2023 10:10:05 -0800 Subject: [PATCH 22/34] Simplify rdr2geo raster generation logic, Add check on DEM --- src/compass/utils/lut.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index e8ab78f6..38ebdd46 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -135,6 +135,8 @@ def compute_geocoding_correction_luts(burst, dem_path, bistatic_delay = burst.bistatic_delay(range_step=rg_step, az_step=az_step) # Compute azimuth FM-rate mismatch + if not os.path.isfile(dem_path): + raise FileNotFoundError(f'Cannot find the dem file: {dem_path}') az_fm_mismatch = burst.az_fm_rate_mismatch_mitigation(dem_path, scratch_path, range_step=rg_step, @@ -310,15 +312,14 @@ def compute_rdr2geo_rasters(burst, dem_raster, output_path, threshold=1.0e8) # Get the rdr2geo raster needed for SET computation - topo_output = {'x': (True, gdal.GDT_Float64), - 'y': (True, gdal.GDT_Float64), - 'incidence_angle': (True, gdal.GDT_Float32), - 'heading_angle': (True, gdal.GDT_Float32)} + topo_output = {f'{output_path}/x.rdr': gdal.GDT_Float64, + f'{output_path}/y.rdr': gdal.GDT_Float64, + f'{output_path}/incidence_angle.rdr': gdal.GDT_Float32, + f'{output_path}/heading_angle.rdr': gdal.GDT_Float32} raster_list = [ - isce3.io.Raster(f'{output_path}/{fname}.rdr', rdr_grid.width, + isce3.io.Raster(fname, rdr_grid.width, rdr_grid.length, 1, dtype, 'ENVI') - if enabled else None - for fname, (enabled, dtype) in topo_output.items()] + for fname, dtype in topo_output.items()] x_raster, y_raster, incidence_raster, heading_raster = raster_list # Run rdr2geo on coarse radar grid @@ -327,8 +328,7 @@ def compute_rdr2geo_rasters(burst, dem_raster, output_path, heading_angle_raster=heading_raster) # Return file path to rdr2geo layers - paths = [f'{output_path}/{fname}.rdr' for fname in topo_output.keys()] - + paths = list(topo_output.keys()) return paths[0], paths[1], paths[2], paths[3] From f6c3d0511cc22c6a3b3a7dfedbe4e9dfcc7b1ad0 Mon Sep 17 00:00:00 2001 From: vbrancat Date: Tue, 21 Feb 2023 10:50:52 -0800 Subject: [PATCH 23/34] Reorganize imports --- src/compass/utils/lut.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 38ebdd46..ae80e118 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -4,13 +4,13 @@ import os import isce3 import numpy as np +from osgeo import gdal import pysolid +from scipy.interpolate import RegularGridInterpolator as RGI +from skimage.transform import resize from compass.utils.geometry_utils import enu2los, en2az from compass.utils.helpers import open_raster -from scipy.interpolate import RegularGridInterpolator as RGI -from osgeo import gdal -from skimage.transform import resize def cumulative_correction_luts(burst, dem_path, From c7bd9f12ee547708c3e1d9393364a870af0a104d Mon Sep 17 00:00:00 2001 From: vbrancat Date: Wed, 22 Feb 2023 09:49:04 -0800 Subject: [PATCH 24/34] Clarify azimuth angle doc string, cite source code --- src/compass/utils/geometry_utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/compass/utils/geometry_utils.py b/src/compass/utils/geometry_utils.py index 9ea068ff..6711679d 100644 --- a/src/compass/utils/geometry_utils.py +++ b/src/compass/utils/geometry_utils.py @@ -1,9 +1,18 @@ +############################################################################ +# Suite of geometry utilities for SAR processing # +# This was adapted from MintPy on 02-22-2023 # +# Source code is available at: # +# https://github.com/insarlab/MintPy/blob/main/src/mintpy/utils/utils0.py # +############################################################################ + + import numpy as np def los2orbit_azimuth_angle(los_az_angle, look_direction='right'): """ Convert the azimuth angle of the LOS vector to the one of the orbit flight vector. + The conversion done for this function only works for zero-Doppler geometry. Parameters ---------- From 0abe9328319568a5e667abd4663c2a2db9a66eb3 Mon Sep 17 00:00:00 2001 From: vbrancat Date: Fri, 3 Mar 2023 22:43:36 -0800 Subject: [PATCH 25/34] Refactor azimuth FM-rate mismatch to use same grid as SET --- src/compass/utils/lut.py | 53 +++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index ae80e118..836ca513 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -122,6 +122,9 @@ def compute_geocoding_correction_luts(burst, dem_path, ''' # Get DEM raster dem_raster = isce3.io.Raster(dem_path) + epsg = dem_raster.get_epsg() + proj = isce3.core.make_projection(epsg) + ellipsoid = proj.ellipsoid # Create directory to store SET temp results output_path = f'{scratch_path}/corrections' @@ -134,26 +137,26 @@ def compute_geocoding_correction_luts(burst, dem_path, # Compute bistatic delay bistatic_delay = burst.bistatic_delay(range_step=rg_step, az_step=az_step) - # Compute azimuth FM-rate mismatch - if not os.path.isfile(dem_path): - raise FileNotFoundError(f'Cannot find the dem file: {dem_path}') - az_fm_mismatch = burst.az_fm_rate_mismatch_mitigation(dem_path, - scratch_path, - range_step=rg_step, - az_step=az_step) - - # Get solid Earth tides on a very coarse grid - # Run rdr2geo on a very coarse grid - lon_path, lat_path, inc_path, head_path = \ + # Run rdr2geo to obtain the required layers + lon_path, lat_path, height_path, inc_path, head_path = \ compute_rdr2geo_rasters(burst, dem_raster, output_path, - rg_step * 10, az_step * 10) + rg_step, az_step) - # Open rdr2geo layers and feed them to SET computation + # Open rdr2geo layers lat = open_raster(lat_path) lon = open_raster(lon_path) + height = open_raster(height_path) inc_angle = open_raster(inc_path) head_angle = open_raster(head_path) + # Compute azimuth FM-rate mismatch + az_fm_mismatch = burst.az_fm_rate_mismatch_from_llh(lat, lon, height, + ellipsoid, + burst.as_isce3_radargrid( + az_step=az_step, + rg_step=rg_step) + ) + # compute Solid Earth Tides (using pySolid) rg_set_temp, az_set_temp = solid_earth_tides(burst, lat, lon, inc_angle, head_angle) @@ -288,21 +291,9 @@ def compute_rdr2geo_rasters(burst, dem_raster, output_path, proj = isce3.core.make_projection(epsg) ellipsoid = proj.ellipsoid - # Get radar and doppler grid - width_rdr_grid, length_rdr_grid = [vec.size for vec in - burst._steps_to_vecs(rg_step, az_step)] - - rdr_grid = isce3.product.RadarGridParameters( - burst.as_isce3_radargrid().sensing_start, - burst.wavelength, - 1.0 / az_step, - burst.starting_range, - rg_step, - isce3.core.LookSide.Right, - length_rdr_grid, - width_rdr_grid, - burst.as_isce3_radargrid().ref_epoch - ) + # Get radar grid for the correction grid + rdr_grid = burst.as_isce3_radargrid(az_step=az_step, + rg_step=rg_step) grid_doppler = isce3.core.LUT2d() @@ -314,22 +305,24 @@ def compute_rdr2geo_rasters(burst, dem_raster, output_path, # Get the rdr2geo raster needed for SET computation topo_output = {f'{output_path}/x.rdr': gdal.GDT_Float64, f'{output_path}/y.rdr': gdal.GDT_Float64, + f'{output_path}/height.rdr': gdal.GDT_Float64, f'{output_path}/incidence_angle.rdr': gdal.GDT_Float32, f'{output_path}/heading_angle.rdr': gdal.GDT_Float32} raster_list = [ isce3.io.Raster(fname, rdr_grid.width, rdr_grid.length, 1, dtype, 'ENVI') for fname, dtype in topo_output.items()] - x_raster, y_raster, incidence_raster, heading_raster = raster_list + x_raster, y_raster, height_raster, incidence_raster, heading_raster = raster_list # Run rdr2geo on coarse radar grid rdr2geo_obj.topo(dem_raster, x_raster, y_raster, + height_raster=height_raster, incidence_angle_raster=incidence_raster, heading_angle_raster=heading_raster) # Return file path to rdr2geo layers paths = list(topo_output.keys()) - return paths[0], paths[1], paths[2], paths[3] + return paths[0], paths[1], paths[2], paths[3], paths[4] def resample_set(geo_tide, pts_src, pts_dest): From 429ff96bfba2566410c5474fd9e06243cd9e191c Mon Sep 17 00:00:00 2001 From: vbrancat Date: Fri, 3 Mar 2023 22:45:05 -0800 Subject: [PATCH 26/34] Decimate lat/lon/inc/head for SET computation --- src/compass/utils/lut.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 836ca513..ac6616a2 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -157,9 +157,13 @@ def compute_geocoding_correction_luts(burst, dem_path, rg_step=rg_step) ) - # compute Solid Earth Tides (using pySolid) - rg_set_temp, az_set_temp = solid_earth_tides(burst, lat, lon, - inc_angle, head_angle) + # compute Solid Earth Tides using pySolid. Decimate the rdr2geo layers. + # compute decimation factor assuming a 5 km spacing along slant range + dec_factor = int(np.round(5000.0 / rg_step)) + rg_set_temp, az_set_temp = solid_earth_tides(burst, lat[::dec_factor], + lon[::dec_factor], + inc_angle[::dec_factor], + head_angle[::dec_factor]) # Resize SET to the size of the correction grid out_shape = bistatic_delay.data.shape From 7a2f8bc346889df36c489a90e336ba5ebe2948c0 Mon Sep 17 00:00:00 2001 From: vbrancat Date: Tue, 7 Mar 2023 08:17:36 -0800 Subject: [PATCH 27/34] Push complete list of reqs for CI unit test --- docker/specifile.txt | 268 +++++++++++++++++++++++-------------------- requirements.txt | 1 + 2 files changed, 145 insertions(+), 124 deletions(-) diff --git a/docker/specifile.txt b/docker/specifile.txt index ab76390d..d8b374a2 100644 --- a/docker/specifile.txt +++ b/docker/specifile.txt @@ -1,158 +1,178 @@ # This file may be used to create an environment using: # $ conda create --name --file -# platform: linux-64 +# platform: osx-64 @EXPLICIT -https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2022.12.7-ha878542_0.conda +https://conda.anaconda.org/conda-forge/osx-64/bzip2-1.0.8-h0d85af4_4.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/c-ares-1.18.1-h0d85af4_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/ca-certificates-2022.12.7-h033912b_0.conda +https://conda.anaconda.org/conda-forge/osx-64/dav1d-1.0.0-hac89ed1_1.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/font-ttf-dejavu-sans-mono-2.37-hab24e00_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/font-ttf-inconsolata-3.000-h77eed37_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/font-ttf-source-code-pro-2.038-h77eed37_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/font-ttf-ubuntu-0.83-hab24e00_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.40-h41732ed_0.conda -https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-12.2.0-h337968e_19.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-12.2.0-h46fd767_19.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/freexl-1.0.6-hb7f2c08_1.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/giflib-5.2.1-hbcb3906_2.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/jpeg-9e-hb7f2c08_3.conda +https://conda.anaconda.org/conda-forge/osx-64/json-c-0.16-h01d06f9_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/jxrlib-1.1-h35c211d_2.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libbrotlicommon-1.0.9-hb7f2c08_8.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libcxx-15.0.7-h71dddab_0.conda +https://conda.anaconda.org/conda-forge/osx-64/libdeflate-1.17-hac1461d_0.conda +https://conda.anaconda.org/conda-forge/osx-64/libev-4.33-haf1e3a3_1.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libffi-3.4.2-h0d85af4_5.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libiconv-1.17-hac89ed1_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libwebp-base-1.2.4-h775f41a_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libzlib-1.2.13-hfd90126_4.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/llvm-openmp-15.0.7-h61d9ccf_0.conda +https://conda.anaconda.org/conda-forge/osx-64/ncurses-6.3-h96cf925_1.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/pixman-0.40.0-hbcb3906_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/poppler-data-0.4.12-hd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/linux-64/python_abi-3.11-3_cp311.conda +https://conda.anaconda.org/conda-forge/osx-64/pthread-stubs-0.4-hc929b4f_1001.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/python_abi-3.11-3_cp311.conda +https://conda.anaconda.org/conda-forge/osx-64/tzcode-2022g-hb7f2c08_0.conda https://conda.anaconda.org/conda-forge/noarch/tzdata-2022g-h191b570_0.conda +https://conda.anaconda.org/conda-forge/osx-64/xorg-libxau-1.0.9-h35c211d_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/xorg-libxdmcp-1.1.3-h35c211d_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/xz-5.2.6-h775f41a_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/yaml-0.2.5-h0d85af4_2.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/zlib-ng-2.0.6-hac89ed1_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/aom-3.5.0-hf0c8a7f_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/charls-2.4.1-hf0c8a7f_0.conda +https://conda.anaconda.org/conda-forge/osx-64/expat-2.5.0-hf0c8a7f_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/fonts-conda-forge-1-0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libgfortran-ng-12.2.0-h69a702a_19.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libgomp-12.2.0-h65d4601_19.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/geos-3.11.1-hf0c8a7f_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/gettext-0.21.1-h8a4c099_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/icu-70.1-h96cf925_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/lerc-4.0.0-hb486fe8_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libaec-1.0.6-hf0c8a7f_1.conda +https://conda.anaconda.org/conda-forge/osx-64/libbrotlidec-1.0.9-hb7f2c08_8.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libbrotlienc-1.0.9-hb7f2c08_8.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libedit-3.1.20191231-h0678c8f_2.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libgfortran5-12.2.0-he409387_30.conda +https://conda.anaconda.org/conda-forge/osx-64/libpng-1.6.39-ha978bb4_0.conda +https://conda.anaconda.org/conda-forge/osx-64/libsqlite-3.40.0-ha978bb4_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libxcb-1.13-h0d85af4_1004.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libzopfli-1.0.3-h046ec9c_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/lz4-c-1.9.4-hf0c8a7f_0.conda +https://conda.anaconda.org/conda-forge/osx-64/nspr-4.35-hea0b92c_0.conda +https://conda.anaconda.org/conda-forge/osx-64/openssl-3.0.8-hfd90126_0.conda +https://conda.anaconda.org/conda-forge/osx-64/pcre2-10.40-h1c4e4bc_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/readline-8.1.2-h3899abd_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/snappy-1.1.9-h225ccf5_2.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/tk-8.6.12-h5dbffcc_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/zfp-1.0.0-ha894c9a_3.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/zlib-1.2.13-hfd90126_4.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.2-hbc0c0cd_6.conda +https://conda.anaconda.org/conda-forge/osx-64/blosc-1.21.2-hebb52c4_0.conda +https://conda.anaconda.org/conda-forge/osx-64/boost-cpp-1.78.0-h8b082ac_1.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/brotli-bin-1.0.9-hb7f2c08_8.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/c-blosc2-2.7.1-had5f71b_0.conda https://conda.anaconda.org/conda-forge/noarch/fonts-conda-ecosystem-1-0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-12.2.0-h65d4601_19.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-h7f98852_4.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/c-ares-1.18.1-h7f98852_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/expat-2.5.0-h27087fc_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/fftw-3.3.10-nompi_hf0379b8_106.conda -https://conda.anaconda.org/conda-forge/linux-64/freexl-1.0.6-h166bdaf_1.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/geos-3.11.1-h27087fc_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/gettext-0.21.1-h27087fc_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/giflib-5.2.1-h36c2ea0_2.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/icu-70.1-h27087fc_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/jpeg-9e-h0b41bf4_3.conda -https://conda.anaconda.org/conda-forge/linux-64/json-c-0.16-hc379101_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/keyutils-1.6.1-h166bdaf_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/lerc-4.0.0-h27087fc_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libaec-1.0.6-hcb278e6_1.conda -https://conda.anaconda.org/conda-forge/linux-64/libdeflate-1.17-h0b41bf4_0.conda -https://conda.anaconda.org/conda-forge/linux-64/libev-4.33-h516909a_1.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.2-h7f98852_5.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libiconv-1.17-h166bdaf_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libnsl-2.0.0-h7f98852_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.21-pthreads_h78a6416_3.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.32.1-h7f98852_1000.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libwebp-base-1.2.4-h166bdaf_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.2.13-h166bdaf_4.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/lz4-c-1.9.4-hcb278e6_0.conda -https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.3-h27087fc_1.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/nspr-4.35-h27087fc_0.conda -https://conda.anaconda.org/conda-forge/linux-64/openssl-3.0.8-h0b41bf4_0.conda -https://conda.anaconda.org/conda-forge/linux-64/pixman-0.40.0-h36c2ea0_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/pthread-stubs-0.4-h36c2ea0_1001.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/snappy-1.1.9-hbd366e4_2.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/tzcode-2022g-h166bdaf_0.conda -https://conda.anaconda.org/conda-forge/linux-64/xorg-kbproto-1.0.7-h7f98852_1002.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/xorg-libice-1.0.10-h7f98852_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/xorg-libxau-1.0.9-h7f98852_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/xorg-libxdmcp-1.1.3-h7f98852_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/xorg-renderproto-0.11.1-h7f98852_1002.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/xorg-xextproto-7.3.0-h0b41bf4_1003.conda -https://conda.anaconda.org/conda-forge/linux-64/xorg-xproto-7.0.31-h7f98852_1007.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/yaml-0.2.5-h7f98852_2.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libblas-3.9.0-16_linux64_openblas.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libedit-3.1.20191231-he28a2e2_2.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libnghttp2-1.51.0-hff17c54_0.conda -https://conda.anaconda.org/conda-forge/linux-64/libpng-1.6.39-h753d276_0.conda -https://conda.anaconda.org/conda-forge/linux-64/librttopo-1.1.0-ha49c73b_12.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.40.0-h753d276_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libssh2-1.10.0-hf14f497_3.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libxcb-1.13-h7f98852_1004.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libxml2-2.10.3-h7463322_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libzip-1.9.2-hc929e4a_1.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/pcre2-10.40-hc3806b6_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/readline-8.1.2-h0f457ee_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.12-h27826a3_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/xorg-libsm-1.2.3-hd9c2040_1000.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/zlib-1.2.13-h166bdaf_4.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.2-h3eb15da_6.conda -https://conda.anaconda.org/conda-forge/linux-64/blosc-1.21.3-hafa529b_0.conda -https://conda.anaconda.org/conda-forge/linux-64/boost-cpp-1.78.0-h75c5d50_1.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/freetype-2.12.1-hca18f0e_1.conda -https://conda.anaconda.org/conda-forge/linux-64/hdf4-4.2.15-h9772cbc_5.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/krb5-1.20.1-h81ceb04_0.conda -https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-16_linux64_openblas.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libglib-2.74.1-h606061b_1.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/liblapack-3.9.0-16_linux64_openblas.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libtiff-4.5.0-h6adf6a1_2.conda -https://conda.anaconda.org/conda-forge/linux-64/libxslt-1.1.37-h873f0b0_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/nss-3.88-he45b914_0.conda -https://conda.anaconda.org/conda-forge/linux-64/python-3.11.0-he550d4f_1_cpython.conda -https://conda.anaconda.org/conda-forge/linux-64/sqlite-3.40.0-h4ff8645_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/xorg-libx11-1.7.2-h7f98852_0.tar.bz2 -https://conda.anaconda.org/conda-forge/noarch/appdirs-1.4.4-pyh9f0ad1d_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/freetype-2.12.1-h3f81eb7_1.conda +https://conda.anaconda.org/conda-forge/osx-64/hdf4-4.2.15-h7aa5921_5.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/krb5-1.20.1-h049b76e_0.conda +https://conda.anaconda.org/conda-forge/osx-64/libavif-0.11.1-he9a59b1_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libgfortran-5.0.0-12_2_0_h97931a8_30.conda +https://conda.anaconda.org/conda-forge/osx-64/libglib-2.74.1-h4c723e1_1.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libnghttp2-1.52.0-he2ab024_0.conda +https://conda.anaconda.org/conda-forge/osx-64/librttopo-1.1.0-h9461dca_12.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libssh2-1.10.0-h47af595_3.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libtiff-4.5.0-hee9004a_2.conda +https://conda.anaconda.org/conda-forge/osx-64/libxml2-2.10.3-hb9e07b5_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libzip-1.9.2-h6db710c_1.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/nss-3.88-h78b00b3_0.conda +https://conda.anaconda.org/conda-forge/osx-64/python-3.11.0-he7542f4_1_cpython.conda +https://conda.anaconda.org/conda-forge/osx-64/sqlite-3.40.0-h9ae0607_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/attrs-22.2.0-pyh71513ae_0.conda -https://conda.anaconda.org/conda-forge/noarch/backoff-2.2.1-pyhd8ed1ab_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/brotli-1.0.9-hb7f2c08_8.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/cached_property-1.5.2-pyha770c72_1.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/certifi-2022.12.7-pyhd8ed1ab_0.conda https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-2.1.1-pyhd8ed1ab_0.tar.bz2 +https://conda.anaconda.org/conda-forge/noarch/click-8.1.3-unix_pyhd8ed1ab_2.tar.bz2 +https://conda.anaconda.org/conda-forge/noarch/cloudpickle-2.2.1-pyhd8ed1ab_0.conda https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_0.tar.bz2 +https://conda.anaconda.org/conda-forge/noarch/cycler-0.11.0-pyhd8ed1ab_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/exceptiongroup-1.1.0-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/linux-64/fontconfig-2.14.2-h14ed4e7_0.conda +https://conda.anaconda.org/conda-forge/osx-64/fontconfig-2.14.2-h5bb23bf_0.conda +https://conda.anaconda.org/conda-forge/noarch/fsspec-2023.3.0-pyhd8ed1ab_1.conda https://conda.anaconda.org/conda-forge/noarch/idna-3.4-pyhd8ed1ab_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/iniconfig-2.0.0-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/linux-64/lcms2-2.14-hfd0df8a_1.conda -https://conda.anaconda.org/conda-forge/linux-64/libcurl-7.88.1-hdc1c0ab_0.conda -https://conda.anaconda.org/conda-forge/linux-64/libkml-1.3.0-h37653c0_1015.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/libpq-15.2-hb675445_0.conda -https://conda.anaconda.org/conda-forge/linux-64/lxml-4.9.2-py311h14a6109_0.conda -https://conda.anaconda.org/conda-forge/linux-64/numpy-1.24.2-py311h8e6699e_0.conda -https://conda.anaconda.org/conda-forge/linux-64/openjpeg-2.5.0-hfec8fc6_2.conda +https://conda.anaconda.org/conda-forge/osx-64/kiwisolver-1.4.4-py311hd2070f0_1.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/lcms2-2.14-h29502cd_1.conda +https://conda.anaconda.org/conda-forge/osx-64/libcurl-7.88.1-h6df9250_0.conda +https://conda.anaconda.org/conda-forge/osx-64/libkml-1.3.0-haeb80ef_1015.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libopenblas-0.3.21-openmp_h429af6e_3.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libpq-15.2-h3640bf0_0.conda +https://conda.anaconda.org/conda-forge/osx-64/libxslt-1.1.37-h5d22bc9_0.tar.bz2 +https://conda.anaconda.org/conda-forge/noarch/locket-1.0.0-pyhd8ed1ab_0.tar.bz2 +https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 +https://conda.anaconda.org/conda-forge/noarch/networkx-3.0-pyhd8ed1ab_0.conda +https://conda.anaconda.org/conda-forge/osx-64/openjpeg-2.5.0-h13ac156_2.conda https://conda.anaconda.org/conda-forge/noarch/packaging-23.0-pyhd8ed1ab_0.conda https://conda.anaconda.org/conda-forge/noarch/pluggy-1.0.0-pyhd8ed1ab_5.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/pycparser-2.21-pyhd8ed1ab_0.tar.bz2 +https://conda.anaconda.org/conda-forge/noarch/pyparsing-3.0.9-pyhd8ed1ab_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/pysocks-1.7.1-pyha2e5f31_6.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/pytz-2022.7.1-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/linux-64/pyyaml-6.0-py311hd4cff14_5.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/ruamel.yaml.clib-0.2.7-py311h2582759_1.conda -https://conda.anaconda.org/conda-forge/noarch/setuptools-67.4.0-pyhd8ed1ab_0.conda +https://conda.anaconda.org/conda-forge/osx-64/pyyaml-6.0-py311h5547dcb_5.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/ruamel.yaml.clib-0.2.7-py311h5547dcb_1.conda +https://conda.anaconda.org/conda-forge/noarch/setuptools-67.5.1-pyhd8ed1ab_0.conda https://conda.anaconda.org/conda-forge/noarch/six-1.16.0-pyh6c4a22f_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/tomli-2.0.1-pyhd8ed1ab_0.tar.bz2 +https://conda.anaconda.org/conda-forge/noarch/toolz-0.12.0-pyhd8ed1ab_0.tar.bz2 +https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.4.0-pyha770c72_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/wheel-0.38.4-pyhd8ed1ab_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/xorg-libxext-1.3.4-h0b41bf4_2.conda -https://conda.anaconda.org/conda-forge/linux-64/xorg-libxrender-0.9.10-h7f98852_1003.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/brunsli-0.1-h046ec9c_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/cached-property-1.5.2-hd8ed1ab_1.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/cairo-1.16.0-ha61ee94_1014.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/cffi-1.15.1-py311h409f033_3.conda -https://conda.anaconda.org/conda-forge/linux-64/cfitsio-4.2.0-hd9d235c_0.conda -https://conda.anaconda.org/conda-forge/linux-64/curl-7.88.1-hdc1c0ab_0.conda -https://conda.anaconda.org/conda-forge/linux-64/hdf5-1.12.2-nompi_h4df4325_101.conda +https://conda.anaconda.org/conda-forge/osx-64/cairo-1.16.0-h904041c_1014.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/cffi-1.15.1-py311ha86e640_3.conda +https://conda.anaconda.org/conda-forge/osx-64/cfitsio-4.2.0-hd56cc12_0.conda +https://conda.anaconda.org/conda-forge/osx-64/curl-7.88.1-h6df9250_0.conda +https://conda.anaconda.org/conda-forge/osx-64/cytoolz-0.12.0-py311h5547dcb_1.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/fonttools-4.39.0-py311h5547dcb_0.conda +https://conda.anaconda.org/conda-forge/osx-64/hdf5-1.12.2-nompi_h48135f9_101.conda +https://conda.anaconda.org/conda-forge/osx-64/libblas-3.9.0-16_osx64_openblas.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/lxml-4.9.2-py311h9f2bb26_0.conda +https://conda.anaconda.org/conda-forge/noarch/partd-1.3.0-pyhd8ed1ab_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/pillow-9.4.0-py311h5bae705_1.conda https://conda.anaconda.org/conda-forge/noarch/pip-23.0.1-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/linux-64/postgresql-15.2-h3248436_0.conda -https://conda.anaconda.org/conda-forge/linux-64/proj-9.1.1-h8ffa02c_2.conda -https://conda.anaconda.org/conda-forge/noarch/pytest-7.2.1-pyhd8ed1ab_0.conda +https://conda.anaconda.org/conda-forge/osx-64/postgresql-15.2-hbea33b9_0.conda +https://conda.anaconda.org/conda-forge/osx-64/proj-9.1.1-hf909084_2.conda +https://conda.anaconda.org/conda-forge/noarch/pytest-7.2.2-pyhd8ed1ab_0.conda https://conda.anaconda.org/conda-forge/noarch/python-dateutil-2.8.2-pyhd8ed1ab_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/ruamel.yaml-0.17.21-py311hd4cff14_2.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/shapely-2.0.1-py311h0f577a2_0.conda -https://conda.anaconda.org/conda-forge/linux-64/xerces-c-3.2.4-h55805fa_1.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/ruamel.yaml-0.17.21-py311h5547dcb_2.tar.bz2 +https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.4.0-hd8ed1ab_0.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/xerces-c-3.2.4-h2007e90_1.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/yamale-4.0.4-pyh6c4a22f_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/brotlipy-0.7.0-py311hd4cff14_1005.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/cryptography-39.0.1-py311h9b4c7bb_0.conda -https://conda.anaconda.org/conda-forge/linux-64/geotiff-1.7.1-h7a142b4_6.conda -https://conda.anaconda.org/conda-forge/linux-64/h5py-3.8.0-nompi_py311h1db17ec_100.conda -https://conda.anaconda.org/conda-forge/linux-64/kealib-1.5.0-ha7026e8_0.conda -https://conda.anaconda.org/conda-forge/linux-64/libnetcdf-4.9.1-nompi_h34a3ff0_100.conda -https://conda.anaconda.org/conda-forge/linux-64/libspatialite-5.0.1-h221c8f1_23.conda -https://conda.anaconda.org/conda-forge/linux-64/pandas-1.5.3-py311h2872171_0.conda -https://conda.anaconda.org/conda-forge/linux-64/poppler-23.01.0-h091648b_0.conda -https://conda.anaconda.org/conda-forge/linux-64/pyproj-3.4.1-py311h945b3ca_1.conda -https://conda.anaconda.org/conda-forge/linux-64/pyre-1.11.2-py311hbbb8f27_3.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/tiledb-2.13.2-hd532e3d_0.conda -https://conda.anaconda.org/conda-forge/linux-64/libgdal-3.6.2-hea5766e_7.conda +https://conda.anaconda.org/conda-forge/osx-64/brotlipy-0.7.0-py311h5547dcb_1005.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/cryptography-39.0.2-py311h61927ef_0.conda +https://conda.anaconda.org/conda-forge/noarch/dask-core-2023.3.0-pyhd8ed1ab_0.conda +https://conda.anaconda.org/conda-forge/osx-64/geotiff-1.7.1-hd690177_6.conda +https://conda.anaconda.org/conda-forge/osx-64/kealib-1.5.0-h5c1f988_0.conda +https://conda.anaconda.org/conda-forge/osx-64/libcblas-3.9.0-16_osx64_openblas.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/liblapack-3.9.0-16_osx64_openblas.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/libnetcdf-4.9.1-nompi_h56690a0_101.conda +https://conda.anaconda.org/conda-forge/osx-64/libspatialite-5.0.1-hd6e941a_23.conda +https://conda.anaconda.org/conda-forge/noarch/platformdirs-3.1.0-pyhd8ed1ab_0.conda +https://conda.anaconda.org/conda-forge/osx-64/poppler-23.01.0-h6e9091c_0.conda +https://conda.anaconda.org/conda-forge/osx-64/pyproj-3.4.1-py311hdc3c720_1.conda +https://conda.anaconda.org/conda-forge/osx-64/tiledb-2.13.2-h8b9cbf0_0.conda +https://conda.anaconda.org/conda-forge/osx-64/libgdal-3.6.2-hc39f1fd_7.conda +https://conda.anaconda.org/conda-forge/osx-64/numpy-1.24.2-py311ha9d2c9f_0.conda https://conda.anaconda.org/conda-forge/noarch/pyopenssl-23.0.0-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/linux-64/gdal-3.6.2-py311hadb6153_7.conda +https://conda.anaconda.org/conda-forge/osx-64/contourpy-1.0.7-py311hd2070f0_0.conda +https://conda.anaconda.org/conda-forge/osx-64/gdal-3.6.2-py311h619941e_7.conda +https://conda.anaconda.org/conda-forge/osx-64/h5py-3.8.0-nompi_py311h777de7a_100.conda +https://conda.anaconda.org/conda-forge/osx-64/imagecodecs-2023.1.23-py311h86fed7d_0.conda +https://conda.anaconda.org/conda-forge/noarch/imageio-2.26.0-pyh24c5eb1_0.conda +https://conda.anaconda.org/conda-forge/osx-64/pandas-1.5.3-py311hd84f3f5_0.conda +https://conda.anaconda.org/conda-forge/osx-64/pywavelets-1.4.1-py311hd5badaa_0.conda +https://conda.anaconda.org/conda-forge/osx-64/shapely-2.0.1-py311h781b04c_0.conda https://conda.anaconda.org/conda-forge/noarch/urllib3-1.26.14-pyhd8ed1ab_0.conda +https://conda.anaconda.org/conda-forge/osx-64/matplotlib-base-3.7.1-py311h2bf763f_0.conda https://conda.anaconda.org/conda-forge/noarch/requests-2.28.2-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/noarch/pooch-1.6.0-pyhd8ed1ab_0.tar.bz2 -https://conda.anaconda.org/conda-forge/linux-64/scipy-1.10.0-py311h8e6699e_2.conda -https://conda.anaconda.org/conda-forge/linux-64/isce3-0.10.0-py311h0802494_0.conda +https://conda.anaconda.org/conda-forge/noarch/tifffile-2023.2.28-pyhd8ed1ab_0.conda +https://conda.anaconda.org/conda-forge/noarch/pooch-1.7.0-pyhd8ed1ab_0.conda +https://conda.anaconda.org/conda-forge/osx-64/scipy-1.10.1-py311h939689b_0.conda +https://conda.anaconda.org/conda-forge/osx-64/scikit-image-0.19.3-py311hd84f3f5_2.tar.bz2 +https://conda.anaconda.org/conda-forge/osx-64/pysolid-0.2.3-py311hf8b1ae8_1.tar.bz2 diff --git a/requirements.txt b/requirements.txt index 2558154f..1f23ea1d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,6 +6,7 @@ gdal>=3 #journal # as of Mar 2022, journal from conda does not support python3.9; since it is included during isce3 installation above, comment this out temporarily. pandas pyproj +pysolid pytest ruamel.yaml scipy From f2204a987c5443efb741de900049120e40a2cddd Mon Sep 17 00:00:00 2001 From: Liang Yu Date: Tue, 7 Mar 2023 09:28:53 -0800 Subject: [PATCH 28/34] docker use s1-reader main revert specifile to linux pkgs fix invalid yaml --- docker/Dockerfile | 4 +- docker/specifile.txt | 274 ++++++++++++++------------- tests/data/geo_cslc_s1_template.yaml | 2 - 3 files changed, 149 insertions(+), 131 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 433774af..3b263935 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -37,9 +37,9 @@ SHELL ["conda", "run", "-n", "COMPASS", "/bin/bash", "-c"] WORKDIR /home/compass_user/OPERA # installing OPERA s1-reader -RUN curl -sSL https://github.com/opera-adt/s1-reader/archive/refs/tags/v0.1.5.tar.gz -o s1_reader_src.tar.gz &&\ +RUN curl -sSL https://github.com/opera-adt/s1-reader/archive/main.tar.gz -o s1_reader_src.tar.gz &&\ tar -xvf s1_reader_src.tar.gz &&\ - ln -s s1-reader-0.1.5 s1-reader &&\ + ln -s s1-reader-main s1-reader &&\ rm s1_reader_src.tar.gz &&\ python -m pip install ./s1-reader diff --git a/docker/specifile.txt b/docker/specifile.txt index d8b374a2..3d3db2f0 100644 --- a/docker/specifile.txt +++ b/docker/specifile.txt @@ -1,90 +1,111 @@ # This file may be used to create an environment using: # $ conda create --name --file -# platform: osx-64 +# platform: linux-64 @EXPLICIT -https://conda.anaconda.org/conda-forge/osx-64/bzip2-1.0.8-h0d85af4_4.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/c-ares-1.18.1-h0d85af4_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/ca-certificates-2022.12.7-h033912b_0.conda -https://conda.anaconda.org/conda-forge/osx-64/dav1d-1.0.0-hac89ed1_1.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2022.12.7-ha878542_0.conda https://conda.anaconda.org/conda-forge/noarch/font-ttf-dejavu-sans-mono-2.37-hab24e00_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/font-ttf-inconsolata-3.000-h77eed37_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/font-ttf-source-code-pro-2.038-h77eed37_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/font-ttf-ubuntu-0.83-hab24e00_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/freexl-1.0.6-hb7f2c08_1.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/giflib-5.2.1-hbcb3906_2.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/jpeg-9e-hb7f2c08_3.conda -https://conda.anaconda.org/conda-forge/osx-64/json-c-0.16-h01d06f9_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/jxrlib-1.1-h35c211d_2.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libbrotlicommon-1.0.9-hb7f2c08_8.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libcxx-15.0.7-h71dddab_0.conda -https://conda.anaconda.org/conda-forge/osx-64/libdeflate-1.17-hac1461d_0.conda -https://conda.anaconda.org/conda-forge/osx-64/libev-4.33-haf1e3a3_1.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libffi-3.4.2-h0d85af4_5.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libiconv-1.17-hac89ed1_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libwebp-base-1.2.4-h775f41a_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libzlib-1.2.13-hfd90126_4.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/llvm-openmp-15.0.7-h61d9ccf_0.conda -https://conda.anaconda.org/conda-forge/osx-64/ncurses-6.3-h96cf925_1.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/pixman-0.40.0-hbcb3906_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.40-h41732ed_0.conda +https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-12.2.0-h337968e_19.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-12.2.0-h46fd767_19.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/poppler-data-0.4.12-hd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/osx-64/pthread-stubs-0.4-hc929b4f_1001.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/python_abi-3.11-3_cp311.conda -https://conda.anaconda.org/conda-forge/osx-64/tzcode-2022g-hb7f2c08_0.conda +https://conda.anaconda.org/conda-forge/linux-64/python_abi-3.11-3_cp311.conda https://conda.anaconda.org/conda-forge/noarch/tzdata-2022g-h191b570_0.conda -https://conda.anaconda.org/conda-forge/osx-64/xorg-libxau-1.0.9-h35c211d_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/xorg-libxdmcp-1.1.3-h35c211d_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/xz-5.2.6-h775f41a_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/yaml-0.2.5-h0d85af4_2.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/zlib-ng-2.0.6-hac89ed1_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/aom-3.5.0-hf0c8a7f_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/charls-2.4.1-hf0c8a7f_0.conda -https://conda.anaconda.org/conda-forge/osx-64/expat-2.5.0-hf0c8a7f_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/fonts-conda-forge-1-0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/geos-3.11.1-hf0c8a7f_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/gettext-0.21.1-h8a4c099_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/icu-70.1-h96cf925_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/lerc-4.0.0-hb486fe8_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libaec-1.0.6-hf0c8a7f_1.conda -https://conda.anaconda.org/conda-forge/osx-64/libbrotlidec-1.0.9-hb7f2c08_8.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libbrotlienc-1.0.9-hb7f2c08_8.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libedit-3.1.20191231-h0678c8f_2.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libgfortran5-12.2.0-he409387_30.conda -https://conda.anaconda.org/conda-forge/osx-64/libpng-1.6.39-ha978bb4_0.conda -https://conda.anaconda.org/conda-forge/osx-64/libsqlite-3.40.0-ha978bb4_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libxcb-1.13-h0d85af4_1004.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libzopfli-1.0.3-h046ec9c_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/lz4-c-1.9.4-hf0c8a7f_0.conda -https://conda.anaconda.org/conda-forge/osx-64/nspr-4.35-hea0b92c_0.conda -https://conda.anaconda.org/conda-forge/osx-64/openssl-3.0.8-hfd90126_0.conda -https://conda.anaconda.org/conda-forge/osx-64/pcre2-10.40-h1c4e4bc_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/readline-8.1.2-h3899abd_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/snappy-1.1.9-h225ccf5_2.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/tk-8.6.12-h5dbffcc_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/zfp-1.0.0-ha894c9a_3.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/zlib-1.2.13-hfd90126_4.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.2-hbc0c0cd_6.conda -https://conda.anaconda.org/conda-forge/osx-64/blosc-1.21.2-hebb52c4_0.conda -https://conda.anaconda.org/conda-forge/osx-64/boost-cpp-1.78.0-h8b082ac_1.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/brotli-bin-1.0.9-hb7f2c08_8.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/c-blosc2-2.7.1-had5f71b_0.conda +https://conda.anaconda.org/conda-forge/linux-64/libgfortran-ng-12.2.0-h69a702a_19.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libgomp-12.2.0-h65d4601_19.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/fonts-conda-ecosystem-1-0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/freetype-2.12.1-h3f81eb7_1.conda -https://conda.anaconda.org/conda-forge/osx-64/hdf4-4.2.15-h7aa5921_5.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/krb5-1.20.1-h049b76e_0.conda -https://conda.anaconda.org/conda-forge/osx-64/libavif-0.11.1-he9a59b1_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libgfortran-5.0.0-12_2_0_h97931a8_30.conda -https://conda.anaconda.org/conda-forge/osx-64/libglib-2.74.1-h4c723e1_1.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libnghttp2-1.52.0-he2ab024_0.conda -https://conda.anaconda.org/conda-forge/osx-64/librttopo-1.1.0-h9461dca_12.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libssh2-1.10.0-h47af595_3.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libtiff-4.5.0-hee9004a_2.conda -https://conda.anaconda.org/conda-forge/osx-64/libxml2-2.10.3-hb9e07b5_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libzip-1.9.2-h6db710c_1.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/nss-3.88-h78b00b3_0.conda -https://conda.anaconda.org/conda-forge/osx-64/python-3.11.0-he7542f4_1_cpython.conda -https://conda.anaconda.org/conda-forge/osx-64/sqlite-3.40.0-h9ae0607_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-12.2.0-h65d4601_19.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/aom-3.5.0-h27087fc_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-h7f98852_4.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/c-ares-1.18.1-h7f98852_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/charls-2.4.1-hcb278e6_0.conda +https://conda.anaconda.org/conda-forge/linux-64/dav1d-1.0.0-h166bdaf_1.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/expat-2.5.0-h27087fc_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/fftw-3.3.10-nompi_hf0379b8_106.conda +https://conda.anaconda.org/conda-forge/linux-64/freexl-1.0.6-h166bdaf_1.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/geos-3.11.1-h27087fc_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/gettext-0.21.1-h27087fc_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/giflib-5.2.1-h36c2ea0_2.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/icu-70.1-h27087fc_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/jpeg-9e-h0b41bf4_3.conda +https://conda.anaconda.org/conda-forge/linux-64/json-c-0.16-hc379101_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/jxrlib-1.1-h7f98852_2.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/keyutils-1.6.1-h166bdaf_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/lerc-4.0.0-h27087fc_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libaec-1.0.6-hcb278e6_1.conda +https://conda.anaconda.org/conda-forge/linux-64/libbrotlicommon-1.0.9-h166bdaf_8.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libdeflate-1.17-h0b41bf4_0.conda +https://conda.anaconda.org/conda-forge/linux-64/libev-4.33-h516909a_1.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.2-h7f98852_5.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libiconv-1.17-h166bdaf_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libnsl-2.0.0-h7f98852_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.21-pthreads_h78a6416_3.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.32.1-h7f98852_1000.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libwebp-base-1.2.4-h166bdaf_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.2.13-h166bdaf_4.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libzopfli-1.0.3-h9c3ff4c_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/lz4-c-1.9.4-hcb278e6_0.conda +https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.3-h27087fc_1.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/nspr-4.35-h27087fc_0.conda +https://conda.anaconda.org/conda-forge/linux-64/openssl-3.0.8-h0b41bf4_0.conda +https://conda.anaconda.org/conda-forge/linux-64/pixman-0.40.0-h36c2ea0_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/pthread-stubs-0.4-h36c2ea0_1001.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/snappy-1.1.9-hbd366e4_2.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/tzcode-2022g-h166bdaf_0.conda +https://conda.anaconda.org/conda-forge/linux-64/xorg-kbproto-1.0.7-h7f98852_1002.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/xorg-libice-1.0.10-h7f98852_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/xorg-libxau-1.0.9-h7f98852_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/xorg-libxdmcp-1.1.3-h7f98852_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/xorg-renderproto-0.11.1-h7f98852_1002.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/xorg-xextproto-7.3.0-h0b41bf4_1003.conda +https://conda.anaconda.org/conda-forge/linux-64/xorg-xproto-7.0.31-h7f98852_1007.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/yaml-0.2.5-h7f98852_2.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/zfp-1.0.0-h27087fc_3.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/zlib-ng-2.0.6-h166bdaf_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libavif-0.11.1-h5cdd6b5_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libblas-3.9.0-16_linux64_openblas.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libbrotlidec-1.0.9-h166bdaf_8.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libbrotlienc-1.0.9-h166bdaf_8.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libedit-3.1.20191231-he28a2e2_2.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libnghttp2-1.52.0-h61bc06f_0.conda +https://conda.anaconda.org/conda-forge/linux-64/libpng-1.6.39-h753d276_0.conda +https://conda.anaconda.org/conda-forge/linux-64/librttopo-1.1.0-ha49c73b_12.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.40.0-h753d276_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libssh2-1.10.0-hf14f497_3.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libxcb-1.13-h7f98852_1004.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libxml2-2.10.3-h7463322_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libzip-1.9.2-hc929e4a_1.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/pcre2-10.40-hc3806b6_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/readline-8.1.2-h0f457ee_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.12-h27826a3_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/xorg-libsm-1.2.3-hd9c2040_1000.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/zlib-1.2.13-h166bdaf_4.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.2-h3eb15da_6.conda +https://conda.anaconda.org/conda-forge/linux-64/blosc-1.21.3-hafa529b_0.conda +https://conda.anaconda.org/conda-forge/linux-64/boost-cpp-1.78.0-h75c5d50_1.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/brotli-bin-1.0.9-h166bdaf_8.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/c-blosc2-2.7.1-hf91038e_0.conda +https://conda.anaconda.org/conda-forge/linux-64/freetype-2.12.1-hca18f0e_1.conda +https://conda.anaconda.org/conda-forge/linux-64/hdf4-4.2.15-h9772cbc_5.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/krb5-1.20.1-h81ceb04_0.conda +https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-16_linux64_openblas.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libglib-2.74.1-h606061b_1.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/liblapack-3.9.0-16_linux64_openblas.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libtiff-4.5.0-h6adf6a1_2.conda +https://conda.anaconda.org/conda-forge/linux-64/libxslt-1.1.37-h873f0b0_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/nss-3.88-he45b914_0.conda +https://conda.anaconda.org/conda-forge/linux-64/python-3.11.0-he550d4f_1_cpython.conda +https://conda.anaconda.org/conda-forge/linux-64/sqlite-3.40.0-h4ff8645_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/xorg-libx11-1.8.4-h0b41bf4_0.conda https://conda.anaconda.org/conda-forge/noarch/attrs-22.2.0-pyh71513ae_0.conda -https://conda.anaconda.org/conda-forge/osx-64/brotli-1.0.9-hb7f2c08_8.tar.bz2 +https://conda.anaconda.org/conda-forge/noarch/backoff-2.2.1-pyhd8ed1ab_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/brotli-1.0.9-h166bdaf_8.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/cached_property-1.5.2-pyha770c72_1.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/certifi-2022.12.7-pyhd8ed1ab_0.conda https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-2.1.1-pyhd8ed1ab_0.tar.bz2 @@ -93,86 +114,85 @@ https://conda.anaconda.org/conda-forge/noarch/cloudpickle-2.2.1-pyhd8ed1ab_0.con https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/cycler-0.11.0-pyhd8ed1ab_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/exceptiongroup-1.1.0-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/osx-64/fontconfig-2.14.2-h5bb23bf_0.conda +https://conda.anaconda.org/conda-forge/linux-64/fontconfig-2.14.2-h14ed4e7_0.conda https://conda.anaconda.org/conda-forge/noarch/fsspec-2023.3.0-pyhd8ed1ab_1.conda https://conda.anaconda.org/conda-forge/noarch/idna-3.4-pyhd8ed1ab_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/iniconfig-2.0.0-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/osx-64/kiwisolver-1.4.4-py311hd2070f0_1.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/lcms2-2.14-h29502cd_1.conda -https://conda.anaconda.org/conda-forge/osx-64/libcurl-7.88.1-h6df9250_0.conda -https://conda.anaconda.org/conda-forge/osx-64/libkml-1.3.0-haeb80ef_1015.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libopenblas-0.3.21-openmp_h429af6e_3.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libpq-15.2-h3640bf0_0.conda -https://conda.anaconda.org/conda-forge/osx-64/libxslt-1.1.37-h5d22bc9_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/kiwisolver-1.4.4-py311h4dd048b_1.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/lcms2-2.14-hfd0df8a_1.conda +https://conda.anaconda.org/conda-forge/linux-64/libcurl-7.88.1-hdc1c0ab_0.conda +https://conda.anaconda.org/conda-forge/linux-64/libkml-1.3.0-h37653c0_1015.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/libpq-15.2-hb675445_0.conda https://conda.anaconda.org/conda-forge/noarch/locket-1.0.0-pyhd8ed1ab_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/lxml-4.9.2-py311h14a6109_0.conda https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/networkx-3.0-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/osx-64/openjpeg-2.5.0-h13ac156_2.conda +https://conda.anaconda.org/conda-forge/linux-64/numpy-1.24.2-py311h8e6699e_0.conda +https://conda.anaconda.org/conda-forge/linux-64/openjpeg-2.5.0-hfec8fc6_2.conda https://conda.anaconda.org/conda-forge/noarch/packaging-23.0-pyhd8ed1ab_0.conda https://conda.anaconda.org/conda-forge/noarch/pluggy-1.0.0-pyhd8ed1ab_5.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/pycparser-2.21-pyhd8ed1ab_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/pyparsing-3.0.9-pyhd8ed1ab_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/pysocks-1.7.1-pyha2e5f31_6.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/pytz-2022.7.1-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/osx-64/pyyaml-6.0-py311h5547dcb_5.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/ruamel.yaml.clib-0.2.7-py311h5547dcb_1.conda +https://conda.anaconda.org/conda-forge/linux-64/pyyaml-6.0-py311hd4cff14_5.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/ruamel.yaml.clib-0.2.7-py311h2582759_1.conda https://conda.anaconda.org/conda-forge/noarch/setuptools-67.5.1-pyhd8ed1ab_0.conda https://conda.anaconda.org/conda-forge/noarch/six-1.16.0-pyh6c4a22f_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/tomli-2.0.1-pyhd8ed1ab_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/toolz-0.12.0-pyhd8ed1ab_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.4.0-pyha770c72_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/wheel-0.38.4-pyhd8ed1ab_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/brunsli-0.1-h046ec9c_0.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/xorg-libxext-1.3.4-h0b41bf4_2.conda +https://conda.anaconda.org/conda-forge/linux-64/xorg-libxrender-0.9.10-h7f98852_1003.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/brunsli-0.1-h9c3ff4c_0.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/cached-property-1.5.2-hd8ed1ab_1.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/cairo-1.16.0-h904041c_1014.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/cffi-1.15.1-py311ha86e640_3.conda -https://conda.anaconda.org/conda-forge/osx-64/cfitsio-4.2.0-hd56cc12_0.conda -https://conda.anaconda.org/conda-forge/osx-64/curl-7.88.1-h6df9250_0.conda -https://conda.anaconda.org/conda-forge/osx-64/cytoolz-0.12.0-py311h5547dcb_1.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/fonttools-4.39.0-py311h5547dcb_0.conda -https://conda.anaconda.org/conda-forge/osx-64/hdf5-1.12.2-nompi_h48135f9_101.conda -https://conda.anaconda.org/conda-forge/osx-64/libblas-3.9.0-16_osx64_openblas.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/lxml-4.9.2-py311h9f2bb26_0.conda +https://conda.anaconda.org/conda-forge/linux-64/cairo-1.16.0-ha61ee94_1014.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/cffi-1.15.1-py311h409f033_3.conda +https://conda.anaconda.org/conda-forge/linux-64/cfitsio-4.2.0-hd9d235c_0.conda +https://conda.anaconda.org/conda-forge/linux-64/contourpy-1.0.7-py311ha3edf6b_0.conda +https://conda.anaconda.org/conda-forge/linux-64/curl-7.88.1-hdc1c0ab_0.conda +https://conda.anaconda.org/conda-forge/linux-64/cytoolz-0.12.0-py311hd4cff14_1.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/fonttools-4.39.0-py311h2582759_0.conda +https://conda.anaconda.org/conda-forge/linux-64/hdf5-1.12.2-nompi_h4df4325_101.conda https://conda.anaconda.org/conda-forge/noarch/partd-1.3.0-pyhd8ed1ab_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/pillow-9.4.0-py311h5bae705_1.conda +https://conda.anaconda.org/conda-forge/linux-64/pillow-9.4.0-py311h50def17_1.conda https://conda.anaconda.org/conda-forge/noarch/pip-23.0.1-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/osx-64/postgresql-15.2-hbea33b9_0.conda -https://conda.anaconda.org/conda-forge/osx-64/proj-9.1.1-hf909084_2.conda +https://conda.anaconda.org/conda-forge/linux-64/postgresql-15.2-h3248436_0.conda +https://conda.anaconda.org/conda-forge/linux-64/proj-9.1.1-h8ffa02c_2.conda https://conda.anaconda.org/conda-forge/noarch/pytest-7.2.2-pyhd8ed1ab_0.conda https://conda.anaconda.org/conda-forge/noarch/python-dateutil-2.8.2-pyhd8ed1ab_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/ruamel.yaml-0.17.21-py311h5547dcb_2.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/pywavelets-1.4.1-py311hcb2cf0a_0.conda +https://conda.anaconda.org/conda-forge/linux-64/ruamel.yaml-0.17.21-py311hd4cff14_2.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/shapely-2.0.1-py311h0f577a2_0.conda https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.4.0-hd8ed1ab_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/xerces-c-3.2.4-h2007e90_1.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/xerces-c-3.2.4-h55805fa_1.tar.bz2 https://conda.anaconda.org/conda-forge/noarch/yamale-4.0.4-pyh6c4a22f_0.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/brotlipy-0.7.0-py311h5547dcb_1005.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/cryptography-39.0.2-py311h61927ef_0.conda +https://conda.anaconda.org/conda-forge/linux-64/brotlipy-0.7.0-py311hd4cff14_1005.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/cryptography-39.0.2-py311h9b4c7bb_0.conda https://conda.anaconda.org/conda-forge/noarch/dask-core-2023.3.0-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/osx-64/geotiff-1.7.1-hd690177_6.conda -https://conda.anaconda.org/conda-forge/osx-64/kealib-1.5.0-h5c1f988_0.conda -https://conda.anaconda.org/conda-forge/osx-64/libcblas-3.9.0-16_osx64_openblas.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/liblapack-3.9.0-16_osx64_openblas.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/libnetcdf-4.9.1-nompi_h56690a0_101.conda -https://conda.anaconda.org/conda-forge/osx-64/libspatialite-5.0.1-hd6e941a_23.conda +https://conda.anaconda.org/conda-forge/linux-64/geotiff-1.7.1-h7a142b4_6.conda +https://conda.anaconda.org/conda-forge/linux-64/h5py-3.8.0-nompi_py311h1db17ec_100.conda +https://conda.anaconda.org/conda-forge/linux-64/imagecodecs-2023.1.23-py311ha5a3c35_0.conda +https://conda.anaconda.org/conda-forge/noarch/imageio-2.26.0-pyh24c5eb1_0.conda +https://conda.anaconda.org/conda-forge/linux-64/kealib-1.5.0-ha7026e8_0.conda +https://conda.anaconda.org/conda-forge/linux-64/libnetcdf-4.9.1-nompi_h34a3ff0_101.conda +https://conda.anaconda.org/conda-forge/linux-64/libspatialite-5.0.1-h221c8f1_23.conda +https://conda.anaconda.org/conda-forge/linux-64/matplotlib-base-3.7.1-py311h8597a09_0.conda +https://conda.anaconda.org/conda-forge/linux-64/pandas-1.5.3-py311h2872171_0.conda https://conda.anaconda.org/conda-forge/noarch/platformdirs-3.1.0-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/osx-64/poppler-23.01.0-h6e9091c_0.conda -https://conda.anaconda.org/conda-forge/osx-64/pyproj-3.4.1-py311hdc3c720_1.conda -https://conda.anaconda.org/conda-forge/osx-64/tiledb-2.13.2-h8b9cbf0_0.conda -https://conda.anaconda.org/conda-forge/osx-64/libgdal-3.6.2-hc39f1fd_7.conda -https://conda.anaconda.org/conda-forge/osx-64/numpy-1.24.2-py311ha9d2c9f_0.conda +https://conda.anaconda.org/conda-forge/linux-64/poppler-23.03.0-h091648b_0.conda +https://conda.anaconda.org/conda-forge/linux-64/pyproj-3.4.1-py311h945b3ca_1.conda +https://conda.anaconda.org/conda-forge/linux-64/pyre-1.11.2-py311hbbb8f27_3.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/tiledb-2.13.2-hd532e3d_0.conda +https://conda.anaconda.org/conda-forge/linux-64/libgdal-3.6.2-h6c674c2_8.conda https://conda.anaconda.org/conda-forge/noarch/pyopenssl-23.0.0-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/osx-64/contourpy-1.0.7-py311hd2070f0_0.conda -https://conda.anaconda.org/conda-forge/osx-64/gdal-3.6.2-py311h619941e_7.conda -https://conda.anaconda.org/conda-forge/osx-64/h5py-3.8.0-nompi_py311h777de7a_100.conda -https://conda.anaconda.org/conda-forge/osx-64/imagecodecs-2023.1.23-py311h86fed7d_0.conda -https://conda.anaconda.org/conda-forge/noarch/imageio-2.26.0-pyh24c5eb1_0.conda -https://conda.anaconda.org/conda-forge/osx-64/pandas-1.5.3-py311hd84f3f5_0.conda -https://conda.anaconda.org/conda-forge/osx-64/pywavelets-1.4.1-py311hd5badaa_0.conda -https://conda.anaconda.org/conda-forge/osx-64/shapely-2.0.1-py311h781b04c_0.conda +https://conda.anaconda.org/conda-forge/noarch/tifffile-2023.2.28-pyhd8ed1ab_0.conda +https://conda.anaconda.org/conda-forge/linux-64/gdal-3.6.2-py311hadb6153_8.conda https://conda.anaconda.org/conda-forge/noarch/urllib3-1.26.14-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/osx-64/matplotlib-base-3.7.1-py311h2bf763f_0.conda https://conda.anaconda.org/conda-forge/noarch/requests-2.28.2-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/noarch/tifffile-2023.2.28-pyhd8ed1ab_0.conda https://conda.anaconda.org/conda-forge/noarch/pooch-1.7.0-pyhd8ed1ab_0.conda -https://conda.anaconda.org/conda-forge/osx-64/scipy-1.10.1-py311h939689b_0.conda -https://conda.anaconda.org/conda-forge/osx-64/scikit-image-0.19.3-py311hd84f3f5_2.tar.bz2 -https://conda.anaconda.org/conda-forge/osx-64/pysolid-0.2.3-py311hf8b1ae8_1.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/scipy-1.10.1-py311h8e6699e_0.conda +https://conda.anaconda.org/conda-forge/linux-64/isce3-0.10.0-py311h0802494_0.conda +https://conda.anaconda.org/conda-forge/linux-64/scikit-image-0.19.3-py311h8b32b4d_2.tar.bz2 +https://conda.anaconda.org/conda-forge/linux-64/pysolid-0.2.3-py311ha29c927_1.tar.bz2 diff --git a/tests/data/geo_cslc_s1_template.yaml b/tests/data/geo_cslc_s1_template.yaml index c07024e5..9fb2f67e 100644 --- a/tests/data/geo_cslc_s1_template.yaml +++ b/tests/data/geo_cslc_s1_template.yaml @@ -30,8 +30,6 @@ runconfig: y_posting: 10 y_snap: null polarization: co-pol - range_split_spectrum: - enabled: False product_path_group: product_path: @TEST_PATH@/product sas_output_file: @TEST_PATH@/product From c62a36f501d33624c152c55dcdf7cca81df5065a Mon Sep 17 00:00:00 2001 From: Liang Yu Date: Tue, 7 Mar 2023 12:34:14 -0800 Subject: [PATCH 29/34] explicit call out slant range SET --- src/compass/utils/lut.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 65bb4166..953f5e3a 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -44,7 +44,7 @@ def cumulative_correction_luts(burst, dem_path, and slant range ''' # Get individual LUTs - geometrical_steer_doppler, bistatic_delay, az_fm_mismatch, tides = \ + geometrical_steer_doppler, bistatic_delay, az_fm_mismatch, [tide_rg, _]= \ compute_geocoding_correction_luts(burst, dem_path=dem_path, rg_step=rg_step, @@ -53,7 +53,7 @@ def cumulative_correction_luts(burst, dem_path, # Convert to geometrical doppler from range time (seconds) to range (m) geometry_doppler = geometrical_steer_doppler.data * isce3.core.speed_of_light * 0.5 - rg_lut_data = geometry_doppler + tides[0] + rg_lut_data = geometry_doppler + tide_rg # Invert signs to correct for convention # TO DO: add azimuth SET to LUT @@ -76,7 +76,7 @@ def cumulative_correction_luts(burst, dem_path, output_path = f'{scratch_path}/corrections' os.makedirs(output_path, exist_ok=True) data_list = [geometry_doppler, bistatic_delay.data, az_fm_mismatch.data, - tides[0]] + tide_rg] descr = ['geometrical doppler', 'bistatic delay', 'azimuth FM rate mismatch', 'slant range Solid Earth tides'] From e2425b5edd0c6fa419bc94f03dba13df20fa6a91 Mon Sep 17 00:00:00 2001 From: Liang Yu Date: Tue, 7 Mar 2023 12:37:30 -0800 Subject: [PATCH 30/34] less repitition with rdr2geo raster load save decimation slice to variable --- src/compass/utils/lut.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 953f5e3a..f235e0f0 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -150,16 +150,13 @@ def compute_geocoding_correction_luts(burst, dem_path, bistatic_delay = burst.bistatic_delay(range_step=rg_step, az_step=az_step) # Run rdr2geo to obtain the required layers - lon_path, lat_path, height_path, inc_path, head_path = \ - compute_rdr2geo_rasters(burst, dem_raster, output_path, - rg_step, az_step) + rdr2geo_raster_paths = compute_rdr2geo_rasters(burst, dem_raster, + output_path, rg_step, + az_step) # Open rdr2geo layers - lat = open_raster(lat_path) - lon = open_raster(lon_path) - height = open_raster(height_path) - inc_angle = open_raster(inc_path) - head_angle = open_raster(head_path) + lat, lon, height, inc_angle, head_angle = \ + [open_raster(raster_path) for raster_path in rdr2geo_raster_paths] # Compute azimuth FM-rate mismatch az_fm_mismatch = burst.az_fm_rate_mismatch_from_llh(lat, lon, height, @@ -172,10 +169,11 @@ def compute_geocoding_correction_luts(burst, dem_path, # compute Solid Earth Tides using pySolid. Decimate the rdr2geo layers. # compute decimation factor assuming a 5 km spacing along slant range dec_factor = int(np.round(5000.0 / rg_step)) - rg_set_temp, az_set_temp = solid_earth_tides(burst, lat[::dec_factor], - lon[::dec_factor], - inc_angle[::dec_factor], - head_angle[::dec_factor]) + dec_slice = ns.s_[::dec_factor] + rg_set_temp, az_set_temp = solid_earth_tides(burst, lat[dec_slice], + lon[dec_slice], + inc_angle[dec_slice], + head_angle[dec_slice]) # Resize SET to the size of the correction grid out_shape = bistatic_delay.data.shape From 3a12cea98de4a1601c60fcffa9f60b1dbaaa3ba7 Mon Sep 17 00:00:00 2001 From: Liang Yu Date: Tue, 7 Mar 2023 12:43:40 -0800 Subject: [PATCH 31/34] less repitition in SET computation --- src/compass/utils/lut.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index f235e0f0..6bb8f723 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -250,12 +250,9 @@ def solid_earth_tides(burst, lat_radar_grid, lon_radar_grid, inc_angle, pts_src = (np.flipud(lat_geo_array), lon_geo_array) pts_dst = (lat_radar_grid.flatten(), lon_radar_grid.flatten()) - rdr_set_e = resample_set(set_e, pts_src, pts_dst).reshape( - lat_radar_grid.shape) - rdr_set_n = resample_set(set_n, pts_src, pts_dst).reshape( - lat_radar_grid.shape) - rdr_set_u = resample_set(set_u, pts_src, pts_dst).reshape( - lat_radar_grid.shape) + rdr_set_e, rdr_set_n, rdr_set_u = \ + [resample_set(set_enu, pts_src, pts_dst).reshape(lat_radar_grid.shape) + for set_enu in [set_e, set_n, set_u]] # Convert SET from ENU to range/azimuth coordinates # Note: rdr2geo heading angle is measured wrt to the East and it is positive From 1fd488812f399aeef94d7faef49de425cea60e0f Mon Sep 17 00:00:00 2001 From: Liang Yu Date: Tue, 7 Mar 2023 12:44:48 -0800 Subject: [PATCH 32/34] nit - add space --- src/compass/utils/helpers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compass/utils/helpers.py b/src/compass/utils/helpers.py index 2a7bf597..1db1f1b4 100644 --- a/src/compass/utils/helpers.py +++ b/src/compass/utils/helpers.py @@ -324,6 +324,7 @@ def burst_bboxes_from_db(burst_ids, burst_db_file=None, burst_db_conn=None): def open_raster(filename, band=1): ''' Return band as numpy array from gdal-friendly raster + Parameters ---------- filename: str From f1d78b038f7eba3473d700ad9bafb42cc9e4423e Mon Sep 17 00:00:00 2001 From: Liang Yu Date: Tue, 7 Mar 2023 12:49:06 -0800 Subject: [PATCH 33/34] fix typo --- src/compass/utils/lut.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 6bb8f723..6909e965 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -169,7 +169,7 @@ def compute_geocoding_correction_luts(burst, dem_path, # compute Solid Earth Tides using pySolid. Decimate the rdr2geo layers. # compute decimation factor assuming a 5 km spacing along slant range dec_factor = int(np.round(5000.0 / rg_step)) - dec_slice = ns.s_[::dec_factor] + dec_slice = np.s_[::dec_factor] rg_set_temp, az_set_temp = solid_earth_tides(burst, lat[dec_slice], lon[dec_slice], inc_angle[dec_slice], From f19d73cd58e5ff72aea294bb8784340ad2ee11c4 Mon Sep 17 00:00:00 2001 From: Liang Yu Date: Tue, 7 Mar 2023 13:10:52 -0800 Subject: [PATCH 34/34] fix raster order comment code clean up --- src/compass/utils/lut.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compass/utils/lut.py b/src/compass/utils/lut.py index 6909e965..a462670e 100644 --- a/src/compass/utils/lut.py +++ b/src/compass/utils/lut.py @@ -150,12 +150,13 @@ def compute_geocoding_correction_luts(burst, dem_path, bistatic_delay = burst.bistatic_delay(range_step=rg_step, az_step=az_step) # Run rdr2geo to obtain the required layers + # return contents: lon_path, lat_path, height_path, inc_path, head_path rdr2geo_raster_paths = compute_rdr2geo_rasters(burst, dem_raster, output_path, rg_step, az_step) # Open rdr2geo layers - lat, lon, height, inc_angle, head_angle = \ + lon, lat, height, inc_angle, head_angle = \ [open_raster(raster_path) for raster_path in rdr2geo_raster_paths] # Compute azimuth FM-rate mismatch