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
Opacities Refactor #2609
base: master
Are you sure you want to change the base?
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
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
) | ||
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?
self.macro_block_references = macro_block_references | ||
self.transition_type = transition_type | ||
|
||
# Destination level is not needed and/or generated for downbranch |
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.
Good reason to split this up! Aside from all the other reasons.
time_explosion, | ||
stimulated_emission_factor, | ||
): | ||
return calculate_sobolev_line_opacity( |
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.
Again, this may as well be a method, right?
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.
ultimately this will be restructured completely in the future but for now I'm just carving parts for the plasma
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.
@jvshields requested that I put this back into its original form and that this PR is only a restructure.
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 the build log. |
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