-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
V inner formal integral #2800
V inner formal integral #2800
Conversation
Solvers pass info to each other Simplified some parts
Also adds docstrings to methods. Updates some methods to use new functionality of the plasma. Adds requirements for the convergence plots (still broken)
…wfullard/tardis into v_inner_solver_restructure
c = const.c.cgs.value | ||
kb = const.k_B.cgs.value | ||
|
||
def B(nu, T): |
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.
Probably we can import the blackbody function from somewhere else in tardis.
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 agree with the comments on this function, but it is something that is out of scope of this PR to improve
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.
Okay, but can we at least name it blackbody or something something that is more pep8 compliant than just a single capitalized letter? (Along with U below)
tardis/workflows/v_inner_solver.py
Outdated
|
||
return estimates | ||
|
||
def reproject(self, a1, m1, a2, m2): |
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 sure if this is would be used elsewhere, but it seems like quite a generic function to live in this class. Maybe this should live in util.py?
Also, a1, m1, a2, and m2 could be a little more explicit. Just named "array1" and "mask1".
Co-authored-by: Jing Lu <48139543+DeerWhale@users.noreply.github.com>
)[self.mean_optical_depth] | ||
) | ||
|
||
interpolator = interp1d( |
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 think scipy's interp1d is deprecated. If we're just doing 1d interpolation, we could use numpy's np.interp instead.
📝
Fixes the formal integral to handle changes in geometry
Type: 🪲
bugfix
When the formal integral is run with the v_inner solver, if the final active geometry state is different than that of the initial geometry mismatches in plasma and opacity quantities occur. This PR rectifies this by slicing these arrays to the correct size
Depends on PR #2797
🚦 Testing
How did you test these changes?
CUDA version of the formal integral was tested locally
☑️ Checklist
build_docs
label