= "missions.cassini.iss.indexes.moon_summary"
key = "missions.lro.lroc.edr" key
PDS Indexes
Support tools to work with PDS index files.
Index
Index (key:str, url:str=None, check_update:bool=True)
*Index manager class.
This class manages one index, identified by a dotted key, e.g. cassini.iss.ring_summary
*
Type | Default | Details | |
---|---|---|---|
key | str | Nested (dotted) key, e.g. cassini.iss.ring_summary | |
url | str | None | URL to index. If not given, will be read from config object. |
check_update | bool | True | switch if dynamic URLS will be derived upon start |
Index.parse_key
Index.parse_key (key:str)
*Take care of different ways how the key could be structured.
This involves adding the sub-key indexes
for the config file structure, which is something the user of this class should not need to know.*
Type | Details | |
---|---|---|
key | str | dotted key |
Index.download
Index.download ()
Wrapping URLs for downloading PDS indices and their label files.
Index.update_available
Index.update_available ()
Property indicating if the index needs to be downloaded.
= Index(key, check_update=True)
index index
Key: missions.lro.lroc.indexes.edr
URL: http://pds.lroc.asu.edu/data/LRO-L-LROC-2-EDR-V1.0/LROLRC_0048C/INDEX/CUMINDEX.LBL
Timestamp: 2023-10-10 15:30:56.195462
index.key
'missions.lro.lroc.indexes.edr'
index.label_filename
Path('CUMINDEX.LBL')
index.url
'http://pds.lroc.asu.edu/data/LRO-L-LROC-2-EDR-V1.0/LROLRC_0048C/INDEX/CUMINDEX.LBL'
index.local_dir
Path('/home/ayek72/mnt/slowdata/planetarypy/missions/lro/lroc/indexes/edr')
if index.check_update and index.update_available:
index.download()
The key
can be provided * with or without the leading ‘missions’ * with or without the internal indexes
level of the config file
"cassini.iss.moon_summary") Index(
Key: missions.cassini.iss.indexes.moon_summary
URL: https://pds-rings.seti.org/holdings/metadata/COISS_2xxx/COISS_2999/COISS_2999_moon_summary.lbl
Timestamp: 2019-06-08 16:28:22
"cassini.iss.indexes.moon_summary") Index(
Key: missions.cassini.iss.indexes.moon_summary
URL: https://pds-rings.seti.org/holdings/metadata/COISS_2xxx/COISS_2999/COISS_2999_moon_summary.lbl
Timestamp: 2019-06-08 16:28:22
index.isotimestamp
'2023-10-10T15:30:56.195462'
index.mission_key
'lro'
index.local_dir
Path('/home/ayek72/mnt/slowdata/planetarypy/missions/lro/lroc/indexes/edr')
2] index.key_tokens[:
['missions', 'lro']
index.instrument_key
'lro.lroc'
config.get_value(index.instrument_key)
{'indexes': {'edr': {'url': 'http://pds.lroc.asu.edu/data/LRO-L-LROC-2-EDR-V1.0/LROLRC_0048C/INDEX/CUMINDEX.LBL', 'timestamp': '2023-10-10T15:30:56.195462'}}}
= Index('mro.ctx.edr', check_update=False) index
index.url
''
index.label_filename
Path('/home/ayek72/mnt/slowdata/planetarypy/missions/mro/ctx/indexes/edr/cumindex.lbl')
list(index.local_dir.glob("*.[lL][bB][lL]"))
[Path('/home/ayek72/mnt/slowdata/planetarypy/missions/mro/ctx/indexes/edr/cumindex.lbl')]