IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 13, 2007, 11:55:33 AM (19 years ago)
Author:
Paul Price
Message:

Only read header when it's there to be read.
When reading concepts, do all levels as appropriate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStats/src/ppStatsLoop.c

    r13793 r13794  
    103103    }
    104104    if (psListLength(data->concepts) > 0) {
    105         if (fits && !pmCellReadHeader(cell, fits)) {
     105        if (fits && cell->hdu && !pmCellReadHeader(cell, fits)) {
    106106            psError (PS_ERR_IO, false, "trouble reading cell header\n");
    107107            psFree(cellResults);
    108108            return PS_EXIT_DATA_ERROR;
    109109        }
    110         pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_ALL, false, config->database);
     110        pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_ALL, true, config->database);
    111111        getMetadata(cellResults, cell->concepts, data->concepts);
    112112    }
     
    299299    }
    300300    if (psListLength(data->concepts) > 0) {
    301         if (fits && !pmChipReadHeader(chip, fits)) {
     301        if (fits && chip->hdu && !pmChipReadHeader(chip, fits)) {
    302302            psError (PS_ERR_IO, false, "trouble reading chip header\n");
    303303            psFree(chipResults);
    304304            return PS_EXIT_DATA_ERROR;
    305305        }
    306         pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_ALL, false, false, config->database);
     306        pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_ALL, true, true, config->database);
    307307        getMetadata(chipResults, chip->concepts, data->concepts);
    308308    }
     
    375375    }
    376376    if (psListLength(data->concepts) > 0) {
    377         if (fits && !pmFPAReadHeader(fpa, fits)) {
     377        if (fits && fpa->hdu && !pmFPAReadHeader(fpa, fits)) {
    378378            psError(PS_ERR_IO, false, "Unable to read header for FPA.");
    379379            psFree(view);
     
    382382            return NULL;
    383383        }
    384         pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_ALL, false, config->database);
     384        pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_ALL, true, config->database);
    385385        getMetadata(newResults, fpa->concepts, data->concepts);
    386386    }
Note: See TracChangeset for help on using the changeset viewer.