|
2 | 2 |
|
3 | 3 |
|
4 | 4 | import json
|
| 5 | +import warnings |
5 | 6 |
|
6 | 7 | from astropy.io import fits
|
7 | 8 | from astropy.stats import sigma_clipped_stats
|
8 | 9 | from astropy.coordinates import SkyCoord
|
| 10 | +from astropy.utils.decorators import AstropyDeprecationWarning, deprecated_renamed_argument |
9 | 11 |
|
10 | 12 | try:
|
11 | 13 | from astropy.nddata import CCDData
|
@@ -331,6 +333,7 @@ def solve_from_source_list(self, x, y, image_width, image_height, *,
|
331 | 333 | verbose=verbose,
|
332 | 334 | return_submission_id=return_submission_id)
|
333 | 335 |
|
| 336 | + @deprecated_renamed_argument(("force_image_upload", "ra_dec_units"), (None, None), since="0.4.8") |
334 | 337 | def solve_from_image(self, image_file_path, *, force_image_upload=False,
|
335 | 338 | ra_key=None, dec_key=None,
|
336 | 339 | ra_dec_units=None,
|
@@ -412,6 +415,14 @@ def solve_from_image(self, image_file_path, *, force_image_upload=False,
|
412 | 415 | cache=False,
|
413 | 416 | files={'file': f})
|
414 | 417 | 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) |
415 | 426 | # Detect sources and delegate to solve_from_source_list
|
416 | 427 | if _HAVE_CCDDATA:
|
417 | 428 | # CCDData requires a unit, so provide one. It has absolutely
|
|
0 commit comments