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

Arbitrary isotope decay handling and positronium #2099

Merged
merged 17 commits into from Sep 12, 2022

Conversation

andrewfullard
Copy link
Contributor

@andrewfullard andrewfullard commented Jul 18, 2022

📝 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?

  • Testing pipeline
  • Other method (describe)
  • My changes can't be tested (explain why)

☑️ Checklist

  • I requested two reviewers for this pull request
  • I updated the documentation according to my changes
  • I built the documentation by applying the build_docs label

Note: If you are not allowed to perform any of these actions, ping (@) a contributor.

@andrewfullard andrewfullard added this to In progress in Nebular phase simulation via automation Jul 18, 2022
@codecov
Copy link

codecov bot commented Jul 18, 2022

Codecov Report

Merging #2099 (e9ee8d2) into master (79f2fc3) will increase coverage by 0.00%.
The diff coverage is 10.52%.

@@           Coverage Diff           @@
##           master    #2099   +/-   ##
=======================================
  Coverage   61.54%   61.54%           
=======================================
  Files          75       75           
  Lines        8635     8634    -1     
=======================================
  Hits         5314     5314           
+ Misses       3321     3320    -1     
Impacted Files Coverage Δ
tardis/energy_input/energy_source.py 28.00% <10.52%> (+0.36%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@andrewfullard andrewfullard marked this pull request as ready for review July 22, 2022 17:55


def get_nuclear_lines_database(
path="~/Downloads/tardisnuclear/decay_radiation.h5",
Copy link
Contributor

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

Copy link
Contributor Author

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="",
Copy link
Contributor

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?

Copy link
Contributor Author

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



def get_nuclear_lines_database(
path="~/Downloads/tardisnuclear/decay_radiation.h5",
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor Author

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.

@andrewfullard andrewfullard mentioned this pull request Aug 8, 2022
6 tasks
@andrewfullard andrewfullard changed the title Arbitrary isotope decay handling Arbitrary isotope decay handling and positronium Aug 10, 2022
@wkerzendorf wkerzendorf merged commit 5ad1cb3 into tardis-sn:master Sep 12, 2022
Nebular phase simulation automation moved this from In progress to Done Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

4 participants