Skip to content

Commit a63dbc5

Browse files
committed
DOC: Updated info related to solve_from_image from removal of deprecated functionality for astrometry_net
1 parent f0fd0e6 commit a63dbc5

1 file changed

Lines changed: 19 additions & 60 deletions

File tree

docs/astrometry_net/astrometry_net.rst

Lines changed: 19 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -138,78 +138,37 @@ dictionary is returned instead. For more details, see
138138
Solving from an image
139139
=====================
140140

141-
There are two ways to get a solution from an image:
141+
The method :meth:`~astroquery.astrometry_net.AstrometryNetClass.solve_from_image`
142+
uploads the entire image file to the `astrometry.net`_ server. The remote service
143+
then detects sources automatically and attempts to compute an astrometric (plate)
144+
solution.
142145

143-
1. Detect sources in the image and upload the source list to get the plate solution.
144-
2. Upload the image entire image. `astrometry.net`_ will detect sources and attempt to determine a solution.
146+
.. important::
145147

146-
In both cases, use
147-
`astroquery.astrometry_net.AstrometryNetClass.solve_from_image`.
148+
Uploading a full image transfers roughly **10,000 times more data** than
149+
uploading a pre-detected source list. In nearly all cases it is faster to
150+
detect sources locally yourself and then call
151+
:meth:`~astroquery.astrometry_net.AstrometryNetClass.solve_from_source_list`
152+
instead.
148153

149-
There are a few settings common to both cases that make it convenient
150-
to use pointing information from the FITS header of the image:
151-
152-
``ra_key``
153-
Name of the key in the FITS header that contains the RA.
154-
``dec_key``
155-
Name of the key in the FITS header that contains the RA.
156-
``ra_dec_units``
157-
Tuple specifying the units of the right ascension and declination in
158-
the header. The default value is ``('hour', 'degree')``.
159-
160-
Detect sources and upload source list
161-
-------------------------------------
162-
163-
To use this method you must have the package `photutils`_ installed.
154+
For example:
164155

165156
.. code-block:: python
166157
167158
from astroquery.astrometry_net import AstrometryNet
168-
169159
ast = AstrometryNet()
170160
ast.api_key = 'XXXXXXXXXXXXXXXX'
171-
172161
wcs_header = ast.solve_from_image('/path/to/image.fit')
173162
174-
There are a few settings specific to this case:
175-
176-
``FWHM``
177-
The rough full-width half-max of stars in the image, in pixels.
178-
``detect_threshold``
179-
The number of standard deviations above background a source needs
180-
to be to count as a detection.
181-
182-
For more options see :ref:`common_settings`.
183-
184-
If `astrometry.net`_ is able to find a solution it is returned as an
185-
`astropy.io.fits.Header`. If it is unable to find a solution an empty
186-
dictionary is returned instead. For more details, see
187-
:ref:`handling_results`.
188-
189-
Upload image
190-
------------
191-
192-
Keep in mind that uploading an image requires transferring roughly 10,000 times
193-
the data as uploading a source list. It would almost certainly take less time to
194-
find the sources in your image locally and upload that source list than it would
195-
to upload the image.
196-
197-
The image will be uploaded under two circumstances. You call
198-
`~astroquery.astrometry_net.AstrometryNetClass.solve_from_image` and either
199-
200-
+ do not have `photutils`_ installed, or
201-
+ set ``force_image_upload=True``.
202-
203-
For example:
204-
205-
.. code-block:: python
206-
207-
from astroquery.astrometry_net import AstrometryNet
208-
209-
ast = AstrometryNet()
210-
ast.api_key = 'XXXXXXXXXXXXXXXX'
163+
.. note::
211164

212-
wcs_header = ast.solve_from_image('/path/to/image.fit', force_image_upload=True)
165+
As of astroquery 0.4.8+ the previous option to automatically detect sources
166+
locally using `photutils` (when ``force_image_upload=False``) has been deprecated,
167+
and as of astroquery 0.4.12+, is entirely removed. The parameters ``fwhm`` and
168+
``detect_threshold`` are retained for backwards compatibility only and are
169+
ignored in the current implementation. If you need to solve from a source list,
170+
detect sources yourself (e.g. with `photutils` or another package) and use
171+
:meth:`~astroquery.astrometry_net.AstrometryNetClass.solve_from_source_list`.
213172

214173
If `astrometry.net`_ is able to find a solution it is returned as an
215174
`astropy.io.fits.Header`. If it is unable to find a solution an empty

0 commit comments

Comments
 (0)