User Tools

Site Tools


ansvrdevelopernotes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
ansvrdevelopernotes [2018/05/22 19:13]
andy
ansvrdevelopernotes [2018/05/22 23:55] (current)
andy
Line 1: Line 1:
 ====== ansvr Developer Notes ====== ====== ansvr Developer Notes ======
  
-''​ansvr''​ is a very thin 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.+''​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 =====
Line 20: Line 20:
  
 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
Line 31: Line 31:
  
 <​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 ===
ansvrdevelopernotes.txt ยท Last modified: 2018/05/22 23:55 by andy