Skip to content

How to use myOwnMagField with Python #58

@atmosalex

Description

@atmosalex

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions