Skip to content

Commit 26050ed

Browse files
authored
Merge pull request #3067 from mfixstsci/gh-2782-remove-photutils-from-astrometry.net
Remove photutils from Astroquery astrometry.net
2 parents e19a779 + 5bfc66b commit 26050ed

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

CHANGES.rst

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ New Tools and Services
88
Service fixes and enhancements
99
------------------------------
1010

11+
astrometry_net
12+
^^^^^^^^^^^^^^
13+
14+
- Remove photutils from Astroquery astrometry.net [#3067]
15+
1116
alma
1217
^^^^
1318

astroquery/astrometry_net/core.py

+11
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33

44
import json
5+
import warnings
56

67
from astropy.io import fits
78
from astropy.stats import sigma_clipped_stats
89
from astropy.coordinates import SkyCoord
10+
from astropy.utils.decorators import AstropyDeprecationWarning, deprecated_renamed_argument
911

1012
try:
1113
from astropy.nddata import CCDData
@@ -331,6 +333,7 @@ def solve_from_source_list(self, x, y, image_width, image_height, *,
331333
verbose=verbose,
332334
return_submission_id=return_submission_id)
333335

336+
@deprecated_renamed_argument(("force_image_upload", "ra_dec_units"), (None, None), since="0.4.8")
334337
def solve_from_image(self, image_file_path, *, force_image_upload=False,
335338
ra_key=None, dec_key=None,
336339
ra_dec_units=None,
@@ -412,6 +415,14 @@ def solve_from_image(self, image_file_path, *, force_image_upload=False,
412415
cache=False,
413416
files={'file': f})
414417
else:
418+
warning_msg = (
419+
"Removing photutils functionality to obtain extracted positions list from "
420+
"AstrometryNetClass.solve_from_source_list. Users will need to "
421+
"submit pre-extracted catalog positions or a fits file for https://nova.astrometry.net/ "
422+
"to extract with their algorithm."
423+
)
424+
425+
warnings.warn(warning_msg, category=AstropyDeprecationWarning)
415426
# Detect sources and delegate to solve_from_source_list
416427
if _HAVE_CCDDATA:
417428
# CCDData requires a unit, so provide one. It has absolutely

0 commit comments

Comments
 (0)