AstrometrySolver#
- class astropop.astrometry.AstrometrySolver(solve_field=None, config=None, config_file=None, defaults=None, keep_files=False)#
Bases:
object
Use astrometry.net to solve the astrometry of images or list of stars. For convenience, all the auxiliary files will be deleted, except you specify to keep it with
keep_files
.- Parameters:
- solve_field: string (optional)
solve-field
command from astrometry.net package. If not set, it will be determined bywhich
function.- config_file: string (optional)
Custom
astrometry.cfg
file to read the configuration from. IfNone
, default file will be used.- config: dict (optional)
Config parameters for astrometry.net. If None is passed, the parameters will be read from the default
astrometry.cfg
file.- defaults: `dict` (optional)
Default arguments to be passed to
solve-field
program. If not set, argumentsno-plot
andoverwrite
will be used. Use only double dashed arguments, ignoring the dashed in thedict
keys. Seeprint_options_help
- keep_files: bool (optional)
Keep the temporary files after finish.
Notes
- Configuration parameters are:
- cpu_limit: int
Maximum CPU time to spend on a field, in seconds.
- inparallel: bool
Check indexes in parallel. Only enable it if you have memory to store all indexes.
- minwidth and maxwidth: int
If no scale estimate is given, use these limits on field width in deg.
- depths: int or list(int)
If no depths are given, use these.
- add_path: string or list(string)
Location of astrometry.net index files. If None provided, default astrometry.net “$prefix/data” directory will be used.
- autoindex: bool
Load any indices found in the directories listed.
- index: string or list(string)
Explicitly list the indices to load.
Methods Summary
Print the available options for
solve-field
.solve_field
(filename[, options, output_dir])Try to solve an image using the astrometry.net.
Methods Documentation
- print_options_help()#
Print the available options for
solve-field
.
- solve_field(filename, options=None, output_dir=None, **kwargs)#
Try to solve an image using the astrometry.net.
- Parameters:
- filenamestr
Name of the file to be solved. Can be a fits image or a xyls sources file.
- options
dict
(optional) Dictionary of
solve-field
options. Seeget_options_help
for all available options. The most useful are: - center or ra and dec: field center - radius: maximum search radius - scale: pixel scale in arcsec/pixel - tweak-order: SIP order to fit- output_dirstr
Directory to output all solved files.
- **kwargs
Additional keyword arguments to be passed to
run_command
.
- Returns:
- solution
AstrometricSolution
Astrometric solution class containing the solved header, the
WCS
solved class and the correspondence table between the sources and the catalog.
- solution