Closed vaishakp closed 1 year ago
These paths are available as entries in the simulation metadata for the RIT catalog:
>>> from nrcatalogtools import RITCatalog
>>> rc = RITCatalog.load(verbosity=4, download=True)
..Going to read catalog file from cache.
>>> rc.get_metadata('RIT:BBH:0002-n100-id0')['metadata_location']
'/home/prayush/.cache/RIT/metadata/RIT:BBH:0002-n100-id0_Metadata.txt'
>>> rc.get_metadata('RIT:BBH:0002-n100-id0')['waveform_data_location']
'/home/prayush/.cache/RIT/data/ExtrapStrain_RIT-BBH-0002-n100.h5'
but not for GT and SXS catalogs at the moment. Is something like this what you're seeking for all catalogs?
Just pushed a patch that allows the same to be done fro the GT catalog:
>>> from nrcatalogtools import MayaCatalog
>>> gc = MayaCatalog.load(verbosity=4, download=True)
Downloading to /home/prayush/.cache/MAYA/catalog.temp.txt:
68.7kB [00:00, 43.4MB/s]
>>> gc.get_metadata('GT0003')['metadata_location']
'/home/prayush/.cache/MAYA/metadata/GT0003.txt'
>>> gc.get_metadata('GT0003')['waveform_data_location']
'/home/prayush/.cache/MAYA/data/GT0003.h5'
This looks good.
SXS stores the metadata path in its metadata under the name 'metadata_path'. Should we retain that?
It would be convenient to have the full path of the simulation metadata (used by the
get_metadata
method) and the file containing the modes data as an entry in the simulation metadata. It is recommended that this entry is set when the simulation metadata dictionary is created, and not computed again for the sake of consistency.This would enable consistency checking between the H5 files and the simulation metadata loaded.