Closed cmarshak closed 11 months ago
Currently, replacing VV
with VH
in the url does the trick and a similar substition for h5
will work.
Again, just providing information for someone using your tool likely before it's even ready for the public ;)
Thank you for opening an issue! Full opera support is pending our next release (very soon). The polarization/url discrepancy is a quirk of Opera VV/VH products being a single CMR entry. All ASFProducts have the umm response from CMR available, and if you were to inspect the umm of one of your results like so:
response[-1].umm
you would see something like this:
{
...
"GranuleUR": "OPERA_L2_RTC-S1_T078-165486-IW2_20231105T004829Z_20231106T002602Z_S1A_30_v1.0",
"AdditionalAttributes": [
...
{
"Name": "POLARIZATION",
"Values": [
"VV",
"VH"
]
},
],
"RelatedUrls": [
{
...
"URL": "https://datapool.asf.alaska.edu/RTC/OPERA-S1/OPERA_L2_RTC-S1_T078-165486-IW2_20231105T004829Z_20231106T002602Z_S1A_30_v1.0_VH.tif",
"Type": "GET DATA",
"Description": "Download OPERA_L2_RTC-S1_T078-165486-IW2_20231105T004829Z_20231106T002602Z_S1A_30_v1.0_VH.tif",
"Format": "Not provided"
},
...
{
"URL": "https://datapool.asf.alaska.edu/RTC/OPERA-S1/OPERA_L2_RTC-S1_T078-165486-IW2_20231105T004829Z_20231106T002602Z_S1A_30_v1.0_VV.tif",
"Type": "GET DATA",
"Description": "Download OPERA_L2_RTC-S1_T078-165486-IW2_20231105T004829Z_20231106T002602Z_S1A_30_v1.0_VV.tif",
"Format": "Not provided"
},
]
}
Note the VV and VH product urls being available for a single product. asf-search naively grabs the first polarization available from the POLARIZATION
additional attribute, and the first download url as well.
In the next release the VV, mask, hd5, geotiff, and xml urls will be available in the product properties dict via additionalUrls
, where they can be downloaded individually with an authenticated session like so:
asf.download_url(results[0].properties['additionalUrls'][0], "path/to/download", "filename.ext", session)
If you find that you want to download all files for a product (vv, vh, mask, etc), ASFProduct
's built in download()
with fileType
will work!
results[0].download("path/to/download", session=session, fileType=asf.FileDownloadType.ALL_FILES)
With the latest release: https://github.com/asfadmin/Discovery-asf_search/releases/tag/v6.7.0
additionalUrls
property, and downloadable like in the example above
I am trying to recreate this search: https://search.asf.alaska.edu/#/?polygon=POINT(-99.8796%2016.8421)&zoom=9.133¢er=-99.712,16.370&resultsLoaded=true&dataset=OPERA-S1&granule=OPERA_L2_RTC-S1_T078-165486-IW2_20231024T004829Z_20231024T091416Z_S1A_30_v1.0&productTypes=RTC
Gives 4 results.
Gives 8.
But the latter is only giving me VH. For example:
gives
Note in the above the url is for
VH
, but the polarization is forVV
.Also, how do I get the h5 files in that search?