IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 19, 2005, 5:10:19 PM (21 years ago)
Author:
eugene
Message:

modifications to use CATMODE, CATFORMAT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/markstar/src/wcatalog.c

    r2490 r4828  
    11# include "markstar.h"
    22
    3 wcatalog (char *catname, Catalog *catalog) {
     3wcatalog (Catalog *catalog) {
    44 
    5   int status;
    6   char filename[256];
     5  /* set catalog format (elixir, loneos, etc) */
     6  if (!strcmp (CATFORMAT, "INTERNAL")) {
     7    sprintf (catalog[0].average_format, "DVO_AVERAGE");
     8    sprintf (catalog[0].measure_format, "DVO_MEASURE");
     9  } else {
     10    sprintf (catalog[0].average_format, "DVO_AVERAGE_%s", CATFORMAT);
     11    sprintf (catalog[0].measure_format, "DVO_MEASURE_%s", CATFORMAT);
     12  }
    713
    8   fits_modify (&catalog[0].header, "MARKSTAR", "%t", 1, TRUE);
    9 
    10   sprintf (filename, "%s/%s\0", CATDIR, catname);
    11   status = save_catalog (filename, catalog, VERBOSE);
     14  if (!save_catalog (catalog, VERBOSE)) {
     15    fprintf (stderr, "ERROR: failure saving catalog\n");
     16    exit (1);
     17  }
    1218
    1319  if (catalog[0].Naverage) {
     
    2733    catalog[0].Nsecfilt = 0;
    2834  }
    29 
    30   switch (status) {
    31   case 0:
    32     exit (0);
    33   case 1:
    34   case 2:
    35     return (status);
    36   default:
    37     fprintf (stderr, "unknown exit status for save_catalog\n");
    38     return (FALSE);
    39   }
     35  fits_free_header (&catalog[0].header);
    4036}
    4137
Note: See TracChangeset for help on using the changeset viewer.