-
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
Flux conservation when smoothing in units of Jy/beam #673
Comments
You can also check by converting your results to Kelvin. They should be correct - but they won't be the same in general, since you're averaging regions of different surface brightness. |
Ash is right here, actually - we are keeping the cube in units of the original beam; if we update the beam (and we should), we should also be scaling up the flux unit. This behavior is unique to Jy/beam scaling - for Jy/sr and Kelvin, the behavior is correct. But for Jy/beam, the |
@e-koch you want to look into tackling this? We need to special-case the |
@keflavich Will do! |
This issue goes a bit deeper: we don't have built in conversion handling for other surface brightness units either (e.g. Jy/beam -> Jy/sr). We can pass equivalencies for simple conversions (https://docs.astropy.org/en/stable/api/astropy.units.equivalencies.beam_angular_area.html#astropy.units.equivalencies.beam_angular_area) but checks for changes in the spatial resolution aren't handled. See #683 |
List of operations where the unit change needs reflect the beam change:
Add if someone notices a missing operation from this list. |
re: reproject - yes, definitely needs jy/pix handling. re: spatial_smooth_median: this is an interesting one, as it's better characterized as a filter rather than a smooth operation, even though the effect is a smoother image. You're right, though, default should be to say "NO" and force the user to override it. |
@e-koch have you solved some or all of this now? |
Partially fixed in #700 to properly handle more BUNIT conversions. But I haven't fixed the Jy/beam conversions when the beam changes, yet. |
When spatially smoothing a cube in units of "Jy/beam", does spectral-spectral cube conserve flux?
e.g.
....SpectralCube with shape=(20, 512, 512) and unit=Jy / beam...
cubejy5 = cubejy.convolve_to(beam5)
spectral-spectral seems to treat
cubejy5
as though it was in units of K - i.e. not accounting for the 1/beam when smoothing. This then returns an erroneously low flux in the cube.The text was updated successfully, but these errors were encountered: