acstools 3.7.2__tar.gz → 3.8.0__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.
Files changed (99) hide show
  1. acstools-3.8.0/.flake8 +10 -0
  2. {acstools-3.7.2 → acstools-3.8.0}/.github/dependabot.yml +4 -2
  3. {acstools-3.7.2 → acstools-3.8.0}/.github/workflows/ci_workflows.yml +6 -6
  4. {acstools-3.7.2 → acstools-3.8.0}/.github/workflows/codeql-analysis.yml +4 -4
  5. acstools-3.8.0/.github/workflows/open_actions.yml +27 -0
  6. {acstools-3.7.2 → acstools-3.8.0}/.github/workflows/predeps_workflows.yml +3 -3
  7. {acstools-3.7.2 → acstools-3.8.0}/.github/workflows/publish-to-pypi.yml +3 -3
  8. {acstools-3.7.2 → acstools-3.8.0}/PKG-INFO +39 -12
  9. {acstools-3.7.2 → acstools-3.8.0}/README.rst +2 -0
  10. {acstools-3.7.2 → acstools-3.8.0}/acstools/acs_destripe.py +11 -11
  11. {acstools-3.7.2 → acstools-3.8.0}/acstools/acs_destripe_plus.py +11 -11
  12. {acstools-3.7.2 → acstools-3.8.0}/acstools/acsphotcte.py +1 -1
  13. {acstools-3.7.2 → acstools-3.8.0}/acstools/acssum.py +3 -3
  14. {acstools-3.7.2 → acstools-3.8.0}/acstools/acszpt.py +4 -2
  15. {acstools-3.7.2 → acstools-3.8.0}/acstools/calacs.py +1 -1
  16. {acstools-3.7.2 → acstools-3.8.0}/acstools/findsat_mrt.py +43 -25
  17. {acstools-3.7.2 → acstools-3.8.0}/acstools/polarization_tools.py +2 -2
  18. {acstools-3.7.2 → acstools-3.8.0}/acstools/utils_findsat_mrt.py +1 -2
  19. acstools-3.8.0/acstools/version.py +24 -0
  20. {acstools-3.7.2 → acstools-3.8.0}/acstools.egg-info/PKG-INFO +39 -12
  21. {acstools-3.7.2 → acstools-3.8.0}/acstools.egg-info/SOURCES.txt +1 -2
  22. {acstools-3.7.2 → acstools-3.8.0}/acstools.egg-info/requires.txt +2 -1
  23. {acstools-3.7.2 → acstools-3.8.0}/doc/source/calacs.rst +5 -5
  24. {acstools-3.7.2 → acstools-3.8.0}/doc/source/conf.py +5 -3
  25. {acstools-3.7.2 → acstools-3.8.0}/doc/source/index.rst +2 -3
  26. acstools-3.8.0/pyproject.toml +118 -0
  27. acstools-3.8.0/setup.cfg +4 -0
  28. {acstools-3.7.2 → acstools-3.8.0}/tox.ini +3 -4
  29. acstools-3.7.2/.github/workflows/open_actions.yml +0 -39
  30. acstools-3.7.2/acstools/version.py +0 -16
  31. acstools-3.7.2/pyproject.toml +0 -4
  32. acstools-3.7.2/setup.cfg +0 -94
  33. acstools-3.7.2/setup.py +0 -39
  34. {acstools-3.7.2 → acstools-3.8.0}/.bandit.yaml +0 -0
  35. {acstools-3.7.2 → acstools-3.8.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  36. {acstools-3.7.2 → acstools-3.8.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  37. {acstools-3.7.2 → acstools-3.8.0}/.github/ISSUE_TEMPLATE/question.md +0 -0
  38. {acstools-3.7.2 → acstools-3.8.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  39. {acstools-3.7.2 → acstools-3.8.0}/.github/labeler.yml +0 -0
  40. {acstools-3.7.2 → acstools-3.8.0}/.gitignore +0 -0
  41. {acstools-3.7.2 → acstools-3.8.0}/.readthedocs.yaml +0 -0
  42. {acstools-3.7.2 → acstools-3.8.0}/CHANGES.rst +0 -0
  43. {acstools-3.7.2 → acstools-3.8.0}/CITATION.md +0 -0
  44. {acstools-3.7.2 → acstools-3.8.0}/CODE_OF_CONDUCT.md +0 -0
  45. {acstools-3.7.2 → acstools-3.8.0}/LICENSE.md +0 -0
  46. {acstools-3.7.2 → acstools-3.8.0}/MANIFEST.in +0 -0
  47. {acstools-3.7.2 → acstools-3.8.0}/acstools/__init__.py +0 -0
  48. {acstools-3.7.2 → acstools-3.8.0}/acstools/acs2d.py +0 -0
  49. {acstools-3.7.2 → acstools-3.8.0}/acstools/acsccd.py +0 -0
  50. {acstools-3.7.2 → acstools-3.8.0}/acstools/acscte.py +0 -0
  51. {acstools-3.7.2 → acstools-3.8.0}/acstools/acscteforwardmodel.py +0 -0
  52. {acstools-3.7.2 → acstools-3.8.0}/acstools/acsrej.py +0 -0
  53. {acstools-3.7.2 → acstools-3.8.0}/acstools/data/polarizer_tables.yaml +0 -0
  54. {acstools-3.7.2 → acstools-3.8.0}/acstools/data/rt_line_kernel_width15.fits +0 -0
  55. {acstools-3.7.2 → acstools-3.8.0}/acstools/data/rt_line_kernel_width3.fits +0 -0
  56. {acstools-3.7.2 → acstools-3.8.0}/acstools/data/rt_line_kernel_width7.fits +0 -0
  57. {acstools-3.7.2 → acstools-3.8.0}/acstools/focus_diverse_epsfs.py +0 -0
  58. {acstools-3.7.2 → acstools-3.8.0}/acstools/satdet.py +0 -0
  59. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/.gitattributes +0 -0
  60. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/__init__.py +0 -0
  61. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/data/input/ja0x03ojq_flt.fits +0 -0
  62. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/data/input/jb5g05ubq_flt.fits +0 -0
  63. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/data/input/jc2z03cvq_blv_tmp.fits +0 -0
  64. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/data/input/jc5001soq_flt.fits +0 -0
  65. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/data/input/jc8m10syq_flc.fits +0 -0
  66. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/data/input/jc8m32j5q_flc.fits +0 -0
  67. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/data/input/jc8o04ghq_flt.fits +0 -0
  68. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/data/input/jc8o04ghq_mask1.fits +0 -0
  69. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/data/input/jc8o04ghq_mask2.fits +0 -0
  70. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/data/truth/ja0x03ojq_flt_ref.fits +0 -0
  71. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/data/truth/jb5g05ubq_flt_ref.fits +0 -0
  72. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/data/truth/jc2z03cvq_blv_tmp_ref.fits +0 -0
  73. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/data/truth/jc5001soq_flt_ref.fits +0 -0
  74. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/data/truth/jc8m10syq_flc_ref.fits +0 -0
  75. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/data/truth/jc8m32j5q_flc_mask_ref.fits +0 -0
  76. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/data/truth/jc8o04ghq_flt_ref.fits +0 -0
  77. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/helpers.py +0 -0
  78. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/test_polarization.py +0 -0
  79. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/test_wfc_destripe.py +0 -0
  80. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/test_wfc_findsat_mrt.py +0 -0
  81. {acstools-3.7.2 → acstools-3.8.0}/acstools/tests/test_wfc_satdet.py +0 -0
  82. {acstools-3.7.2 → acstools-3.8.0}/acstools/utils_calib.py +0 -0
  83. {acstools-3.7.2 → acstools-3.8.0}/acstools.egg-info/dependency_links.txt +0 -0
  84. {acstools-3.7.2 → acstools-3.8.0}/acstools.egg-info/entry_points.txt +0 -0
  85. {acstools-3.7.2 → acstools-3.8.0}/acstools.egg-info/not-zip-safe +0 -0
  86. {acstools-3.7.2 → acstools-3.8.0}/acstools.egg-info/top_level.txt +0 -0
  87. {acstools-3.7.2 → acstools-3.8.0}/conftest.py +0 -0
  88. {acstools-3.7.2 → acstools-3.8.0}/doc/Makefile +0 -0
  89. {acstools-3.7.2 → acstools-3.8.0}/doc/make.bat +0 -0
  90. {acstools-3.7.2 → acstools-3.8.0}/doc/source/_static/stsci_pri_combo_mark_white.png +0 -0
  91. {acstools-3.7.2 → acstools-3.8.0}/doc/source/_templates/.gitignore +0 -0
  92. {acstools-3.7.2 → acstools-3.8.0}/doc/source/acs_destripe.rst +0 -0
  93. {acstools-3.7.2 → acstools-3.8.0}/doc/source/acsphotcte.rst +0 -0
  94. {acstools-3.7.2 → acstools-3.8.0}/doc/source/acszpt.rst +0 -0
  95. {acstools-3.7.2 → acstools-3.8.0}/doc/source/findsat_mrt.rst +0 -0
  96. {acstools-3.7.2 → acstools-3.8.0}/doc/source/focus_diverse_epsfs.rst +0 -0
  97. {acstools-3.7.2 → acstools-3.8.0}/doc/source/polarization_tools.rst +0 -0
  98. {acstools-3.7.2 → acstools-3.8.0}/doc/source/satdet.rst +0 -0
  99. {acstools-3.7.2 → acstools-3.8.0}/doc/source/utils_calib.rst +0 -0
acstools-3.8.0/.flake8 ADDED
@@ -0,0 +1,10 @@
1
+ [flake8]
2
+ # Ignoring these for now:
3
+ # E221: multiple spaces before operator
4
+ # E226: missing whitespace around arithmetic operator
5
+ # E262: inline comment should start with '# '
6
+ # E265: block comment should start with '#'
7
+ # E501: line too long
8
+ # E704: multiple statements on one line (def)
9
+ # W504: line break after binary operator
10
+ ignore = E221,E226,E262,E265,E501,E704,W504
@@ -12,7 +12,8 @@ updates:
12
12
  actions:
13
13
  patterns:
14
14
  - "*"
15
- open-pull-requests-limit: 10
15
+ cooldown:
16
+ default-days: 7
16
17
 
17
18
  # Maintain dependencies for pip
18
19
  - package-ecosystem: "pip"
@@ -25,4 +26,5 @@ updates:
25
26
  actions:
26
27
  patterns:
27
28
  - "*"
28
- open-pull-requests-limit: 10
29
+ cooldown:
30
+ default-days: 7
@@ -21,7 +21,7 @@ jobs:
21
21
  runs-on: ubuntu-latest
22
22
  steps:
23
23
  - name: Check base branch
24
- uses: actions/github-script@v7
24
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
25
25
  if: github.event_name == 'pull_request'
26
26
  with:
27
27
  script: |
@@ -35,7 +35,7 @@ jobs:
35
35
 
36
36
  tests:
37
37
  needs: initial_checks
38
- uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
38
+ uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@e97344095b099e1d729fe97429078c9975921d8a # v2.6.2
39
39
  with:
40
40
  setenv: |
41
41
  jref: "https://ssb.stsci.edu/trds_open/jref"
@@ -55,10 +55,10 @@ jobs:
55
55
  - name: Check links
56
56
  linux: linkcheck
57
57
 
58
- - name: Python 3.9 with remote data and all dependencies
59
- linux: py39-test-alldeps
58
+ - name: Python 3.10 with remote data and all dependencies
59
+ linux: py310-test-alldeps
60
60
  posargs: --remote-data -v
61
61
 
62
- - name: Python 3.12 with remote data and dev dependencies
63
- linux: py312-test-devdeps
62
+ - name: Python 3.14 with remote data and dev dependencies
63
+ linux: py314-test-devdeps
64
64
  posargs: --remote-data -v
@@ -37,11 +37,11 @@ jobs:
37
37
 
38
38
  steps:
39
39
  - name: Checkout repository
40
- uses: actions/checkout@v4
40
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
41
41
 
42
42
  # Initializes the CodeQL tools for scanning.
43
43
  - name: Initialize CodeQL
44
- uses: github/codeql-action/init@v3
44
+ uses: github/codeql-action/init@5618c9fc1e675841ca52c1c6b1304f5255a905a0 # codeql-bundle-v2.19.0
45
45
  with:
46
46
  languages: ${{ matrix.language }}
47
47
  # If you wish to specify custom queries, you can do so here or in a config file.
@@ -52,7 +52,7 @@ jobs:
52
52
  # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
53
53
  # If this step fails, then you should remove it and run the build manually (see below)
54
54
  - name: Autobuild
55
- uses: github/codeql-action/autobuild@v3
55
+ uses: github/codeql-action/autobuild@5618c9fc1e675841ca52c1c6b1304f5255a905a0 # codeql-bundle-v2.19.0
56
56
 
57
57
  # ℹ️ Command-line programs to run using the OS shell.
58
58
  # 📚 https://git.io/JvXDl
@@ -66,4 +66,4 @@ jobs:
66
66
  # make release
67
67
 
68
68
  - name: Perform CodeQL Analysis
69
- uses: github/codeql-action/analyze@v3
69
+ uses: github/codeql-action/analyze@5618c9fc1e675841ca52c1c6b1304f5255a905a0 # codeql-bundle-v2.19.0
@@ -0,0 +1,27 @@
1
+ name: When Opened
2
+
3
+ on:
4
+ issues:
5
+ types:
6
+ - opened
7
+ pull_request_target:
8
+ types:
9
+ - opened
10
+
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ triage:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Label PR
20
+ uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
21
+ if: github.event_name == 'pull_request_target' || github.event_name == 'pull_request'
22
+ with:
23
+ repo-token: "${{ secrets.GITHUB_TOKEN }}"
24
+ #- name: Special comment
25
+ # uses: pllim/action-special_pr_comment@5126c189c02418a55448480b28efd1a00af48d7b # 0.2
26
+ # with:
27
+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -12,7 +12,7 @@ permissions:
12
12
 
13
13
  jobs:
14
14
  rc_tests:
15
- uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
15
+ uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@e97344095b099e1d729fe97429078c9975921d8a # v2.6.2
16
16
  with:
17
17
  setenv: |
18
18
  jref: "https://ssb.stsci.edu/trds_open/jref"
@@ -20,6 +20,6 @@ jobs:
20
20
  coverage: ''
21
21
  # TODO: Enable more OSes when possible.
22
22
  envs: |
23
- - name: Python 3.11 with pre-release
24
- linux: py311-test-predeps
23
+ - name: Python 3.13 with pre-release
24
+ linux: py313-test-predeps
25
25
  posargs: --remote-data -v
@@ -32,11 +32,11 @@ jobs:
32
32
  if: (github.repository == 'spacetelescope/acstools' && (github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'Build wheels')))
33
33
 
34
34
  steps:
35
- - uses: actions/checkout@v4
35
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
36
36
  with:
37
37
  fetch-depth: 0
38
38
 
39
- - uses: actions/setup-python@v5
39
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
40
40
  with:
41
41
  python-version: '3.11'
42
42
 
@@ -56,7 +56,7 @@ jobs:
56
56
  # Use appropriate token if debugging with TestPyPI
57
57
  - name: Publish distribution 📦 to PyPI
58
58
  if: (startsWith(github.ref, 'refs/tags/') && github.event_name == 'push')
59
- uses: pypa/gh-action-pypi-publish@release/v1
59
+ uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
60
60
  with:
61
61
  user: __token__
62
62
  password: ${{ secrets.PYPI_TOKEN }}
@@ -1,28 +1,26 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: acstools
3
- Version: 3.7.2
3
+ Version: 3.8.0
4
4
  Summary: Python Tools for HST ACS
5
- Home-page: https://github.com/spacetelescope/acstools
6
5
  Author: Matt Davis, Warren Hack, Norman Grogin, Pey Lian Lim, Sara Ogaz, Leonardo Ubeda, Mihai Cara, David Borncamp, Nathan Miles, Tyler Desjardins, Jenna Ryon, David Stark, Gagandeep Anand, Yotam Cohen
7
- Author-email: help@stsci.edu
8
- License: BSD
9
- Project-URL: Bug Reports, https://github.com/spacetelescope/acstools/issues/
10
- Project-URL: Source, https://github.com/spacetelescope/acstools/
6
+ License-Expression: BSD-3-Clause
7
+ Project-URL: Bug Reports, https://github.com/spacetelescope/acstools/issues
8
+ Project-URL: Source, https://github.com/spacetelescope/acstools
11
9
  Project-URL: Help, https://hsthelp.stsci.edu
10
+ Project-URL: Documentation, https://acstools.readthedocs.io
12
11
  Keywords: astronomy,astrophysics,calibration
13
12
  Classifier: Intended Audience :: Science/Research
14
- Classifier: License :: OSI Approved :: BSD License
15
13
  Classifier: Operating System :: OS Independent
16
14
  Classifier: Programming Language :: Python :: 3
17
15
  Classifier: Programming Language :: Python :: Implementation :: CPython
18
16
  Classifier: Topic :: Scientific/Engineering :: Astronomy
19
17
  Classifier: Topic :: Scientific/Engineering :: Physics
20
18
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
- Requires-Python: >=3.8
22
- Description-Content-Type: text/plain
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/x-rst
23
21
  License-File: LICENSE.md
24
22
  Requires-Dist: numpy
25
- Requires-Dist: astropy>=3.1
23
+ Requires-Dist: astropy
26
24
  Requires-Dist: requests
27
25
  Requires-Dist: PyYAML
28
26
  Provides-Extra: all
@@ -42,5 +40,34 @@ Provides-Extra: docs
42
40
  Requires-Dist: sphinx; extra == "docs"
43
41
  Requires-Dist: sphinx-automodapi; extra == "docs"
44
42
  Requires-Dist: sphinx-rtd-theme; extra == "docs"
43
+ Requires-Dist: numpydoc; extra == "docs"
44
+ Dynamic: license-file
45
45
 
46
- Python Tools for HST ACS (Advanced Camera for Surveys) Data
46
+ ACSTOOLS
47
+ ========
48
+
49
+ .. image:: https://img.shields.io/badge/ascl-2011.024-blue.svg?colorB=262255
50
+ :target: https://ascl.net/2011.024
51
+ :alt: ascl:2011.024
52
+
53
+ .. image:: https://readthedocs.org/projects/acstools/badge/?version=latest
54
+ :alt: Documentation Status
55
+ :target: https://acstools.readthedocs.io/en/latest/?badge=latest
56
+
57
+ .. image:: https://github.com/spacetelescope/acstools/workflows/CI/badge.svg
58
+ :target: https://github.com/spacetelescope/acstools/actions?query=workflow%3ACI
59
+ :alt: Github Actions CI Status
60
+
61
+ Python Tools for HST ACS (Advanced Camera for Surveys) Data.
62
+
63
+ For v3.5 or later:
64
+
65
+ .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.7406933.svg
66
+ :alt: zenodo.7406933
67
+ :target: https://doi.org/10.5281/zenodo.7406933
68
+
69
+ For older versions:
70
+
71
+ .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3728240.svg
72
+ :alt: zenodo.3728240
73
+ :target: https://doi.org/10.5281/zenodo.3728240
@@ -13,6 +13,8 @@ ACSTOOLS
13
13
  :target: https://github.com/spacetelescope/acstools/actions?query=workflow%3ACI
14
14
  :alt: Github Actions CI Status
15
15
 
16
+ Python Tools for HST ACS (Advanced Camera for Surveys) Data.
17
+
16
18
  For v3.5 or later:
17
19
 
18
20
  .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.7406933.svg
@@ -232,7 +232,7 @@ def clean(input, suffix, stat="pmode1", maxiter=15, sigrej=2.0,
232
232
  The string to use to add to each input file name to
233
233
  indicate an output product. This string will be appended
234
234
  to the suffix in each input filename to create the
235
- new output filename. For example, setting `suffix='csck'`
235
+ new output filename. For example, setting ``suffix='csck'``
236
236
  will create '\*_csck.fits' images.
237
237
 
238
238
  stat : { 'pmode1', 'pmode2', 'mean', 'mode', 'median', 'midpt' } (Default = 'pmode1')
@@ -286,7 +286,7 @@ def clean(input, suffix, stat="pmode1", maxiter=15, sigrej=2.0,
286
286
  Histogram's bin width, in sigma units, used to sample the
287
287
  distribution of pixel brightness values in order to compute the
288
288
  background statistics. This parameter is aplicable *only* to *stat*
289
- parameter values of `'mode'` or `'midpt'`.
289
+ parameter values of ``'mode'`` or ``'midpt'``.
290
290
 
291
291
  clobber : bool
292
292
  Specify whether or not to 'clobber' (delete then replace)
@@ -307,7 +307,7 @@ def clean(input, suffix, stat="pmode1", maxiter=15, sigrej=2.0,
307
307
  computations. For example, if pixels in the DQ array can be
308
308
  combinations of 1, 2, 4, and 8 flags and one wants to consider
309
309
  DQ "defects" having flags 2 and 4 as being acceptable for de-striping
310
- computations, then `dqbits` should be set to 2+4=6. Then a DQ pixel
310
+ computations, then ``dqbits`` should be set to 2+4=6. Then a DQ pixel
311
311
  having values 2,4, or 6 will be considered a good pixel, while a DQ
312
312
  pixel with a value, e.g., 1+2=3, 4+8=12, etc. will be flagged
313
313
  as a "bad" pixel.
@@ -315,30 +315,30 @@ def clean(input, suffix, stat="pmode1", maxiter=15, sigrej=2.0,
315
315
  Alternatively, one can enter a comma- or '+'-separated list of
316
316
  integer bit flags that should be added to obtain the final
317
317
  "good" bits. For example, both ``4,8`` and ``4+8`` are equivalent to
318
- setting `dqbits` to 12.
318
+ setting ``dqbits`` to 12.
319
319
 
320
- | Set `dqbits` to 0 to make *all* non-zero pixels in the DQ
320
+ | Set ``dqbits`` to 0 to make *all* non-zero pixels in the DQ
321
321
  mask to be considered "bad" pixels, and the corresponding image
322
322
  pixels not to be used for de-striping computations.
323
323
 
324
324
  | Default value (`None`) will turn off the use of image's DQ array
325
325
  for de-striping computations.
326
326
 
327
- | In order to reverse the meaning of the `dqbits`
327
+ | In order to reverse the meaning of the ``dqbits``
328
328
  parameter from indicating values of the "good" DQ flags
329
329
  to indicating the "bad" DQ flags, prepend '~' to the string
330
330
  value. For example, in order not to use pixels with
331
331
  DQ flags 4 and 8 for sky computations and to consider
332
332
  as "good" all other pixels (regardless of their DQ flag),
333
- set `dqbits` to ``~4+8``, or ``~4,8``. To obtain the
333
+ set ``dqbits`` to ``~4+8``, or ``~4,8``. To obtain the
334
334
  same effect with an `int` input value (except for 0),
335
335
  enter -(4+8+1)=-9. Following this convention,
336
- a `dqbits` string value of ``'~0'`` would be equivalent to
336
+ a ``dqbits`` string value of ``'~0'`` would be equivalent to
337
337
  setting ``dqbits=None``.
338
338
 
339
339
  .. note::
340
340
  DQ masks (if used), *will be* combined with user masks specified
341
- in the `mask1` and `mask2` parameters (if any).
341
+ in the ``mask1`` and ``mask2`` parameters (if any).
342
342
 
343
343
  rpt_clean : int
344
344
  An integer indicating how many *additional* times stripe cleaning
@@ -346,8 +346,8 @@ def clean(input, suffix, stat="pmode1", maxiter=15, sigrej=2.0,
346
346
 
347
347
  atol : float, None
348
348
  The threshold for maximum absolute value of bias stripe correction
349
- below which repeated cleanings can stop. When `atol` is `None`
350
- cleaning will be repeated `rpt_clean` number of times.
349
+ below which repeated cleanings can stop. When ``atol`` is `None`
350
+ cleaning will be repeated ``rpt_clean`` number of times.
351
351
  Default = 0.01 [e].
352
352
 
353
353
  verbose : bool
@@ -148,7 +148,7 @@ def destripe_plus(inputfile, suffix='strp', stat='pmode1', maxiter=15,
148
148
  * 'mode' - the mode of the distribution of the "good" pixels;
149
149
  * 'median' - the median of the distribution of the "good" pixels;
150
150
  * 'midpt' - estimate of the median of the distribution of the "good"
151
- pixels based on an algorithm similar to IRAF's `imagestats` task
151
+ pixels based on an algorithm similar to IRAF's ``imagestats`` task
152
152
  (``CDF(midpt)=1/2``).
153
153
 
154
154
  .. note::
@@ -184,7 +184,7 @@ def destripe_plus(inputfile, suffix='strp', stat='pmode1', maxiter=15,
184
184
  Histogram's bin width, in sigma units, used to sample the
185
185
  distribution of pixel brightness values in order to compute the
186
186
  background statistics. This parameter is aplicable *only* to *stat*
187
- parameter values of `'mode'` or `'midpt'`.
187
+ parameter values of ``'mode'`` or ``'midpt'``.
188
188
 
189
189
  scimask1 : str or list of str
190
190
  Mask images for *calibrated* ``SCI,1``, one for each input file.
@@ -201,7 +201,7 @@ def destripe_plus(inputfile, suffix='strp', stat='pmode1', maxiter=15,
201
201
  computations. For example, if pixels in the DQ array can be
202
202
  combinations of 1, 2, 4, and 8 flags and one wants to consider
203
203
  DQ "defects" having flags 2 and 4 as being acceptable for de-striping
204
- computations, then `dqbits` should be set to 2+4=6. Then a DQ pixel
204
+ computations, then ``dqbits`` should be set to 2+4=6. Then a DQ pixel
205
205
  having values 2,4, or 6 will be considered a good pixel, while a DQ
206
206
  pixel with a value, e.g., 1+2=3, 4+8=12, etc. will be flagged
207
207
  as a "bad" pixel.
@@ -209,30 +209,30 @@ def destripe_plus(inputfile, suffix='strp', stat='pmode1', maxiter=15,
209
209
  Alternatively, one can enter a comma- or '+'-separated list of
210
210
  integer bit flags that should be added to obtain the final
211
211
  "good" bits. For example, both ``4,8`` and ``4+8`` are equivalent to
212
- setting `dqbits` to 12.
212
+ setting ``dqbits`` to 12.
213
213
 
214
- | Set `dqbits` to 0 to make *all* non-zero pixels in the DQ
214
+ | Set ``dqbits`` to 0 to make *all* non-zero pixels in the DQ
215
215
  mask to be considered "bad" pixels, and the corresponding image
216
216
  pixels not to be used for de-striping computations.
217
217
 
218
218
  | Default value (`None`) will turn off the use of image's DQ array
219
219
  for de-striping computations.
220
220
 
221
- | In order to reverse the meaning of the `dqbits`
221
+ | In order to reverse the meaning of the ``dqbits``
222
222
  parameter from indicating values of the "good" DQ flags
223
223
  to indicating the "bad" DQ flags, prepend '~' to the string
224
224
  value. For example, in order not to use pixels with
225
225
  DQ flags 4 and 8 for sky computations and to consider
226
226
  as "good" all other pixels (regardless of their DQ flag),
227
- set `dqbits` to ``~4+8``, or ``~4,8``. To obtain the
227
+ set ``dqbits`` to ``~4+8``, or ``~4,8``. To obtain the
228
228
  same effect with an `int` input value (except for 0),
229
229
  enter -(4+8+1)=-9. Following this convention,
230
- a `dqbits` string value of ``'~0'`` would be equivalent to
230
+ a ``dqbits`` string value of ``'~0'`` would be equivalent to
231
231
  setting ``dqbits=None``.
232
232
 
233
233
  .. note::
234
234
  DQ masks (if used), *will be* combined with user masks specified
235
- in the `scimask1` and `scimask2` parameters (if any).
235
+ in the ``scimask1`` and ``scimask2`` parameters (if any).
236
236
 
237
237
  rpt_clean : int
238
238
  An integer indicating how many *additional* times stripe cleaning
@@ -240,8 +240,8 @@ def destripe_plus(inputfile, suffix='strp', stat='pmode1', maxiter=15,
240
240
 
241
241
  atol : float, None
242
242
  The threshold for maximum absolute value of bias stripe correction
243
- below which repeated cleanings can stop. When `atol` is `None`
244
- cleaning will be repeated `rpt_clean` number of times.
243
+ below which repeated cleanings can stop. When ``atol`` is `None`
244
+ cleaning will be repeated ``rpt_clean`` number of times.
245
245
  Default = 0.01 [e].
246
246
 
247
247
  cte_correct : bool
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python
2
2
  """
3
3
  The ACS Photometric CTE API is a programmatic interface for the
4
- `ACS Photometric CTE Webtool <https://acsphotometriccte.stsci.edu>`_.
4
+ ACS Photometric CTE Webtool (currently unavailable).
5
5
  The API is a cloud-based service that employs a serverless approach on AWS
6
6
  with API Gateway and Lambda to compute the photometric CTE corrections
7
7
  using the model described in `ACS ISR 2022-06 <https://ui.adsabs.harvard.edu/abs/2022acs..rept....6C/abstract>`_.
@@ -38,9 +38,9 @@ def acssum(input, output, exec_path='', time_stamps=False, verbose=False,
38
38
 
39
39
  output : str
40
40
  Output filename.
41
- If `output` is '' and `input` is '\*_asn.fits',
42
- `output` will be automatically set to '\*_sfl.fits'.
43
- Otherwise, it is an error not to provide a specific `output`.
41
+ If ``output`` is '' and ``input`` is '\*_asn.fits',
42
+ ``output`` will be automatically set to '\*_sfl.fits'.
43
+ Otherwise, it is an error not to provide a specific ``output``.
44
44
 
45
45
  exec_path : str, optional
46
46
  The complete path to ACSSUM executable.
@@ -255,6 +255,8 @@ class Query:
255
255
  dt_obj = dt.datetime.strptime(self.date, fmt)
256
256
  except ValueError:
257
257
  result = f'{self.date} does not match YYYY-MM-DD format'
258
+ except Exception: # nosec
259
+ pass
258
260
  else:
259
261
  if dt_obj < self._acs_installation_date:
260
262
  result = ('The observation date cannot occur '
@@ -264,8 +266,8 @@ class Query:
264
266
  result = ('The observation date cannot be '
265
267
  'after 2029 '
266
268
  f'({self._end_table_date.strftime(fmt)})')
267
- finally:
268
- return result
269
+
270
+ return result
269
271
 
270
272
  def fetch(self):
271
273
  """Function to query API on AWS APIGateway for zeropoints for single or all
@@ -56,7 +56,7 @@ def calacs(input_file, exec_path=None, time_stamps=False, temp_files=False,
56
56
  exe_args : list, optional
57
57
  Arbitrary arguments passed to underlying executable call.
58
58
  Note: Implementation uses subprocess.call and whitespace is not
59
- permitted. E.g. use exe_args=['--nThreads', '1']
59
+ permitted. E.g., use exe_args=['--nThreads', '1']
60
60
 
61
61
  """
62
62
  if exec_path:
@@ -144,32 +144,32 @@ class TrailFinder:
144
144
  The specific header for the FITS extension being used. This is
145
145
  added onto the catalog. Default is `None`.
146
146
  save_image_header_keys : list, optional
147
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.save_image_header_keys`.
147
+ See :attr:`~acstools.findsat_mrt.TrailFinder.save_image_header_keys`.
148
148
  Default is an empty list (nothing saved from ``image_header``).
149
149
  processes : int, optional
150
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.processes`.
150
+ See :attr:`~acstools.findsat_mrt.TrailFinder.processes`.
151
151
  The default is 2.
152
152
  min_length : int, optional
153
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.min_length`.
153
+ See :attr:`~acstools.findsat_mrt.TrailFinder.min_length`.
154
154
  The default is 25 pixels.
155
155
  max_width : int, optional
156
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.max_width`.
156
+ See :attr:`~acstools.findsat_mrt.TrailFinder.max_width`.
157
157
  The default is 75 pixels.
158
158
  buffer : int, optional
159
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.buffer`.
159
+ See :attr:`~acstools.findsat_mrt.TrailFinder.buffer`.
160
160
  The default is 250 pixels on each side.
161
161
  threshold : float, optional
162
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.threshold`.
162
+ See :attr:`~acstools.findsat_mrt.TrailFinder.threshold`.
163
163
  The default is 5.
164
164
  theta : ndarray, optional
165
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.theta`.
165
+ See :attr:`~acstools.findsat_mrt.TrailFinder.theta`.
166
166
  The default is `None`, which sets to ``numpy.arange(0, 180, 0.5)``.
167
167
  kernels : list, optional
168
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.kernels`.
168
+ See :attr:`~acstools.findsat_mrt.TrailFinder.kernels`.
169
169
  The default is `None`, which reverts to using the 3-, 7-, and 15-pixel
170
170
  wide kernels included with this package.
171
171
  mask_include_status : list, optional
172
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.mask_include_status`.
172
+ See :attr:`~acstools.findsat_mrt.TrailFinder.mask_include_status`.
173
173
  The default is ``[2]``.
174
174
  plot : bool, optional
175
175
  Plot all intermediate steps. When set, plots of the input image, MRT
@@ -186,31 +186,31 @@ class TrailFinder:
186
186
  :func:`acstools.findsat_mrt.TrailFinder.plot_segment`. The default is
187
187
  `False`.
188
188
  output_dir : str, optional
189
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.output_dir`.
189
+ See :attr:`~acstools.findsat_mrt.TrailFinder.output_dir`.
190
190
  The default is ``'.'`` (current directory).
191
191
  output_root : string, optional
192
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.root`.
192
+ See :attr:`~acstools.findsat_mrt.TrailFinder.root`.
193
193
  The default is ``''`` (no prefix).
194
194
  check_persistence : bool, optional
195
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.check_persistence`.
195
+ See :attr:`~acstools.findsat_mrt.TrailFinder.check_persistence`.
196
196
  The default is `True`.
197
197
  min_persistence : float, optional
198
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.min_persistence`.
198
+ See :attr:`~acstools.findsat_mrt.TrailFinder.min_persistence`.
199
199
  Must be between 0 and 1. The default is 0.5.
200
200
  ignore_theta_range : list of tuples or `None`, optional
201
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.ignore_theta_range`.
201
+ See :attr:`~acstools.findsat_mrt.TrailFinder.ignore_theta_range`.
202
202
  Default is `None`.
203
203
  save_catalog : bool, optional
204
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.save_catalog`.
204
+ See :attr:`~acstools.findsat_mrt.TrailFinder.save_catalog`.
205
205
  Default is `True`.
206
206
  save_diagnostic : bool, optional
207
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.save_diagnostic`.
207
+ See :attr:`~acstools.findsat_mrt.TrailFinder.save_diagnostic`.
208
208
  Default is `True`.
209
209
  save_mrt : bool, optional
210
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.save_mrt`.
210
+ See :attr:`~acstools.findsat_mrt.TrailFinder.save_mrt`.
211
211
  Default is `False`.
212
212
  save_mask : bool, optional
213
- See :attr:`~acstools.utils_findsat_mrt.TrailFinder.save_mask`.
213
+ See :attr:`~acstools.findsat_mrt.TrailFinder.save_mask`.
214
214
  Default is `False`.
215
215
 
216
216
  ''' # noqa
@@ -755,11 +755,17 @@ class TrailFinder:
755
755
  '''
756
756
  # test for photutils
757
757
  try:
758
+ import photutils
758
759
  from photutils.detection import StarFinder
759
760
  except ImportError:
760
761
  LOG.error('photutils not installed. Source detection will not work.') # noqa
761
762
  return
762
763
 
764
+ from astropy.utils import minversion
765
+
766
+ PHOTUTILS_LT_3 = not minversion(photutils, "2.3.1.dev") # dev tag a little off
767
+ photutils.future_column_names = True
768
+
763
769
  LOG.info('Detection threshold: {}'.format(self.threshold))
764
770
 
765
771
  snrmap = self.mrt / self.mrt_err
@@ -773,13 +779,15 @@ class TrailFinder:
773
779
  LOG.info('Using kernel {}'.format(k))
774
780
 
775
781
  # detect sources
782
+ if PHOTUTILS_LT_3:
783
+ kwargs = {"brightest": None, "peakmax": None}
784
+ else:
785
+ kwargs = {"n_brightest": None, "peak_max": None}
776
786
  s = StarFinder(self.threshold, kernel, min_separation=20,
777
- exclude_border=False, brightest=None,
778
- peakmax=None)
787
+ exclude_border=False, **kwargs)
779
788
 
780
789
  # can fail for cases where nothing found. Allow code to return
781
790
  # nothing and move on
782
-
783
791
  tbl = s.find_stars(snrmap, mask=snrmap_mask)
784
792
  if tbl is None:
785
793
  nsources = 0
@@ -789,6 +797,12 @@ class TrailFinder:
789
797
  LOG.info('{{no}} sources found using kernel: {}'.format(nsources))
790
798
 
791
799
  if nsources > 0:
800
+ if not PHOTUTILS_LT_3:
801
+ col_map = {'x_centroid': 'xcentroid',
802
+ 'y_centroid': 'ycentroid'}
803
+ for col in col_map:
804
+ tbl.rename_column(col, col_map[col])
805
+
792
806
  tbl = tbl[np.isfinite(tbl['xcentroid'])]
793
807
  LOG.info('{} sources found using kernel'.format(len(tbl)))
794
808
  if (len(tbls) > 0):
@@ -809,10 +823,14 @@ class TrailFinder:
809
823
  # add the theta and rho values to the table
810
824
  if self.source_list is not None:
811
825
  dtheta = self.theta[1] - self.theta[0]
812
- self.source_list['theta'] = self.theta[0] + \
826
+ self.source_list['theta'] = (
827
+ self.theta[0] +
813
828
  dtheta * self.source_list['xcentroid']
814
- self.source_list['rho'] = self.rho[0] + \
829
+ )
830
+ self.source_list['rho'] = (
831
+ self.rho[0] +
815
832
  self.source_list['ycentroid']
833
+ )
816
834
 
817
835
  # Add the status array and endpoints array. Status will be zero
818
836
  # because no additional checks have been done yet.
@@ -1208,10 +1226,10 @@ class WfcWrapper(TrailFinder):
1208
1226
  Extension of input file to read. This keyword is required if the input
1209
1227
  image is an FLC/FLT file. The default is `None`.
1210
1228
  binsize : int or `None`, optional
1211
- See :attr:`~acstools.utils_findsat_mrt.WfcWrapper.binsize`.
1229
+ See :attr:`~acstools.findsat_mrt.WfcWrapper.binsize`.
1212
1230
  The default is `None` (no binning).
1213
1231
  ignore_flags : list of int
1214
- See :attr:`~acstools.utils_findsat_mrt.WfcWrapper.ignore_flags`.
1232
+ See :attr:`~acstools.findsat_mrt.WfcWrapper.ignore_flags`.
1215
1233
  Default is ``[4096, 8192, 16384]``.
1216
1234
  preprocess : bool, optional
1217
1235
  Flag to run all the preprocessing steps (bad pixel flagging,
@@ -259,7 +259,7 @@ class PolarizerTables:
259
259
 
260
260
  Returns
261
261
  -------
262
- pol_tables : `~acstools.polarizer_tools.PolarizerTables`
262
+ pol_tables : `~acstools.polarization_tools.PolarizerTables`
263
263
  """
264
264
  with open(yaml_file, 'r') as yf:
265
265
  input_dict = yaml.safe_load(yf)
@@ -273,7 +273,7 @@ class PolarizerTables:
273
273
 
274
274
  Returns
275
275
  -------
276
- pol_tables : `~acstools.polarizer_tools.PolarizerTables`
276
+ pol_tables : `~acstools.polarization_tools.PolarizerTables`
277
277
  """
278
278
  filename = get_pkg_data_filename(os.path.join('data', 'polarizer_tables.yaml'))
279
279
  return cls.from_yaml(filename)
@@ -420,7 +420,7 @@ def filter_sources(image, streak_positions, plot_streak=False, buffer=100,
420
420
  * trail width
421
421
  * trail SNR
422
422
  * trail persistence
423
- * trail status (see :attr:`acstools.utils_findsat_mrt.TrailFinder.mask_include_status`)
423
+ * trail status (see :attr:`acstools.findsat_mrt.TrailFinder.mask_include_status`)
424
424
 
425
425
  ''' # noqa
426
426
  # we'll save the newly measured parameters in the following arrays
@@ -1075,7 +1075,6 @@ def radon(image, theta=None, circle=False, *, preserve_range=False,
1075
1075
  Notes
1076
1076
  -----
1077
1077
  Based on code of Justin K. Romberg
1078
- (https://www.clear.rice.edu/elec431/projects96/DSP/bpanalysis.html)
1079
1078
 
1080
1079
  """
1081
1080
  total_median_time = 0.