IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34391


Ignore:
Timestamp:
Sep 5, 2012, 3:29:15 PM (14 years ago)
Author:
eugene
Message:

finish the history tracking mechanism

Location:
branches/eam_branches/ipp-20120805/Ohana/src/dvomerge
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120805/Ohana/src/dvomerge/Makefile

    r34260 r34391  
    3333$(SRC)/dvomergeUpdate_catalogs.$(ARCH).o \
    3434$(SRC)/dvomergeUpdate_threaded.$(ARCH).o \
     35$(SRC)/dvomergeHistory.$(ARCH).o \
    3536$(SRC)/dvomergeFromList.$(ARCH).o \
    3637$(SRC)/dvomergeImageIDs.$(ARCH).o \
     
    5657$(SRC)/dvomerge_client.$(ARCH).o \
    5758$(SRC)/dvomergeUpdate_catalogs.$(ARCH).o \
     59$(SRC)/dvomergeHistory.$(ARCH).o \
    5860$(SRC)/dvomergeImageIDs.$(ARCH).o \
    5961$(SRC)/dvo_image_merge_dbs.$(ARCH).o \
  • branches/eam_branches/ipp-20120805/Ohana/src/dvomerge/include/dvomerge.h

    r34277 r34391  
    4444  char *notFound;
    4545} IDmapType;
     46
     47// struct to describe a sequence of dvomerges (Image.dat header)
     48typedef struct {
     49  int Nmerge;
     50  char **IDs;
     51} dmhImage;
     52
     53// struct to describe a sequence of dvomerges (Object table : cpt header)
     54typedef struct {
     55  int   Nmerge;
     56  off_t  *size;
     57  time_t *time;
     58  char  **date;
     59} dmhObject;
     60
     61// data on a single table, populated when a new file is merged
     62typedef struct {
     63  off_t  size;
     64  time_t time;
     65  char  *date;
     66} dmhObjectStats;
     67
     68// struct to describe the current status of a single output file:
     69// is it on this machine (valid)? have we already merged or not (missed)?
     70// what is the collection of past merges (history)?  what is the real filename?
     71typedef struct {
     72  int valid;                  // is this object table on this machine?
     73  int missed;                 // did we fail to merge into this table yet?
     74  dmhObject *history;         // complete sequence of previous merges
     75  char *filename;             // true filename on disk
     76} OutputStatus;
    4677
    4778int        main                   PROTO((int argc, char **argv));
     
    130161IDmapType *IDmapLoad               PROTO((char *filename));
    131162int        create_IDmap_lookup     PROTO((IDmapType *IDmap));
     163
     164// dvomerge history functions
     165OutputStatus *OutputStatusInit (int N);
     166int OutputStatusFree (OutputStatus *outstat, int N);
     167
     168int dmhObjectAdd (dmhObject *history, Header *header, dmhObjectStats *inStats);
     169int dmhObjectCheck (dmhObject *history, dmhObjectStats *inStats);
     170dmhObject *dmhObjectRead (char *filename);
     171
     172void dmhObjectStatsFree (dmhObjectStats *stats);
     173dmhObjectStats *dmhObjectStatsRead (char *filename);
     174
     175int dmhImageAdd (FITS_DB *db, dmhImage *history, char *dbID);
     176dmhImage *dmhImageRead (FITS_DB *db) ;
     177int dmhImageCheck (dmhImage *history, char *dbID);
     178
     179char *dmhImageReadID (FITS_DB *db);
     180int dvoCreateID (char *catdir);
     181
  • branches/eam_branches/ipp-20120805/Ohana/src/dvomerge/src/dvomergeHistory.c

    r34356 r34391  
    1 # include "dvomerge.c"
     1# include "dvomerge.h"
    22
    33// We track the dvomerge history (dmh) in the headers of the Image table (Image.dat) and
     
    1111// somewhat
    1212
    13 // struct to describe a sequence of dvomerges (Image.dat header)
    14 typedef struct {
    15   int Nmerge;
    16   char **IDs;
    17 } dmhImage;
    18 
    19 // struct to describe a sequence of dvomerges (Object table : cpt header)
    20 typedef struct {
    21   int   Nmerge;
    22   off_t  *size;
    23   time_t *time;
    24   char  **date;
    25 } dmhObject;
    26 
    27 // data on a single table, populated when a new file is merged
    28 typedef struct {
    29   off_t  size;
    30   time_t time;
    31   char  *date;
    32 } dmhObjectStats;
    33 
    34 // struct to describe the current status of a single output file:
    35 // is it on this machine (valid)? have we already merged or not (missed)?
    36 // what is the collection of past merges (history)?  what is the real filename?
    37 typedef struct {
    38   int valid;                  // is this object table on this machine?
    39   int missed;                 // did we fail to merge into this table yet?
    40   dmhTable *history;          // complete sequence of previous merges
    41   char *filename;             // true filename on disk
    42 } OutputStatus;
    43 
    4413// we have a sequence of dvomerge events. 
    4514// in the image table header, we want to track the IDs of the databases
     
    4817// some (possible?) functions needed to track the history
    4918
    50 // given a dvo image db, add an ID to the header
    51 // XXX move this to libdvo and generate tools to update a database
    52 int dvoCreateID (char *catdir) {
    53  
    54   // open and read header
    55   char filename[DVO_MAX_PATH];
    56   snprintf (filename, DVO_MAX_PATH, "%s/Images.dat", catdir);
    57 
    58   // open for update
    59   FILE *file = fopen (filename, "r+");
    60   if (!file) {
    61     fprintf (stderr, "problem opening output file to read header %s\n", filename);
    62     perror ("stats error message:");
    63     exit (2);
    64     // XXX should we generate an file with an empty table here? 
    65   }
    66 
    67   Header header;
    68   if (!gfits_fread_header (file, &header)) {
    69     fprintf (stderr, "problem reading header for output file %s\n", filename);
    70     exit (2);
    71   }
    72      
    73   // I have a header, I want to add ONE line.  double check there is enough space
    74   char *p = gfits_header_field (&header, "END", 1);
    75   if (p == NULL) {
    76     fprintf (stderr, "header is missing END\n");
    77     exit (1);
    78   }
    79   if (p - header.buffer + 80 == header.datasize) {
    80     fprintf (stderr, "no free space in block, can't insert keyword\n");
    81     exit (1);
    82   }
    83 
    84   int start_size = header.datasize;
     19// user must pass in a char * of length DVO_DBID_LEN
     20char *dmhImageReadID (FITS_DB *db) {
    8521
    8622  char dbID[33];
    87   long A = time(NULL);
    88   srand48(A);
    89  
    90   for (i = 0; i < 32; i++) {
    91     sprintf (&dbID[i], "%1x", (int)(16.0*drand48()));
    92   }
    93 
    94   gfits_modify (&header, "DVO_DB_ID", "%32s", 1, dbID);     
    95   if (start_size != header.datasize) {
    96     fprintf (stderr, "error: header buffer grew? (%d to %d bytes)\n", start_size, header.datasize);
    97     exit (1);
    98   }
    99 
    100   fclose (file);
    101   return TRUE;
    102 }
    103 
    104 // user must pass in a char * of length DVO_DB_ID_LEN
    105 char *dmhImageReadID (FITS_DB *db) {
    106 
    107   char dbID[33];
    108   status = gfits_scan (&db->header, "DVO_DB_ID", "%s", 1, dbID);     
     23  int status = gfits_scan (&db->header, "DVO_DBID", "%s", 1, dbID);     
    10924  if (!status) {
    11025    return NULL;
     
    11833
    11934  if (!db) return FALSE;
    120   if (!db->header) return FALSE;
     35  if (!db->header.buffer) return FALSE;
    12136
    12237  dmhImage *history = NULL;
     
    12439
    12540  // should track the number in the header (would overwrite)
    126   status = gfits_scan (&db->header, "DM_NMERGE", "%d", 1, &history->Nmerge);
     41  int status = gfits_scan (&db->header, "NMERGE", "%d", 1, &history->Nmerge);
    12742  if (!status) {
    128     fprintf (stderr, "failed to read DM_NMERGE\n");
    129     exit (5);
     43    history->Nmerge = 0;
    13044  }
    13145
     
    13347  ALLOCATE (history->IDs, char *, history->Nmerge);
    13448
     49  int i;
     50  char name[16], ID[80];
    13551  for (i = 0; i < history->Nmerge; i++) {
    13652    snprintf (name, 16, "DM_%05d", i);
    137     status = gfits_scan (&header, name, "%s", ID);
     53    status = gfits_scan (&db->header, name, "%s", 1, ID);
    13854    if (!status) {
    13955      fprintf (stderr, "failed to read %s\n", name);
     
    14561}
    14662
     63// compare stats for the input to the full history for the output
     64// have we merged this file?
     65int dmhImageCheck (dmhImage *history, char *dbID) {
     66
     67  // if the input catalog does not exist, we did not miss it
     68  // if the output catalog does not exist, we must have missed it
     69
     70  if (!dbID) return FALSE; // no ID to merge, probably an error to get here
     71  if (!history) return FALSE; // we must not have merged since it does not exist
     72
     73  int i;
     74  for (i = 0; i < history->Nmerge; i++) {
     75    // do we match this size?
     76    if (!strcmp(history->IDs[i], dbID)) return TRUE; // we match (already merged)
     77  }
     78  return FALSE; // no match, not yet merged
     79}
     80
    14781int dmhImageAdd (FITS_DB *db, dmhImage *history, char *dbID) {
    14882
    14983  // update the arrays
    150   last = history->Nmerge;
     84  int last = history->Nmerge;
    15185
    15286  history->Nmerge ++;
    15387  REALLOCATE (history->IDs, char *, history->Nmerge);
    15488
    155   history->IDs[last] = strcreate (ID);
    156 
     89  history->IDs[last] = strcreate (dbID);
     90
     91  char name[16];
    15792  snprintf (name, 16, "DM_%05d", last);
    158   gfits_modify (&db->header, name, "%s", ID);
    159 
     93  gfits_modify (&db->header, name, "%s", 1, dbID);
     94
     95  gfits_modify (&db->header, "NMERGE", "%d", 1, history->Nmerge);
    16096  return TRUE;
    16197}
     
    169105  int stat_result = stat (filename, &instats);
    170106  if (stat_result) {
    171     if (errno == ENOENT) return NULL
    172     fprintf (stderr, "cannot read stats on input file %s\n", inlist[0].filename[i]);
     107    if (errno == ENOENT) return NULL;
     108    fprintf (stderr, "cannot read stats on input file %s\n", filename);
    173109    perror ("stats error message:");
    174110    exit (2);
    175111  }
    176112 
    177   ALLOCATE (stats, dmhStatsType, 1);
     113  dmhObjectStats *stats = NULL; 
     114  ALLOCATE (stats, dmhObjectStats, 1);
    178115  stats->size = instats.st_size;
    179116  stats->time = instats.st_mtime;
     
    183120
    184121void dmhObjectStatsFree (dmhObjectStats *stats) {
     122  if (!stats) return;
    185123  if (stats->date) free (stats->date);
    186124  free (stats);
     
    192130  // if the file does not exist, return NULL (means 'missed')
    193131  struct stat outstats;
    194   stat_result = stat (filename, &outstats);
     132  int stat_result = stat (filename, &outstats);
    195133  if (stat_result) {
    196134    if (errno == ENOENT) return NULL;
     
    217155  ALLOCATE (history, dmhObject, 1);
    218156
    219   status = gfits_scan (&outheader, "DM_NMERGE", "%d", 1, &history->Nmerge);     
     157  int status = gfits_scan (&outheader, "NMERGE", "%d", 1, &history->Nmerge);     
    220158  if (!status) {
    221     fprintf (stderr, "failed to read DM_NMERGE\n");
    222     exit (5);
     159    history->Nmerge = 0;
    223160  }
    224161
     
    228165  ALLOCATE (history->date, char *, history->Nmerge);
    229166
     167  int i;
    230168  for (i = 0; i < history->Nmerge; i++) {
    231169    off_t  size;
    232     time_t time;
    233170    char   date[80];
    234171
     172    char name[16];
     173   
    235174    snprintf (name, 16, "MS_%05d", i);
    236     status = gfits_scan (&header, name, OFF_T_FMT, &size);
     175    status = gfits_scan (&outheader, name, OFF_T_FMT, 1, &size);
    237176    if (!status) {
    238177      fprintf (stderr, "failed to read %s\n", name);
     
    242181
    243182    snprintf (name, 16, "MT_%05d", i);
    244     status = gfits_scan (&header, name, "%s", date);
     183    status = gfits_scan (&outheader, name, "%s", 1, date);
    245184    if (!status) {
    246185      fprintf (stderr, "failed to read %s\n", name);
     
    250189    history->time[i] = ohana_date_to_sec (date);
    251190  }
    252 
    253   fclose (fout);
    254 
    255191  return history;
    256192}
    257193 
    258194// compare stats for the input to the full history for the output
     195// have we merged this file?
    259196int dmhObjectCheck (dmhObject *history, dmhObjectStats *inStats) {
    260197
     198  // if the input catalog does not exist, we did not miss it
     199  // if the output catalog does not exist, we must have missed it
     200
     201  if (!inStats) return TRUE; // we do not need to merge something that does not exist...
     202  if (!history) return FALSE; // we must not have merged since it does not exist
     203
     204  int i;
    261205  for (i = 0; i < history->Nmerge; i++) {
    262206   
     
    267211    if (history->time[i] != inStats->time) continue;
    268212
    269     return TRUE;  // we match (already found)
    270   }
    271   return FALSE;
     213    return TRUE;  // we match (already merged)
     214  }
     215  return FALSE; // no match, not yet merged
    272216}
    273217
    274218// add the stats for the given input file to the output structure and header
    275 int dmhObjectAdd (dmhObject *history, Header *header, dmhObjectStats inStats) {
     219int dmhObjectAdd (dmhObject *history, Header *header, dmhObjectStats *inStats) {
    276220
    277221  // update the arrays
    278   last = history->Nmerge;
     222  int last = history->Nmerge;
    279223
    280224  history->Nmerge ++;
     
    287231  history->date[last] = inStats->date;
    288232
     233  char name[16];
    289234  snprintf (name, 16, "MS_%05d", last);
    290   status = gfits_modify (&header, name, OFF_T_FMT, inStats->size);
    291   if (!status) { error out};
     235
     236  int status = gfits_modify (header, name, OFF_T_FMT, 1, inStats->size);
     237  if (!status) {
     238    fprintf (stderr, "error: failed to add size to header (%d)\n", (int) inStats->size);
     239    exit (1);
     240  }
    292241
    293242  snprintf (name, 16, "MT_%05d", last);
    294   status = gfits_modify (&header, name, "%s", inStats->date);
    295   if (!status) { error out};
    296 
    297   gfits_modify (&db->header, "DM_NMERGE", "%d", history->Nmerge);
     243  status = gfits_modify (header, name, "%s", 1, inStats->date);
     244  if (!status) {     
     245    fprintf (stderr, "error: failed to add date to header (%s)\n", inStats->date);
     246    exit (1);
     247  }
     248
     249  gfits_modify (header, "NMERGE", "%d", 1, history->Nmerge);
    298250  return TRUE;
    299251}
    300252
    301253OutputStatus *OutputStatusInit (int N) {
     254
     255  int i;
    302256
    303257  OutputStatus *outstat = NULL;
     
    309263    outstat[i].filename = NULL;
    310264  }
    311 
     265  return outstat;
    312266}
    313267
    314268int OutputStatusFree (OutputStatus *outstat, int N) {
    315269
     270  int i;
    316271  for (i = 0; i < N; i++) {
    317272    if (outstat[i].history)  { free (outstat[i].history); }
     
    319274  }
    320275  free (outstat);
    321 }
    322 
     276  return TRUE;
     277}
  • branches/eam_branches/ipp-20120805/Ohana/src/dvomerge/src/dvomergeImageIDs.c

    r34356 r34391  
    2525    Shutdown ("can't read input image catalog %s", inDB.filename);
    2626  }
     27  dvo_image_unlock (&inDB); // unlock input
    2728
    2829  // read the header for the database ID?
    29   char *indbID = dvomergeHistoryReadID (&inDB);
     30  char *indbID = dmhImageReadID (&inDB);
    3031  if (!indbID) {
    3132    Shutdown ("this database is missing a DVO database ID; please generate one before merging\n");
     
    5354  }
    5455
     56  // have we already merged this database?
     57  if (dmhImageCheck(history, indbID)) {
     58    // if so, then just match the image IDs
     59    if (VERBOSE) fprintf (stderr, "already merged image table\n");
     60    dvo_image_match_dbs(IDmap, &outDB, &inDB);
     61    dvo_image_unlock (&outDB); // unlock output
     62    return TRUE;
     63  }
     64
    5565  // convert database table to internal structure & add to output image db
    5666  dvo_image_merge_dbs(IDmap, &outDB, &inDB);
    57   dvo_image_unlock (&inDB); // unlock input
    5867
    5968  // add the new image db to merge history
     
    6271    Shutdown ("error reading history for output database\n");
    6372  }
    64 
    65   // XXX I need to pass the history structure back out somehow...
    66 
     73   
    6774  SetProtect (TRUE);
    6875  dvo_image_save (&outDB, VERBOSE);
  • branches/eam_branches/ipp-20120805/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c

    r34356 r34391  
    3636    // are any of these output regions relevant to this machine?
    3737    int found = FALSE;
    38     for (j = 0; !found && (j < outlist[0].Nregions); j++) {
     38    for (j = 0; j < outlist[0].Nregions; j++) {
    3939      outstat[j].valid = HostTableTestHost(outlist[0].regions[j], HOST_ID);
    4040      found = (found || outstat[j].valid);
     
    4848    }
    4949
    50     // get stats for history check
     50    // get stats for history check, skip input catalog if file not found (NULL inStats)
    5151    dmhObjectStats *inStats = dmhObjectStatsRead (inlist[0].filename[i]);
     52    if (!inStats) {
     53      if (VERBOSE) fprintf (stderr, "skipping %s, empty \n", inlist[0].filename[i]);
     54      OutputStatusFree (outstat, outlist->Nregions);
     55      SkyListFree (outlist);
     56      continue;
     57    }
    5258
    5359    // Check if any of the output files have NOT yet received data from this input file
     
    6571      outstat[j].history = dmhObjectRead (outstat[j].filename);
    6672
    67       outstat[j].missed = dmhObjectCheck (outstat[j].history, inStats);
     73      // have we already merged this database?
     74      outstat[j].missed = !dmhObjectCheck (outstat[j].history, inStats);
    6875      missed = (missed || outstat[j].missed);
    6976    }
    7077    if (!missed) {
    71       fprintf (stderr, "skipping %s, already merged\n", inlist[0].filename[i]);
     78      if (VERBOSE) fprintf (stderr, "skipping %s, empty or already merged\n", inlist[0].filename[i]);
    7279      OutputStatusFree (outstat, outlist->Nregions);
    7380      dmhObjectStatsFree (inStats);
  • branches/eam_branches/ipp-20120805/Ohana/src/dvomerge/test/catdir.grizy/Images.dat

    r24745 r34391  
    1 SIMPLE  =                    T /                                                BITPIX  =                    8 /                                                NAXIS   =                    0 /                                                PCOUNT  =                    0 /                                                GCOUNT  =                    1 /                                                BSCALE  =         1.0000000000 /                                                BZERO   =         0.0000000000 /                                                EXTEND  =                    T /                                                NIMAGES =                    0 /                                                ZERO_PT =        25.0000000000 /                                                FORMAT  = 'ELIXIR            ' /                                                END                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             XTENSION= 'BINTABLE          ' /                                                BITPIX  =                    8 /                                                NAXIS   =                    2 /                                                NAXIS1  =                  240 /                                                NAXIS2  =                    0 /                                                PCOUNT  =                    0 /                                                GCOUNT  =                    1 /                                                TFIELDS =                   50 /                                                EXTNAME = 'DVO_IMAGE_ELIXIR  ' /                                                TTYPE1  = 'CRVAL1            ' / coordinate at reference pixel                  TUNIT1  = '                  ' /                                                TFORM1  = 'D                 ' /                                                TSCAL1  =         1.0000000000 /                                                TZERO1  =         0.0000000000 /                                                TTYPE2  = 'CRVAL2            ' / coordinate at reference pixel                  TUNIT2  = '                  ' /                                                TFORM2  = 'D                 ' /                                                TSCAL2  =         1.0000000000 /                                                TZERO2  =         0.0000000000 /                                                TTYPE3  = 'CRPIX1            ' / coordinate of reference pixel                  TUNIT3  = '                  ' /                                                TFORM3  = 'E                 ' /                                                TSCAL3  =         1.0000000000 /                                                TZERO3  =         0.0000000000 /                                                TTYPE4  = 'CRPIX2            ' / coordinate of reference pixel                  TUNIT4  = '                  ' /                                                TFORM4  = 'E                 ' /                                                TSCAL4  =         1.0000000000 /                                                TZERO4  =         0.0000000000 /                                                TTYPE5  = 'CDELT1            ' / degrees per pixel                              TUNIT5  = '                  ' /                                                TFORM5  = 'E                 ' /                                                TSCAL5  =         1.0000000000 /                                                TZERO5  =         0.0000000000 /                                                TTYPE6  = 'CDELT2            ' / degrees per pixel                              TUNIT6  = '                  ' /                                                TFORM6  = 'E                 ' /                                                TSCAL6  =         1.0000000000 /                                                TZERO6  =         0.0000000000 /                                                TTYPE7  = 'PC1_1             ' / rotation matrix                                TUNIT7  = '                  ' /                                                TFORM7  = 'E                 ' /                                                TSCAL7  =         1.0000000000 /                                                TZERO7  =         0.0000000000 /                                                TTYPE8  = 'PC1_2             ' / rotation matrix                                TUNIT8  = '                  ' /                                                TFORM8  = 'E                 ' /                                                TSCAL8  =         1.0000000000 /                                                TZERO8  =         0.0000000000 /                                                TTYPE9  = 'PC2_1             ' / rotation matrix                                TUNIT9  = '                  ' /                                                TFORM9  = 'E                 ' /                                                TSCAL9  =         1.0000000000 /                                                TZERO9  =         0.0000000000 /                                                TTYPE10 = 'PC2_2             ' / rotation matrix                                TUNIT10 = '                  ' /                                                TFORM10 = 'E                 ' /                                                TSCAL10 =         1.0000000000 /                                                TZERO10 =         0.0000000000 /                                                TTYPE11 = 'POLYTERMS         ' / higher order warping terms                     TUNIT11 = '                  ' /                                                TFORM11 = '14E               ' /                                                TSCAL11 =         1.0000000000 /                                                TZERO11 =         0.0000000000 /                                                TTYPE12 = 'CTYPE             ' / coordinate type                                TUNIT12 = '                  ' /                                                TFORM12 = '15A               ' /                                                TSCAL12 =         1.0000000000 /                                                TZERO12 =         0.0000000000 /                                                TTYPE13 = 'NPOLYTERMS        ' / order of polynomial                            TUNIT13 = '                  ' /                                                TFORM13 = 'A                 ' /                                                TSCAL13 =         1.0000000000 /                                                TZERO13 =         0.0000000000 /                                                TTYPE14 = 'TZERO             ' / readout time (row 0)                           TUNIT14 = '                  ' /                                                TFORM14 = 'J                 ' /                                                TSCAL14 =         1.0000000000 /                                                TZERO14 =         0.0000000000 /                                                TTYPE15 = 'NSTAR             ' / number of stars on image                       TUNIT15 = '                  ' /                                                TFORM15 = 'J                 ' /                                                TSCAL15 =         1.0000000000 /                                                TZERO15 =         0.0000000000 /                                                TTYPE16 = 'SECZ              ' / airmass                                        TUNIT16 = 'milliairmass      ' /                                                TFORM16 = 'I                 ' /                                                TSCAL16 =         1.0000000000 /                                                TZERO16 =         0.0000000000 /                                                TTYPE17 = 'NX                ' / image width                                    TUNIT17 = '                  ' /                                                TFORM17 = 'I                 ' /                                                TSCAL17 =         1.0000000000 /                                                TZERO17 =         0.0000000000 /                                                TTYPE18 = 'NY                ' / image height                                   TUNIT18 = '                  ' /                                                TFORM18 = 'I                 ' /                                                TSCAL18 =         1.0000000000 /                                                TZERO18 =         0.0000000000 /                                                TTYPE19 = 'APMIFIT           ' / aperture correction                            TUNIT19 = 'millimag          ' /                                                TFORM19 = 'I                 ' /                                                TSCAL19 =         1.0000000000 /                                                TZERO19 =         0.0000000000 /                                                TTYPE20 = 'DAPMIFIT          ' / apmifit error                                  TUNIT20 = 'millimag          ' /                                                TFORM20 = 'I                 ' /                                                TSCAL20 =         1.0000000000 /                                                TZERO20 =         0.0000000000 /                                                TTYPE21 = 'SOURCE            ' / identifier for CCD,                            TUNIT21 = '                  ' /                                                TFORM21 = 'I                 ' /                                                TSCAL21 =         1.0000000000 /                                                TZERO21 =         0.0000000000 /                                                TTYPE22 = 'MCAL              ' / calibration mag                                TUNIT22 = 'millimag          ' /                                                TFORM22 = 'I                 ' /                                                TSCAL22 =         1.0000000000 /                                                TZERO22 =         0.0000000000 /                                                TTYPE23 = 'DMCAL             ' / error on Mcal                                  TUNIT23 = 'millimag          ' /                                                TFORM23 = 'I                 ' /                                                TSCAL23 =         1.0000000000 /                                                TZERO23 =         0.0000000000 /                                                TTYPE24 = 'XM                ' / image chisq                                    TUNIT24 = '10*log(value)     ' /                                                TFORM24 = 'I                 ' /                                                TSCAL24 =         1.0000000000 /                                                TZERO24 =         0.0000000000 /                                                TTYPE25 = 'NAME              ' / name of original image                         TUNIT25 = '                  ' /                                                TFORM25 = '32A               ' /                                                TSCAL25 =         1.0000000000 /                                                TZERO25 =         0.0000000000 /                                                TTYPE26 = 'DETECTION_LIMIT   ' / detection limit                                TUNIT26 = '10*mag            ' /                                                TFORM26 = 'B                 ' /                                                TSCAL26 =         1.0000000000 /                                                TZERO26 =         0.0000000000 /                                                TTYPE27 = 'SATURATION_LIMIT  ' / saturation limit                               TUNIT27 = '10*mag            ' /                                                TFORM27 = 'B                 ' /                                                TSCAL27 =         1.0000000000 /                                                TZERO27 =         0.0000000000 /                                                TTYPE28 = 'CERROR            ' / astrometric error                              TUNIT28 = '50*arcsec         ' /                                                TFORM28 = 'B                 ' /                                                TSCAL28 =         1.0000000000 /                                                TZERO28 =         0.0000000000 /                                                TTYPE29 = 'FWHM_X            ' / PSF x width                                    TUNIT29 = '25*arcsec         ' /                                                TFORM29 = 'B                 ' /                                                TSCAL29 =         1.0000000000 /                                                TZERO29 =         0.0000000000 /                                                TTYPE30 = 'FWHM_Y            ' / PSF y width                                    TUNIT30 = '25*arcsec         ' /                                                TFORM30 = 'B                 ' /                                                TSCAL30 =         1.0000000000 /                                                TZERO30 =         0.0000000000 /                                                TTYPE31 = 'TRATE             ' / scan rate                                      TUNIT31 = '100 usec/pixel    ' /                                                TFORM31 = 'B                 ' /                                                TSCAL31 =         1.0000000000 /                                                TZERO31 =         0.0000000000 /                                                TTYPE32 = 'EXPTIME           ' / exposure time                                  TUNIT32 = 'seconds           ' /                                                TFORM32 = 'E                 ' /                                                TSCAL32 =         1.0000000000 /                                                TZERO32 =         0.0000000000 /                                                TTYPE33 = 'CODE              ' / image quality flag                             TUNIT33 = '                  ' /                                                TFORM33 = 'A                 ' /                                                TSCAL33 =         1.0000000000 /                                                TZERO33 =         0.0000000000 /                                                TTYPE34 = 'CCDNUM            ' / CCD ID number                                  TUNIT34 = '                  ' /                                                TFORM34 = 'B                 ' /                                                TSCAL34 =         1.0000000000 /                                                TZERO34 =         0.0000000000 /                                                TTYPE35 = 'DUMMY             ' / unused                                         TUNIT35 = '                  ' /                                                TFORM35 = '20A               ' /                                                TSCAL35 =         1.0000000000 /                                                TZERO35 =         0.0000000000 /                                                TTYPE36 = 'ORDER             ' / Mrel 2D polynomical order                      TUNIT36 = '                  ' /                                                TFORM36 = 'I                 ' /                                                TSCAL36 =         1.0000000000 /                                                TZERO36 =         0.0000000000 /                                                TTYPE37 = 'MX                ' / Mrel polyterm                                  TUNIT37 = '                  ' /                                                TFORM37 = 'I                 ' /                                                TSCAL37 =         1.0000000000 /                                                TZERO37 =         0.0000000000 /                                                TTYPE38 = 'MY                ' / Mrel polyterm                                  TUNIT38 = '                  ' /                                                TFORM38 = 'I                 ' /                                                TSCAL38 =         1.0000000000 /                                                TZERO38 =         0.0000000000 /                                                TTYPE39 = 'MXX               ' / Mrel polyterm                                  TUNIT39 = '                  ' /                                                TFORM39 = 'I                 ' /                                                TSCAL39 =         1.0000000000 /                                                TZERO39 =         0.0000000000 /                                                TTYPE40 = 'MXY               ' / Mrel polyterm                                  TUNIT40 = '                  ' /                                                TFORM40 = 'I                 ' /                                                TSCAL40 =         1.0000000000 /                                                TZERO40 =         0.0000000000 /                                                TTYPE41 = 'MYY               ' / Mrel polyterm                                  TUNIT41 = '                  ' /                                                TFORM41 = 'I                 ' /                                                TSCAL41 =         1.0000000000 /                                                TZERO41 =         0.0000000000 /                                                TTYPE42 = 'MXXX              ' / Mrel polyterm                                  TUNIT42 = '                  ' /                                                TFORM42 = 'I                 ' /                                                TSCAL42 =         1.0000000000 /                                                TZERO42 =         0.0000000000 /                                                TTYPE43 = 'MXXY              ' / Mrel polyterm                                  TUNIT43 = '                  ' /                                                TFORM43 = 'I                 ' /                                                TSCAL43 =         1.0000000000 /                                                TZERO43 =         0.0000000000 /                                                TTYPE44 = 'MXYY              ' / Mrel polyterm                                  TUNIT44 = '                  ' /                                                TFORM44 = 'I                 ' /                                                TSCAL44 =         1.0000000000 /                                                TZERO44 =         0.0000000000 /                                                TTYPE45 = 'MYYY              ' / Mrel polyterm                                  TUNIT45 = '                  ' /                                                TFORM45 = 'I                 ' /                                                TSCAL45 =         1.0000000000 /                                                TZERO45 =         0.0000000000 /                                                TTYPE46 = 'MXXXX             ' / Mrel polyterm                                  TUNIT46 = '                  ' /                                                TFORM46 = 'I                 ' /                                                TSCAL46 =         1.0000000000 /                                                TZERO46 =         0.0000000000 /                                                TTYPE47 = 'MXXXY             ' / Mrel polyterm                                  TUNIT47 = '                  ' /                                                TFORM47 = 'I                 ' /                                                TSCAL47 =         1.0000000000 /                                                TZERO47 =         0.0000000000 /                                                TTYPE48 = 'MXXYY             ' / Mrel polyterm                                  TUNIT48 = '                  ' /                                                TFORM48 = 'I                 ' /                                                TSCAL48 =         1.0000000000 /                                                TZERO48 =         0.0000000000 /                                                TTYPE49 = 'MXYYY             ' / Mrel polyterm                                  TUNIT49 = '                  ' /                                                TFORM49 = 'I                 ' /                                                TSCAL49 =         1.0000000000 /                                                TZERO49 =         0.0000000000 /                                                TTYPE50 = 'MYYYY             ' / Mrel polyterm                                  TUNIT50 = '                  ' /                                                TFORM50 = 'I                 ' /                                                TSCAL50 =         1.0000000000 /                                                TZERO50 =         0.0000000000 /                                                END                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
     1SIMPLE  =                    T /                                                BITPIX  =                    8 /                                                NAXIS   =                    0 /                                                PCOUNT  =                    0 /                                                GCOUNT  =                    1 /                                                BSCALE  =         1.0000000000 /                                                BZERO   =         0.0000000000 /                                                EXTEND  =                    T /                                                NIMAGES =                    0 /                                                ZERO_PT =        25.0000000000 /                                                FORMAT  = 'ELIXIR            ' /                                                DVO_DBID= 'c2fa2cdbac0df952ae954ed04381e219' /                                  END                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             XTENSION= 'BINTABLE          ' /                                                BITPIX  =                    8 /                                                NAXIS   =                    2 /                                                NAXIS1  =                  240 /                                                NAXIS2  =                    0 /                                                PCOUNT  =                    0 /                                                GCOUNT  =                    1 /                                                TFIELDS =                   50 /                                                EXTNAME = 'DVO_IMAGE_ELIXIR  ' /                                                TTYPE1  = 'CRVAL1            ' / coordinate at reference pixel                  TUNIT1  = '                  ' /                                                TFORM1  = 'D                 ' /                                                TSCAL1  =         1.0000000000 /                                                TZERO1  =         0.0000000000 /                                                TTYPE2  = 'CRVAL2            ' / coordinate at reference pixel                  TUNIT2  = '                  ' /                                                TFORM2  = 'D                 ' /                                                TSCAL2  =         1.0000000000 /                                                TZERO2  =         0.0000000000 /                                                TTYPE3  = 'CRPIX1            ' / coordinate of reference pixel                  TUNIT3  = '                  ' /                                                TFORM3  = 'E                 ' /                                                TSCAL3  =         1.0000000000 /                                                TZERO3  =         0.0000000000 /                                                TTYPE4  = 'CRPIX2            ' / coordinate of reference pixel                  TUNIT4  = '                  ' /                                                TFORM4  = 'E                 ' /                                                TSCAL4  =         1.0000000000 /                                                TZERO4  =         0.0000000000 /                                                TTYPE5  = 'CDELT1            ' / degrees per pixel                              TUNIT5  = '                  ' /                                                TFORM5  = 'E                 ' /                                                TSCAL5  =         1.0000000000 /                                                TZERO5  =         0.0000000000 /                                                TTYPE6  = 'CDELT2            ' / degrees per pixel                              TUNIT6  = '                  ' /                                                TFORM6  = 'E                 ' /                                                TSCAL6  =         1.0000000000 /                                                TZERO6  =         0.0000000000 /                                                TTYPE7  = 'PC1_1             ' / rotation matrix                                TUNIT7  = '                  ' /                                                TFORM7  = 'E                 ' /                                                TSCAL7  =         1.0000000000 /                                                TZERO7  =         0.0000000000 /                                                TTYPE8  = 'PC1_2             ' / rotation matrix                                TUNIT8  = '                  ' /                                                TFORM8  = 'E                 ' /                                                TSCAL8  =         1.0000000000 /                                                TZERO8  =         0.0000000000 /                                                TTYPE9  = 'PC2_1             ' / rotation matrix                                TUNIT9  = '                  ' /                                                TFORM9  = 'E                 ' /                                                TSCAL9  =         1.0000000000 /                                                TZERO9  =         0.0000000000 /                                                TTYPE10 = 'PC2_2             ' / rotation matrix                                TUNIT10 = '                  ' /                                                TFORM10 = 'E                 ' /                                                TSCAL10 =         1.0000000000 /                                                TZERO10 =         0.0000000000 /                                                TTYPE11 = 'POLYTERMS         ' / higher order warping terms                     TUNIT11 = '                  ' /                                                TFORM11 = '14E               ' /                                                TSCAL11 =         1.0000000000 /                                                TZERO11 =         0.0000000000 /                                                TTYPE12 = 'CTYPE             ' / coordinate type                                TUNIT12 = '                  ' /                                                TFORM12 = '15A               ' /                                                TSCAL12 =         1.0000000000 /                                                TZERO12 =         0.0000000000 /                                                TTYPE13 = 'NPOLYTERMS        ' / order of polynomial                            TUNIT13 = '                  ' /                                                TFORM13 = 'A                 ' /                                                TSCAL13 =         1.0000000000 /                                                TZERO13 =         0.0000000000 /                                                TTYPE14 = 'TZERO             ' / readout time (row 0)                           TUNIT14 = '                  ' /                                                TFORM14 = 'J                 ' /                                                TSCAL14 =         1.0000000000 /                                                TZERO14 =         0.0000000000 /                                                TTYPE15 = 'NSTAR             ' / number of stars on image                       TUNIT15 = '                  ' /                                                TFORM15 = 'J                 ' /                                                TSCAL15 =         1.0000000000 /                                                TZERO15 =         0.0000000000 /                                                TTYPE16 = 'SECZ              ' / airmass                                        TUNIT16 = 'milliairmass      ' /                                                TFORM16 = 'I                 ' /                                                TSCAL16 =         1.0000000000 /                                                TZERO16 =         0.0000000000 /                                                TTYPE17 = 'NX                ' / image width                                    TUNIT17 = '                  ' /                                                TFORM17 = 'I                 ' /                                                TSCAL17 =         1.0000000000 /                                                TZERO17 =         0.0000000000 /                                                TTYPE18 = 'NY                ' / image height                                   TUNIT18 = '                  ' /                                                TFORM18 = 'I                 ' /                                                TSCAL18 =         1.0000000000 /                                                TZERO18 =         0.0000000000 /                                                TTYPE19 = 'APMIFIT           ' / aperture correction                            TUNIT19 = 'millimag          ' /                                                TFORM19 = 'I                 ' /                                                TSCAL19 =         1.0000000000 /                                                TZERO19 =         0.0000000000 /                                                TTYPE20 = 'DAPMIFIT          ' / apmifit error                                  TUNIT20 = 'millimag          ' /                                                TFORM20 = 'I                 ' /                                                TSCAL20 =         1.0000000000 /                                                TZERO20 =         0.0000000000 /                                                TTYPE21 = 'SOURCE            ' / identifier for CCD,                            TUNIT21 = '                  ' /                                                TFORM21 = 'I                 ' /                                                TSCAL21 =         1.0000000000 /                                                TZERO21 =         0.0000000000 /                                                TTYPE22 = 'MCAL              ' / calibration mag                                TUNIT22 = 'millimag          ' /                                                TFORM22 = 'I                 ' /                                                TSCAL22 =         1.0000000000 /                                                TZERO22 =         0.0000000000 /                                                TTYPE23 = 'DMCAL             ' / error on Mcal                                  TUNIT23 = 'millimag          ' /                                                TFORM23 = 'I                 ' /                                                TSCAL23 =         1.0000000000 /                                                TZERO23 =         0.0000000000 /                                                TTYPE24 = 'XM                ' / image chisq                                    TUNIT24 = '10*log(value)     ' /                                                TFORM24 = 'I                 ' /                                                TSCAL24 =         1.0000000000 /                                                TZERO24 =         0.0000000000 /                                                TTYPE25 = 'NAME              ' / name of original image                         TUNIT25 = '                  ' /                                                TFORM25 = '32A               ' /                                                TSCAL25 =         1.0000000000 /                                                TZERO25 =         0.0000000000 /                                                TTYPE26 = 'DETECTION_LIMIT   ' / detection limit                                TUNIT26 = '10*mag            ' /                                                TFORM26 = 'B                 ' /                                                TSCAL26 =         1.0000000000 /                                                TZERO26 =         0.0000000000 /                                                TTYPE27 = 'SATURATION_LIMIT  ' / saturation limit                               TUNIT27 = '10*mag            ' /                                                TFORM27 = 'B                 ' /                                                TSCAL27 =         1.0000000000 /                                                TZERO27 =         0.0000000000 /                                                TTYPE28 = 'CERROR            ' / astrometric error                              TUNIT28 = '50*arcsec         ' /                                                TFORM28 = 'B                 ' /                                                TSCAL28 =         1.0000000000 /                                                TZERO28 =         0.0000000000 /                                                TTYPE29 = 'FWHM_X            ' / PSF x width                                    TUNIT29 = '25*arcsec         ' /                                                TFORM29 = 'B                 ' /                                                TSCAL29 =         1.0000000000 /                                                TZERO29 =         0.0000000000 /                                                TTYPE30 = 'FWHM_Y            ' / PSF y width                                    TUNIT30 = '25*arcsec         ' /                                                TFORM30 = 'B                 ' /                                                TSCAL30 =         1.0000000000 /                                                TZERO30 =         0.0000000000 /                                                TTYPE31 = 'TRATE             ' / scan rate                                      TUNIT31 = '100 usec/pixel    ' /                                                TFORM31 = 'B                 ' /                                                TSCAL31 =         1.0000000000 /                                                TZERO31 =         0.0000000000 /                                                TTYPE32 = 'EXPTIME           ' / exposure time                                  TUNIT32 = 'seconds           ' /                                                TFORM32 = 'E                 ' /                                                TSCAL32 =         1.0000000000 /                                                TZERO32 =         0.0000000000 /                                                TTYPE33 = 'CODE              ' / image quality flag                             TUNIT33 = '                  ' /                                                TFORM33 = 'A                 ' /                                                TSCAL33 =         1.0000000000 /                                                TZERO33 =         0.0000000000 /                                                TTYPE34 = 'CCDNUM            ' / CCD ID number                                  TUNIT34 = '                  ' /                                                TFORM34 = 'B                 ' /                                                TSCAL34 =         1.0000000000 /                                                TZERO34 =         0.0000000000 /                                                TTYPE35 = 'DUMMY             ' / unused                                         TUNIT35 = '                  ' /                                                TFORM35 = '20A               ' /                                                TSCAL35 =         1.0000000000 /                                                TZERO35 =         0.0000000000 /                                                TTYPE36 = 'ORDER             ' / Mrel 2D polynomical order                      TUNIT36 = '                  ' /                                                TFORM36 = 'I                 ' /                                                TSCAL36 =         1.0000000000 /                                                TZERO36 =         0.0000000000 /                                                TTYPE37 = 'MX                ' / Mrel polyterm                                  TUNIT37 = '                  ' /                                                TFORM37 = 'I                 ' /                                                TSCAL37 =         1.0000000000 /                                                TZERO37 =         0.0000000000 /                                                TTYPE38 = 'MY                ' / Mrel polyterm                                  TUNIT38 = '                  ' /                                                TFORM38 = 'I                 ' /                                                TSCAL38 =         1.0000000000 /                                                TZERO38 =         0.0000000000 /                                                TTYPE39 = 'MXX               ' / Mrel polyterm                                  TUNIT39 = '                  ' /                                                TFORM39 = 'I                 ' /                                                TSCAL39 =         1.0000000000 /                                                TZERO39 =         0.0000000000 /                                                TTYPE40 = 'MXY               ' / Mrel polyterm                                  TUNIT40 = '                  ' /                                                TFORM40 = 'I                 ' /                                                TSCAL40 =         1.0000000000 /                                                TZERO40 =         0.0000000000 /                                                TTYPE41 = 'MYY               ' / Mrel polyterm                                  TUNIT41 = '                  ' /                                                TFORM41 = 'I                 ' /                                                TSCAL41 =         1.0000000000 /                                                TZERO41 =         0.0000000000 /                                                TTYPE42 = 'MXXX              ' / Mrel polyterm                                  TUNIT42 = '                  ' /                                                TFORM42 = 'I                 ' /                                                TSCAL42 =         1.0000000000 /                                                TZERO42 =         0.0000000000 /                                                TTYPE43 = 'MXXY              ' / Mrel polyterm                                  TUNIT43 = '                  ' /                                                TFORM43 = 'I                 ' /                                                TSCAL43 =         1.0000000000 /                                                TZERO43 =         0.0000000000 /                                                TTYPE44 = 'MXYY              ' / Mrel polyterm                                  TUNIT44 = '                  ' /                                                TFORM44 = 'I                 ' /                                                TSCAL44 =         1.0000000000 /                                                TZERO44 =         0.0000000000 /                                                TTYPE45 = 'MYYY              ' / Mrel polyterm                                  TUNIT45 = '                  ' /                                                TFORM45 = 'I                 ' /                                                TSCAL45 =         1.0000000000 /                                                TZERO45 =         0.0000000000 /                                                TTYPE46 = 'MXXXX             ' / Mrel polyterm                                  TUNIT46 = '                  ' /                                                TFORM46 = 'I                 ' /                                                TSCAL46 =         1.0000000000 /                                                TZERO46 =         0.0000000000 /                                                TTYPE47 = 'MXXXY             ' / Mrel polyterm                                  TUNIT47 = '                  ' /                                                TFORM47 = 'I                 ' /                                                TSCAL47 =         1.0000000000 /                                                TZERO47 =         0.0000000000 /                                                TTYPE48 = 'MXXYY             ' / Mrel polyterm                                  TUNIT48 = '                  ' /                                                TFORM48 = 'I                 ' /                                                TSCAL48 =         1.0000000000 /                                                TZERO48 =         0.0000000000 /                                                TTYPE49 = 'MXYYY             ' / Mrel polyterm                                  TUNIT49 = '                  ' /                                                TFORM49 = 'I                 ' /                                                TSCAL49 =         1.0000000000 /                                                TZERO49 =         0.0000000000 /                                                TTYPE50 = 'MYYYY             ' / Mrel polyterm                                  TUNIT50 = '                  ' /                                                TFORM50 = 'I                 ' /                                                TSCAL50 =         1.0000000000 /                                                TZERO50 =         0.0000000000 /                                                END                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
Note: See TracChangeset for help on using the changeset viewer.