Open gibsongreen opened 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 88.82%. Comparing base (
f4a6889
) to head (1aa60fa
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks. Is there a way to test this in the CI, preferably without remote data?
Eventually we want a cube in counts
to be coerced into counts/pix**2
("surface brightness" units) and for SB<>flux to still work to toggle between counts/pix**2
and counts
. This is probably covered under @cshanahan1's current work, but its not clear to me how this PR fits into that (will it need to be reverted once coercing cubes from flux into SB is implemented?).
Eventually we want a cube in
counts
to be coerced intocounts/pix**2
("surface brightness" units) and for SB<>flux to still work to toggle betweencounts/pix**2
andcounts
. This is probably covered under @cshanahan1's current work, but its not clear to me how this PR fits into that (will it need to be reverted once coercing cubes from flux into SB is implemented?).
With that being said, the problem should likely go away when generalizing the angle unit is implemented (and this translation becomes possible). I imagine this PR is probably not merging given when we expect the following PR to be implemented, but if the problem still arises then, we have some investigation to completed as to why. Although, I do think a test for counts cubes like what @pllim was suggesting is a great idea.
I'm not sure if this is semantics or if there is a scientific value, but, what would the angle_unit.selected
be for a flux unit? Not that this is correct, right now I have a placeholder there that is 'pix' so the dropdown doesn't appear empty, and that there are angle_unit.choices
.
I'm not sure if this is semantics or if there is a scientific value, but, what would the angle_unit.selected be for a flux unit?
(Eventually) if a cube with units of counts
is imported into cubeviz, the parser should coerce that into counts/pix**2
, the flux dropdown would show counts
(and probably not have any other choices), the solid angle dropdown pix**2
(and probably not any other choices unless there is some information on the size of the pixel on the sky), and surface-brightness would then be computed as counts/pix**2
. The spectrum viewer, which defaults to function = 'sum'
would then integrate over counts/pix**2
cube, to show a spectrum in "flux" units of counts
, by default.
Description
On app startup, when a cube with u.count units is loaded into Cubeviz, the
flux_or_sb_selected
is set to 'Flux'. This would then trigger_on_flux_unit_changed()
, and enter the condition for translating. An additional condition has been added to ensure thatflux_or_sb_selected
can be set without entering the translator when the native units are in counts.Change log entry
CHANGES.rst
? If you want to avoid merge conflicts, list the proposed change log here for review and add toCHANGES.rst
before merge. If no, maintainer should add ano-changelog-entry-needed
label.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.