SNEWS2 / snewpy

A Python package for working with supernova neutrinos
https://snewpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
26 stars 19 forks source link

Sheshuk/zenodo downloader #191

Closed Sheshuk closed 2 years ago

Sheshuk commented 2 years ago

Closes #163 A prototype for the Zenodo downloader: more generally, a registry for the model data files, capable of downloading the files from the remote location on demand.

The registry is located in a yaml file model_files.yml, where one can specify

The goal is to interplay nicely with model registry #184 - the models can use this datafile registry instead of providing full file paths.

Usage example (to be updated):

from snewpy.zenodo_downloader import load_registry
model_files = load_registry('python/snewpy/model_files.yml')
from snewpy.models.presn import Patton_2017
#instantiate model
m = Patton_2017(model_files['presn']['Patton_2017']['totalLuminosity_15SolarMass.dat'].load())
JostMigenda commented 2 years ago

Work to continue in #184, as discussed at the Hackathon.