ansvr is a wrapper around the astrometry.net plate solve command,
solve-field. If your client program is on the same machine where astrometry.net/ansvr is installed, you should consider invoking
solve-field directly as that is simpler and more efficient than going through the
ansvr HTTP interface.
If you put your image to be solved (
stars.fit in the following example) in the folder
%LOCALAPPDATA%\cygwin_ansvr\tmp\ then you can run:
%LOCALAPPDATA%\cygwin_ansvr\bin\bash.exe --login -c "/usr/bin/solve-field -p -O -U none -B none -R none -M none -N none -C cancel --crpix-center -z 2 --objs 100 -u arcsecperpix -L 1.3752 -H 1.5199 /tmp/stars.fit"
Replace the numbers after
-H with your low and high image scale estimates (arcsec per pixel). The solution will be in the file
stars.wcs (FITS format). You can run
solve-field --help to see all the available options.
If you do want to use the HTTP interface, here are some notes on the subset of the nova.astrometry.net Web API implemented by ansvr.
Server response: JSON object:
subsequent requests from the client pass the session id
POST /api/upload/ with
The first part of the multipart/form-data request is the JSON request with the scale hint information. Example:
scale_err are the key parameters; other parameters are ignored (except
session). The image scale is expected to be between
scale_est - scale_est*scale_err/100 and
scale_est + scale_est*scale_err/100
The second part of the upload request is the image data (FITS file format)
Server: response is a JSON object containing a non-empty
jobs list attribute and non-zero
processing_finished numeric attribute when done, e.g.
Keep posting the submissions request periodically until the job has completed.
POST /api/jobs/<JOB_ID> using the job id from the
Server: response contains a JSON object with the status of the solve (success/failure), e.g.
Server: solution data as a JSON object:
I have a perl module that works as an ansvr or nova.astrometry.net client that is available if anyone is interested, but if you use the command line interface (
solve-field), then you won't need it. I'd be willing to develop other language bindings if there is any interest.
If you end up adding
ansvr to your application, please drop me an email at
email@example.com. I am interested in hearing how
ansvr is being used as this can help steer future development.