CosmicStudioSoftware / OMMBV

Orthogonal Multipole Magnetic Basis Vectors - Complete orthogonal vector basis with accurate field-line mapping of electric fields and ion drifts within multipole magnetic fields
BSD 3-Clause "New" or "Revised" License
10 stars 7 forks source link

Magnetic field tracing problem #45

Closed habtie-phys closed 2 years ago

habtie-phys commented 4 years ago

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.

rstoneback commented 4 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.

habtie-phys commented 3 years ago

Thank you for the consideration!

rstoneback commented 3 years ago

Code in work in pull #46