IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 3, 2007, 10:01:23 AM (19 years ago)
Author:
eugene
Message:

consolidating includes in ppImage.h; adding ppImageMetadataStats and ppImagePixelStats

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppImage.c

    r13901 r14000  
    4545    return PS_EXIT_SUCCESS;
    4646}
    47 
    48 void ppImageFileCheck (pmConfig *config) {
    49 
    50     // add the output names to the output-type files
    51     psMetadataItem *item = NULL;
    52     psMetadataIterator *iter = psMetadataIteratorAlloc (config->files, PS_LIST_HEAD, NULL);
    53     while ((item = psMetadataGetAndIncrement (iter)) != NULL) {
    54         pmFPAfile *file = item->data.V;
    55         pmFPA *fpa = file->fpa;
    56         fprintf (stderr, "file %s\n", file->name);
    57         if (!fpa) {
    58             fprintf (stderr, "  has no FPA\n");
    59             continue;
    60         }
    61         if (fpa->hdu) {
    62             if (fpa->hdu->images) fprintf (stderr, "  (%d,%d) images\n", -1, -1);
    63             if (fpa->hdu->weights) fprintf (stderr, "  (%d,%d) weights\n", -1, -1);
    64             if (fpa->hdu->masks) fprintf (stderr, "  (%d,%d) masks\n", -1, -1);
    65             if (fpa->hdu->header) fprintf (stderr, "  (%d,%d) header\n", -1, -1);
    66         } else {
    67             // fprintf (stderr, "  has no fpa data (%d,%d)\n", -1, -1);
    68         }
    69         for (int i = 0; i < fpa->chips->n; i++) {
    70             pmChip *chip = fpa->chips->data[i];
    71             if (chip->hdu) {
    72                 if (chip->hdu->images) fprintf (stderr, "  (%d,%d) images\n", i, -1);
    73                 if (chip->hdu->weights) fprintf (stderr, "  (%d,%d) weights\n", i, -1);
    74                 if (chip->hdu->masks) fprintf (stderr, "  (%d,%d) masks\n", i, -1);
    75                 if (chip->hdu->header) fprintf (stderr, "  (%d,%d) header\n", i, -1);
    76             } else {
    77                 // fprintf (stderr, "  has no chip data (%d,%d)\n", i, -1);
    78             }
    79             for (int j = 0; j < chip->cells->n; j++) {
    80                 pmCell *cell = chip->cells->data[j];
    81                 if (cell->hdu) {
    82                     if (cell->hdu->images) fprintf (stderr, "  (%d,%d) images\n", i, j);
    83                     if (cell->hdu->weights) fprintf (stderr, "  (%d,%d) weights\n", i, j);
    84                     if (cell->hdu->masks) fprintf (stderr, "  (%d,%d) masks\n", i, j);
    85                     if (cell->hdu->header) fprintf (stderr, "  (%d,%d) header\n", i, j);
    86                 } else {
    87                     // fprintf (stderr, "  has no cell data (%d,%d)\n", i, j);
    88                 }
    89                 for (int k = 0; k < cell->readouts->n; k++) {
    90                     pmReadout *readout = cell->readouts->data[k];
    91                     if (readout) {
    92                         if (readout->image) fprintf (stderr, "  (%d,%d,%d) image\n", i, j, k);
    93                         if (readout->weight) fprintf (stderr, "  (%d,%d,%d) weight\n", i, j, k);
    94                         if (readout->mask) fprintf (stderr, "  (%d,%d,%d) masks\n", i, j, k);
    95                     }
    96                 }
    97             }
    98         }
    99     }
    100     psFree (iter);
    101 }
Note: See TracChangeset for help on using the changeset viewer.