-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
Arbitrary isotope decay handling and positronium #2099
Arbitrary isotope decay handling and positronium #2099
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2099 +/- ##
=======================================
Coverage 61.54% 61.54%
=======================================
Files 75 75
Lines 8635 8634 -1
=======================================
Hits 5314 5314
+ Misses 3321 3320 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
tardis/energy_input/energy_source.py
Outdated
|
||
|
||
def get_nuclear_lines_database( | ||
path="~/Downloads/tardisnuclear/decay_radiation.h5", |
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.
does the decay radiation data base always live in ~/Downloads/tardisnuclear
? this seems dangerous
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.
It's a kwarg because it's the standard location from nuclear
, but the user can override
@@ -295,7 +361,7 @@ def main_gamma_ray_loop( | |||
photoabsorption_opacity="tardis", | |||
pair_creation_opacity="tardis", | |||
seed=1, | |||
path_to_artis_lines="", | |||
path_to_decay_data="", |
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.
is path_to_decay_data
the file that is hardcoded in tardis/energy_input/energy_source.py
line 259?
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.
Yes, the user can override the path with this kwarg
tardis/energy_input/energy_source.py
Outdated
|
||
|
||
def get_nuclear_lines_database( | ||
path="~/Downloads/tardisnuclear/decay_radiation.h5", |
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.
Is this general for everyone? Does tardisnuclear always install here?
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.
Yes, but I have moved the path value to the main function as a kwarg so it is clearer for the user
Isotope as e.g. Ni56 | ||
taus : dict | ||
Mean half-life for each isotope | ||
start_tau : float64 |
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.
If these are half-lifes perhaps it better to call them something like t_12 or t_halflife since tau is sometimes used for the decay e-folding time
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.
They are actually the e-folding time i.e. the mean lifetime, so I have clarified.
📝 Description
Type: 🚀
feature
These changes allow for an arbitrary selection of radioactive isotopes to be added to an energy deposition calculation. The isotopes must be part of a
nuclear
database, which this code reads in. Also included some refactoring of the packet initialization process.Positronium continuum handling is also included, supporting 2 and 3 photon decay processes with a controlling fraction.
🚦 Testing
How did you test these changes?
☑️ Checklist
build_docs
label