-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
[GSoC] Formal integral Project #740
Merged
Merged
Conversation
This file contains 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
This implementation is siginficantly faster than the python version.
This reduces the time to traverse the line list by a huge amount for a huge number of lines, especially if the start is near the red end of the line list.
Currently the c function expects a storage model, a blackbody temperature, an array of frequencies, the length of said array, the source function and the number of integration points. The function returns a array with the same length as the frequency array. Remember to free the result to prevent memory leaks. The python wrapper expects a simulation object, a np.ndarray of frequencies and the number of integration points. Additionally the identation of the C code was changed
Expand documentation Fix bug in populate_z.
In very rare cases when the outermost p line has an equal distance to the center as the radius of the outer shell, the code could try to access memory out of bounds.
The class stores a reference to model, plasma and runner to be able to calculate the formal integral. In this implementation it is first instantiated in MontecarloRunner.run() and available thereafter. It returns a TARDISSpectrum of the integrated spectrum.
The FormalIntegrator is responsible for all calculations associated with the formal integration method. It contains methods to calculate the source function and a wrapper to the c implementation.
There is a new option under spectrum which defaults to 'virtual' but can be set to 'real' or 'integrated' as well.
4 tasks
Make it clear when asserting the equality of two scalar values.
Add unit tests for the formal integral
unoebauer
reviewed
Jun 19, 2017
- real | ||
default: virtual | ||
description: The method to generate the final spectrum | ||
description: Final spectrum sampling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice - for now we need to check however that FI is only used with:
- downbranch
- disable_electron_scattering
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see #746
The current implementation of the formal integral can only handle 'downbranch' and disabled electron scattering. So we raise a ConfigurationError if we find incompatible settings.
[TEP005][CONFIG] Prevent incompatible configurations
This is a shortcut for obtaining an integrated spectrum for the wavelength grid defined in the configuration file. If incompatible configuration settings are detected, an IntegrationError is raised.
[TEP005][DOC] Documentation
[TEP005][QOL] Add MontecarloRunner.spectrum_integrated
8 tasks
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.
Continuation of #726
This PR contains all changes related to the formal integral project. This is an aggregation PR. That means future changes will be made as PR to the feature branch
formal_integral
. Once that branch is feature complete, it will be merged into master.Milestones: