lofar-astron / RMextract

extract TEC, vTEC, Earthmagnetic field and Rotation Measures from GPS and WMM data for radio interferometry observations
GNU General Public License v3.0
31 stars 22 forks source link

Allow custom URL formats #45

Closed AlecThomson closed 1 year ago

AlecThomson commented 1 year ago

Hi there,

This is a suggested refactor to allow for custom URL formats - this is particularly useful for hosting or using datasets. This also cleans up some of the hard-coded formats for these URLs.

This allows a user to provide a formatter function which takes in server, year, dayofyear, prefix, yy as args and returns the appropriately formatted URL. There is a default dictionary of KNOWN_FORMATTERS for the currently supported servers.

AlecThomson commented 1 year ago

Apologies - closing for now since there are some other issues that need fixing at the same time. I'll open an issue describing what we're attempting and we can discuss there.