Skip to content

Commit

Permalink
Merge branch 'main' into cubeviz-spec-extract-through-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed May 7, 2024
2 parents ae2e81e + 5cbbdae commit a2fa931
Show file tree
Hide file tree
Showing 19 changed files with 549 additions and 166 deletions.
87 changes: 70 additions & 17 deletions .github/workflows/standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,79 @@ on:
tags:
- 'v*'
workflow_dispatch:
pull_request:

defaults:
run:
shell: bash {0}

jobs:
build_binary:
build_binary_not_osx:
runs-on: ${{ matrix.os }}-latest
if: (github.repository == 'spacetelescope/jdaviz' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Build standalone')))
strategy:
matrix:
os: [ubuntu, windows, macos]
os: [ubuntu, windows]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install jdaviz
run: pip install .[test]

- name: Install pyinstaller
run: pip install pyinstaller==6.6

- name: Create standalone binary
env:
DEVELOPER_ID_APPLICATION: ${{ secrets.DEVELOPER_ID_APPLICATION }}
run: (cd standalone; pyinstaller ./jdaviz.spec)

- name: Run jdaviz cmd in background
run: ./standalone/dist/jdaviz/jdaviz-cli imviz&

- name: Install playwright
run: (pip install playwright; playwright install chromium)

- name: Install pytest
run: pip install pytest-playwright

- name: Wait for Voila to get online
uses: ifaxity/wait-on-action@a7d13170ec542bdca4ef8ac4b15e9c6aa00a6866 # v1.2.1
with:
resource: tcp:8866
timeout: 60000

- name: Test standalone
run: (cd standalone; touch pytest.ini; JUPYTER_PLATFORM_DIRS=1 pytest test_standalone.py --video=on)

- name: Upload Test artifacts
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v3
with:
name: test-results-${{ matrix.os }}
path: standalone/test-results

- name: Upload jdaviz standalone (non-OSX)
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v3
with:
name: jdaviz-standlone-${{ matrix.os }}
path: |
standalone/dist/jdaviz
# Do not want to deal with OSX certs in pull request builds.
build_binary_osx:
runs-on: ${{ matrix.os }}-latest
if: (github.repository == 'spacetelescope/jdaviz' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch'))
strategy:
matrix:
os: [macos]
steps:
# osx signing based on https://melatonin.dev/blog/how-to-code-sign-and-notarize-macos-audio-plugins-in-ci/
- name: Import Certificates (macOS)
Expand All @@ -27,19 +89,20 @@ jobs:
with:
p12-file-base64: ${{ secrets.DEV_ID_APP_CERT }}
p12-password: ${{ secrets.DEV_ID_APP_PASSWORD }}

- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install jdaviz
run: pip install .[test]

- name: Install pyinstaller
run: pip install pyinstaller==5.11
run: pip install pyinstaller==6.6

- name: Create standalone binary
env:
Expand All @@ -59,6 +122,8 @@ jobs:
rm -rf standalone/dist/jdaviz.app/Contents/Resources/skimage/.dylibs
rm -rf standalone/dist/jdaviz.app/Contents/MacOS/shapely/.dylibs
rm -rf standalone/dist/jdaviz.app/Contents/Resources/shapely/.dylibs
rm -rf standalone/dist/jdaviz.app/Contents/MacOS/scipy/.dylibs
rm -rf standalone/dist/jdaviz.app/Contents/Resources/scipy/.dylibs
- name: Codesign (OSX)
if: ${{ matrix.os == 'macos' }}
Expand Down Expand Up @@ -101,18 +166,14 @@ jobs:
if: ${{ matrix.os == 'macos' }}
run: ./standalone/dist/jdaviz.app/Contents/MacOS/jdaviz-cli imviz&

- name: Run jdaviz cmd in background
if: ${{ matrix.os != 'macos' }}
run: ./standalone/dist/jdaviz/jdaviz-cli imviz&

- name: Install playwright
run: (pip install playwright; playwright install chromium)

- name: Install pytest
run: pip install pytest-playwright

- name: Wait for Voila to get online
uses: ifaxity/wait-on-action@df89d0cf8089bb0c38e25279c74848ef313da53b # v1.2.0
uses: ifaxity/wait-on-action@a7d13170ec542bdca4ef8ac4b15e9c6aa00a6866 # v1.2.1
with:
resource: tcp:8866
timeout: 60000
Expand All @@ -127,14 +188,6 @@ jobs:
name: test-results-${{ matrix.os }}
path: standalone/test-results

- name: Upload jdaviz standalone (non-OSX)
if: ${{ always() && (matrix.os != 'macos') }}
uses: actions/upload-artifact@v3
with:
name: jdaviz-standlone-${{ matrix.os }}
path: |
standalone/dist/jdaviz
- name: Upload jdaviz standalone (OSX)
if: ${{ always() && (matrix.os == 'macos') }}
uses: actions/upload-artifact@v3
Expand Down
137 changes: 114 additions & 23 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
3.10 (unreleased)
=================
4.0 (unreleased)
================

New Features
------------

- The filename entry in the export plugin is now automatically populated based on the selection. [#2824]

- Adding Data Quality plugin for Imviz and Cubeviz. [#2767, #2817, #2844]

- Enable exporting spectral regions to ECSV files readable by ``astropy.table.QTable`` or
``specutils.SpectralRegion`` [#2843]
- Adding flux/surface brightness translation and surface brightness
unit conversion in Cubeviz and Specviz. [#2781]

Cubeviz
^^^^^^^

- Enable spectral unit conversion in cubeviz. [#2758, #2803]

- Enable spectral extraction for composite subsets. [#2837]

Imviz
^^^^^

Expand All @@ -36,9 +28,6 @@ API Changes
Cubeviz
^^^^^^^

- ERROR and DATA_QUALITY extension names are now recognized as
uncertainty and mask, respectively. [#2840]

Imviz
^^^^^

Expand Down Expand Up @@ -69,27 +58,77 @@ Specviz
Specviz2d
^^^^^^^^^

- Loading a specific extension with ``ext`` keyword no longer crashes. [#2830]

Other Changes and Additions
---------------------------

- Bump required Python version to 3.10. [#2757]
3.11 (unreleased)
=================

- Line menu in Redshift from Centroid section of Line Analysis now shows values in current units. [#2816, #2831]
New Features
------------

- Bump required specutils version to 1.15. [#2843]
Cubeviz
^^^^^^^

3.9.2 (unreleased)
==================
Imviz
^^^^^

Mosviz
^^^^^^

Specviz
^^^^^^^

Specviz2d
^^^^^^^^^

API Changes
-----------

Cubeviz
^^^^^^^

Imviz
^^^^^

Mosviz
^^^^^^

Specviz
^^^^^^^

Specviz2d
^^^^^^^^^

Bug Fixes
---------

Cubeviz
^^^^^^^

- Re-enable support for exporting spectrum-viewer. [#2825]
Imviz
^^^^^

Mosviz
^^^^^^

Specviz
^^^^^^^

Specviz2d
^^^^^^^^^

Other Changes and Additions
---------------------------

3.10.1 (unreleased)
===================

Bug Fixes
---------

Cubeviz
^^^^^^^

Imviz
^^^^^
Expand All @@ -103,6 +142,58 @@ Specviz
Specviz2d
^^^^^^^^^

3.10 (2024-05-03)
=================

New Features
------------

- The filename entry in the export plugin is now automatically populated based on the selection. [#2824]

- Adding Data Quality plugin for Imviz and Cubeviz. [#2767, #2817, #2844]

- Enable exporting spectral regions to ECSV files readable by ``astropy.table.QTable`` or
``specutils.SpectralRegion`` [#2843]

Cubeviz
^^^^^^^

- Enable spectral unit conversion in cubeviz. [#2758, #2803]

- Enable spectral extraction for composite subsets. [#2837]

API Changes
-----------

Cubeviz
^^^^^^^

- ERROR and DATA_QUALITY extension names are now recognized as
uncertainty and mask, respectively. [#2840]

Bug Fixes
---------

Cubeviz
^^^^^^^

- Re-enable support for exporting spectrum-viewer. [#2825]


Specviz2d
^^^^^^^^^

- Loading a specific extension with ``ext`` keyword no longer crashes. [#2830]

Other Changes and Additions
---------------------------

- Bump required Python version to 3.10. [#2757]

- Line menu in Redshift from Centroid section of Line Analysis now shows values in current units. [#2816, #2831]

- Bump required specutils version to 1.15. [#2843]

3.9.1 (2024-04-19)
==================

Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ authors:
- family-names: "Volfman"
given-names: "Sabrina"
title: "Jdaviz"
version: 3.9.1
version: 3.10
doi: https://doi.org/10.5281/zenodo.5513927
date-released: 2024-04-19
date-released: 2024-05-03
url: "https://github.com/spacetelescope/jdaviz"

# see a full list of contributors here: https://github.com/spacetelescope/jdaviz/graphs/contributors
Binary file removed docs/img/slit_overlay.png
Binary file not shown.
3 changes: 0 additions & 3 deletions docs/mosviz/displayspectra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ Synchronous Spectral Pan/Zoom
-----------------------------
Mosviz assumes the 1D and 2D spectra objects share a relationship in spectral space. As a result, the 1D and 2D spectral viewers have their spectral axes (the horizontal x-axis) linked. As you pan and zoom in spectral space (horizontally) in either of the two spectral viewers, the other will follow, simultaneously panning and zooming by the same amounts.

.. warning::
If you pan too far away from the bounds of the dataset provided in the 1D or 2D spectral viewers, a warning will be displayed to notify the user. If you go too far, there is a risk of desynchronizing the two viewers.

Defining Spectral Regions
=========================

Expand Down
Binary file modified docs/mosviz/img/mosviz_ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 4 additions & 7 deletions docs/mosviz/navigation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,16 @@ Clicking on a row in the table viewer populates the other viewers with the data
corresponding to that row. Note that the checkbox at the far left of the row does
not need to be checked to display the data - that checkbox is related to selecting
subsets of rows. By default, 10 rows are shown at a time but this can be changed
with the selector at the bottom right of the table viewer. To the right of the
with the selector at the bottom right of the table viewer. To the right of the
rows-per-page selector are left and right arrows that are used to move between
pages of the table, if there is more data than fits on a single page.
pages of the table, if there is more data than fits on a single page.


.. _slit-overlay:

Using the Slit Overlay
======================

Currently, the option to overlay slit geometry is enabled by default if the
Currently, the option to overlay slit geometry is enabled by default if the
required information is present. The option to toggle whether slits are displayed
is located in the top right tool menu under the "Slit Overlay" heading, as seen
in the screenshot below.

.. image:: ../img/slit_overlay.png
is located in the top right tool menu under the "Slit Overlay" heading.
8 changes: 4 additions & 4 deletions docs/mosviz/notebook.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _mosviz-notebook:

***********************************
Using Mosviz in a Jupyter Notebook
***********************************
***************************
Exporting data from Mosviz
***************************

To initialize an instance of the Mosviz app in a Jupyter notebook, simply run
the following code in a cell of the notebook:
Expand All @@ -13,7 +13,7 @@ the following code in a cell of the notebook:
mosviz = Mosviz()
mosviz.show()
After running the code above, you can interact with the Mosviz application from
After running the code above, you can interact with the Mosviz application from
subsequent notebook cells via the API methods attached to the
:class:`~jdaviz.configs.mosviz.helper.Mosviz` object,
for example loading data into the app as described in :ref:`mosviz-import-api`.
Expand Down
Loading

0 comments on commit a2fa931

Please sign in to comment.