mattkjames7 / PyGeopack

Wrapper for geopack-08 used for the Tsyganenko magnetic field models
GNU General Public License v3.0
11 stars 2 forks source link

GSEtoGSM coordinate transformation, x component changes #22

Open EvaKraemer opened 3 months ago

EvaKraemer commented 3 months ago

Hi again,

I have been using the function PyGeopack.Coords.GSEtoGSM to convert coordinates from the GSE to GSM coordinate system.

The GSE and GSM coordinate system share the same x-axis ((https://sscweb.gsfc.nasa.gov/users_guide/Appendix_C.shtml)) . However, when using GSEtoGSM the x-value of the input coordinate changes, which it shouldn't since its a rotation around the x-axis.

Here is a minimal example:

import PyGeopack as gp gse = [-331.088196, 89.673592, 89.884628] date = 20160107 ut = 7.0 gp.Coords.GSEtoGSM(gse[0], gse[1], gse[2], date, ut)

Output: (array([-333.24389722]), array([86.69694231]), array([84.68847704]))

mattkjames7 commented 2 months ago

Hi, I suspect that is due to the fact that the geopack code actually transforms the coordinates into an aberrated coordinate system based on the solar wind velocity. Technically GSM should probably be referred to as GSW, though if the solar wind is radial (i.e. V = Vx) then GSM should be equal to GSW.