astropop 0.9.5.dev9__tar.gz → 0.9.5.dev26__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 (159) hide show
  1. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/.github/workflows/build-n-publish.yml +4 -4
  2. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/.github/workflows/ci_devdeps.yml +12 -11
  3. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/.github/workflows/ci_workflows.yml +21 -14
  4. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/PKG-INFO +9 -7
  5. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/_online_tools.py +5 -1
  6. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/gaia.py +112 -13
  7. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/simbad.py +66 -11
  8. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/vizier.py +10 -0
  9. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/vizier_catalogs/apass9.yml +7 -0
  10. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/vizier_catalogs/twomass.yml +2 -0
  11. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/vizier_catalogs/ucac4.yml +3 -3
  12. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/vizier_catalogs/ucac5.yml +2 -2
  13. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/image/imcombine.py +6 -6
  14. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/photometry/aperture.py +6 -1
  15. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/photometry/detection.py +4 -1
  16. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/py_utils.py +2 -2
  17. astropop-0.9.5.dev26/astropop/version.py +24 -0
  18. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop.egg-info/PKG-INFO +9 -7
  19. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop.egg-info/SOURCES.txt +16 -1
  20. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop.egg-info/requires.txt +6 -4
  21. astropop-0.9.5.dev26/astropop.egg-info/scm_file_list.json +151 -0
  22. astropop-0.9.5.dev26/astropop.egg-info/scm_version.json +8 -0
  23. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/conf.py +1 -2
  24. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/reduction/astrometry.rst +6 -6
  25. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/reduction/imarith.rst +3 -3
  26. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/tools/catalog/gaia.rst +29 -8
  27. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/tools/catalog/simbad.rst +5 -5
  28. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/tools/catalog/vizier.rst +12 -13
  29. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/tools/files.rst +2 -2
  30. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/pyproject.toml +13 -6
  31. astropop-0.9.5.dev26/tests/conftest.py +220 -0
  32. astropop-0.9.5.dev26/tests/data/catalog_responses/README.md +68 -0
  33. astropop-0.9.5.dev26/tests/data/catalog_responses/allwise.yaml +3167 -0
  34. astropop-0.9.5.dev26/tests/data/catalog_responses/apass9.yaml +1079 -0
  35. astropop-0.9.5.dev26/tests/data/catalog_responses/gaia.yaml +10871 -0
  36. astropop-0.9.5.dev26/tests/data/catalog_responses/gsc242.yaml +4830 -0
  37. astropop-0.9.5.dev26/tests/data/catalog_responses/simbad.yaml +6668 -0
  38. astropop-0.9.5.dev26/tests/data/catalog_responses/skymapper.yaml +835 -0
  39. astropop-0.9.5.dev26/tests/data/catalog_responses/twomass.yaml +2306 -0
  40. astropop-0.9.5.dev26/tests/data/catalog_responses/tycho2.yaml +982 -0
  41. astropop-0.9.5.dev26/tests/data/catalog_responses/ucac4.yaml +1376 -0
  42. astropop-0.9.5.dev26/tests/data/catalog_responses/ucac5.yaml +160 -0
  43. astropop-0.9.5.dev26/tests/data/catalog_responses/vsx.yaml +679 -0
  44. astropop-0.9.5.dev26/tests/data/catalog_responses/wise.yaml +3600 -0
  45. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_aperture.py +14 -2
  46. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_astrometry.py +4 -5
  47. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_catalogs.py +2 -2
  48. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_catalogs_online.py +384 -55
  49. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_detection.py +3 -3
  50. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_filecollection.py +1 -1
  51. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_framedata.py +4 -4
  52. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_framedata_cachemanager.py +42 -26
  53. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_framedata_compat.py +1 -1
  54. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_framedata_tools.py +5 -4
  55. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_image_imcombine.py +7 -7
  56. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_math.py +0 -1
  57. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_physical_numpyfuncs.py +1 -1
  58. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_polarimetry.py +10 -10
  59. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_pyutils.py +26 -0
  60. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tox.ini +24 -7
  61. astropop-0.9.5.dev9/astropop/version.py +0 -16
  62. astropop-0.9.5.dev9/tests/conftest.py +0 -1
  63. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/.codacy.yml +0 -0
  64. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/.github/workflows/code_quality_analysis.yml +0 -0
  65. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/.gitignore +0 -0
  66. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/.readthedocs.yml +0 -0
  67. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/MANIFEST.in +0 -0
  68. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/README.rst +0 -0
  69. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/__init__.py +0 -0
  70. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/_unit_property.py +0 -0
  71. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/astrometry/__init__.py +0 -0
  72. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/astrometry/astrometrynet.py +0 -0
  73. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/astrometry/coords_utils.py +0 -0
  74. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/astrometry/manual_wcs.py +0 -0
  75. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/__init__.py +0 -0
  76. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/_sources_catalog.py +0 -0
  77. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/vizier_catalogs/allwise.yml +0 -0
  78. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/vizier_catalogs/denis.yml +0 -0
  79. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/vizier_catalogs/gsc242.yml +0 -0
  80. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/vizier_catalogs/hip.yml +0 -0
  81. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/vizier_catalogs/skymapper.yml +0 -0
  82. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/vizier_catalogs/tycho2.yml +0 -0
  83. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/vizier_catalogs/vsx.yml +0 -0
  84. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/catalogs/vizier_catalogs/wise.yml +0 -0
  85. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/file_collection.py +0 -0
  86. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/fits_utils.py +0 -0
  87. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/flags.py +0 -0
  88. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/framedata/__init__.py +0 -0
  89. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/framedata/_compat.py +0 -0
  90. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/framedata/_memmap.py +0 -0
  91. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/framedata/cache_manager.py +0 -0
  92. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/framedata/framedata.py +0 -0
  93. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/framedata/util.py +0 -0
  94. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/image/__init__.py +0 -0
  95. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/image/_tools.py +0 -0
  96. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/image/imarith.py +0 -0
  97. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/image/processing.py +0 -0
  98. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/image/register.py +0 -0
  99. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/logger.py +0 -0
  100. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/math/__init__.py +0 -0
  101. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/math/_deriv.py +0 -0
  102. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/math/array.py +0 -0
  103. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/math/hasher.py +0 -0
  104. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/math/models.py +0 -0
  105. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/math/physical.py +0 -0
  106. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/photometry/__init__.py +0 -0
  107. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/photometry/background.py +0 -0
  108. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/polarimetry/__init__.py +0 -0
  109. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop/testing.py +0 -0
  110. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop.egg-info/dependency_links.txt +0 -0
  111. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/astropop.egg-info/top_level.txt +0 -0
  112. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/codecov.yml +0 -0
  113. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/Makefile +0 -0
  114. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/_static/le2pol.jpeg +0 -0
  115. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/data_structures/framedata.rst +0 -0
  116. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/data_structures/physical.rst +0 -0
  117. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/data_structures.rst +0 -0
  118. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/dev/pixel_convention.rst +0 -0
  119. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/index.rst +0 -0
  120. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/ipynb/astrometry_example.ipynb +0 -0
  121. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/ipynb/diy_reduction_script.ipynb +0 -0
  122. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/ipynb/online_catalogs.ipynb +0 -0
  123. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/make.bat +0 -0
  124. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/reducing.rst +0 -0
  125. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/reduction/ccdprocessing.rst +0 -0
  126. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/reduction/photometry.rst +0 -0
  127. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/reduction/pipelines.rst +0 -0
  128. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/reduction/polarimetry.rst +0 -0
  129. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/reduction/registering.rst +0 -0
  130. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/references.txt +0 -0
  131. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/tools/catalogs.rst +0 -0
  132. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/tools/fits_utils.rst +0 -0
  133. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/tools/logger.rst +0 -0
  134. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/tools/py_utils.rst +0 -0
  135. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/tools/testing.rst +0 -0
  136. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/tools.rst +0 -0
  137. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/docs/user_guide.rst +0 -0
  138. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/licenses/LICENSE.rst +0 -0
  139. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/licenses/TEMPLATE_LICENCE.rst +0 -0
  140. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/scripts/fitsheader_set +0 -0
  141. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/setup.cfg +0 -0
  142. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/setup.py +0 -0
  143. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/__init__.py +0 -0
  144. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_fits_utils.py +0 -0
  145. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_flags.py +0 -0
  146. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_framedata_getset.py +0 -0
  147. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_framedata_io.py +0 -0
  148. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_framedata_memmap.py +0 -0
  149. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_framedata_meta.py +0 -0
  150. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_framedata_utils.py +0 -0
  151. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_image_imarith.py +0 -0
  152. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_image_mergers.py +0 -0
  153. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_image_processing.py +0 -0
  154. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_image_register.py +0 -0
  155. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_logger.py +0 -0
  156. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_math_models.py +0 -0
  157. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_physical.py +0 -0
  158. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_testing.py +0 -0
  159. {astropop-0.9.5.dev9 → astropop-0.9.5.dev26}/tests/test_unit_property.py +0 -0
