All-Sky Plate Solving

PinPoint's internal engine requires an approximate place in the sky to start searching for matching stars. Beginning in 2006, the Astrometry.net project undertook "blind-solving" as one of the design objectives for its astrometric service. Blind-solving refers to the abiliity to match stars in an image with stars in the sky without any hint as to the area in the sky. We call this all-sky plate solving. The project reached its maturity with the commissioning of its online offerings consisting of a human-interface web service as well as a web-service application programming interface (API). In addition, the project released open source code so that others could integrate the Astrometry.net engine into their own software. This open source code was then used by Andy Galasso to make up a locally hosted all-sky solving engine called ansvr and PinPoint can use this as well.

The time limit for the Astrometry.net all-sky solving engine is ten minutes. During routine tests, we have observed an occasional image that ran for over 5 minutes then solved. The ten minute limit applies to both the online and local all-sky servers. Don't give up, just wait to see if the solution comes back!

Online solving

DC-3 Dreams initially decided to use the online API instead of locally hosted code and indices. The indices needed for narrow field images are really huge, much larger than the USNO UCAC4 or A2.0 catalogs that PinPoint uses. The code occasionally gets updates and the online services code base is maintained by its original authors. The machine that runs the online human and API services is a beast with multiple CPUs and 64 gigabytes of RAM. Most of our customers are running their observatory machines connected to the internet. So instead of a large local program that would be slow and require vast amounts of downloading and disk space, our choice of using the online API should be clear. To use this service, set Plate.AllSkyDomain (provided in VIsual PinPoint Solve Settings by the All-sky service domain field) to nova.astrometry.net. This is the default setting.

Solving without an internet connection

Thanks to the work by Andy Galasso initially for Sequence Generator Pro users, we now have ansvr, a local/offline Astrometry.net webservice. PinPoint can make use of this as an alternative to the online solving service. We do not distribute ansvr, you must download and install it, then download the indexes you need for your field of view, and finally make sure the service is running on your system. For more information please see this web page:

http://adgsoftware.com/ansvr/

Once you have this installed and running, depending on your software (which hosts all of PinPoint's settngs) you can use 127.0.0.1:nnnn as PinPoint's all-sky server address (Plate.AllSkyDomain), where nnnn is the port number you assigned when you installed ansvr. You can get help on ansvr on the Main Sequence Software Forum. We do not provide support for ansvr.

Some Hints on using ansvr

While we don't provide support for ansvr, here is some info that may help you get it set up on your system. Your C drive will need at least 10 Gb of free space. The installation info on the ansvr web page is excellent, so start with that. I suggest you use a port of 9123 because the 8xxx ones are commonly used for web related things and you may end up with a port conflict.

NOTE: While the installer allows you to select a location in which to install ansvr, the bulk of the disk space including the large indexes is hardwired to go into a complex folder tree used by a "virtual Unix" system called cygwin, always on your system/C drive, in a hidden location. If you're comfortable with showing hidden files, editing BAT scripts, and making changes to the Windows registry, you can move this entire system to a different drive. See below.

Moving ansvr's server files and indexes

When installed, regardless of the location you gave to the ansvr installer, almost all of its files are installed to C:\Users\yourloginname\AppData\Local\cygwin_ansvr. AppData is hidden so you need to turn on hidden file visibility in Windows Explorer (not Internet Explorer, right?). This is the place where a complex Unix emulation lives, and the main Astrometry.net engine runs within this environment. The ansvr web server that provides the local all-sky service which acts like Astrometry.net is located within cygwin at /opt/ansvr and is a big Perl script. In that directory are also a number of bash shell scripts. If you can't figure these out don't worry, but if you can you will find some useful things here. Once you move it, though, the GUI index downloader that Andy includes will no longer work. There is a shell script that does it all and it's easy to use.

To move all of this somewhere else is fairly straightforward if you have the skills. Look it all over before starting.

  1. Copy the entire cygwin_ansvr directory to the location you want (e.g. S:\cygwin_ansvr)
  2. Edit the registry at HKLM\Software\Wow6432Node\Cygwin\Installations. You will find a string value with a name that is long hex string and value pointing to the original place that cygwin_ansvr was installed (\??\C:\Users\yourloginname\AppData\Local\cygwin_ansvr). Change this to point to the new location and include the \??\ (e.g. \??\S:\cygwin_ansvr).
  3. Now you need to edit the BAT files in the place you installed ansvr during installation. It should be obvious what to do. For our example, the start_ansvr.bat file would contain simply
    @echo off
    S:\cygwin_ansvr\bin\bash.exe -l -c /opt/ansvr/ansvr

Once you've edited the BAT files, the Start menu links should now work to start and stop the server, watch the log, etc. Test them as described in Andy's docs.

Downloading Indexes to Moved ansvr

Once you move the cygwin_ansvr directory tree as described, Andy's GUI index downloader won't work. Fortunately it's pretty simple to download indexes using the bash shell and a script that's already there and needs no editing. To do this, open a Windows CMD shell and change directory to the moved cygwin_ansvr root, then execute a bash command:

xxx> S:
 S:> CD cygwin_ansvr
 CS:\cygwin_ansvr> .\bin\bash.exe -l -c "/opt/ansvr/download_indexes 4202 4219"

where the last two args are the lower and upper index levels you want. Mind the double quotes! This shell script is the "meat" of the downloader anyway. It has the smarts to avoid downloading indexes that are already there, and finishing partial downloads.

All-Sky Solving with Visual PinPoint

Visual PinPoint already has the controls to allow all-sky solving of images with either the online service or a locally installed ansvr. For more information see Visual PinPoint, All-Sky solving.

All-Sky Solving from Scripts and Client Programs

Using PinPoint's all-slky solving from its application programming interface (API) is really easy. Instead of calling Plate.Solve(), call Plate.SolveAllSky(). For details see the info on Plate.SolveAllSky(). There are options (properties) for specifying the domain name of the Astrometry.net server (Plate.AllSkyDomain) which gives you access to a local ansvr engine, the API key (Plate.AllSkyApiKey, domain specific, and used to access your own account on the service), and whether to send the image itself (instead of the list of XY detection locations, Plate.AllSkyUseImage).

How It Works

When PinPoint's Plate.SolveAllSky() method is called, the image is scanned and a XY list of detections is made as usual. This list is written to a file. Then a small external application BlindSolver.exe is given that path to the XY list file. BlindSolver connects to the Astrometry.net API across the internet (or to a local ansvr engine), sends the XY list (or the image for ansvr), then waits for the results of the remote all-sky solution. When it is complete, BlindSolver retrieves the J200 Right Ascension, J2000 Declination, and Plate Scale (arc seconds per pixel). This info is passed back to the PinPoint engine, which stores it in the appropriate Plate properties. Then the local Plate.Solve() method is executed, completing the process with a full distortion-mapped high-accuracy PinPoint solution.