IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 16, 2006, 10:12:55 AM (20 years ago)
Author:
eugene
Message:

updating to new DVO APIs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libdvo/src/dvo_catalog_split.c

    r8342 r8386  
    6060    gfits_free_header (&header);
    6161  }
     62  dvo_catalog_test (catalog, FALSE);
    6263
    6364  /*** Measure Table ***/
     
    6869  if (catalog[0].catflags & LOAD_MEAS) {
    6970    ALLOCATE (measure, Catalog, 1);
    70     measure[0].measure_catalog = NULL;
    71     measure[0].missing_catalog = NULL;
    72     measure[0].secfilt_catalog = NULL;
     71    dvo_catalog_init (measure, TRUE);
    7372
    7473    /* get split filename from main header (paths relative to cpt file) */
     
    9089    /* matrix should be empty */
    9190    if (!gfits_fread_matrix (measure[0].f, &matrix, &measure[0].header)) {
    92       if (VERBOSE) fprintf (stderr, "can't read primary matrix");
     91      if (VERBOSE) fprintf (stderr, "can't read primary matrix\n");
    9392      return (FALSE);
    9493    }
    9594    /* read Measure table header */
    9695    if (!gfits_fread_header (measure[0].f, &header)) {
    97       if (VERBOSE) fprintf (stderr, "can't read measure PHU header");
     96      if (VERBOSE) fprintf (stderr, "can't read measure PHU header\n");
    9897      return (FALSE);
    9998    }
    10099    /* read Measure table data */
    101100    if (!gfits_fread_ftable_data (measure[0].f, &ftable)) {
    102       if (VERBOSE) fprintf (stderr, "can't read table measure data");
     101      if (VERBOSE) fprintf (stderr, "can't read table measure data\n");
    103102      return (FALSE);
    104103    }
     
    112111    gfits_free_matrix (&matrix);
    113112  }
     113  dvo_catalog_test (catalog, FALSE);
    114114
    115115  /* (Meta Load) */
    116116  if (catalog[0].catflags & LOAD_MEAS_META) {
    117117    ALLOCATE (measure, Catalog, 1);
     118    dvo_catalog_init (measure, TRUE);
    118119
    119120    /* get split filename from main header (paths relative to cpt file) */
     
    142143  }
    143144  catalog[0].measure_catalog = measure;
     145  dvo_catalog_test (catalog, FALSE);
    144146
    145147  /*** Missing Table ***/
     
    148150  if (catalog[0].catflags & LOAD_MISS) {
    149151    ALLOCATE (missing, Catalog, 1);
    150     missing[0].measure_catalog = NULL;
    151     missing[0].missing_catalog = NULL;
    152     missing[0].secfilt_catalog = NULL;
     152    dvo_catalog_init (missing, TRUE);
    153153
    154154    /* get split filename from main header (paths relative to cpt file) */
     
    170170    /* matrix should be empty */
    171171    if (!gfits_fread_matrix (missing[0].f, &matrix, &missing[0].header)) {
    172       if (VERBOSE) fprintf (stderr, "can't read primary matrix");
     172      if (VERBOSE) fprintf (stderr, "can't read primary matrix\n");
    173173      return (FALSE);
    174174    }
    175175    /* read Missing table header */
    176176    if (!gfits_fread_header (missing[0].f, &header)) {
    177       if (VERBOSE) fprintf (stderr, "can't read table missing header");
     177      if (VERBOSE) fprintf (stderr, "can't read table missing header\n");
    178178      return (FALSE);
    179179    }
    180180    /* read Missing table data */
    181181    if (!gfits_fread_ftable_data (missing[0].f, &ftable)) {
    182       if (VERBOSE) fprintf (stderr, "can't read table missing data");
     182      if (VERBOSE) fprintf (stderr, "can't read table missing data\n");
    183183      return (FALSE);
    184184    }
     
    192192  }
    193193  catalog[0].missing_catalog = missing;
     194  dvo_catalog_test (catalog, FALSE);
    194195
    195196  /*** Secfilt Table ***/
     
    198199  if (catalog[0].catflags & LOAD_SECF) {
    199200    ALLOCATE (secfilt, Catalog, 1);
    200     secfilt[0].measure_catalog = NULL;
    201     secfilt[0].missing_catalog = NULL;
    202     secfilt[0].secfilt_catalog = NULL;
     201    dvo_catalog_init (secfilt, TRUE);
    203202
    204203    /* get split filename from main header (paths relative to cpt file) */
     
    220219    /* matrix should be empty */
    221220    if (!gfits_fread_matrix (secfilt[0].f, &matrix, &secfilt[0].header)) {
    222       if (VERBOSE) fprintf (stderr, "can't read primary matrix");
     221      if (VERBOSE) fprintf (stderr, "can't read primary matrix\n");
    223222      return (FALSE);
    224223    }
    225224    /* read secfilt table header */
    226225    if (!gfits_fread_header (secfilt[0].f, &header)) {
    227       if (VERBOSE) fprintf (stderr, "can't read table secfilt header");
     226      if (VERBOSE) fprintf (stderr, "can't read table secfilt header\n");
    228227      return (FALSE);
    229228    }
    230229    /* read secfilt table data */
    231230    if (!gfits_fread_ftable_data (secfilt[0].f, &ftable)) {
    232       if (VERBOSE) fprintf (stderr, "can't read table secfilt data");
     231      if (VERBOSE) fprintf (stderr, "can't read table secfilt data\n");
    233232      return (FALSE);
    234233    }
     
    242241  }
    243242  catalog[0].secfilt_catalog = secfilt;
     243  dvo_catalog_test (catalog, FALSE);
    244244
    245245  /* save the current number so we can do partial updates */
Note: See TracChangeset for help on using the changeset viewer.