IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18168


Ignore:
Timestamp:
Jun 17, 2008, 12:29:17 PM (18 years ago)
Author:
Paul Price
Message:

API change for pmFPARead(), etc.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackLoop.c

    r18102 r18168  
    431431
    432432                if (!pmReadoutReadChunk(readout, imageFits->data[i], 0, numScans, overlap,
    433                                         config->database) ||
     433                                        config) ||
    434434                    !pmReadoutReadChunkMask(readout, maskFits->data[i], 0, numScans, overlap,
    435                                             config->database) ||
     435                                            config) ||
    436436                    !pmReadoutReadChunkWeight(readout, weightFits->data[i], 0, numScans, overlap,
    437                                               config->database)) {
     437                                              config)) {
    438438                    psError(PS_ERR_IO, false, "Unable to read chunk %d for file %d", numChunk, i);
    439439                    psFree(readouts);
     
    474474                    continue;
    475475                }
    476                 more &= pmReadoutMore(readout, imageFits->data[i], 0, numScans, config->database);
    477                 more &= pmReadoutMoreMask(readout, maskFits->data[i], 0, numScans, config->database);
    478                 more &= pmReadoutMoreWeight(readout, weightFits->data[i], 0, numScans, config->database);
     476                more &= pmReadoutMore(readout, imageFits->data[i], 0, numScans, config);
     477                more &= pmReadoutMoreMask(readout, maskFits->data[i], 0, numScans, config);
     478                more &= pmReadoutMoreWeight(readout, weightFits->data[i], 0, numScans, config);
    479479            }
    480480        }
     
    554554                assert(readout);
    555555
    556                 if (!pmReadoutReadChunk(readout, imageFits->data[i], 0, numScans, 0, config->database) ||
    557                     !pmReadoutReadChunkMask(readout, maskFits->data[i], 0, numScans, 0, config->database) ||
     556                if (!pmReadoutReadChunk(readout, imageFits->data[i], 0, numScans, 0, config) ||
     557                    !pmReadoutReadChunkMask(readout, maskFits->data[i], 0, numScans, 0, config) ||
    558558                    !pmReadoutReadChunkWeight(readout, weightFits->data[i], 0, numScans, 0,
    559                                               config->database)) {
     559                                              config)) {
    560560                    psError(PS_ERR_IO, false, "Unable to read chunk %d for file %d", numChunk, i);
    561561                    psFree(readouts);
     
    597597                    continue;
    598598                }
    599                 more &= pmReadoutMore(readout, imageFits->data[i], 0, numScans, config->database);
    600                 more &= pmReadoutMoreMask(readout, maskFits->data[i], 0, numScans, config->database);
    601                 more &= pmReadoutMoreWeight(readout, weightFits->data[i], 0, numScans, config->database);
     599                more &= pmReadoutMore(readout, imageFits->data[i], 0, numScans, config);
     600                more &= pmReadoutMoreMask(readout, maskFits->data[i], 0, numScans, config);
     601                more &= pmReadoutMoreWeight(readout, weightFits->data[i], 0, numScans, config);
    602602            }
    603603        }
  • trunk/ppStats/src/ppStats.h

    r14020 r18168  
    1414    bool doStats;                       // Do pixel statistics?
    1515    bool fileLevel;                     // Output file level?
    16     pmFPAview *fileView;                // View to analyse
     16    pmFPAview *fileView;                // View to analyse
    1717
    1818    psList *headers;                    // Headers to read
     
    3030ppStatsData *ppStatsDataAlloc(void);
    3131
    32 /// Perform the ppStats steps on the given FPA (optionally for specified view) 
     32/// Perform the ppStats steps on the given FPA (optionally for specified view)
    3333psMetadata *ppStatsFPA(psMetadata *out,
    34                        pmFPA *fpa,         // FPA for which to get statistics
    35                        pmFPAview *view,    // View for analysis
    36                        psMaskType maskVal, // Value to mask
    37                        pmConfig *config    // Configuration
     34                       pmFPA *fpa,         // FPA for which to get statistics
     35                       pmFPAview *view,    // View for analysis
     36                       psMaskType maskVal, // Value to mask
     37                       pmConfig *config    // Configuration
    3838    );
    3939
    4040psExit ppStatsChip(psMetadata *fpaResults, // Metadata holding the fpa results
    41                    pmChip *chip,     // Chip for which to get statistics
    42                    psFits *fits,     // FITS file handle
    43                    pmFPAview *view,  // View for analysis
    44                    ppStatsData *data,// The data
    45                    const pmConfig *config // Configuration
     41                   pmChip *chip,     // Chip for which to get statistics
     42                   psFits *fits,     // FITS file handle
     43                   pmFPAview *view,  // View for analysis
     44                   ppStatsData *data,// The data
     45                  pmConfig *config // Configuration
    4646    );
    4747
    4848psExit ppStatsCell(psMetadata *chipResults, // Metadata holding the chip results
    49                    pmCell *cell,     // Cell for which to get statistics
    50                    psFits *fits,     // FITS file handle
    51                    pmFPAview *view,  // View for analysis
    52                    ppStatsData *data,// The data
    53                    const pmConfig *config // Configuration
     49                   pmCell *cell,     // Cell for which to get statistics
     50                   psFits *fits,     // FITS file handle
     51                   pmFPAview *view,  // View for analysis
     52                   ppStatsData *data,// The data
     53                   pmConfig *config // Configuration
    5454    );
    5555
     
    6464// measure only the pixel-related statistics (stats, summary)
    6565psMetadata *ppStatsPixels(psMetadata *out,
    66                           pmFPA *fpa,         // FPA for which to get statistics
    67                           pmFPAview *view,    // View for analysis
    68                           psMaskType maskVal, // Value to mask
    69                           pmConfig *config    // Configuration
     66                          pmFPA *fpa,         // FPA for which to get statistics
     67                          pmFPAview *view,    // View for analysis
     68                          psMaskType maskVal, // Value to mask
     69                          pmConfig *config    // Configuration
    7070    );
    7171
    7272// measure only the non-pixel-related statistics (headers, concepts)
    7373psMetadata *ppStatsMetadata(psMetadata *out,
    74                             pmFPA *fpa,         // FPA for which to get statistics
    75                             pmFPAview *view,    // View for analysis
    76                             psMaskType maskVal, // Value to mask
    77                             pmConfig *config    // Configuration
     74                            pmFPA *fpa,         // FPA for which to get statistics
     75                            pmFPAview *view,    // View for analysis
     76                            psMaskType maskVal, // Value to mask
     77                            pmConfig *config    // Configuration
    7878    );
    7979
     
    8181psMetadata *ppStatsLoop(psExit *result,
    8282                        ppStatsData *data, // The data
    83                         const pmConfig *config // Configuration
     83                        pmConfig *config // Configuration
    8484    );
    8585
     
    101101
    102102void p_ppStatsGetMetadata(psMetadata *target, // Target for metadata
    103                           psMetadata *source, // Source for metadata
    104                           psList *list    // List containing keywords
     103                          psMetadata *source, // Source for metadata
     104                          psList *list    // List containing keywords
    105105    );
    106106
    107107void p_ppStatsGetAnalysis(psMetadata *target, // Output Target for metadata
    108                           psList *headers,    // List containing desired keywords
    109                           psMetadata *source, // Input Source for metadata
    110                           psList *list        // List containing analysis blocks
     108                          psList *headers,    // List containing desired keywords
     109                          psMetadata *source, // Input Source for metadata
     110                          psList *list        // List containing analysis blocks
    111111    );
    112112
    113113bool p_ppStatsDoThis(psList *toDoList,    // List of things to do
    114                      const char *this     // The name of "this"
     114                     const char *this     // The name of "this"
    115115    );
    116116
    117117void p_ppStatsAddToHierarchy(psMetadata *source, // Source to add
    118                              psMetadata *target, // Target to which to add
    119                              const char *name, // Name of source
    120                              const char *comment // Comment for source
     118                             psMetadata *target, // Target to which to add
     119                             const char *name, // Name of source
     120                             const char *comment // Comment for source
    121121    );
    122122
    123123psExit ppStatsReadout(psMetadata *cellResults, // Metadata holding the chip results
    124                       pmReadout *readout,       // Cell for which to get statistics
    125                       int nReadout,     // readout number
    126                       ppStatsData *data,        // The data
    127                       const pmConfig *config // Configuration
     124                      pmReadout *readout,       // Cell for which to get statistics
     125                      int nReadout,     // readout number
     126                      ppStatsData *data,        // The data
     127                      const pmConfig *config // Configuration
    128128    );
    129129
  • trunk/ppStats/src/ppStatsCell.c

    r18137 r18168  
    66                   pmFPAview *view,  // View for analysis
    77                   ppStatsData *data,   // The data
    8                    const pmConfig *config // Configuration
     8                   pmConfig *config // Configuration
    99    )
    1010{
     
    4949        // extract from existing headers
    5050        if (cell->hdu) {
    51             if (fits && !pmCellReadHeader(cell, fits, config->database)) {
     51            if (fits && !pmCellReadHeader(cell, fits, config)) {
    5252                psError (PS_ERR_IO, false, "trouble reading cell header\n");
    5353                psFree(cellResults);
     
    6565    // Extract Concept values
    6666    if (psListLength(data->concepts) > 0) {
    67         if (fits && cell->hdu && !pmCellReadHeader(cell, fits, config->database)) {
     67        if (fits && cell->hdu && !pmCellReadHeader(cell, fits, config)) {
    6868            psError (PS_ERR_IO, false, "trouble reading cell header\n");
    6969            psFree(cellResults);
    7070            return PS_EXIT_DATA_ERROR;
    7171        }
    72         pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_ALL, false, config->database);
     72        pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_ALL, false, config);
    7373        p_ppStatsGetMetadata(cellResults, cell->concepts, data->concepts);
    7474    }
     
    7777    if (data->doStats || psListLength(data->summary)) {
    7878        // Read the image pixel data
    79         if (fits && !pmCellRead(cell, fits, config->database)) {
     79        if (fits && !pmCellRead(cell, fits, config)) {
    8080            psError (PS_ERR_IO, false, "trouble reading cell data\n");
    8181            psFree(cellResults);
  • trunk/ppStats/src/ppStatsChip.c

    r18137 r18168  
    22
    33psExit ppStatsChip(psMetadata *fpaResults, // Metadata holding the fpa results
    4                    pmChip *chip,     // Chip for which to get statistics
    5                    psFits *fits,     // FITS file handle
    6                    pmFPAview *view,  // View for analysis
    7                    ppStatsData *data,// The data
    8                    const pmConfig *config // Configuration
     4                   pmChip *chip,     // Chip for which to get statistics
     5                   psFits *fits,     // FITS file handle
     6                   pmFPAview *view,  // View for analysis
     7                   ppStatsData *data,// The data
     8                  pmConfig *config // Configuration
    99    )
    1010{
     
    2222    }
    2323    if (!chip->file_exists && !chip->data_exists) {
    24         return PS_EXIT_SUCCESS;
     24        return PS_EXIT_SUCCESS;
    2525    }
    2626
     
    3636    // Extract Header values
    3737    if (psListLength(data->headers)) {
    38         // extract from existing headers
    39         if (chip->hdu) {
    40             if (fits && !pmChipReadHeader(chip, fits, config->database)) {
    41                 psError (PS_ERR_IO, false, "trouble reading chip header\n");
    42                 psFree(chipResults);
    43                 return PS_EXIT_DATA_ERROR;
    44             }
    45             pmHDU *hdu = chip->hdu;     // HDU for headers
    46             p_ppStatsGetMetadata(chipResults, hdu->header, data->headers);
    47         }
    48         // extract from data->analysis output MD entries
    49         if (psListLength(data->analysis)) {
    50             p_ppStatsGetAnalysis (chipResults, data->headers, chip->analysis, data->analysis);
    51         }
     38        // extract from existing headers
     39        if (chip->hdu) {
     40            if (fits && !pmChipReadHeader(chip, fits, config)) {
     41                psError (PS_ERR_IO, false, "trouble reading chip header\n");
     42                psFree(chipResults);
     43                return PS_EXIT_DATA_ERROR;
     44            }
     45            pmHDU *hdu = chip->hdu;     // HDU for headers
     46            p_ppStatsGetMetadata(chipResults, hdu->header, data->headers);
     47        }
     48        // extract from data->analysis output MD entries
     49        if (psListLength(data->analysis)) {
     50            p_ppStatsGetAnalysis (chipResults, data->headers, chip->analysis, data->analysis);
     51        }
    5252    }
    5353
    5454    // Extract Concept values
    5555    if (psListLength(data->concepts) > 0) {
    56         if (fits && chip->hdu && !pmChipReadHeader(chip, fits, config->database)) {
     56        if (fits && chip->hdu && !pmChipReadHeader(chip, fits, config)) {
    5757            psError (PS_ERR_IO, false, "trouble reading chip header\n");
    5858            psFree(chipResults);
    5959            return PS_EXIT_DATA_ERROR;
    6060        }
    61         pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_ALL, false, false, config->database);
     61        pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_ALL, false, false, config);
    6262        p_ppStatsGetMetadata(chipResults, chip->concepts, data->concepts);
    6363    }
     
    7373    // Iterate over cells (if view->cell is set, skip all others)
    7474    for (int i = 0; i < cells->n; i++) {
    75         if ((view->cell >= 0) && (i != view->cell)) continue;
     75        if ((view->cell >= 0) && (i != view->cell)) continue;
    7676        pmCell *cell = cells->data[i];  // Cell of interest
    7777        psExit result = ppStatsCell(chipResults, cell, fits, view, data, config);
  • trunk/ppStats/src/ppStatsLoop.c

    r18167 r18168  
    33psMetadata *ppStatsLoop(psExit *result,
    44                        ppStatsData *data, // The data
    5                         const pmConfig *config // Configuration
     5                        pmConfig *config // Configuration
    66    )
    77{
Note: See TracChangeset for help on using the changeset viewer.