@@ -12,13 +12,13 @@ jobs:
12
12
  name: Build and publish to PyPi
13
13
  runs-on: ubuntu-latest
14
14
  steps:
15
- - uses: actions/checkout@master
15
+ - uses: actions/checkout@v6
16
16
  with:
17
17
  fetch-depth: 0
18
- - name: Set up Python 3.9
19
- uses: actions/setup-python@v1
18
+ - name: Set up Python 3.13
19
+ uses: actions/setup-python@v6
20
20
  with:
21
- python-version: 3.9
21
+ python-version: '3.13'
22
22
  - name: Install pypa/build
23
23
  run: >-
24
24
  python -m
@@ -23,19 +23,20 @@ jobs:
23
23
  libraries: |
24
24
  apt:
25
25
  - tzdata
26
- - libopenblas-base
27
26
  - libopenblas-dev
28
27
  envs: |
29
- - name: (Allowed Failure) Python 3.12 with dev version of deps
30
- linux: py313-test-devdeps-online
31
- python-version: 3.13-dev
32
-
28
+ # Live service compatibility is checked in CI's online conformance job.
29
+ # These environments exercise dependency/platform changes with mocks.
33
30
  - name: (Allowed Failure) Python 3.13 with dev version of deps
34
- linux: py313-test-devdeps-online
35
- python-version: 3.12
31
+ linux: py313-test-devdeps
32
+ python-version: '3.13'
33
+
34
+ - name: (Allowed Failure) Python 3.14 with dev version of deps
35
+ linux: py314-test-devdeps
36
+ python-version: '3.14'
36
37
 
37
- - macos: py312-test-online
38
- cache-key: ${{ github.ref }}-py312mac-astropycache
38
+ - macos: py313-test
39
+ cache-key: ${{ github.ref }}-py313mac-astropycache
39
40
 
40
- - windows: py312-test-online
41
- cache-key: ${{ github.ref }}-py312win-astropycache
41
+ - windows: py313-test
42
+ cache-key: ${{ github.ref }}-py313win-astropycache
@@ -20,16 +20,25 @@ jobs:
20
20
  with:
21
21
  cache-path: ~/.astropy
22
22
  envs: |
23
- - linux: py38-test-olddeps-online
24
- cache-key: ${{ github.ref }}-py38lin-astropycache
25
- - linux: py39-test-online
26
- cache-key: ${{ github.ref }}-py39lin-astropycache
27
- - linux: py310-test-online
23
+ - linux: py310-test-olddeps
28
24
  cache-key: ${{ github.ref }}-py310lin-astropycache
29
- - linux: py311-test-online
25
+ - linux: py311-test
30
26
  cache-key: ${{ github.ref }}-py311lin-astropycache
31
- - linux: py312-test-online
27
+ - linux: py312-test
32
28
  cache-key: ${{ github.ref }}-py312lin-astropycache
29
+ - linux: py313-test
30
+ cache-key: ${{ github.ref }}-py313lin-astropycache
31
+ - linux: py314-test
32
+ cache-key: ${{ github.ref }}-py314lin-astropycache
33
+
34
+ online_conformance:
35
+ name: Online catalog conformance
36
+ uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
37
+ if: "!(contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[ci skip]'))"
38
+ with:
39
+ envs: |
40
+ - linux: py314-catalogs-online
41
+ python-version: '3.14'
33
42
 
34
43
  build_docs:
35
44
  uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
@@ -68,14 +77,12 @@ jobs:
68
77
  path: ${{ env.CONDA }}/envs
69
78
  key:
70
79
  ${{ github.ref }}-${{ runner.os }}-${{ runner.arch }}-${{ steps.get-date.outputs.today }}-conda-envs-${{ hashFiles('pyproject.toml') }}
71
- - uses: conda-incubator/setup-miniconda@v2
80
+ - uses: conda-incubator/setup-miniconda@v4
72
81
  with:
73
- miniforge-variant: Mambaforge
74
82
  miniforge-version: latest
75
83
  activate-environment: astropop
76
- use-mamba: true
77
- mamba-version: "*"
78
- channels: conda-forge,defaults
84
+ channels: conda-forge
85
+ conda-remove-defaults: true
79
86
  python-version: "3.12"
80
87
  - name: Cache astropy cache
81
88
  uses: actions/cache@v3
@@ -87,7 +94,7 @@ jobs:
87
94
  - name: Install dependencies
88
95
  shell: bash -l {0}
89
96
  run: |
90
- mamba install -y -q pytest astrometry \
97
+ conda install -y -q pytest astrometry \
91
98
  astropy scipy numpy matplotlib \
92
99
  scikit-image scikit-learn \
93
100
  sep astroquery
@@ -104,7 +111,7 @@ jobs:
104
111
  - name: Run Pytest and generate coverage
105
112
  shell: bash -l {0}
106
113
  run: |
107
- pytest --pyargs ./tests ./docs --remote-data --cov astropop --cov-config=./pyproject.toml
114
+ pytest --pyargs ./tests ./docs --remote-data=none --cov astropop --cov-config=./pyproject.toml
108
115
  coverage xml -o ./coverage.xml
109
116
  - name: Upload coverage to Codecov
110
117
  uses: codecov/codecov-action@v4
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: astropop
3
- Version: 0.9.5.dev9
3
+ Version: 0.9.5.dev26
4
4
  Summary: Astronomical Polarimetry and Photometry Pipeline
5
5
  Author-email: Julio Campagnolo <julio.campagnolo@cefet-rj.br>
6
6
  License: BSD-3-Clause
@@ -17,15 +17,15 @@ Classifier: Programming Language :: Python :: 3
17
17
  Classifier: Programming Language :: Python :: Implementation :: CPython
18
18
  Classifier: Topic :: Scientific/Engineering :: Astronomy
19
19
  Classifier: Topic :: Scientific/Engineering :: Physics
20
- Requires-Python: >=3.8
20
+ Requires-Python: >=3.10
21
21
  Description-Content-Type: text/x-rst
22
- Requires-Dist: astropy>=4.3
23
- Requires-Dist: numpy>=1.17
24
- Requires-Dist: scipy>=1.6
22
+ Requires-Dist: astropy>=5.0
23
+ Requires-Dist: numpy>=1.21.6
24
+ Requires-Dist: scipy>=1.7.3
25
25
  Requires-Dist: astroquery
26
26
  Requires-Dist: scikit-image
27
27
  Requires-Dist: scikit-learn
28
- Requires-Dist: photutils>=1.7
28
+ Requires-Dist: photutils<3,>=1.7
29
29
  Requires-Dist: pytz
30
30
  Requires-Dist: pyyaml
31
31
  Requires-Dist: astroscrappy
@@ -40,7 +40,9 @@ Requires-Dist: pytest-astropy; extra == "test"
40
40
  Requires-Dist: pytest-remotedata; extra == "test"
41
41
  Requires-Dist: testfixtures; extra == "test"
42
42
  Requires-Dist: pytest-rerunfailures; extra == "test"
43
+ Requires-Dist: vcrpy>=7; extra == "test"
43
44
  Provides-Extra: docs
45
+ Requires-Dist: matplotlib; extra == "docs"
44
46
  Requires-Dist: ipython; extra == "docs"
45
47
  Requires-Dist: ipykernel; extra == "docs"
46
48
  Requires-Dist: sphinx; extra == "docs"
@@ -76,9 +76,13 @@ def astroquery_skycoord(center, simbad=None):
76
76
  if simbad is None:
77
77
  simbad = Simbad()
78
78
  t = simbad.query_object(center)
79
- if t is None:
79
+ if t is None or len(t) == 0:
80
80
  raise ValueError(f'Coordinates {center} could not be'
81
81
  ' resolved.')
82
+ # The TAP interface (Astroquery >= 0.4.8) returns degrees
83
+ # under lowercase names; the legacy interface used sexagesimal.
84
+ if 'ra' in t.colnames and 'dec' in t.colnames:
85
+ return SkyCoord(t['ra'][0], t['dec'][0], unit='deg')
82
86
  return guess_coordinates(t['RA'][0], t['DEC'][0], skycoord=True)
83
87
  if isinstance(center, (tuple, list, np.ndarray)) and len(center) == 2:
84
88
  return guess_coordinates(center[0], center[1], skycoord=True)
@@ -2,11 +2,14 @@
2
2
  """Query and match objects in catalogs using TAP services."""
3
3
 
4
4
  import copy
5
+ import time
6
+ from contextlib import contextmanager
5
7
  import numpy as np
6
8
  from astropy.coordinates import SkyCoord
7
9
  from astropy import units as u
8
10
  from astroquery.gaia import Gaia
9
11
  from astropy.time import Time
12
+ from astropy.table import vstack
10
13
 
11
14
  from ._sources_catalog import _OnlineSourcesCatalog, SourcesCatalog
12
15
  from ._online_tools import astroquery_query, string_fix
@@ -16,6 +19,45 @@ from ..math import QFloat
16
19
  __all__ = ['GaiaDR3SourcesCatalog', 'gaiadr3']
17
20
 
18
21
 
22
+ @contextmanager
23
+ def _gaia_query_timeout(client, timeout=300):
24
+ """Limit socket waits using one budget for the whole Gaia query.
25
+
26
+ The deadline is checked when a connection is created; its remaining time
27
+ becomes that socket's inactivity timeout. This is not a hard wall-clock
28
+ limit on DNS resolution, a continuously streaming response, or parsing.
29
+ """
30
+ # Gaia can accept an async job but leave it in EXECUTING for minutes, even
31
+ # for a tiny result. A successful availability request does not rule this
32
+ # out. Astroquery polls the job without an overall deadline, and its TAP
33
+ # sockets have no explicit timeout, so even a status read can hang.
34
+ #
35
+ # The TAP client has no public timeout setter. Adapt the connection factory
36
+ # only on this catalog's deepcopy of Gaia, preserving the configured host
37
+ # and avoiding process-wide socket changes. Restore it on success or error.
38
+ handler = client._TapPlus__getconnhandler()._TapConn__connectionHandler
39
+ original = handler.get_connection
40
+ deadline = time.monotonic() + timeout
41
+ connections = []
42
+
43
+ def get_connection(*args, **kwargs):
44
+ remaining = deadline - time.monotonic()
45
+ if remaining <= 0:
46
+ raise TimeoutError('Gaia query timed out.')
47
+ connection = original(*args, **kwargs)
48
+ connection.timeout = remaining
49
+ connections.append(connection)
50
+ return connection
51
+
52
+ handler.get_connection = get_connection
53
+ try:
54
+ yield
55
+ finally:
56
+ handler.get_connection = original
57
+ for connection in connections:
58
+ connection.close()
59
+
60
+
19
61
  class GaiaDR3SourcesCatalog(_OnlineSourcesCatalog):
20
62
  """Sources catalog from Gaia-DR3 catalog.
21
63
 
@@ -43,10 +85,16 @@ class GaiaDR3SourcesCatalog(_OnlineSourcesCatalog):
43
85
  Maximum G-band magnitude to query. If None, no magnitude
44
86
  filtering will be performed. Default is None.
45
87
 
88
+ query_mode: {'async', 'sync'} (optional)
89
+ Use asynchronous jobs (default) or synchronous requests. Synchronous
90
+ queries fetch pages of at most 2000 sources and return the complete
91
+ result sorted by distance, without creating asynchronous jobs.
92
+
46
93
  Raises
47
94
  ------
48
95
  ValueError:
49
- If a ``band`` not available in the filters is passed.
96
+ If a ``band`` not available in the filters is passed, or
97
+ ``query_mode`` is not ``'async'`` or ``'sync'``.
50
98
  """
51
99
 
52
100
  _available_filters = ['G', 'BP', 'RP']
@@ -58,7 +106,11 @@ class GaiaDR3SourcesCatalog(_OnlineSourcesCatalog):
58
106
  'phot_variable_flag', 'non_single_star',
59
107
  'in_galaxy_candidates']
60
108
 
61
- def __init__(self, center, radius, band='all', max_g_mag=None):
109
+ def __init__(self, center, radius, band='all', max_g_mag=None, *,
110
+ query_mode='async'):
111
+ if query_mode not in ('async', 'sync'):
112
+ raise ValueError("query_mode must be 'async' or 'sync'.")
113
+ self._query_mode = query_mode
62
114
  self._setup_catalog()
63
115
  self._max_g_mag = max_g_mag
64
116
  _OnlineSourcesCatalog.__init__(self, center, radius=radius, band=band)
@@ -103,10 +155,24 @@ class GaiaDR3SourcesCatalog(_OnlineSourcesCatalog):
103
155
  mag_err = 1.1/np.array(query[f'phot_{f}_mean_flux_over_error'])
104
156
  return QFloat(mag, mag_err, unit='mag')
105
157
 
106
- def _query_object_async(self, center, radius=None, columns=None):
107
- """Construct the query and launch job. Good for max_g_mag filtering."""
108
- # Based on astroquery.gaia.Gaia.query_object_async
158
+ def _query_object(self, center, radius=None, columns=None):
159
+ """Query a cone using the selected TAP mode and sort by distance."""
160
+ # Based on astroquery.gaia.Gaia.query_object_async. Sync mode bypasses
161
+ # async job execution/polling, which was slow even when the same SQL
162
+ # completed promptly through /sync. It can still suffer network or
163
+ # server timeouts; it is an alternative path, not a timeout guarantee.
164
+ sync = self._query_mode == 'sync'
165
+ # Astroquery's synchronous launcher limits results to 2000 rows, even
166
+ # with Gaia.ROW_LIMIT = -1. Page by unique source_id to avoid truncation.
167
+ # Distance is not a safe cursor because multiple sources can tie.
168
+ # Keep IDs as integers (Gaia IDs exceed float's exact-integer range),
169
+ # and remove this extra column unless the caller requested it.
170
+ include_id = sync and 'source_id' not in columns
109
171
  columns = ','.join(map(str, columns))
172
+ if include_id:
173
+ columns += ',source_id'
174
+ row_limit = 'TOP 2000' if sync else ''
175
+ order = 'source_id ASC' if sync else 'dist ASC'
110
176
 
111
177
  ra = center.ra.degree
112
178
  dec = center.dec.degree
@@ -117,7 +183,7 @@ class GaiaDR3SourcesCatalog(_OnlineSourcesCatalog):
117
183
  mag_filtering = ''
118
184
 
119
185
  query = f"""
120
- SELECT
186
+ SELECT {row_limit}
121
187
  {columns},
122
188
  DISTANCE(
123
189
  POINT('ICRS', {self._g.MAIN_GAIA_TABLE_RA},
@@ -132,18 +198,51 @@ class GaiaDR3SourcesCatalog(_OnlineSourcesCatalog):
132
198
  CIRCLE('ICRS', {ra}, {dec}, {radius})
133
199
  )
134
200
  {mag_filtering}
201
+ {{page_filter}}
135
202
  ORDER BY
136
- dist ASC
203
+ {order}
137
204
  """
138
205
 
139
- return self._g.launch_job_async(query,
140
- dump_to_file=False).get_results()
206
+ if not sync:
207
+ return self._g.launch_job_async(query.format(page_filter=''),
208
+ dump_to_file=False).get_results()
209
+
210
+ pages = []
211
+ last_id = None
212
+ while True:
213
+ page_filter = ('' if last_id is None else
214
+ f'AND source_id > {last_id}')
215
+ page = self._g.launch_job(query.format(page_filter=page_filter),
216
+ dump_to_file=False).get_results()
217
+ if page is None:
218
+ raise RuntimeError('No online catalog result found.')
219
+ if len(page):
220
+ next_id = int(page['source_id'][-1])
221
+ if last_id is not None and next_id <= last_id:
222
+ raise RuntimeError('Gaia synchronous pagination stalled.')
223
+ last_id = next_id
224
+ pages.append(page)
225
+ # A full page does not prove that the result is complete. An exact
226
+ # multiple of 2000 therefore needs one final, empty request.
227
+ if len(page) < 2000:
228
+ break
229
+ result = vstack(pages, join_type='exact') if len(pages) > 1 else pages[0]
230
+ # Page order is by ID; the catalog API promises angular-distance order.
231
+ result.sort('dist')
232
+ if include_id:
233
+ result.remove_column('source_id')
234
+ return result
141
235
 
142
236
  def _do_query(self):
