Open Ahleroy opened 8 months ago
Digging into sensar
's repository, I was able to found a workaround :
import json
def gtc(
product_urlpath: str,
measurement_group: str,
dem_urlpath: str,
output_urlpath: str = "GTC.tif",
enable_dask_distributed: bool = False,
client_kwargs_json: str = '{"processes": false}',
chunks: int = 1024,
) -> None:
"""Generate a geometrically terrain corrected (GTC) image from Sentinel-1 product."""
client_kwargs = json.loads(client_kwargs_json)
real_chunks = chunks if chunks > 0 else None
product = sarsen.sentinel1.Sentinel1SarProduct(
product_urlpath,
measurement_group,
)
return apps.terrain_correction(
product,
dem_urlpath,
output_urlpath=output_urlpath,
enable_dask_distributed=enable_dask_distributed,
client_kwargs=client_kwargs,
chunks=real_chunks,
)
gtc = gtc(
grd_local_path,
measurement_group=measurement_group,
dem_urlpath=dem_path,
output_urlpath=os.path.join(
tmp_dir, os.path.basename(product_folder) + ".10m.GTC.tif"
),
)
Thanks for the report. cc @alexamici, is that the recommended way to handle the product_urlpath change?
Following the Customisable RTC tutorial with Sentinel-1, I am facing this issue when it comes to using
sarsen
v0.9.3:This happens when running
In 13
of the tutorial which corresponds to the following piece of code:Looking at the sarsen API, it seems it has changed since the tutorial was made. However, I do not see any equivalent to how to use the new API.