Closed gibsongreen closed 1 month ago
Attention: Patch coverage is 91.66667%
with 6 lines
in your changes missing coverage. Please review.
Project coverage is 88.81%. Comparing base (
3976983
) to head (d3ec377
). Report is 1 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
jdaviz/utils.py | 90.19% | 5 Missing :warning: |
...specviz/plugins/unit_conversion/unit_conversion.py | 85.71% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Patch coverage is only 67.64%. Any chance you can increase that?
Patch coverage is only 67.64%. Any chance you can increase that?
I see it at 79.62...would still be nice to increase it a bit if possible.
I changed the term 'untranslatable' to 'transitive' for those specific units since they now are translatable. I was also thinking 'indirect', but if there are any other suggestions I can update the name
How is the drop-down order controlled? Jy and MJy is at the top, and the list is not completely alphabetical order, yet two other Jy prefixes are scattered as such:
Should they be grouped together at the top? If so, is it in scope here or a separate ticket?
Spectral extraction failed when I tried to grab "mean" instead of "sum". Is fixing this in scope here?
Spectral extraction failed when I tried to grab "mean" instead of "sum". Is fixing this in scope here?
I reproduced and believe I know what the issue is, the spectra if you use min/max/mean are in Surface Brightness units and there needs to be an extra case in _indirect_conversions to handle going from A->D (just as it is done in the image-viewers) and not just A->C.
How is the drop-down order controlled? Jy and MJy is at the top, and the list is not completely alphabetical order, yet two other Jy prefixes are scattered as such:
Should they be grouped together at the top? If so, is it in scope here or a separate ticket?
This will also have to be done for the Spectral Unit and the Angle Unit (when fully populated) drop downs. Is the preference here alphabetical order or groupings of units with the same numerator base?
Hmm looks like there are merge conflicts now, so needs a rebase too.
Is the preference here alphabetical order or groupings of units with the same numerator base?
Personally, I prefer logical grouping but I cannot speak for everyone.
Can ordering/grouping be a follow-up (and probably not necessary for 4.0)?
Spectral extraction failed when I tried to grab "mean" instead of "sum". Is fixing this in scope here?
I reproduced and believe I know what the issue is, the spectra if you use min/max/mean are in Surface Brightness units and there needs to be an extra case in _indirect_conversions to handle going from A->D (just as it is done in the image-viewers) and not just A->C.
Took me a bit but I realized since I split the _indirect_conversion
into its own function and I was updating orig_units
in the new function but that wasn't getting updated in flux_conversion
, with that now updating spectral extraction should be working now!
Description
This pull request is to address implementing a solution to handle units that cannot be translated using the MJy <-> MJy / sr custom equivalency (and subsequent surface brightness conversions between these units). The following units are able to be converted between flux units and other flux units, but issues specifically arise in translations and in surface brightness to surface brightness conversions. Custom equivalencies have been added in this PR that enable conversions and translations to solve this issue, and they work in a notebook cell setting. However, attempting to utilize this solution in Cubeviz UI causes tracebacks. It is likely due to the native units from the data collection. The native units will be used for the Spectrum1D object used in
flux_conversion
, and the native unit will also be used as either theoriginal_unit
or thetarget_unit
(see jdaviz/utils.py). Translation(s) and/or conversion(s) needs to take place before the next translation/conversion occurs.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.