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

Testing sources #53

Closed rstoneback closed 2 years ago

rstoneback commented 2 years ago

Description

Adds support for pure dipole and linear quadrupole sources to verify performance of OMMBV on multipole sources.

Addresses a variety of issues, including documented issues #50, #44.

Provides direct evidence that vectors are orthogonal for multipole fields.

Original Performance

There is an apparent reduction in performance for some linear quadrupoles in the equatorial plane. Current uncertainty on scaling values for drifts and electric fields is < 0.1%. In practical terms, given instrumentation errors are certainly higher, the observed uncertainty is fine for scientific applications. Still, looking to see if there is a way to improve this performance. Scaling uncertainty for dipole and linear quadrupole (along pole) is < .001%.

UPDATE

Performance improved and uncertainty with multipole fields is the same as dipole alone! Fixes are in here. Also includes:

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Running unit tests on known source magnetic fields.

Test Configuration:

Checklist:

rstoneback commented 2 years ago

I sorted out a bit of error and now the OMMBV vectors are even better. Uncertainty for multipole fields is at the same level as a pure dipole.

rstoneback commented 2 years ago

I'm giving up on windows testing. OMMBC appears to compile everything just fine. However, pytest tests the pure python code without the compiled and installed Fortran. I also dropped MacOS testing way back since there is no installed Fortran compiler on the machines. Runs locally on Mac.