dstansby / pfsspy

Potential Field Source Surface model package for Python
https://pfsspy.readthedocs.io/
Other
41 stars 17 forks source link

Magnetic field along traced field line is NaN at footpoints #277

Closed wtbarnes closed 3 years ago

wtbarnes commented 3 years ago

I've traced a number of field lines (~400) through an extrapolation derived from an HMI synoptic map. When I access the field vector along that line (through b_along_fline), I'm finding that for every one of my fieldlines, the value of all three components at both footpoints (i.e. indexes 0 and -1) is NaN. Is this expected? Is there some reason that the value of the field at the footpoints cannot be inferred?

I realized this is a bit vague. I will try to come up with a MWE that demonstrates this.

wtbarnes commented 3 years ago

I'm finding that this seems to be a function of the resolution of the extrapolation itself. Refining the lat/lon grid seems to have fixed this, though I'm not really sure why.

dstansby commented 3 years ago

Do you have a minimal working example, preferably with a single field line that shows this? I think it's related to https://github.com/dstansby/pfsspy/issues/227 and field lines not being clipped at the boundary of the the PFSS model. I suspect solving that will also solve this issue.

dstansby commented 3 years ago

I'm going to close this since there's not much I can do without an example - feel free to comment with an example and I'll re-open.