Skip to content

Fix wcs loading#30

Closed
cshanahan1 wants to merge 1245 commits into
javerbukh:mainfrom
cshanahan1:fix_wcs_loading
Closed

Fix wcs loading#30
cshanahan1 wants to merge 1245 commits into
javerbukh:mainfrom
cshanahan1:fix_wcs_loading

Conversation

@cshanahan1

Copy link
Copy Markdown

Fix to make sure that fits files that have ASDF extensions are properly using the GWCS for data.coords, rather than creating a FITS WCS from the header.

kecnry and others added 30 commits December 20, 2024 14:41
* remove call to reset limits during unit conversion
* custom logic for mapping y-limits on unit change
* remove delay_callback

---------

Co-authored-by: gibsongreen <gibsongreen99@outlook.com>
* logic to connect visibilities of child/parent layers from data-menu
* test coverage
spacetelescope#3369)

* expose zoom_to_selected in catalogs plugin api

* kyle comments
* switch order of setting ymin and ymax

* change log

* .

* remove test because it requires image to be rendered
* TST: Add Linux job to use Python 3.13

Ignore DeprecationWarning from ipykernel.

* TST: Use Python 3.13 on devdeps
* adding check for subset name

* Create list of reserved labels at app level to check against

* Force labels to strings now so don't need None

* Move validation function, minimize layer reprocessing, start adding to subset_tools

* Warn if label is not alphanumberic, adding code from spacetelescope#1291

Co-authored-by: Kyle Conroy <kyleconroy@gmail.com>

* Add SubsetRenameMessage

* Update all SubsetSelects in plugins when subset is renamed.

* allow plugin components to call `send_state`

not needed anywhere yet

* Working on updating subset items in LayerSelect on rename, buggy right now

* Add passing test, refactor app.get_subsets for better efficiency in single subset case

* Add changelog

* Remove leftover lower() from rebase

* Fix tests

* Remove debugging prints

* Add docstrings, remove kwarg that isn't relevant to users

* Don't allow renaming to Subset N

* Raise instead of error, add test

* Remove debugging prints

* Raise error if trying to rename a subset that doesn't exist

* Remove prints

* codesty.e

* Don't check for hardcoded 'Subset' in label

* Fix failing test

* Fix check to be more general

* Move changelog entry

* Restore updated subset to layer select menus with icon

* Don't duplicate renamed subset in export plugin

* Update extracted spectrum data collection item as well

Update extracted spectrum data collection item as well

* Update old data menu items

* Address review comments

* Codestyle

* Check old label

* Add simple test

* Test rename_selected

* Codestyle

* Cover another case

* Add methods to class docstring

---------

Co-authored-by: Clare Shanahan <cshanahan@stsci.edu>
Co-authored-by: Kyle Conroy <kyleconroy@gmail.com>
* BUG: Also check for inf in spaxel tool
when setting new Y limits

* Add change log

* BUG: Avoid INF in MANGA IVAR uncert
…pacetelescope#3373)

