-
Notifications
You must be signed in to change notification settings - Fork 65
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
Handling larger range for BUNIT conversions #700
Handling larger range for BUNIT conversions #700
Conversation
Codecov Report
@@ Coverage Diff @@
## master #700 +/- ##
=========================================
Coverage ? 77.66%
=========================================
Files ? 24
Lines ? 5579
Branches ? 0
=========================================
Hits ? 4333
Misses ? 1246
Partials ? 0 Continue to review full report at Codecov.
|
All brightness unit conversions should be handled and tested now. Integrated units like |
42786d8
to
a27f2f4
Compare
Codecov Report
@@ Coverage Diff @@
## master #700 +/- ##
==========================================
- Coverage 80.30% 76.62% -3.69%
==========================================
Files 24 24
Lines 5551 5475 -76
==========================================
- Hits 4458 4195 -263
- Misses 1093 1280 +187
Continue to review full report at Codecov.
|
@astrofrog @keflavich -- This is ready to review for BUNIT conversions. Composite unit conversions like |
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.
Only nitpicks.
Per our discussion, don't merge until #709 is solved
def pixels_per_beam(self): | ||
pixels_per_beam = [(beam.sr / | ||
(astropy.wcs.utils.proj_plane_pixel_area(self.wcs) * | ||
u.deg**2)).to(u.one).value for beam in self.beams] |
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.
WHOA, I didn't know u.one
is u.dimensionless
! neat!
…dled for all cases
Co-authored-by: Adam Ginsburg <[email protected]>
b658365
to
30de78e
Compare
Tests passing now that #709 is merged. The remaining failures for the windows build are from a yt issue. |
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.
Can we add at least one specific by-hand correctness check?
This is to address #683. There are a number of fairly common unit transitions that we've been missing. We also have some gaps for different objects that can be addressed here (e.g., 2D Projection or Slice).
SpectralCube
VaryingResolutionSpectralCube
Projection
/Slice
[ ] km/s <-> m/s (centroid/line width)(Unsure why I added this. It's a basic transform that already works.)OneDSpectrum
VaryingResolutionOneDSpectrum