diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 2a55df6..0000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,15 +0,0 @@ - -Resolves [HLA-nnnn](https://jira.stsci.edu/browse/HLA-nnnn) - - -Closes # - - -This PR addresses ... - -**Checklist for maintainers** -- [ ] added entry in `CHANGELOG.rst` within the relevant release section -- [ ] updated or added relevant tests -- [ ] updated relevant documentation -- [ ] added relevant label(s) \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c11575..c83850c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,10 @@ jobs: python-version: '3.10' toxenv: py310 - - name: Python 3.11 + - name: Python 3.9 runs-on: ubuntu-latest - python-version: 3.11 - toxenv: py311 + python-version: 3.9 + toxenv: py39 - name: Python 3.12 runs-on: ubuntu-latest diff --git a/.github/workflows/weekly_cron.yml b/.github/workflows/weekly_cron.yml deleted file mode 100644 index 90a0ef3..0000000 --- a/.github/workflows/weekly_cron.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: CI - -on: - schedule: - # Weekly Monday 6AM build - - cron: "0 0 * * 1" - -jobs: - tox: - name: ${{ matrix.name }} - runs-on: ${{ matrix.runs-on }} - strategy: - fail-fast: false - matrix: - include: - - name: Python 3.10 - runs-on: ubuntu-latest - python-version: '3.10' - toxenv: py310 - - - name: Python 3.11 - runs-on: ubuntu-latest - python-version: 3.11 - toxenv: py312 - - - name: Python 3.12 - runs-on: ubuntu-latest - python-version: 3.12 - toxenv: py312 - - - name: Code style checks - runs-on: ubuntu-latest - python-version: 3.11 - toxenv: style - - - name: Python 3.11 with dev dependencies - runs-on: ubuntu-latest - python-version: 3.11 - toxenv: dev - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install tox - run: | - python -m pip install --upgrade pip - pip install tox - - name: Run tox - run: tox -e ${{ matrix.toxenv }} - - # Kept in a separate job because it needs extra system dependencies - # that can't be installed by tox. - build-docs: - name: Build documentation and check warnings - runs-on: ubuntu-latest - steps: - - name: Install system packages - run: | - sudo apt-get install graphviz texlive-latex-extra dvipng - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Python 3.11 - uses: actions/setup-python@v2 - with: - python-version: 3.11 - - name: Install tox - run: | - python -m pip install --upgrade pip - pip install tox - - name: Run tox - run: tox -e build-docs diff --git a/README.rst b/README.rst index 52d0a72..95f61c1 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ STWCS ----- -.. image:: https://github.com/spacetelescope/stwcs/workflows/CI/badge.svg +.. image:: https://github.com/spacetelescope/stwcs/actions/workflows/weekly_cron.yml/badge.svg :target: https://github.com/spacetelescope/stwcs/actions :alt: CI Status diff --git a/doc/source/fits_convention_tsr/source/sip.rst b/doc/source/fits_convention_tsr/source/sip.rst index c19d7e2..054c0fa 100644 --- a/doc/source/fits_convention_tsr/source/sip.rst +++ b/doc/source/fits_convention_tsr/source/sip.rst @@ -41,7 +41,7 @@ due to velocity aberration observed due to the motion of HST in orbit. The typi for HST cameras results in a measurable velocity aberration with variations from the center of the field of view to the edge on the order of 0.1 pixels. More details about this correction can be found in `Appendix A.3 of the DrizzlePac Handbook -`_. +`_. This scale factor gets computed by the HST ground systems for start of each exposure and recorded as the VAFACTOR keyword in each diff --git a/doc/source/hstwcs_ui.rst b/doc/source/hstwcs_ui.rst index f37282a..6eccb21 100644 --- a/doc/source/hstwcs_ui.rst +++ b/doc/source/hstwcs_ui.rst @@ -9,9 +9,13 @@ Create an HSTWCS Object -------------------------- - Create an HSTWCS object using a pyfits HDUList and an extension number - ``fobj = pyfits.open('some_file.fits')`` + ``from astropy.io import fits`` - ``w = wcsutil.HSTWCS(fobj, 3)`` + ``from stwcs import wcsutil`` + + ``hdu = fits.open('some_file.fits')`` + + ``w = wcsutil.HSTWCS(hdu, 3)`` - Create an HSTWCS object using a qualified file name. @@ -24,10 +28,6 @@ Create an HSTWCS Object - Create an HSTWCS object from WCS with key 'O'. ``w = wcsutil.HSTWCS('j9irw4b1q_flt.fits', ext=2, wcskey='O')`` - -- Create a template HSTWCS object for a DEFAULT object. - - ``w = wcsutil.HSTWCS(instrument='DEFAULT')`` ---------------------------------- Coordinate Transformation Examples @@ -50,9 +50,9 @@ of the first image pixel is (0,0). - Apply the entire detector to sky transformation at once: - ``outpix = w1.all_pix2world(inpix, 1)`` + ``outpix = w.all_pix2world(inpix, 1)`` - ``outpix = w1.all_pix2world(X, Y, 1)`` + ``outpix = w.all_pix2world(X, Y, 1)`` - The same transformation can be done in separate steps: @@ -76,6 +76,6 @@ of the first image pixel is (0,0). 5. Finally the transformation from undistorted to world coordinates is done by applying the linear WCS. - ``wpix = w.wcs_pix2sky(fpix, 1)`` + ``wpix = w.wcs_pix2world(fpix, 1)`` diff --git a/stwcs/updatewcs/utils.py b/stwcs/updatewcs/utils.py index 14a7380..e9b79b2 100644 --- a/stwcs/updatewcs/utils.py +++ b/stwcs/updatewcs/utils.py @@ -1,5 +1,4 @@ import os -import string from stsci.tools import fileutil import logging diff --git a/tox.ini b/tox.ini index 0bcca25..863229a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist= py310, py311, py312, style, dev +envlist= py311, py312, py310, style, dev [testenv]