* stylized label: exclude subset on wcs-only layer
* fallback when zorder is None
MNT: Compatibility with astropy v7.1
… Clear Table functionality (spacetelescope#3359)

* Add functionality to load catalogs from a file

* Fix table and viewer clearing functionality

* Remove redundant 'Clear' button and combine its functionality with 'Clear Table' for intuitive behavior

* Codestyle

* Add change log

* Update tests

* Fix failing test

* Fix the test, ensuring to first select a row before zooming in.

* Update change log

* Preserve the unit when serializing

* Generate default Object IDs when label column is missing

* Update docs related to label column in catalogs

* Update tests after merge

* Update test

* Move changelog to correct milestone

* Adjust test assertions

* Add test for loading catalogs with additional columns

* Update change log

* Update based on feedback

* Apply suggestions from code review

Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>

* Update CHANGES.rst

Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>

* Adjust test tolerance

---------

Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
* replace old data-menu with new data-menu
* fix icon for layers beyond "Z"
* remove tests for old data-menu
* update tests
* docs updates
* support disabling layer multiselect from API
* (temporary) ability to open data-menu from old button
* row select

* .

* move to mixin

* deselect all

* .

* deselect_all to select_none

* .
…ope#3385)

* orientation: remove deprecated link_type, wcs_use_affine
* update notebooks/docs
* data-menu: handle viewer rename properly
* user-api method/attr filtering in plugin tray
* changelog entry
* force expansion arrow to stay near top
* Add refresh button which updates sound device list

* Update changelog
* support composite specctral regions, and ensure spectral regions are up-to-date n render

* sonification plugin options: rearrange, label, defaults.

* git push cleanup

* update max adio freq default

* make some of the advanced options inaccessible, add some better functionality for flux %ile removal

* take out tqdm loop

* strip out unused wl bounds parameters,

* update CHANGES

* Update jdaviz/configs/cubeviz/plugins/viewers.py with unit conversion formatting

Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>

* Update jdaviz/configs/cubeviz/plugins/viewers.py with unit conversion formatting

Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>

* format and explain RE @pllim suggestions

* pep8 formatting

* Update CHANGES.rst

Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>

* Update CHANGES.rst

Co-authored-by: Jesse Averbukh <javerbukh@gmail.com>

* Remove whitespace

---------

Co-authored-by: James Trayford <j.w.trayford@port.ac.uk>
Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
Co-authored-by: Jesse Averbukh <javerbukh@gmail.com>
)

* feat: add --browser=qt to use an embedded browser instead of system one

This also restore the --browser feature that was previously broken.

* feat: use embedded qt browser for jdaviz standalone

* support ipypopout and give instructions what to install

* ci: pin os versions for building standalone

* fix: hook for dask, which needs jinja templates to be included

* ci: ignore qt module

* fix: exit solara after last kernel closed more reliably
…telescope#3391)

* fix: DataMenu keeps scrolling in view after app is out of view
Also update tests and sort some imports.

Replaced a couple of accidental deprecated usage internally.

