Skip to content

Fixed an issue where plot_pfss()-method would crash with reference_lo…#95

Merged
jgieseler merged 1 commit intojgieseler:mainfrom
Christian-Palmroos:main
Feb 13, 2026
Merged

Fixed an issue where plot_pfss()-method would crash with reference_lo…#95
jgieseler merged 1 commit intojgieseler:mainfrom
Christian-Palmroos:main

Conversation

@Christian-Palmroos
Copy link
Contributor

…n==int(0). Also fixed a minor bug where pfss_table would display the latitudinal separation between reference and the Earth as the Earth's magnetic footpoint if no reference latitude was given.

…n==int(0). Also fixed a minor bug where pfss_table would display the latitudinal separation between reference and the Earth as the Earth's magnetic footpoint if no reference latitude was given.
@Christian-Palmroos
Copy link
Contributor Author

This pull request is a fix to issue #94.

@jgieseler
Copy link
Owner

Also fixed a minor bug where pfss_table would display the latitudinal separation between reference and the Earth as the Earth's magnetic footpoint if no reference latitude was given.

But now this is only fixed for the latitude; the longitude still shows the old behavior, right? And that would be crashing, because

ref_earth_sep_lon = earth_footpoint[0] - self.reference_long if earth_footpoint[0] - self.reference_long < 180 else earth_footpoint[0] - self.reference_long - 360

will cause a TypeError: unsupported operand type(s) for -: 'float' and 'NoneType' if self.reference_long is None.

@Christian-Palmroos
Copy link
Contributor Author

No, it will not, because that line is never executed if self.reference_long == None. This is checked on line 1449, while ref_earth_sep_lon is determined on line 1450.

@jgieseler jgieseler merged commit 6d256f9 into jgieseler:main Feb 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants