# include "astro.h"

int altaz                   PROTO((int, char **));
int biassub                 PROTO((int, char **));
int cgrid                   PROTO((int, char **));
int coords                  PROTO((int, char **));
int cplot                   PROTO((int, char **));
int csystem                 PROTO((int, char **));
int ctimes                  PROTO((int, char **));
int cval                    PROTO((int, char **));
int czplot                  PROTO((int, char **));
int drizzle                 PROTO((int, char **));
int flux                    PROTO((int, char **));
int fixwrap                 PROTO((int, char **));
int gauss                   PROTO((int, char **));
int gaussfit                PROTO((int, char **));
int getvel                  PROTO((int, char **));
int getlst                  PROTO((int, char **));
int imfit                   PROTO((int, char **));
int imsub                   PROTO((int, char **));
int medianmap               PROTO((int, char **));
int mkgauss                 PROTO((int, char **));
int multifit                PROTO((int, char **));
int objload                 PROTO((int, char **));
int outline                 PROTO((int, char **));
int polar                   PROTO((int, char **));
int precess                 PROTO((int, char **));
int profile                 PROTO((int, char **));
int radec                   PROTO((int, char **));
int region                  PROTO((int, char **));
int rotcurve                PROTO((int, char **));
int scale                   PROTO((int, char **));
int sexigesimal             PROTO((int, char **));
int spec                    PROTO((int, char **));
int star                    PROTO((int, char **));
int times                   PROTO((int, char **));
int transform               PROTO((int, char **));

static Command cmds[] = {  
  {1, "altaz",       altaz,        "convert alt/az to/from ra/dec"},
  {1, "biassub",     biassub,      "subtract medianed overscan row or column"},
  {1, "cgrid",       cgrid,        "plot sky coordinate grid"},
  {1, "coords",      coords,       "load coordinates for buffer from file"},
  {1, "cplot",       cplot,        "plot vectors in sky coordinates"},
  {1, "csystem",     csystem,      "convert between coordinate systems"},
  {1, "ctimes",      ctimes,       "convert between time formats"},
  {1, "cval",        cval,         "cosmic ray flux?"},
  {1, "czplot",      czplot,       "plot scaled vectors in sky coordinates"},
  {1, "drizzle",     drizzle,      "transform image to image"},
  {1, "flux",        flux,         "flux in a convex contour"},
  {1, "fixwrap",     fixwrap,      "fix megacam over-wrapped pixels"},
  {1, "gauss",       gauss,        "get statistics on a star, assuming gaussian profile"},
  {1, "getvel",      getvel,       "rotcurve to velocities"},
  {1, "getlst",      getlst,       "return LST given time and longitude"},
  {1, "imfit",       imfit,        "fit function"},
  {1, "imsub",       imsub,        "subtract function"},
  {1, "medianmap",   medianmap,    "small median image"},
  {1, "mkgauss",     mkgauss,      "generate a 2-D gaussian centered in image"},
  {1, "multifit",    multifit,     "fit multi-order spectrum"},
  {1, "objload",     objload,      "plot obj data on Ximage "},
  {1, "outline",     outline,      "fit outline region"},
  {1, "polar",       polar,        "convert polar image to cartesian"},
  {1, "precess",     precess,      "precess coordinates"},
  {1, "profile",     profile,      "radial profile at X, Y"},
  {1, "radec",       radec,        "convert to/from radec in hms or dd"},
  {1, "region",      region,       "define sky region for plot"},
  {1, "rotcurve",    rotcurve,     "convert CO images to polar coords"},
  {1, "scale",       scale,        "get / set real bzero / bscale values"},
  {1, "sexigesimal", sexigesimal,  "convert to/from sexigesimal/decimal"},
  {1, "spec",        spec,         "extract a spectrum"},
  {1, "star",        star,         "star stats at rough coords"},
  {1, "transform",   transform,    "geometric transformation of image"},
}; 

/* not currently implemented 
  {"gaussfit",    gaussfit,     "fit a gaussian to pixels in a region"},
  {"testfit",     testfit, ""},
  {"times", , ""},
*/

void InitAstro () {
  
  int i;

  for (i = 0; i < sizeof (cmds) / sizeof (Command); i++) {
    AddCommand (&cmds[i]);
  }

}

void FreeAstro () {
}
