spacetelescope / jdaviz

JWST astronomical data analysis tools in the Jupyter platform
https://jdaviz.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
142 stars 74 forks source link

[FEAT] Hide the pixel area options in aperture photometry if not applicable #2549

Open eteq opened 1 year ago

eteq commented 1 year ago

Jdaviz component

Imviz

What is the problem this feature will solve?

The aperture photometry plugin (in batch or single mode) has a "Pixel area" option with the caption ""Pixel area in arcsec squared, only used if sr in data unit"". That's a bit distracting in the common case where sr are not in the data units.

Describe the desired outcome

This could be a toggle instead of an option that is mandatory but only sometimes used. It should be off by default unless the data units definitely have solid angle in them (becaues BUNIT is defined or whatever), which can be easily checked by looking at the physical_type of the units.

Additional context

🐱

pllim commented 1 year ago

Hiding this requires exposing that value as a traitlet on the JS side but doable.