|
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
|
9 |
| -from astropy.utils.decorators import deprecated_renamed_argument |
| 10 | +from astropy.utils.decorators import AstropyDeprecationWarning, deprecated_renamed_argument |
10 | 11 |
|
11 | 12 | try:
|
12 | 13 | from astropy.nddata import CCDData
|
@@ -332,7 +333,7 @@ def solve_from_source_list(self, x, y, image_width, image_height, *,
|
332 | 333 | verbose=verbose,
|
333 | 334 | return_submission_id=return_submission_id)
|
334 | 335 |
|
335 |
| - @deprecated_renamed_argument("force_image_upload", None, since="0.4.8") |
| 336 | + @deprecated_renamed_argument(("force_image_upload", "ra_dec_units"), (None, None), since="0.4.8") |
336 | 337 | def solve_from_image(self, image_file_path, *, force_image_upload=False,
|
337 | 338 | ra_key=None, dec_key=None,
|
338 | 339 | ra_dec_units=None,
|
@@ -414,10 +415,11 @@ def solve_from_image(self, image_file_path, *, force_image_upload=False,
|
414 | 415 | cache=False,
|
415 | 416 | files={'file': f})
|
416 | 417 | else:
|
417 |
| - warning_msg = "Removing photutils functionality to obtain position list." \ |
418 |
| - "Users can generate a coordinate list and upload to Astrometry.net" \ |
419 |
| - "or a fits file that Astrometry.net will extract positions." |
420 |
| - DeprecationWarning(warning_msg) |
| 418 | + warning_msg = "Removing photutils functionality to obtain extracted positions list from " \ |
| 419 | + "AstoromertyNetClass.solve_from_source_list. Users will need to " \ |
| 420 | + "submit pre-extracted catalog positions or a fits file for https://nova.astrometry.net/ " \ |
| 421 | + "to extract with their algorithm." |
| 422 | + warnings.warn(warning_msg, category=AstropyDeprecationWarning) |
421 | 423 | # Detect sources and delegate to solve_from_source_list
|
422 | 424 | if _HAVE_CCDDATA:
|
423 | 425 | # CCDData requires a unit, so provide one. It has absolutely
|
|
0 commit comments