-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
[Restructure/plasma] Initial Opacities Refactor #2609
[Restructure/plasma] Initial Opacities Refactor #2609
Conversation
2fbdbc1
to
e804942
Compare
…ace.py, transport_montecarlo_numba_interface.py, conftest.py, formal_integral.py, base.py, and macro_atom.py
tardis/opacities/macro_atom/base.py
Outdated
transition_type = macro_atom_data.transition_type.values | ||
lines_idx = macro_atom_data.lines_idx.values | ||
tpos = macro_atom_data.transition_probability.values | ||
util.calculate_transition_probabilities( |
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.
I really don't like having two functions with identical names here, especially if one is in util
of all places. But I'm not sure if this is your change or not.
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.
still draft I think
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.
not my change - but I'll have a look
tardis/opacities/macro_atom/base.py
Outdated
) | ||
return transition_probabilities | ||
|
||
def _normalize_transition_probabilities(self, transition_probabilities): |
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.
This is better duplication since it is underscored. But why is it in util?
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.
I don't think it is in util. Can yiu check. I think it doesn't work but is never tested.
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.
On master
it points at macro_atom
but the function is not defined or used anywhere. So you could just delete it.
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.
remove
docstrings? |
Would be nice for the refactor pr to be separate from the functional code change pr. |
*beep* *bop* Hi, human. The Click here to see your results. |
@andrewfullard - I believe this is based on the transport refactor, right? |
run black on file |
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.
Add docstrings, check constant usage, run black, make issue re: opacitystate
I think resolved. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2609 +/- ##
==========================================
- Coverage 67.89% 67.80% -0.10%
==========================================
Files 174 177 +3
Lines 14439 14534 +95
==========================================
+ Hits 9804 9855 +51
- Misses 4635 4679 +44 ☔ View full report in Codecov by Sentry. |
linelist with 29k lines and 10 shells is slower by a factor of 3 in the new implementation (but I think this is shrinking with more lines; used to be a factor >5 for 247 lines).
Function took 0.001744791865348816 seconds to run
Function took 0.0059948337730020285 seconds to run