Merged
Conversation
Re-used the variable `ind` rather than `primary_opt`, leading to wrong results in some cases.
When input equilibria do not specify separate density and temperature profiles, there are several options for how these should be set. One of these options (3 in hypnotoad) is to keep the same shape for both profiles. This code had a bug, which resulted in the output pressure profiles being proportional to the square of the input pressure profiles. This bug affected both hypnotoad and the pdb2bout.pro processing used for input from DSKGATO or ELITE inputs. Thanks to Seto-san for finding.
Contributor
The change looks fine, and probably makes the code easier to read, but I can't see how the old code could lead to wrong results? I can't see anywhere that would change |
Contributor
Author
|
After |
Copy fix from IDL version in process_grid.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some important fixes for Hypnotoad, mainly found by @HarukiST . Particularly important for people using proportional density and temperature profiles, since the old code gave the wrong pressure profile.
Emphasises the need for: