-
-
Notifications
You must be signed in to change notification settings - Fork 410
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
NLTE #347
Merged
aoifeboyle
merged 13 commits into
tardis-sn:plasma/restructure
from
aoifeboyle:plasma/nlte
Aug 1, 2015
Merged
NLTE #347
Changes from 10 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
4d54577
New NLTE system.
4c20e61
New NLTE system.
4b5782e
New NLTE system.
1aaee4b
Inserted fix for lines/nlte_lines indexing discrepancy.
061e75e
Added classical nebular NLTE.
9927784
Re-added collision matrix.
8d9a073
Fix.
7aa5c03
Fix.
1070c25
WIP: Will fail tests. Change to NLTE structure.
ccc78d6
Changing NLTE.
d92cb1d
Combined NLTE options into single property.
affeab6
Preventing nlte config contradiction.
e687f9f
Small fix.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from tardis.plasma.properties.base import BasePlasmaProperty | ||
|
||
__all__ = ['PreviousElectronDensities', 'PreviousBetaSobolevs'] | ||
|
||
class PreviousIterationProperty(BasePlasmaProperty): | ||
def _set_output_value(self, output, value): | ||
setattr(self, output, value) | ||
|
||
def set_value(self, value): | ||
assert len(self.outputs) == 1 | ||
self._set_output_value(self.outputs[0], value) | ||
|
||
class PreviousElectronDensities(PreviousIterationProperty): | ||
outputs = ('previous_electron_densities',) | ||
|
||
class PreviousBetaSobolevs(PreviousIterationProperty): | ||
outputs = ('previous_beta_sobolevs',) |
Oops, something went wrong.
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.
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.
@wkerzendorf Think I've found a better way of doing this now, without having to output and read in values from previous iterations from model.py. Created this new property class to store values from previous iterations. The values are set just prior to all of the properties being updated. I think it's a lot more straightforward! Let me know if you think I'm on the right track now and then I'll tidy it up/finish it off.