geomagpy / magpy

MagPy (or GeomagPy) is a Python package for analysing and displaying geomagnetic data.
BSD 3-Clause "New" or "Revised" License
49 stars 27 forks source link

IAF to IAGA conversion does not allow for writing G #79

Closed leonro closed 7 years ago

leonro commented 7 years ago

Charles Blais:

Data contained in the IAF are xyzg. However, when writing to IAGA2002, it tries to write xyzf. I used the keyword "useg" as stated in the code and I am still getting XYZF on the ouput.

leonro commented 7 years ago

There was an error within the IAGA export code, if G values were present but no F, as it happens when reading IAF. I corrected this one. As long as G values are available, IAGA will always contain them. If only F values are available, you can provide the useg option to automatically calculate G. Otherwise F values are written to the file.