143
- self._query = astroquery_query(self._query_object_async,
144
- self._center,
145
- radius=self._radius.to(u.deg).value,
146
- columns=self._columns)
237
+ # Keep the deadline outside astroquery_query: its timeout retries must
238
+ # not each get a fresh five-minute budget. In sync mode this same budget
239
+ # covers every page. An exception propagates instead of exposing a
240
+ # partial catalog or silently switching back to the slow async path.
241
+ with _gaia_query_timeout(self._g):
242
+ self._query = astroquery_query(self._query_object,
243
+ self._center,
244
+ radius=self._radius.to(u.deg).value,
245
+ columns=self._columns)
147
246
  sk = SkyCoord(self._query['ra'], self._query['dec'],
148
247
  obstime=Time(self._query['ref_epoch'], format='jyear'),
149
248
  pm_ra_cosdec=self._query['pmra'],
@@ -16,6 +16,40 @@ from ..py_utils import string_fix
16
16
  __all__ = ['simbad_query_id', 'SimbadSourcesCatalog', 'simbad']
17
17
 
18
18
 
19
+ def _normalize_tap_result(query, filters):
20
+ """Pivot TAP flux rows into one legacy-shaped row per source.
21
+
22
+ Keep filter names case-sensitive and preserve masked photometry as NaN.
23
+ Coordinates from TAP remain in degrees.
24
+ """
25
+ _, indices = np.unique(query['main_id'], return_index=True)
26
+ indices.sort()
27
+ result = query[indices].copy()
28
+ for key in ('main_id', 'ra', 'dec', 'pmra', 'pmdec', 'coo_bibcode'):
29
+ result.rename_column(key, key.upper())
30
+ for band in filters:
31
+ values = np.full(len(result), np.nan)
32
+ errors = np.full(len(result), np.nan)
33
+ bibcodes = []
34
+ for i, source in enumerate(result['MAIN_ID']):
35
+ selected = query[(query['main_id'] == source)
36
+ & (query['flux.filter'] == band)]
37
+ bibcode = ''
38
+ if len(selected):
39
+ row = selected[0]
40
+ if not np.ma.is_masked(row['flux']):
41
+ values[i] = row['flux']
42
+ if not np.ma.is_masked(row['flux_err']):
43
+ errors[i] = row['flux_err']
44
+ if not np.ma.is_masked(row['flux.bibcode']):
45
+ bibcode = string_fix(row['flux.bibcode'])
46
+ bibcodes.append(bibcode)
47
+ result[f'FLUX_{band}'] = values
48
+ result[f'FLUX_ERROR_{band}'] = errors
49
+ result[f'FLUX_BIBCODE_{band}'] = bibcodes
50
+ return result
51
+
52
+
19
53
  def _simbad_query_id(ra, dec, limit_angle, name_order=None):
20
54
  """Query name ids for a star in Simbad. See simbad_query_id.
21
55
 
@@ -60,14 +94,23 @@ def _simbad_query_id(ra, dec, limit_angle, name_order=None):
60
94
  unit=(u.degree, u.degree)),
61
95
  radius=limit_angle)
62
96
 
63
- if q is not None:
64
- name = string_fix(q['MAIN_ID'][0])
65
- ids = _timeout_retry(s.query_objectids, name)['ID']
97
+ if q is not None and len(q):
98
+ if 'ra' in q.colnames:
99
+ coords = SkyCoord(q['ra'], q['dec'], unit='deg')
100
+ center = SkyCoord(ra, dec, unit='deg')
101
+ q = q[np.argsort(coords.separation(center))]
102
+ key = 'main_id' if 'main_id' in q.colnames else 'MAIN_ID'
103
+ name = string_fix(q[key][0])
104
+ identifiers = _timeout_retry(s.query_objectids, name)
105
+ key = 'id' if 'id' in identifiers.colnames else 'ID'
106
+ ids = identifiers[key]
66
107
  for i in name_order:
67
108
  if i == 'MAIN_ID':
68
109
  return _strip_spaces(name)
110
+ if name.startswith(i+' '):
111
+ return _strip_spaces(name)
69
112
  for k in ids:
70
- if i+' ' in k:
113
+ if k.startswith(i+' '):
71
114
  return _strip_spaces(k)
72
115
  # If nothing is found, return empty string
73
116
  return ''
@@ -146,17 +189,29 @@ class SimbadSourcesCatalog(_OnlineSourcesCatalog):
146
189
 
147
190
  def _setup_catalog(self):
148
191
  self._s = Simbad()
149
- self._s.add_votable_fields('pm')
150
- self._s.ROW_LIMIT = 0
151
- for filt in self.filters:
152
- self._s.add_votable_fields(f'fluxdata({filt})')
192
+ self._tap = hasattr(type(self._s), 'tap')
193
+ if self._tap:
194
+ self._s.ROW_LIMIT = -1
195
+ self._s.add_votable_fields('pmra', 'pmdec', 'coo_bibcode')
196
+ if self.filters:
197
+ self._s.add_votable_fields('flux')
198
+ else:
199
+ self._s.add_votable_fields('pm')
200
+ self._s.ROW_LIMIT = 0
201
+ for filt in self.filters:
202
+ self._s.add_votable_fields(f'fluxdata({filt})')
153
203
 
154
204
  def _do_query(self):
155
205
  # We query everything in J2000 and query propermotion too
206
+ kwargs = {} if self._tap else {'epoch': 'J2000'}
156
207
  self._query = astroquery_query(self._s.query_region,
157
208
  self._center,
158
- radius=self._radius,
159
- epoch='J2000')
209
+ radius=self._radius, **kwargs)
210
+ if self._tap:
211
+ self._query = _normalize_tap_result(self._query, self.filters)
212
+ coords = SkyCoord(self._query['RA'], self._query['DEC'], unit='deg')
213
+ order = np.argsort(coords.separation(self._center))
214
+ self._query = self._query[order]
160
215
  ids = np.array([string_fix(i) for i in self._query['MAIN_ID']])
161
216
  for band in self.filters:
162
217
  if self._mags_table is None:
@@ -168,7 +223,7 @@ class SimbadSourcesCatalog(_OnlineSourcesCatalog):
168
223
  self._mags_table[f'{band}_error'] = mags_error
169
224
 
170
225
  sk = SkyCoord(self._query['RA'], self._query['DEC'],
171
- unit=('hourangle', 'degree'),
226
+ unit=('degree' if self._tap else 'hourangle', 'degree'),
172
227
  pm_ra_cosdec=self._query['PMRA'],
173
228
  pm_dec=self._query['PMDEC'],
174
229
  obstime='J2000.0', frame='icrs')
@@ -68,6 +68,10 @@ class VizierSourcesCatalog(_OnlineSourcesCatalog):
68
68
  self._table = self._conf['table']
69
69
  self._available_filters = self._get_available_filters()
70
70
  self._columns = self._conf['columns'] + self._get_mag_columns()
71
+ original_names = {alias: original for original, alias in
72
+ self._conf.get('column_aliases', {}).items()}
73
+ self._columns = [original_names.get(column, column)
74
+ for column in self._columns]
71
75
 
72
76
  self._setup_catalog()
73
77
  super().__init__(*args, **kwargs)
@@ -173,6 +177,11 @@ class VizierSourcesCatalog(_OnlineSourcesCatalog):
173
177
  if len(q) == 0:
174
178
  raise RuntimeError('An error occured during online query.')
175
179
  self._query = q[0]
180
+ # Recent Astroquery keeps the original VizieR column names instead
181
+ # of converting punctuation and leading digits to underscores.
182
+ for original, alias in self._conf.get('column_aliases', {}).items():
183
+ if original in self._query.colnames and alias not in self._query.colnames:
184
+ self._query.rename_column(original, alias)
176
185
  ids = self._filter_ids(self._query)
177
186
 
178
187
  # perform magnitude filtering only if available
@@ -228,3 +237,4 @@ def __getattr__(name):
228
237
  NewViz.help = staticmethod(help)
229
238
  NewViz.__doc__ += VizierSourcesCatalog.__doc__
230
239
  return NewViz
240
+ raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
@@ -3,6 +3,13 @@ table: 'II/336/apass9'
3
3
  bibcode: '2015AAS...22533616H'
4
4
  description: 'AAVSO Photometric All Sky Survey (APASS) DR9 (Henden+, 2016)'
5
5
  columns: ['+_r', '**'] # not so many columns
6
+ column_aliases:
7
+ "g'mag": g_mag
8
+ "e_g'mag": e_g_mag
9
+ "r'mag": r_mag
10
+ "e_r'mag": e_r_mag
11
+ "i'mag": i_mag
12
+ "e_i'mag": e_i_mag
6
13
  available_filters: {
7
14
  'B': 'Johnson B-band magnitude',
8
15
  'V': 'Johnson V-band magnitude',
@@ -3,6 +3,8 @@ table: 'II/246/out'
3
3
  bibcode: '2003yCat.2246....0C'
4
4
  description: '2MASS All-Sky Catalog of Point Sources (Cutri+ 2003)'
5
5
  columns: ['+_r', '**']
6
+ column_aliases:
7
+ 2MASS: _2MASS
6
8
  available_filters: {
7
9
  'J': '2MASS J magnitude (1.2um)',
8
10
  'H': '2MASS H magnitude (1.6um)',
@@ -2,7 +2,7 @@
2
2
  table: 'ucac4'
3
3
  description: "UCAC4 Catalogue (Zacharias+, 2012)"
4
4
  bibcode: "2012yCat.1322....0Z"
5
- columns: ['+_r', 'UCAC4', 'RA_ICRS', 'DE_ICRS', 'pmRA', 'pmDE', 'EpRA']
5
+ columns: ['+_r', 'UCAC4', 'RAJ2000', 'DEJ2000', 'pmRA', 'pmDE', 'EpRA']
6
6
  available_filters: {
7
7
  'J': '2MASS J magnitude (1.2um)',
8
8
  'H': '2MASS H magnitude (1.6um)',
@@ -14,8 +14,8 @@ available_filters: {
14
14
  'i': 'i magnitude from APASS'
15
15
  }
16
16
  coordinates:
17
- ra_column: 'RA_ICRS'
18
- dec_column: 'DE_ICRS'
17
+ ra_column: 'RAJ2000'
18
+ dec_column: 'DEJ2000'
19
19
  pm_ra_column: 'pmRA'
20
20
  pm_dec_column: 'pmDE'
21
21
  frame: 'icrs'
@@ -2,7 +2,7 @@
2
2
  table: 'ucac5'
3
3
  bibcode: "2017yCat.1340....0Z"
4
4
  description: 'UCAC5 Catalogue (Zacharias+ 2017)'
5
- columns: ['+r', '**']
5
+ columns: ['+_r', '**']
6
6
  available_filters: {
7
7
  'G': 'Gaia G magnitude',
8
8
  'R': 'Photographic R magnitude from NOMAD',
@@ -20,7 +20,7 @@ magnitudes:
20
20
  mag_column: '{band}mag'
21
21
  err_mag_column: 'e_{band}mag'
22
22
  epoch:
23
- value: 'J2015.0'
23
+ value: 2015.0
24
24
  format: 'jyear'
25
25
  ids:
26
26
  prepend: 'Gaia'
@@ -279,21 +279,21 @@ class ImCombiner:
279
279
  Maximum threshold of the clipping. `None` disables maximum masking.
280
280
  Default: `None`
281
281
  """
282
- l, h = min_value, max_value
282
+ low, high = min_value, max_value
283
283
  # disable
284
- if l is None and h is None:
284
+ if low is None and high is None:
285
285
  self._minmax = None
286
286
 
287
- for i in (l, h):
287
+ for i in (low, high):
288
288
  if not check_number(i) and i is not None:
289
289
  raise ValueError(f"{i} is not compatible with min_max "
290
290
  "clipping")
291
291
 
292
292
  # check if minimum is lower then maximum
293
- if l is not None and h is not None:
294
- l, h = sorted([l, h])
293
+ if low is not None and high is not None:
294
+ low, high = sorted([low, high])
295
295
 
296
- self._minmax = (l, h)
296
+ self._minmax = (low, high)
297
297
 
298
298
  def set_merge_header(self, strategy, keys=None):
299
299
  """Set the strategy to merge headers during combination.
@@ -244,8 +244,9 @@ def aperture_photometry(data, x, y, r='auto', r_ann='auto',
244
244
  -------
245
245
  res_ap : `~astropy.table.Table`
246
246
  Table containing all aperture photometry informations.
247
+
247
248
  - ``x``, ``y``: centroids of the sources. If recentering is performed,
248
- these values will be different from input.
249
+ these values will be different from input.
249
250
  - ``aperture``: aperture radius. Same for all sources.
250
251
  - ``flux``: flux of the sources with bkg subtracted
251
252
  - ``flux_error``: flux error of the sources with bkg subtracted
@@ -257,7 +258,9 @@ def aperture_photometry(data, x, y, r='auto', r_ann='auto',
257
258
  clipping)
258
259
  - ``flags``: flag for the sources
259
260
  - ``original_x``, ``original_y``: original input positions
261
+
260
262
  The metadata of the table will contain the following information:
263
+
261
264
  - ``photutils``: photutils version used
262
265
  - ``astropy``: astropy version used
263
266
  - ``astropop``: astropop version used
@@ -338,6 +341,8 @@ def aperture_photometry(data, x, y, r='auto', r_ann='auto',
338
341
 
339
342
  if bkg_error is None:
340
343
  bkg_error = 0.0
344
+ if np.ndim(bkg_error) == 0:
345
+ bkg_error = np.full_like(data, bkg_error, dtype=float)
341
346
 
342
347
  # Get the total error (bkg+poisson) from photutils
343
348
  # FIXME: check the gain situation
@@ -60,6 +60,7 @@ def segfind(data, threshold, background, noise, mask=None, fwhm=None, npix=5,
60
60
  sources: `astropy.table.Table`
61
61
  Table with the sources found. The table will contain the following
62
62
  columns:
63
+
63
64
  - ``id``: source ID
64
65
  - ``x``, ``y``: x and y coordinates of the source centroid
65
66
  - ``xcentroid``, ``ycentroid``: same as ``x`` and ``y``
@@ -234,6 +235,7 @@ def daofind(data, threshold, background, noise, fwhm,
234
235
  sources: `astropy.table.Table`
235
236
  Table with the sources found. The table will contain the following
236
237
  columns:
238
+
237
239
  - ``id``: source ID
238
240
  - ``x``, ``y``: x and y coordinates of the source centroid
239
241
  - ``xcentroid``, ``ycentroid``: same as ``x`` and ``y``
@@ -278,7 +280,7 @@ def daofind(data, threshold, background, noise, fwhm,
278
280
  # DaoStarFinder uses absolute threshold value
279
281
  thresh = np.median(threshold * noise)
280
282
 
281
- dao = DAOStarFinder(thresh, fwhm=fwhm, sky=0,
283
+ dao = DAOStarFinder(thresh, fwhm=fwhm,
282
284
  sharplo=sharplo, sharphi=sharphi,
283
285
  roundlo=roundlo, roundhi=roundhi,
284
286
  exclude_border=exclude_border,
@@ -369,6 +371,7 @@ def starfind(data, threshold, background, noise, fwhm=None, mask=None,
369
371
  sources: `astropy.table.Table`
370
372
  Table with the sources found. The table will contain the following
371
373
  columns:
374
+
372
375
  - ``id``: source ID
373
376
  - ``x``, ``y``: x and y coordinates of the source centroid
374
377
  - ``xcentroid``, ``ycentroid``: same as ``x`` and ``y``