Closed habtie-phys closed 2 years ago
Thanks for the report!
I started this package to support the interpretation of satellite data which is why things are only working when the starting altitude is greater than the ending altitude. I'll put this on my to-do list to support broader uses.
Thank you for the consideration!
Code in work in pull #46
The function _pysatMagVect._core.field_linetrace performs the geomagnetic field line tracing only when the altitude of the field line beginning is greater than terminating altitude. Here I attached an example.
import pysatMagVect glat=69.583 glon=19.210 galt=3e-2 xyz=pysatMagVect._core.geodetic_to_ecef(glat, glon, galt) date=2016+100/365 xyz=[xyz[0],xyz[1],xyz[2]]
trace_pos=pysatMagVect._core.field_line_trace(xyz, date, dir=-1, h=100)
Here it is supposed to trace the field line upward in the North pole. it returns array([[2107.33706216, 734.26483525, 5954.99832081], [2107.33706216, 734.26483525, 5954.99832081], [2107.33706216, 734.26483525, 5954.99832081], ..., [2107.33706216, 734.26483525, 5954.99832081], [2107.33706216, 734.26483525, 5954.99832081], [2107.33706216, 734.26483525, 5954.99832081]])
in which all values are the initial position of the field line tracing.