add_astrometry¶
-
msumastro.header_processing.astrometry.
add_astrometry
(filename, overwrite=False, ra_dec=None, note_failure=False, save_wcs=False, verify=None, try_builtin_source_finder=False, custom_sextractor=False, odds_ratio=None, astrometry_config=None, camera='', avoid_pyfits=False)[source]¶ Add WCS headers to FITS file using astrometry.net
- Parameters
- overwritebool, optional
Set
True
to overwrite the original file. If False, the file astrometry.net generates is kept.- ra_declist or tuple of float or str
(RA, Dec) of field center as either decimal or sexagesimal; also limits search radius to 1 degree.
- note_failurebool, optional
If
True
, create a file with extension “failed” if astrometry.net fails. The “failed” file contains the error messages genreated by astrometry.net.- try_builtin_source_finderbool
If true, try using astrometry.net’s built-in source extractor if sextractor fails.
- save_wcs :
- verify :
- camerastr, one of [‘celestron’, ‘u9’, ‘cp16’], optional
Name of camera; determines the pixel scale used in the solved. Default is to use ‘u9’.
- avoid_pyfitsbool
Add arguments to solve-field to avoid calls to pyfits.BinTableHDU. See https://groups.google.com/forum/#!topic/astrometry/AT21x6zVAJo
- Returns
- bool
True
on success.
Notes
Tries a couple strategies before giving up: first sextractor, then, if that fails, astrometry.net’s built-in source extractor.
It also cleans up after astrometry.net, keeping only the new FITS file it generates, the .solved file, and, if desired, a “.failed” file for fields which it fails to solve.
For more flexible invocation of astrometry.net, see
call_astrometry()