Next revision
|
Previous revision
|
ansvrdevelopernotes [2018/05/22 19:06] andy created |
ansvrdevelopernotes [2018/05/22 23:55] (current) andy |
====== ansvr Developer Notes ====== | ====== ansvr Developer Notes ====== |
| |
''ansvr'' is a very thin 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. | ''ansvr'' is a wrapper around the [[http://astrometry.net/|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. |
| |
===== Using solve-field directly ===== | ===== Using solve-field directly ===== |
Replace the numbers after ''-L'' and ''-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. | Replace the numbers after ''-L'' and ''-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. |
| |
==== Using the HTTP interface ==== | ===== Using the HTTP interface ===== |
| |
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. | 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. |
| |
Client request: ''POST /api/login'' \\ | Client request: ''POST /api/login'' \\ |
Server response: ''"session":SESSION_ID'' | Server response: JSON object: ''{"session":"SESSION_ID"}'' |
| |
subsequent requests from the client pass the session id | subsequent requests from the client pass the session id |
| |
<code> | <code> |
{"session":"17","allow_commercial_use":"d","allow_modifications":"d","publicly_visible":"y","scale_units":"arcsecperpix","scale_type":"ev","scale_est":1.2225129792992102,"scale_err":100.0} | {"session":"SESSION_ID","allow_commercial_use":"d","allow_modifications":"d","publicly_visible":"y","scale_units":"arcsecperpix","scale_type":"ev","scale_est":1.2225129792992102,"scale_err":100.0} |
</code> | </code> |
| |
''scale_est'' and ''scale_err'' are the key parameters; other params are ignored (except ''session_id''). The image scale is expected to be between ''scale_est - scale_err/100'' and ''scale_est + scale_err/100'' | ''scale_est'' and ''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 format) | The second part of the upload request is the image data (FITS file format) |
| |
=== submissions request === | === submissions request === |
</code> | </code> |
| |
==== Etc. ==== | ===== Etc. ===== |
| |
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. | 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. |