Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update plot_ionosphere.py #233

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

ArnaudLalague
Copy link
Contributor

Add the reading of the ionospheric radius parameter and its reconstruction

Add the reading of the ionospheric radius parameter and its reconstruction
@ArnaudLalague
Copy link
Contributor Author

A test with a previously failed file that does not have the ionosphere radius as a parameter in the VLSV file and a test with a file that does have the ionosphere radius parameter in the VLSV file. Analysator succeed to read and recalculate the ionosphere radius.
ionosphere_plot_with_parameter
ionsphere_plot_without_parameter

ionosphere_radius = f.read_parameter("ionosphere_radius")
except:
# Recalculate the radius of the ionospheric grid
ionosphere_radius = np.max(np.linalg.norm(coords, axis=-1))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So taking the max here assures that the argument to arccos can't accidentally get > 1. It's a nice safety.

@markusbattarbee markusbattarbee merged commit be5bcea into fmihpc:master Jun 11, 2024
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.

3 participants