Handle those warnings everywhere else.
* allow toggling add/remove/rename support
* allow renaming subsets from subset tools plugin dropdown
* catch errors and raise snackbar
javerbukh and others added 19 commits July 11, 2025 14:38
* ignore deprecation warning from astropy via spectral-cube (spacetelescope#3683)

* feat: allow exporting of figures in a custom resolution (spacetelescope#3478)


Co-authored-by: Kyle Conroy <kyleconroy@gmail.com>

* loaders: use filename/URL as default label (spacetelescope#3684)

* expose proposed data_label to user

* allow passing extension through load

* simplify repr of importers for debugging

* import button enabled for all BUT listed configs

* clearer as we extend support for loaders, but also will enable for lcviz
* deprecates import button for imviz

* codestyle

* pass extension through _load

* hdu2data to not return data

* load_data: support list of filenames

* allow defaulting to have extension for data without extension

* strip out repeated data_label logic

* load_data: backwards compatibility for appending [DATA]

* orientation: bypass load_data

* load_data: backwards compatibility for appending extension to ImageHDU

* loaders: use filename/URL as default label (spacetelescope#3684)

* update to use filename as default prefix

* handle appending "extensions" for NDData

* fix HDUList case when providing data_label through load_data

* bypass NDData extension logic if coming from plugin (incl orientation)

* Revert "orientation: bypass load_data"

This reverts commit 2b49a73.

* fix tests

* maintain .reg support through load_data

* Specutils 2 compatibility (spacetelescope#2922)

* Remove jwst s3d parser now that it can be handled by Spectrum1D

* Update Jdaviz for specutils 2 compatibility

Fix coords mouseover when SkyCoord is before SpectralCoord

More debugging

Fix slice with different spectral_axis_index, add specutils_format kwarg to cubeviz parser

Remove unused import

Remove ESA parser from commissioning [skip ci]

Generalizing coords_info to handle spectral axis first or last [ci skip]

Working on debugging aperture photometry

Need to pull meta from data not comp

Fix aperture photometry and wrong coord order in coords_info

Fix codestyle, delete defunct case in parser

Change Spectrum1D to Spectrum

Change class name in recent code additions

Get spectral extraction working again for cylinder case

Debugging wavelength dependent case

Make sure spectral extraction result is linked when added to data collection

Moved fix to correct place

Fix indents

Remove stray code from rebase

Update missed Spectrum1D

Debugging cubeviz parser

First start on fixing testt

Fix bad rebase in spectral extraction

Starting to work through test failures

Working through test failures

Debugging spectral extraction

Fixing errors after rebase to  main

Finish fixing codestyle, probably still need functional fixes

Replace new occurances of Spectrum1D with Spectrum

Missed committing a file

(re-) fix spectral extraction

Handle checking GWCS for spectral subset, fix codestyle

More debugging

More debugging

Remove parent data label code reintroduced by rebase

* Update newer instances of Spectrum1D

* Working on resolving test failures

Trying to fix slicing

Add keyword in velocity calculation

Fix spectral extraction for arrays

Update collapse

Debugging moment maps

* Fix bugs revealed by CI and update tests with new values where needed

More debugging

Debugging cube model fitting

Fixing more tests

Debugging spectral extraction and collapse

Keep metadata in return_spectrum_with_correct_units

Update gaussian smooth tests

Take correct slice index in coords info

Look for SpectralGWCS for linking as well as SpectralCoordinate

More debugging

Fix spectrum-at-spaxel for spectral-first cubes, linking for plugin generated cubes

Fix model initialization and subset application for non-last spectral axis

Link moment maps to correct cube components

Update moment map test

Remove debugging prints

Update test value

Remove debugging prints

* Missed a couple codestyle things and Spectrum1D instances

Fix moment map test

* Fix remaining Spectrum1D instances

Codestyle

* Trying to fix tests related to this fixture

* Update test values here as well for fixed test fixture

* Changelog and updated specutils pin to use 2.0 RC

* Update test values for fixed test fixture

Codestyle

* Add missing spectral_axis_index to this case

* Temporarily pin glue-astronomy PR in dependencies

Also pin dev specreduce for now, for CI

Try this again...

Same thing for glue-astronomy

* Rename Spectrum1D instances after rebase to main

* Remove new Spectrum1D usage

* Glue-astronomy PR has been merged, pin to main

* Revert specutils intersphinx mapping to stable

* Fix cross dispersion profile wav calculation with specutils 2

* Update pins, fix aperture mask, update docs links

Update specutils documentation links

Fix specreduce pin

* Fix moment map coordinate handling for GWCS, slice check for data ndim=1

Fix another remote data test

* Remove duplicate line

* Generalize generate_spaxels

* Getting sonification working with specutils 2 and multiprocessing

More work on cube listener

Move wcs code to where it's actually used for readability

Still trying to get sonification working, wrong pixel axes are getting linked in external_links

Codestyle

Get percentile along correct axis for sonification

Link sonified data properly, fix expand_di axis

Missed this Spectrum1D

Got sonification working

Fix failing testtest

* Codestyle, debugging tests, addressing review comments

Fixing spectrum2d loader

Ignore warning in this test

Move time information to snackbar output

Revert check on len(subset_region)

* Fix two minor rebase problems

* Update jdaviz/configs/cubeviz/plugins/viewers.py

Co-authored-by: Kyle Conroy <kyleconroy@gmail.com>

* Apply suggestions from code review

Co-authored-by: Kyle Conroy <kyleconroy@gmail.com>

* Handle case where meta doesn't have spectral_axis_index

* Update jdaviz/configs/imviz/plugins/aper_phot_simple/aper_phot_simple.py

Co-authored-by: Kyle Conroy <kyleconroy@gmail.com>

* Ignore new FitsFixed warning

* Debugging failing test

* Fix failing spectrum2d test

* Make this more robust

---------

Co-authored-by: Kyle Conroy <kyleconroy@gmail.com>

* allow API access to imviz.loaders

* nddata without meta

* for HDUList, always append extension to user-passed data_label

---------

Co-authored-by: Maarten Breddels <maartenbreddels@gmail.com>
Co-authored-by: Ricky O'Steen <39831871+rosteen@users.noreply.github.com>
* delete redundant data label prefix logic

* avoid double extension

* further simplification

* fix parent logic

* temporary workaround for ImageHDU
@cshanahan1

Copy link
Copy Markdown
Author

whoops wrong target branch

@cshanahan1 cshanahan1 closed this Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.