mattkjames7 / PyGeopack

Wrapper for geopack-08 used for the Tsyganenko magnetic field models
GNU General Public License v3.0
11 stars 2 forks source link

Why only inside Magnetopause? #12

Closed ddasilva closed 2 years ago

ddasilva commented 2 years ago

I was wondering what is the rational for this code producing NaN's outside the magnetopause. Is there a way to turn that off? The Tsyganenko models are defined outside the magnetopause, and define structure on both sides which would be useful for my analysis.

ddasilva commented 2 years ago

I modified the code in my fork to skip the inside magnetopause condition and it works as expected. Would you be open to accepting a merge request that adds a keyword argument to the model that skips the inside-magnetopause check?

mattkjames7 commented 2 years ago

Hi Daniel,

To be honest, the reason I did that originally was to stop tracing outside of the MP boundary because that was all I needed at the time.

I would be happy to review your changes if you submit a pull request. Thanks for so quickly adding this option - saves me programming it up!

Cheers, Matt.

ddasilva commented 2 years ago

Great! Would you mind if we call the option WithinMPOnly? Does defaulting to False work for you?

mattkjames7 commented 2 years ago

That sounds good to me!