spacetelescope / jdat_notebooks

JWST Data Analysis Tools Notebooks
https://spacetelescope.github.io/jdat_notebooks/
98 stars 80 forks source link

Update notebooks to remove deprecated methods #192

Closed rosteen closed 6 months ago

rosteen commented 7 months ago

Recent Jdaviz releases have deprecated (and finally removed) the app.get_data_from_viewer, app.get_subsets_from_viewer, and specviz.load_spectrum methods. This PR updates affected notebooks accordingly. I tagged a few relevant folks as reviewers, wasn't sure who all would want to see this.

review-notebook-app[bot] commented 7 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

kecnry commented 7 months ago

print(cubeviz.app.data_collection)

I wonder if we need something more user-friendly at the helper level for this case (exploring what data exists in the app, rather than just extracting data where you already know the label, etc)? With what exists now, this probably makes sense for the notebook, though.

rosteen commented 7 months ago

The notebook execution failures are due to needing UI interactions to define subsets before running those notebook cells, I assume those tests have never passed. And the pep8 failures appear unrelated to my changes.

camipacifici commented 7 months ago

The ifu_optimal notebook is in another PR with edits from Patrick. Maybe Ricky's changes have already been addressed in Patrick's PR.

rosteen commented 6 months ago

@haticekaratay I fixed the conflicts with main, I think this is good to go now. I left in two updates to Patrick's IFU notebook to better use current API methods.