wfc3tools 1.5.0__tar.gz → 1.6.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/.github/CODEOWNERS +1 -1
- wfc3tools-1.6.1/.github/dependabot.yml +15 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/.github/workflows/build.yml +1 -1
- wfc3tools-1.6.1/.github/workflows/tests.yml +33 -0
- wfc3tools-1.6.1/.pre-commit-config.yaml +14 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/.readthedocs.yaml +2 -2
- wfc3tools-1.6.1/.ruff.toml +24 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/CHANGES.rst +8 -1
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/MANIFEST.in +0 -4
- wfc3tools-1.6.1/PKG-INFO +82 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/README.rst +9 -19
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/conf.py +12 -7
- wfc3tools-1.6.1/docs/rtd_environment.yaml +6 -0
- wfc3tools-1.6.1/pyproject.toml +65 -0
- wfc3tools-1.6.1/setup.cfg +4 -0
- wfc3tools-1.6.1/tox.ini +17 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools/calwf3.py +13 -12
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools/embedsub.py +29 -31
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools/pstack.py +11 -14
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools/pstat.py +31 -23
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools/sampinfo.py +58 -60
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools/sub2full.py +19 -20
- wfc3tools-1.6.1/wfc3tools/tests/test_calwf3.py +14 -0
- wfc3tools-1.6.1/wfc3tools/tests/test_pstack.py +56 -0
- wfc3tools-1.6.1/wfc3tools/tests/test_pstat.py +82 -0
- wfc3tools-1.6.1/wfc3tools/tests/test_sampinfo.py +55 -0
- wfc3tools-1.6.1/wfc3tools/tests/test_sub2full.py +52 -0
- wfc3tools-1.6.1/wfc3tools/util.py +64 -0
- wfc3tools-1.6.1/wfc3tools/version.py +34 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools/wf32d.py +29 -19
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools/wf3ccd.py +27 -18
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools/wf3cte.py +5 -6
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools/wf3ir.py +5 -5
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools/wf3rej.py +29 -16
- wfc3tools-1.6.1/wfc3tools.egg-info/PKG-INFO +82 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools.egg-info/SOURCES.txt +10 -3
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools.egg-info/requires.txt +6 -1
- wfc3tools-1.5.0/PKG-INFO +0 -30
- wfc3tools-1.5.0/docs/rtd_environment.yaml +0 -9
- wfc3tools-1.5.0/pyproject.toml +0 -3
- wfc3tools-1.5.0/setup.cfg +0 -46
- wfc3tools-1.5.0/setup.py +0 -4
- wfc3tools-1.5.0/wfc3tools/tests/test_calwf3.py +0 -22
- wfc3tools-1.5.0/wfc3tools/util.py +0 -60
- wfc3tools-1.5.0/wfc3tools/version.py +0 -16
- wfc3tools-1.5.0/wfc3tools.egg-info/PKG-INFO +0 -30
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/.gitignore +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/CODE_OF_CONDUCT.md +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/LICENSE.txt +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/Makefile +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/_static/calwf3_flow.png +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/_static/ir_data_format.png +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/_static/pstack_example.png +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/_static/pstat_example.png +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/_static/raw_uvis_format.png +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/_static/stsci_pri_combo_mark_white.png +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/_static/sub2full_translate.png +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/_static/uvis_data_format.png +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/_static/wfc3_Ch33_1.png +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/_static/wfc3_Ch33_5.png +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/_static/wfc_logo.png +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/exts/numfig.py +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/index.rst +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/make.bat +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/notebooks/README +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/notebooks/wf3persist.ipynb +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/wfc3tools/calwf3.rst +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/wfc3tools/embedsub.rst +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/wfc3tools/history.rst +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/wfc3tools/ir_pipeline.inc +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/wfc3tools/pstack.rst +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/wfc3tools/pstat.rst +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/wfc3tools/sampinfo.rst +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/wfc3tools/sub2full.rst +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/wfc3tools/uvis_pipeline.inc +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/wfc3tools/wf32d.rst +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/wfc3tools/wf3ccd.rst +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/wfc3tools/wf3cte.rst +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/wfc3tools/wf3ir.rst +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/docs/wfc3tools/wf3rej.rst +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools/__init__.py +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools.egg-info/dependency_links.txt +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools.egg-info/not-zip-safe +0 -0
- {wfc3tools-1.5.0 → wfc3tools-1.6.1}/wfc3tools.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
|
|
4
|
+
# Maintain dependencies for GitHub Actions
|
|
5
|
+
- package-ecosystem: "github-actions"
|
|
6
|
+
directory: ".github/workflows"
|
|
7
|
+
target-branch: "main"
|
|
8
|
+
schedule:
|
|
9
|
+
interval: monthly
|
|
10
|
+
groups:
|
|
11
|
+
actions:
|
|
12
|
+
patterns:
|
|
13
|
+
- "*"
|
|
14
|
+
cooldown:
|
|
15
|
+
default-days: 7
|
|
@@ -8,7 +8,7 @@ on:
|
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
10
|
build:
|
|
11
|
-
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@
|
|
11
|
+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@9f1fedda61294df4c004c05519a3fbf3b8e1f32f # v2.3.1
|
|
12
12
|
with:
|
|
13
13
|
upload_to_pypi: ${{ (github.event_name == 'release') && (github.event.action == 'released') }}
|
|
14
14
|
secrets:
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- '*x'
|
|
8
|
+
tags:
|
|
9
|
+
- '*'
|
|
10
|
+
pull_request:
|
|
11
|
+
schedule:
|
|
12
|
+
# Weekly Wednesday 9AM build
|
|
13
|
+
- cron: "0 9 * * 3"
|
|
14
|
+
workflow_dispatch:
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
18
|
+
cancel-in-progress: true
|
|
19
|
+
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
test:
|
|
25
|
+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@9f1fedda61294df4c004c05519a3fbf3b8e1f32f # v2.3.1
|
|
26
|
+
with:
|
|
27
|
+
conda: true
|
|
28
|
+
envs: |
|
|
29
|
+
- linux: py311
|
|
30
|
+
- linux: py312
|
|
31
|
+
- macos: py313
|
|
32
|
+
# https://github.com/OpenAstronomy/github-actions-workflows/issues/342
|
|
33
|
+
#- linux: py314
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
exclude = [
|
|
2
|
+
"docs",
|
|
3
|
+
".tox",
|
|
4
|
+
".eggs",
|
|
5
|
+
"build",
|
|
6
|
+
"__init__.py",
|
|
7
|
+
]
|
|
8
|
+
line-length = 127
|
|
9
|
+
|
|
10
|
+
target-version = "py311"
|
|
11
|
+
|
|
12
|
+
[format]
|
|
13
|
+
quote-style = "double"
|
|
14
|
+
indent-style = "space"
|
|
15
|
+
|
|
16
|
+
[lint]
|
|
17
|
+
select = [
|
|
18
|
+
"F401", # Module imported but unused
|
|
19
|
+
"F811", # Redefinition of unused
|
|
20
|
+
"I", # isort
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[lint.isort]
|
|
24
|
+
known-first-party = ["wfc3tools"]
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
1.6.1 (2026-02-06)
|
|
2
|
+
------------------
|
|
3
|
+
- Maintenance release for CALDP build. No functional change.
|
|
4
|
+
|
|
5
|
+
1.6.0 (2025-10-21)
|
|
6
|
+
------------------
|
|
7
|
+
- Follow PEP621 to move build configuration pyproject.toml [#90]
|
|
8
|
+
|
|
1
9
|
1.5.0 (2023-10-18)
|
|
2
10
|
------------------
|
|
3
11
|
- Major updates to the readthedocs documentation, particularly for UVIS pipeline and new full-well saturation [#68, #83]
|
|
@@ -7,7 +15,6 @@
|
|
|
7
15
|
- Modified how an image section is specified and reversed the use of column and row parameters for pstat [#75]
|
|
8
16
|
- Dropped support for Python 3.8 [#79]
|
|
9
17
|
|
|
10
|
-
|
|
11
18
|
1.4.0 (2022-03-10)
|
|
12
19
|
------------------
|
|
13
20
|
- fixed matplotlib plotting issue, added explicit draw and interaction plots
|
wfc3tools-1.6.1/PKG-INFO
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wfc3tools
|
|
3
|
+
Version: 1.6.1
|
|
4
|
+
Summary: Python Tools for HST WFC3 Data
|
|
5
|
+
Author: STScI
|
|
6
|
+
Project-URL: Homepage, http://wfc3tools.readthedocs.io/
|
|
7
|
+
Project-URL: Bug Reports, https://github.com/spacetelescope/wfc3tools/issues/
|
|
8
|
+
Project-URL: Source, https://github.com/spacetelescope/wfc3tools/
|
|
9
|
+
Project-URL: Help, https://hsthelp.stsci.edu
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
14
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
15
|
+
Requires-Python: >=3.9
|
|
16
|
+
Description-Content-Type: text/x-rst
|
|
17
|
+
License-File: LICENSE.txt
|
|
18
|
+
Requires-Dist: astropy>=4.2.0
|
|
19
|
+
Requires-Dist: numpy>=1.21.0
|
|
20
|
+
Requires-Dist: matplotlib>=3.5.1
|
|
21
|
+
Requires-Dist: stsci.tools>=4.0.1
|
|
22
|
+
Requires-Dist: scipy>=1.8.0
|
|
23
|
+
Provides-Extra: tests
|
|
24
|
+
Requires-Dist: pytest; extra == "tests"
|
|
25
|
+
Requires-Dist: astroquery; extra == "tests"
|
|
26
|
+
Requires-Dist: ci-watson; extra == "tests"
|
|
27
|
+
Provides-Extra: docs
|
|
28
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
29
|
+
Requires-Dist: sphinx-automodapi; extra == "docs"
|
|
30
|
+
Requires-Dist: sphinx-rtd-theme>1.2.0; extra == "docs"
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
|
|
33
|
+
WFC3TOOLS
|
|
34
|
+
=========
|
|
35
|
+
|
|
36
|
+
.. image:: https://github.com/spacetelescope/wfc3tools/actions/workflows/tests.yml/badge.svg?branch=main
|
|
37
|
+
:target: https://github.com/spacetelescope/wfc3tools/actions/workflows/tests.yml
|
|
38
|
+
:alt: tests
|
|
39
|
+
|
|
40
|
+
.. image:: https://readthedocs.org/projects/wfc3tools/badge/?version=latest
|
|
41
|
+
:target: https://wfc3tools.readthedocs.io/en/latest/?badge=latest
|
|
42
|
+
:alt: Documentation Status
|
|
43
|
+
|
|
44
|
+
.. image:: https://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat
|
|
45
|
+
:target: https://www.astropy.org
|
|
46
|
+
:alt: Powered by Astropy Badge
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
For more information please see the `online documentation <https://wfc3tools.readthedocs.io/>`_.
|
|
50
|
+
|
|
51
|
+
To install using pip:
|
|
52
|
+
|
|
53
|
+
::
|
|
54
|
+
|
|
55
|
+
pip install wfc3tools
|
|
56
|
+
|
|
57
|
+
pip install --upgrade wfc3tools # if you already have an older version installed
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
Contributing
|
|
62
|
+
------------
|
|
63
|
+
|
|
64
|
+
Please open a new issue or new pull request for bugs, feedback, or new features
|
|
65
|
+
you would like to see. If there is an issue you would like to work on, please
|
|
66
|
+
leave a comment and we will be happy to assist. New contributions and
|
|
67
|
+
contributors are very welcome!
|
|
68
|
+
|
|
69
|
+
New to github or open source projects? If you are unsure about where to start
|
|
70
|
+
or haven't used github before, please feel free to contact `HST Help Desk <https://stsci.service-now.com/hst>`_.
|
|
71
|
+
|
|
72
|
+
Feedback and feature requests? Is there something missing you would like
|
|
73
|
+
to see? Please open an issue or contact `HST Help Desk <https://stsci.service-now.com/hst>`_.
|
|
74
|
+
|
|
75
|
+
``wfc3tools`` follows the STScI Code of Conduct and strives to provide a
|
|
76
|
+
welcoming community to all of our users and contributors.
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
License
|
|
80
|
+
-------
|
|
81
|
+
|
|
82
|
+
``wfc3tools`` is licensed under a 3-clause BSD style license (see the ``LICENSE.txt`` file).
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
WFC3TOOLS
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
.. image:: https://github.com/spacetelescope/wfc3tools/actions/workflows/tests.yml/badge.svg?branch=main
|
|
5
|
+
:target: https://github.com/spacetelescope/wfc3tools/actions/workflows/tests.yml
|
|
6
|
+
:alt: tests
|
|
7
|
+
|
|
4
8
|
.. image:: https://readthedocs.org/projects/wfc3tools/badge/?version=latest
|
|
5
|
-
:target:
|
|
9
|
+
:target: https://wfc3tools.readthedocs.io/en/latest/?badge=latest
|
|
6
10
|
:alt: Documentation Status
|
|
7
11
|
|
|
8
|
-
.. image::
|
|
9
|
-
:target:
|
|
12
|
+
.. image:: https://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat
|
|
13
|
+
:target: https://www.astropy.org
|
|
10
14
|
:alt: Powered by Astropy Badge
|
|
11
15
|
|
|
12
16
|
|
|
13
|
-
For more information please see the `online documentation <
|
|
14
|
-
|
|
15
|
-
You can also display the docs locally after install, import ``wfc3tools`` and then issue the following command to display the help docs in your local browser:
|
|
16
|
-
|
|
17
|
-
::
|
|
18
|
-
|
|
19
|
-
wfc3tools.display_help()
|
|
17
|
+
For more information please see the `online documentation <https://wfc3tools.readthedocs.io/>`_.
|
|
20
18
|
|
|
21
19
|
To install using pip:
|
|
22
20
|
|
|
@@ -42,19 +40,11 @@ or haven't used github before, please feel free to contact `HST Help Desk <https
|
|
|
42
40
|
Feedback and feature requests? Is there something missing you would like
|
|
43
41
|
to see? Please open an issue or contact `HST Help Desk <https://stsci.service-now.com/hst>`_.
|
|
44
42
|
|
|
45
|
-
``wfc3tools`` follows the
|
|
43
|
+
``wfc3tools`` follows the STScI Code of Conduct and strives to provide a
|
|
46
44
|
welcoming community to all of our users and contributors.
|
|
47
45
|
|
|
48
|
-
Want more information about how to make a contribution? Take a look at
|
|
49
|
-
the the astropy `contributing`_ and `developer`_ documentation.
|
|
50
|
-
|
|
51
46
|
|
|
52
47
|
License
|
|
53
48
|
-------
|
|
54
49
|
|
|
55
50
|
``wfc3tools`` is licensed under a 3-clause BSD style license (see the ``LICENSE.txt`` file).
|
|
56
|
-
|
|
57
|
-
.. _AstroPy: http://www.astropy.org/
|
|
58
|
-
.. _contributing: http://docs.astropy.org/en/stable/index.html#contributing
|
|
59
|
-
.. _developer: http://docs.astropy.org/en/stable/index.html#developer-documentation
|
|
60
|
-
.. _Astropy Code of Conduct: http://www.astropy.org/about.html#codeofconduct
|
|
@@ -9,13 +9,18 @@
|
|
|
9
9
|
from configparser import ConfigParser
|
|
10
10
|
import datetime
|
|
11
11
|
import os
|
|
12
|
+
from pathlib import Path
|
|
12
13
|
import sys
|
|
13
14
|
|
|
14
15
|
from wfc3tools import __version__
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
if sys.version_info < (3, 11):
|
|
18
|
+
import tomli as tomllib
|
|
19
|
+
else:
|
|
20
|
+
import tomllib
|
|
21
|
+
|
|
22
|
+
with open(Path(__file__).parent.parent / "pyproject.toml", "rb") as configuration_file:
|
|
23
|
+
metadata = tomllib.load(configuration_file)["project"]
|
|
19
24
|
# -- Path setup --------------------------------------------------------------
|
|
20
25
|
|
|
21
26
|
# If extensions (or modules to document with autodoc) are in another directory,
|
|
@@ -28,9 +33,9 @@ sys.path.insert(0, os.path.abspath('exts/'))
|
|
|
28
33
|
|
|
29
34
|
|
|
30
35
|
# -- Project information -----------------------------------------------------
|
|
31
|
-
project =
|
|
32
|
-
author =
|
|
33
|
-
copyright =
|
|
36
|
+
project = metadata["name"]
|
|
37
|
+
author = f'{metadata["authors"][0]["name"]}'
|
|
38
|
+
copyright = f"{datetime.datetime.now().year}, {author}"
|
|
34
39
|
|
|
35
40
|
# The version info for the project you're documenting, acts as replacement for
|
|
36
41
|
# |version| and |release|, also used in various other places throughout the
|
|
@@ -139,4 +144,4 @@ latex_show_urls = 'True'
|
|
|
139
144
|
# latex_appendices = []
|
|
140
145
|
|
|
141
146
|
# If false, no module index is generated.
|
|
142
|
-
latex_domain_indices = True
|
|
147
|
+
latex_domain_indices = True
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "wfc3tools"
|
|
3
|
+
description = "Python Tools for HST WFC3 Data"
|
|
4
|
+
requires-python = ">=3.9"
|
|
5
|
+
authors = [
|
|
6
|
+
{ name = "STScI" },
|
|
7
|
+
]
|
|
8
|
+
license-files = ["LICENSE.txt"]
|
|
9
|
+
classifiers = [
|
|
10
|
+
"Intended Audience :: Science/Research",
|
|
11
|
+
"Operating System :: OS Independent",
|
|
12
|
+
"Programming Language :: Python",
|
|
13
|
+
"Topic :: Scientific/Engineering :: Astronomy",
|
|
14
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
15
|
+
]
|
|
16
|
+
dependencies = [
|
|
17
|
+
"astropy>=4.2.0",
|
|
18
|
+
"numpy>=1.21.0",
|
|
19
|
+
"matplotlib>=3.5.1",
|
|
20
|
+
"stsci.tools>=4.0.1",
|
|
21
|
+
"scipy>=1.8.0",
|
|
22
|
+
]
|
|
23
|
+
dynamic = [
|
|
24
|
+
"version",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[project.readme]
|
|
28
|
+
file = "README.rst"
|
|
29
|
+
content-type = "text/x-rst"
|
|
30
|
+
|
|
31
|
+
[project.urls]
|
|
32
|
+
Homepage = "http://wfc3tools.readthedocs.io/"
|
|
33
|
+
"Bug Reports" = "https://github.com/spacetelescope/wfc3tools/issues/"
|
|
34
|
+
Source = "https://github.com/spacetelescope/wfc3tools/"
|
|
35
|
+
Help = "https://hsthelp.stsci.edu"
|
|
36
|
+
|
|
37
|
+
[project.optional-dependencies]
|
|
38
|
+
tests = [
|
|
39
|
+
"pytest",
|
|
40
|
+
"astroquery",
|
|
41
|
+
"ci-watson",
|
|
42
|
+
]
|
|
43
|
+
docs = [
|
|
44
|
+
"sphinx",
|
|
45
|
+
"sphinx-automodapi",
|
|
46
|
+
"sphinx-rtd-theme>1.2.0",
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
[build-system]
|
|
50
|
+
requires = [
|
|
51
|
+
"setuptools>=61.2",
|
|
52
|
+
"setuptools_scm[toml]>=3.4",
|
|
53
|
+
"wheel",
|
|
54
|
+
]
|
|
55
|
+
build-backend = "setuptools.build_meta"
|
|
56
|
+
|
|
57
|
+
[tool.setuptools]
|
|
58
|
+
zip-safe = false
|
|
59
|
+
include-package-data = false
|
|
60
|
+
|
|
61
|
+
[tool.setuptools.packages.find]
|
|
62
|
+
namespaces = false
|
|
63
|
+
|
|
64
|
+
[tool.setuptools_scm]
|
|
65
|
+
version_file = "wfc3tools/version.py"
|
wfc3tools-1.6.1/tox.ini
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[tox]
|
|
2
|
+
env_list =
|
|
3
|
+
py{311,312,313,314}
|
|
4
|
+
isolated_build = True
|
|
5
|
+
|
|
6
|
+
[testenv]
|
|
7
|
+
description =
|
|
8
|
+
run tests
|
|
9
|
+
extras = tests
|
|
10
|
+
conda_deps =
|
|
11
|
+
hstcal
|
|
12
|
+
conda_channels =
|
|
13
|
+
conda-forge
|
|
14
|
+
commands_pre =
|
|
15
|
+
pip freeze
|
|
16
|
+
commands =
|
|
17
|
+
pytest -v {posargs}
|
|
@@ -29,11 +29,13 @@ import subprocess
|
|
|
29
29
|
|
|
30
30
|
# STSCI
|
|
31
31
|
from stsci.tools import parseinput
|
|
32
|
+
|
|
32
33
|
from .util import error_code
|
|
33
34
|
|
|
34
35
|
|
|
35
|
-
def calwf3(
|
|
36
|
-
|
|
36
|
+
def calwf3(
|
|
37
|
+
input=None, printtime=False, save_tmp=False, verbose=False, debug=False, parallel=True, version=False, log_func=print
|
|
38
|
+
):
|
|
37
39
|
"""
|
|
38
40
|
Run the calwf3.e executable as from the shell.
|
|
39
41
|
|
|
@@ -137,33 +139,32 @@ def calwf3(input=None, printtime=False, save_tmp=False,
|
|
|
137
139
|
|
|
138
140
|
"""
|
|
139
141
|
|
|
140
|
-
call_list = [
|
|
142
|
+
call_list = ["calwf3.e"]
|
|
141
143
|
return_code = None
|
|
142
144
|
|
|
143
145
|
if printtime:
|
|
144
|
-
call_list.append(
|
|
146
|
+
call_list.append("-t")
|
|
145
147
|
|
|
146
148
|
if save_tmp:
|
|
147
|
-
call_list.append(
|
|
149
|
+
call_list.append("-s")
|
|
148
150
|
|
|
149
151
|
if verbose:
|
|
150
|
-
call_list.append(
|
|
152
|
+
call_list.append("-v")
|
|
151
153
|
|
|
152
154
|
if version:
|
|
153
|
-
call_list.append(
|
|
155
|
+
call_list.append("--version")
|
|
154
156
|
|
|
155
157
|
if debug:
|
|
156
|
-
call_list.append(
|
|
158
|
+
call_list.append("-d")
|
|
157
159
|
|
|
158
160
|
if not parallel:
|
|
159
|
-
call_list.append(
|
|
161
|
+
call_list.append("-1")
|
|
160
162
|
|
|
161
163
|
infiles, dummy = parseinput.parseinput(input)
|
|
162
164
|
if (len(parseinput.irafglob(input)) == 0) and not version:
|
|
163
165
|
raise IOError("No valid image specified")
|
|
164
166
|
if len(parseinput.irafglob(input)) > 1:
|
|
165
|
-
raise IOError("calwf3 can only accept 1 file
|
|
166
|
-
"input at a time: {0}".format(infiles))
|
|
167
|
+
raise IOError("calwf3 can only accept 1 file forinput at a time: {0}".format(infiles))
|
|
167
168
|
|
|
168
169
|
for image in infiles:
|
|
169
170
|
if not os.path.exists(image):
|
|
@@ -180,7 +181,7 @@ def calwf3(input=None, printtime=False, save_tmp=False,
|
|
|
180
181
|
|
|
181
182
|
if log_func is not None:
|
|
182
183
|
for line in proc.stdout:
|
|
183
|
-
log_func(line.decode(
|
|
184
|
+
log_func(line.decode("utf8"))
|
|
184
185
|
|
|
185
186
|
return_code = proc.wait()
|
|
186
187
|
ec = error_code(return_code)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import numpy
|
|
2
2
|
|
|
3
3
|
# STDLIB
|
|
4
4
|
from astropy.io import fits
|
|
5
|
-
import os
|
|
6
|
-
import numpy
|
|
7
5
|
|
|
8
6
|
# STSCI
|
|
9
7
|
from stsci.tools import parseinput
|
|
10
8
|
|
|
9
|
+
from .sub2full import sub2full
|
|
10
|
+
|
|
11
11
|
__taskname__ = "embedsub"
|
|
12
12
|
|
|
13
13
|
|
|
@@ -36,14 +36,13 @@ def embedsub(files):
|
|
|
36
36
|
|
|
37
37
|
# process all the input subarrays
|
|
38
38
|
for filename in infiles:
|
|
39
|
-
|
|
40
39
|
# Make sure the input name conforms to normal style
|
|
41
|
-
if
|
|
40
|
+
if "_flt" not in filename:
|
|
42
41
|
print("Warning: Can't properly parse '%s'; Skipping" % files)
|
|
43
42
|
|
|
44
43
|
# Extract the root name and build SPT and output file names
|
|
45
|
-
root = filename[0:filename.find(
|
|
46
|
-
full = root[0:len(root)-1] +
|
|
44
|
+
root = filename[0 : filename.find("_flt")]
|
|
45
|
+
full = root[0 : len(root) - 1] + "f_flt.fits"
|
|
47
46
|
|
|
48
47
|
try:
|
|
49
48
|
# open input file read-only
|
|
@@ -51,14 +50,13 @@ def embedsub(files):
|
|
|
51
50
|
except EnvironmentError:
|
|
52
51
|
print("Problem opening fits file %s" % (filename))
|
|
53
52
|
|
|
54
|
-
detector = flt[0].header[
|
|
55
|
-
if
|
|
53
|
+
detector = flt[0].header["DETECTOR"]
|
|
54
|
+
if "UVIS" in detector:
|
|
56
55
|
uvis = True
|
|
57
56
|
|
|
58
57
|
# compute subarray corners assuming the raw image location
|
|
59
58
|
x1, x2, y1, y2 = sub2full(filename, fullExtent=True)[0]
|
|
60
|
-
print("Subarray image section [x1,x2,y1,y2] = [%d:%d,%d:%d]" % (x1, x2,
|
|
61
|
-
y1, y2))
|
|
59
|
+
print("Subarray image section [x1,x2,y1,y2] = [%d:%d,%d:%d]" % (x1, x2, y1, y2))
|
|
62
60
|
|
|
63
61
|
if uvis:
|
|
64
62
|
xaxis = uvis_full_x
|
|
@@ -74,44 +72,44 @@ def embedsub(files):
|
|
|
74
72
|
err = numpy.zeros([xaxis, yaxis], dtype=numpy.float32)
|
|
75
73
|
dq = numpy.zeros([xaxis, yaxis], dtype=numpy.int16) + 4
|
|
76
74
|
|
|
77
|
-
sci[y1-1:y2, x1-1:x2] = flt[1].data
|
|
78
|
-
err[y1-1:y2, x1-1:x2] = flt[2].data
|
|
79
|
-
dq[y1-1:y2, x1-1:x2] = flt[3].data
|
|
75
|
+
sci[y1 - 1 : y2, x1 - 1 : x2] = flt[1].data
|
|
76
|
+
err[y1 - 1 : y2, x1 - 1 : x2] = flt[2].data
|
|
77
|
+
dq[y1 - 1 : y2, x1 - 1 : x2] = flt[3].data
|
|
80
78
|
|
|
81
79
|
if not uvis:
|
|
82
80
|
samp = numpy.zeros([xaxis, yaxis], dtype=numpy.int16)
|
|
83
81
|
time = numpy.zeros([xaxis, yaxis], dtype=numpy.float32)
|
|
84
|
-
samp[y1-1:y2, x1-1:x2] = flt[4].data
|
|
85
|
-
time[y1-1:y2, x1-1:x2] = flt[5].data
|
|
82
|
+
samp[y1 - 1 : y2, x1 - 1 : x2] = flt[4].data
|
|
83
|
+
time[y1 - 1 : y2, x1 - 1 : x2] = flt[5].data
|
|
86
84
|
|
|
87
85
|
# Reset a few WCS values to make them appropriate for a
|
|
88
86
|
# full-chip image
|
|
89
|
-
crpix1 = flt[1].header[
|
|
90
|
-
crpix2 = flt[1].header[
|
|
87
|
+
crpix1 = flt[1].header["CRPIX1"]
|
|
88
|
+
crpix2 = flt[1].header["CRPIX2"]
|
|
91
89
|
|
|
92
|
-
flt[1].header[
|
|
93
|
-
flt[1].header[
|
|
90
|
+
flt[1].header["sizaxis1"] = yaxis
|
|
91
|
+
flt[1].header["sizaxis2"] = xaxis
|
|
94
92
|
|
|
95
93
|
for i in range(1, 4):
|
|
96
|
-
if
|
|
97
|
-
flt[i].header[
|
|
98
|
-
flt[i].header[
|
|
99
|
-
if
|
|
100
|
-
flt[i].header[
|
|
101
|
-
flt[i].header[
|
|
94
|
+
if "CRPIX1" in flt[i].header:
|
|
95
|
+
flt[i].header["crpix1"] = crpix1 + x1 - 1
|
|
96
|
+
flt[i].header["crpix2"] = crpix2 + y1 - 1
|
|
97
|
+
if "LTV1" in flt[i].header:
|
|
98
|
+
flt[i].header["ltv1"] = 0.0
|
|
99
|
+
flt[i].header["ltv2"] = 0.0
|
|
102
100
|
|
|
103
101
|
# set the header value of SUBARRAY to False since it's now
|
|
104
102
|
# regular size image
|
|
105
|
-
flt[0].header[
|
|
106
|
-
|
|
103
|
+
flt[0].header["SUBARRAY"] = False
|
|
104
|
+
|
|
107
105
|
# Now write out the SCI, ERR, DQ extensions to the full-chip file
|
|
108
|
-
flt[1].data = sci
|
|
106
|
+
flt[1].data = sci
|
|
109
107
|
flt[2].data = err
|
|
110
108
|
flt[3].data = dq
|
|
111
|
-
|
|
109
|
+
|
|
112
110
|
if not uvis:
|
|
113
111
|
flt[4].data = samp
|
|
114
|
-
flt[5].data = time
|
|
112
|
+
flt[5].data = time
|
|
115
113
|
|
|
116
114
|
flt.writeto(full, overwrite=False)
|
|
117
115
|
|