-
Notifications
You must be signed in to change notification settings - Fork 22
How to use myOwnMagField with Python #58
Description
I appreciate the Python wrapper which makes IRBEM easy to integrate with other projects. I would like to perform IRBEM calculations using my own magnetic field class (including finding Lstar) and would appreciate some guidance:
I see that I can instantiate an IRBEM magnetic field Python object like so:
mf_MAG = ib.MagFields(options=[1, 0, 0, 0, 4], verbose=False, kext='None', sysaxes=6, alpha=[90])
With options[4] set to some other value, I can query the field using mf_MAG.get_field_multi(XYZ, maginput), for example. When I set it to 4 as above, I get fill values from the dummy subroutine in myOwnMagField.f.
The magnetic field I want to use is currently implemented as a high level Python object, with a method analogous to myOwnMagField. Q1) how would I use my Python method to perform IRBEM calculations instead of rewriting myOwnMagField.f? Q2) are there limitations when calling make_lstar and specifying myOwnMagField?