asfadmin / Discovery-asf_search

BSD 3-Clause "New" or "Revised" License
126 stars 43 forks source link

[Feature] OPERA Datasets searchable by burst id? (yes, we can filter on bursts after we get all the relevant products) #230

Closed cmarshak closed 10 months ago

cmarshak commented 10 months ago

Partly feature request. Also, documenting for OPERA, what is available.

I can find OPERA datasets using the "groupID" in general search function.

I first did this:

import asf_search as asf
resp = asf.granule_search(['OPERA_L2_RTC-S1_T078-165486-IW2_20231024T004829Z_20231024T091416Z_S1A_30_v1.0'])
resp[0].properties

This is the OPERA-RTC-S1 product.

The output is:

{'beamModeType': None,
 'browse': ['https://datapool.asf.alaska.edu/BROWSE/OPERA-S1/OPERA_L2_RTC-S1_T078-165486-IW2_20231024T004829Z_20231024T091416Z_S1A_30_v1.0_BROWSE.png',
  's3://asf-cumulus-prod-opera-browse/OPERA_L2_RTC-S1/OPERA_L2_RTC-S1_T078-165486-IW2_20231024T004829Z_20231024T091416Z_S1A_30_v1.0/OPERA_L2_RTC-S1_T078-165486-IW2_20231024T004829Z_20231024T091416Z_S1A_30_v1.0_BROWSE.png',
  'https://datapool.asf.alaska.edu/BROWSE/OPERA-S1/OPERA_L2_RTC-S1_T078-165486-IW2_20231024T004829Z_20231024T091416Z_S1A_30_v1.0_BROWSE_low-res.png',
  's3://asf-cumulus-prod-opera-browse/OPERA_L2_RTC-S1/OPERA_L2_RTC-S1_T078-165486-IW2_20231024T004829Z_20231024T091416Z_S1A_30_v1.0/OPERA_L2_RTC-S1_T078-165486-IW2_20231024T004829Z_20231024T091416Z_S1A_30_v1.0_BROWSE_low-res.png',
  'https://datapool.asf.alaska.edu/BROWSE/OPERA-S1/OPERA_L2_RTC-S1_T078-165486-IW2_20231024T004829Z_20231024T091416Z_S1A_30_v1.0_BROWSE_thumbnail.png',
  's3://asf-cumulus-prod-opera-browse/OPERA_L2_RTC-S1/OPERA_L2_RTC-S1_T078-165486-IW2_20231024T004829Z_20231024T091416Z_S1A_30_v1.0/OPERA_L2_RTC-S1_T078-165486-IW2_20231024T004829Z_20231024T091416Z_S1A_30_v1.0_BROWSE_thumbnail.png'],
 'bytes': None,
 'centerLat': None,
 'centerLon': None,
 'faradayRotation': None,
 'fileID': 'OPERA_L2_RTC-S1_T078-165486-IW2_20231024T004829Z_20231024T091416Z_S1A_30_v1.0',
 'flightDirection': 'ASCENDING',
 'groupID': 'S1A_IWDV_0051_0057_050900_078',
 'granuleType': None,
 'insarStackId': None,
 'md5sum': None,
 'offNadirAngle': None,
 'orbit': 50900,
 'pathNumber': 78,
 'platform': 'Sentinel-1A',
 'pointingAngle': None,
 'polarization': 'VV',
 'processingDate': '2023-10-24T09:14:20Z',
 'processingLevel': 'RTC',
 'sceneName': 'OPERA_L2_RTC-S1_T078-165486-IW2_20231024T004829Z_20231024T091416Z_S1A_30_v1.0',
 'sensor': 'C-SAR',
 'startTime': '2023-10-24T00:48:29Z',
 'stopTime': '2023-10-24T00:48:32Z',
 'url': 'https://datapool.asf.alaska.edu/RTC/OPERA-S1/OPERA_L2_RTC-S1_T078-165486-IW2_20231024T004829Z_20231024T091416Z_S1A_30_v1.0_VH.tif',
 'fileName': 'OPERA_L2_RTC-S1_T078-165486-IW2_20231024T004829Z_20231024T091416Z_S1A_30_v1.0_VH.tif',
 'frameNumber': None}

The groupID is what I can use to use with intersectsWith.

My feature request:

cmarshak commented 10 months ago

One thing that is interesting - the burst ID is in the UMM json for both OPERA CSLC and OPERA RTC:

To extract the JPL burst id and link it to the existing ESA burst map one could use this: https://github.com/opera-adt/burst_db/blob/main/src/burst_db/build_frame_db.py#L619-L627 (credit to @scottstanie for sharing this).

Anyways, hope a search for a fixed burst id can automatically pull the latest scenes.

SpicyGarlicAlbacoreRoll commented 10 months ago

The latest release (https://github.com/asfadmin/Discovery-asf_search/releases/tag/v6.7.0) includes

import asf_search as asf

# get all OPERA-S1 products with a burst id
response = asf.search(operaBurstID=['T078-165486-IW2'])

# get only the RTC products for a burst id
response = asf.search(operaBurstID=['T078-165486-IW2'], processingLevel='RTC')

# get only the CSLCs with two particular burst ids
response = asf.search(operaBurstID=['T078_165486_IW2', 'T078_165485_IW2'], processingLevel='CSLC')

latest_cslc = response[0]

# how to access OperaBurstID in the properties dict
latest_cslc.properties['operaBurstID']