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

Code style #50

Open AlecThomson opened 4 months ago

AlecThomson commented 4 months ago

Hi @maaijke,

A relatively unimportant issue, but just food for thought. Since this codebase has been around for a while (i.e. during the Python 2->3 era) and has had many contributors over the years, there are a mix of codestyles in place.

IMO, this has hurt some of the code readability and consistency. I'd like to recommend the implementation of a standard formatter / style. My recommendation would be enforcing a tool like ruff. On top of that, a pre-commit hook + CI could be added to enforce / fix codestyle for developers/contributers.

Let me know what you think, and I'm happy to help get these sorts of things implemented.

maaijke commented 4 months ago

Hi Alec, I completely agree. I have been thinking about fully rewriting the code for some time now, especially since there are many more advanced updates and it seems many groups are using the code (which originally started as a dump of some of my private scripts on github..). Your help would be very much appreciated, maybe we can continue this discussion in a more direct way. You can contact me via my astron mail address

twillis449 commented 4 months ago

Glad to see that RMextract is being 'modernized' :) So you might want to replace PyEphem interface with SkyField as PyEphem is no longer being supported. Although super-accurate positions are not all that critical for ionosphere modeling. Also I assume that RMextract will now be distinguishing between the pre and post GPS week 2238 (27 Non 2022) names of ionex files.