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
[bugfix] fix light cone projections with weight fields #37
Conversation
Codecov Report
@@ Coverage Diff @@
## master #37 +/- ##
==========================================
+ Coverage 63.46% 65.36% +1.89%
==========================================
Files 24 24
Lines 1270 1305 +35
==========================================
+ Hits 806 853 +47
+ Misses 464 452 -12
Continue to review full report at Codecov.
|
@@ -335,14 +335,9 @@ def project_light_cone(self, field_of_view, image_resolution, field, | |||
pixel_area = (proper_box_size.in_cgs() / pixels)**2 #in proper cm^2 | |||
factor = pixel_area / (4.0 * np.pi * dL.in_cgs()**2) | |||
mylog.info("Distance to slice = %s" % dL) | |||
frb[field] *= factor #in erg/s/cm^2/Hz on observer"s image plane. | |||
frb['field'] *= factor #in erg/s/cm^2/Hz on observer"s image plane. |
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.
As long as you're changing this line, there is a double quote where a single would do
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.
Oh yeah, that's probably been there forever!
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.
Thanks for the new tests, LGTM!
This resolves Issue #36. There were a few places with improper handling of the projected weight field. The behavior of the code suggests that some functionality was not updated for changes to projections, so this has likely been broken for quite some time. I'll let the test suite run and then add a new test.