csobey / ionFR

A code that allows you to predict the ionospheric Faraday rotation for a specific line-of-sight, geographic location, and epoch
GNU General Public License v3.0
9 stars 9 forks source link

Allow the code to work with python 2 and 3 #1

Closed cjordan closed 4 years ago

cjordan commented 4 years ago

There are three important changes here:

  1. The future module is now needed (this could be relaxed if we didn't want a usage string to be printed to stderr);
  2. The path variable defined in ionFRM.py is now determined automatically. This may or may not be useful, but that's what pull requests are for.
  3. I had to remove "ionFR_2018" from a path in ionFRM.py to get the example to work (see the last diff shown in this PR). I assume that was not meant to be there.

With these changes, I get the same output (modulo floating-point-precision errors) in both python 2 and 3.

I also assume that the usage function used in ionFRM.py wants to use usage from rdalaz.py. Before these commits, no other usage function was available to ionFRM.py.