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

Set fvth flux to 0 for input energies above CHIANTI energy grid #178

Merged
merged 6 commits into from
Jan 30, 2025

Conversation

natsat0919
Copy link
Contributor

This PR addresses issue #177.

If some of the thermal model input energies are above the CHIANTI energy grid, the flux for these is set to 0 and a warning is shown (originally a ValuError was raised). This should be similar to what OSPEX does. At these >200 keV energies the contribution from the thermal model is negligible so setting the flux to 0 shouldn't be a problem.

If some of the input energies are below the CHIANTI energy grid, then a ValueError is raised.

@natsat0919
Copy link
Contributor Author

@DanRyanIrish Could you have a quick look through the changes please? I haven't changed any of the actual code that calculates the flux; I have only updated the warnings/errors.

Copy link
Collaborator

@samaloney samaloney left a comment

Choose a reason for hiding this comment

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

LGTM the test fail is due to updated NDCube repr/str.

@settwi
Copy link
Contributor

settwi commented Jan 28, 2025

are there ant f_vth tests that try to use the zeroed count values above the grid energies?

@settwi
Copy link
Contributor

settwi commented Jan 28, 2025

@samaloney and @natsat0919 are u happy with the tests? i added a check on continuum_emission and some basic tests. things seem to be working

@natsat0919
Copy link
Contributor Author

@settwi looks good to me

@samaloney samaloney merged commit a869fd4 into sunpy:main Jan 30, 2025
14 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.

3 participants