Skip to content

Commit

Permalink
fixes old reference to properties paths
Browse files Browse the repository at this point in the history
  • Loading branch information
kim committed Aug 2, 2024
1 parent 9f9e300 commit 7676949
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion asf_search/ASFProduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def translate_product(self, item: Dict) -> Dict:

properties = {
prop: self._read_umm_property(umm, umm_mapping)
for prop, umm_mapping in self._properties_paths.items()
for prop, umm_mapping in self._base_properties.items()
}

if properties.get('url') is not None:
Expand Down
2 changes: 1 addition & 1 deletion asf_search/Products/AIRSARProduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class AIRSARProduct(ASFProduct):
ASF Dataset Overview Page: https://asf.alaska.edu/data-sets/sar-data-sets/airsar/
"""
_base_properties = {
**ASFProduct._properties_paths,
**ASFProduct._base_properties,
'frameNumber': {'path': ['AdditionalAttributes', ('Name', 'CENTER_ESA_FRAME'), 'Values', 0], 'cast': try_parse_int},
'groupID': {'path': [ 'AdditionalAttributes', ('Name', 'GROUP_ID'), 'Values', 0]},
'insarStackId': {'path': [ 'AdditionalAttributes', ('Name', 'INSAR_STACK_ID'), 'Values', 0]},
Expand Down
2 changes: 1 addition & 1 deletion asf_search/Products/ALOSProduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ALOSProduct(ASFStackableProduct):
ASF Dataset Documentation Page: https://asf.alaska.edu/datasets/daac/alos-palsar/
"""
_base_properties = {
**ASFStackableProduct._properties_paths,
**ASFStackableProduct._base_properties,
'frameNumber': {'path': ['AdditionalAttributes', ('Name', 'FRAME_NUMBER'), 'Values', 0], 'cast': try_parse_int},
'faradayRotation': {'path': ['AdditionalAttributes', ('Name', 'FARADAY_ROTATION'), 'Values', 0], 'cast': try_parse_float},
'offNadirAngle': {'path': ['AdditionalAttributes', ('Name', 'OFF_NADIR_ANGLE'), 'Values', 0], 'cast': try_parse_float},
Expand Down
2 changes: 1 addition & 1 deletion asf_search/Products/ARIAS1GUNWProduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ARIAS1GUNWProduct(S1Product):
ASF Dataset Documentation Page: https://asf.alaska.edu/data-sets/derived-data-sets/sentinel-1-interferograms/
"""
_base_properties = {
**S1Product._properties_paths,
**S1Product._base_properties,
'perpendicularBaseline': {'path': ['AdditionalAttributes', ('Name', 'PERPENDICULAR_BASELINE'), 'Values', 0], 'cast': try_parse_float},
'orbit': {'path': ['OrbitCalculatedSpatialDomains']},
'inputGranules': {'path': ['InputGranules']},
Expand Down
2 changes: 1 addition & 1 deletion asf_search/Products/ERSProduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ERSProduct(ASFStackableProduct):
ASF ERS-2 Dataset Documentation Page: https://asf.alaska.edu/datasets/daac/ers-2/
"""
_base_properties = {
**ASFStackableProduct._properties_paths,
**ASFStackableProduct._base_properties,
'frameNumber': {'path': ['AdditionalAttributes', ('Name', 'FRAME_NUMBER'), 'Values', 0]},
'bytes': {'path': ['AdditionalAttributes', ('Name', 'BYTES'), 'Values', 0], 'cast': try_round_float},
'esaFrame': {'path': ['AdditionalAttributes', ('Name', 'CENTER_ESA_FRAME'), 'Values', 0]},
Expand Down
2 changes: 1 addition & 1 deletion asf_search/Products/JERSProduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class JERSProduct(ASFStackableProduct):
ASF Dataset Documentation Page: https://asf.alaska.edu/datasets/daac/jers-1/
"""
_base_properties = {
**ASFStackableProduct._properties_paths,
**ASFStackableProduct._base_properties,
'browse': {'path': ['RelatedUrls', ('Type', [('GET RELATED VISUALIZATION', 'URL')])]},
'groupID': {'path': ['AdditionalAttributes', ('Name', 'GROUP_ID'), 'Values', 0]},
'md5sum': {'path': ['AdditionalAttributes', ('Name', 'MD5SUM'), 'Values', 0]},
Expand Down
2 changes: 1 addition & 1 deletion asf_search/Products/NISARProduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class NISARProduct(ASFStackableProduct):
ASF Dataset Documentation Page: https://asf.alaska.edu/nisar/
"""
_base_properties = {
**ASFStackableProduct._properties_paths,
**ASFStackableProduct._base_properties,
'pgeVersion': {'path': ['PGEVersionClass', 'PGEVersion']}
}

Expand Down
2 changes: 1 addition & 1 deletion asf_search/Products/OPERAS1Product.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class OPERAS1Product(S1Product):
ASF Dataset Documentation Page: https://asf.alaska.edu/datasets/daac/opera/
"""
_base_properties = {
**S1Product._properties_paths,
**S1Product._base_properties,
'centerLat': {'path': []}, # Opera products lacks these fields
'centerLon': {'path': []},
'frameNumber': {'path': []},
Expand Down
2 changes: 1 addition & 1 deletion asf_search/Products/RADARSATProduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class RADARSATProduct(ASFStackableProduct):
ASF Dataset Documentation Page: https://asf.alaska.edu/datasets/daac/radarsat-1/
"""
_base_properties = {
**ASFStackableProduct._properties_paths,
**ASFStackableProduct._base_properties,
'faradayRotation': {'path': ['AdditionalAttributes', ('Name', 'FARADAY_ROTATION'), 'Values', 0], 'cast': try_parse_float},
'md5sum': {'path': ['AdditionalAttributes', ('Name', 'MD5SUM'), 'Values', 0]},
'beamModeType': {'path': ['AdditionalAttributes', ('Name', 'BEAM_MODE_TYPE'), 'Values', 0]},
Expand Down
2 changes: 1 addition & 1 deletion asf_search/Products/S1BurstProduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class S1BurstProduct(S1Product):
ASF Dataset Documentation Page: https://asf.alaska.edu/datasets/data-sets/derived-data-sets/sentinel-1-bursts/
"""
_base_properties = {
**S1Product._properties_paths,
**S1Product._base_properties,
'bytes': {'path': ['AdditionalAttributes', ('Name', 'BYTE_LENGTH'), 'Values', 0]},
'absoluteBurstID': {'path': ['AdditionalAttributes', ('Name', 'BURST_ID_ABSOLUTE'), 'Values', 0], 'cast': try_parse_int},
'relativeBurstID': {'path': ['AdditionalAttributes', ('Name', 'BURST_ID_RELATIVE'), 'Values', 0], 'cast': try_parse_int},
Expand Down
2 changes: 1 addition & 1 deletion asf_search/Products/S1Product.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class S1Product(ASFStackableProduct):
"""

_base_properties = {
**ASFStackableProduct._properties_paths,
**ASFStackableProduct._base_properties,
'frameNumber': {'path': ['AdditionalAttributes', ('Name', 'FRAME_NUMBER'), 'Values', 0], 'cast': try_parse_int}, #Sentinel and ALOS product alt for frameNumber (ESA_FRAME)
'groupID': {'path': ['AdditionalAttributes', ('Name', 'GROUP_ID'), 'Values', 0]},
'md5sum': {'path': ['AdditionalAttributes', ('Name', 'MD5SUM'), 'Values', 0]},
Expand Down
2 changes: 1 addition & 1 deletion asf_search/Products/SEASATProduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class SEASATProduct(ASFProduct):
ASF Dataset Documentation Page: https://asf.alaska.edu/data-sets/sar-data-sets/seasat/
"""
_base_properties = {
**ASFProduct._properties_paths,
**ASFProduct._base_properties,
'bytes': {'path': [ 'AdditionalAttributes', ('Name', 'BYTES'), 'Values', 0], 'cast': try_round_float},
'insarStackId': {'path': [ 'AdditionalAttributes', ('Name', 'INSAR_STACK_ID'), 'Values', 0]},
'md5sum': {'path': [ 'AdditionalAttributes', ('Name', 'MD5SUM'), 'Values', 0]},
Expand Down
2 changes: 1 addition & 1 deletion asf_search/Products/SIRCProduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class SIRCProduct(ASFProduct):
Dataset Documentation Page: https://eospso.nasa.gov/missions/spaceborne-imaging-radar-c
"""
_base_properties = {
**ASFProduct._properties_paths,
**ASFProduct._base_properties,
'groupID': {'path': [ 'AdditionalAttributes', ('Name', 'GROUP_ID'), 'Values', 0]},
'md5sum': {'path': [ 'AdditionalAttributes', ('Name', 'MD5SUM'), 'Values', 0]},
'pgeVersion': {'path': ['PGEVersionClass', 'PGEVersion'] },
Expand Down
2 changes: 1 addition & 1 deletion asf_search/Products/SMAPProduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class SMAPProduct(ASFProduct):
ASF Dataset Documentation Page: https://asf.alaska.edu/data-sets/sar-data-sets/soil-moisture-active-passive-smap-mission/
"""
_base_properties = {
**ASFProduct._properties_paths,
**ASFProduct._base_properties,
'groupID': {'path': [ 'AdditionalAttributes', ('Name', 'GROUP_ID'), 'Values', 0]},
'insarStackId': {'path': [ 'AdditionalAttributes', ('Name', 'INSAR_STACK_ID'), 'Values', 0]},
'md5sum': {'path': [ 'AdditionalAttributes', ('Name', 'MD5SUM'), 'Values', 0]},
Expand Down
2 changes: 1 addition & 1 deletion asf_search/Products/UAVSARProduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class UAVSARProduct(ASFProduct):
ASF Dataset Documentation Page: https://asf.alaska.edu/datasets/daac/uavsar/
"""
_base_properties = {
**ASFProduct._properties_paths,
**ASFProduct._base_properties,
'groupID': {'path': [ 'AdditionalAttributes', ('Name', 'GROUP_ID'), 'Values', 0]},
'insarStackId': {'path': [ 'AdditionalAttributes', ('Name', 'INSAR_STACK_ID'), 'Values', 0]},
'md5sum': {'path': [ 'AdditionalAttributes', ('Name', 'MD5SUM'), 'Values', 0]},
Expand Down
2 changes: 1 addition & 1 deletion asf_search/search/baseline_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def _cast_to_subclass(product: ASFProduct, subclass: Type[ASFProduct]) -> ASFPro
```
class MyCustomClass(ASFProduct):
_base_properties = {
**ASFProduct._properties_paths,
**ASFProduct._base_properties,
'some_unique_property': {'path': ['AdditionalAttributes', 'UNIQUE_PROPERTY', ...]}
}
Expand Down

0 comments on commit 7676949

Please sign in to comment.