IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 22, 2006, 2:23:08 PM (20 years ago)
Author:
Paul Price
Message:

Adding pmHDUGenerate to make an HDU (image) from the cells contained below. Altered pmFPACopy to use pmHDUGenerate functions. The motivation for pmHDUGenerate is that when we go through an FPA bit by bit, creating an output FPA, we don't know the size of the resultant output images until we're done with the whole lot. So we simply create the cells, and call pmHDUGenerateFromFPA (etc) to generate the HDU image which is then written out. It takes care of the TRIMSEC, BIASSEC, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmHDUUtils.c

    r7017 r7168  
    5959}
    6060
     61void pmHDUPrint(pmHDU *hdu,             // HDU to print
     62                int level,              // Level at which to print
     63                bool header             // Print header?
     64               )
     65{
     66    if (hdu->phu) {
     67        psTrace(__func__, level, "HDU: %s (PHU)\n", hdu->extname);
     68    } else {
     69        psTrace(__func__, level, "HDU: %s\n", hdu->extname);
     70    }
     71
     72    psTrace(__func__, level + 1, "Format: %x\n", hdu->format);
     73    if (header) {
     74        if (hdu->header) {
     75            psTrace(__func__, level + 1, "Header:\n");
     76            psMetadataPrint(hdu->header, level + 2);
     77        } else {
     78            psTrace(__func__, level + 1, "No header.\n");
     79        }
     80    }
     81
     82    if (hdu->images) {
     83        psTrace(__func__, level + 1, "Images:\n");
     84        for (long i = 0; i < hdu->images->n; i++) {
     85            psImage *image = hdu->images->data[i]; // Image of interest
     86            psTrace(__func__, level + 2, "%ld: %dx%d\n", i, image->numCols, image->numRows);
     87        }
     88    } else {
     89        psTrace(__func__, level + 1, "NO images.\n");
     90    }
     91
     92    if (hdu->masks) {
     93        psTrace(__func__, level + 1, "Masks:\n");
     94        for (long i = 0; i < hdu->masks->n; i++) {
     95            psImage *mask = hdu->masks->data[i]; // Mask of interest
     96            psTrace(__func__, level + 2, "%ld: %dx%d\n", i, mask->numCols, mask->numRows);
     97        }
     98    } else {
     99        psTrace(__func__, level + 1, "NO masks.\n");
     100    }
     101
     102
     103    if (hdu->weights) {
     104        psTrace(__func__, level + 1, "Weights:\n");
     105        for (long i = 0; i < hdu->masks->n; i++) {
     106            psImage *weight = hdu->weights->data[i]; // Weight image of interest
     107            psTrace(__func__, level + 2, "%ld: %dx%d\n", i, weight->numCols, weight->numRows);
     108        }
     109    } else {
     110        psTrace(__func__, level + 1, "NO weights.\n");
     111    }
     112
     113
     114    return;
     115}
Note: See TracChangeset for help on using the changeset viewer.