Skip to main content

Register images to az/el using the astrometry.net program

Project description

Azimuth/Elevation converter for Astrometry.net

Zenodo DOI Actions Status PyPi version Downloads

Note: If you want to work with the intermediate steps (source extraction) or photometry, see my AstroPy-based examples.

Prerequisites

Astrometry.net ≥ 0.67 or, use the astrometry.net cloud service.

Installation

python3 -m pip install -e .

Astrometry.net index files

If you use astrometry.net on your PC, you may need to install the index files and setup your config file to point at them:

downloadIndex ~/data

Command line options

Pass-through arguments

The -a --args command line option allows passing through a variety of parameters to solve-field, which underlies this program. Type solve-field -h or man solve-field for a brief description of the nearly 100 options available.

Be sure to enclose the options in quotes. For example, to specify that the image field is at least 20 degrees in extent:

PlateScale ~/data/myimg.jpg -a "-L 20"

Examples

Citizen science images often contain extraneous items in the image field of view. These can very easily break solve-field, which is designed for professional science-grade imagery from telescopes and narrow to medium field of view imagers (at least to 50 degree FOV). To mitigate these issues, judicious use of arguments passed to solve-field via --args is probably a good start.

The parameters I find most useful for citizen science images include:

-L / --scale-low <scale>: lower bound of image scale estimate
-H / --scale-high <scale>: upper bound of image scale estimate
 -d / --depth <number or range>: number of field objects to look at, or range
          of numbers; 1 is the brightest star, so "-d 10" or "-d 1-10" mean look
          at the top ten brightest stars only.

For extraneous regions of the image, try making a copy of the original image that has the offending regions cropped out. If the original image is in a lossy format such as JPEG, consider saving in a lossless format such as PNG after cropping.

FITS image input

FITS is a legacy file format commonly used in astronomy.

Astrometry.net installed on your PC

PlateScaleFITS myimg.fits -c 61.2 -149.9 -t 2013-04-02T12:03:23Z --nc --png

gives NetCDF .nc with az/el ra/dec and PNG plots of the data. Both files contain the same data, just for your convenience.

61.2 -149.9 is your WGS84 coordinates, 2013-04-02T12:03:23Z is UTC time of the picture.

wcs.fits from the Astrometry.net WEBSITE

first rename wcs.fits to myimg.wcs:

PlateScaleFITS myimg.wcs -c 61.2 -149.9 -t 2013-04-02T12:03:23Z --nc --png

JPG image input

JPG is commonly used by prosumer cameras. It's preferable to use lossless formats for scientific imaging such as JPEG2000 or newer file formats.

Notes

build astrometry.net

We use Linux or Windows Subsystem for Linux as follows:

wget http://astrometry.net/downloads/astrometry.net-latest.tar.gz tar xf astrometry.net-latest.tar.gz cd astrometry* apt install gcc make libcairo2-dev libnetpbm10-dev netpbm libpng-dev libjpeg-dev python3-numpy python3-pyfits python3-dev zlib1g-dev libbz2-dev swig libcfitsio-dev make -j make py -j make extra -j make install -j INSTALL_DIR=$HOME/.local/astrometry

add to ~/.bashrc:

export PATH=$PATH:$HOME/.local/astrometry/bin

open a new terminal to use.

Download index files

You will get various weird errors without the necessary star index files.

python downloadIndex.py -source http://broiler.astrometry.net/~dstn/4100/ -i 8 20

Then, edit ~/.local/astrometry/etc/astrometry.cfg, making the following changes:

  1. uncomment inparallel
  2. be sure add_path points to /home/username/astrometry-data, where username is your Linux username. Don't use ~ or $HOME.
  3. optionally, set minwidth smaller than the smallest FOV (in degrees) you'd ever see. For example, if NOT using a telescope, perhaps minwidth 1 or something.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astrometry_azel-1.3.0.tar.gz (13.2 kB view details)

Uploaded Source

File details

Details for the file astrometry_azel-1.3.0.tar.gz.

File metadata

  • Download URL: astrometry_azel-1.3.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0.post20201207 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for astrometry_azel-1.3.0.tar.gz
Algorithm Hash digest
SHA256 9e124cd7e2a8763d21a02371847642148433044ef7c1728b1eda73b83372272c
MD5 e2fdcbff9d5e42d48f96404fee8a3dc8
BLAKE2b-256 9b4fe4c0b3ac71936f76df7b90473068793fc33901423592e5753d4dcb1d65a5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page