#ifndef TS_TILE_H
#define TS_TILE_H

/* A tilable object. */
typedef struct tsTilableObject
{
  int run;                    /* run id */
  int rerun;                  /* re-run number */
  int col;                    /* camera column */
  int field;                  /* field within run */
  int id;                     /* id within field */
  int tid;                    /* unique id within list of objects */
  double ra;                  /* J2000 right ascension (degrees) */
  double dec;                 /* J2000 declination (degrees) */
  int priority;               /* tiling priority */
  int tileId;                 /* id of tile assigned to */
  int tiFlag;                 /* tiling flag */
  /* TODO: remove following fields when no longer needed for culling */
  int primTarget;             /* Primary target flags */
  int secTarget;              /* Secondary target flags */
  float objc_rowc;
  float objc_colc;
  float psfMag[5];
} TS_TILABLE_OBJ; /* pragma SCHEMA */

/* A target for input to completeTile. */
typedef struct tsTarget
{
  int run;                    /* run id */
  int rerun;                  /* re-run number */
  int col;                    /* camera column */
  int field;                  /* field within run */
  int id;                     /* id within field */
  int tid;                    /* unique id within list of objects */
  double ra;                  /* J2000 right ascension (degrees) */
  double dec;                 /* J2000 declination (degrees) */
  int primTarget;             /* Primary target flags */
  int secTarget;              /* Secondary target flags */
  int priority;               /* tiling priority */
  int tileId;                 /* id of tile assigned to */
  int tiFlag;                 /* tiling flag */
  float mag[5];		      /* Fiber magnitudes */
  float starL;                /* r' likelihood is stellar */
  float expL;                 /* r' likelihood is an exponential disk */
  float deVaucL;              /* r' likelihood is a deVaucouleurs profile */
} TS_TARGET; /* pragma SCHEMA */

#endif
