IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 18, 2005, 4:19:41 PM (21 years ago)
Author:
Paul Price
Message:

Current state before I go on holiday. Not sure if it works or not. Not current for pslib8.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/scripts/src/phase2/pmFPAWrite.c

    r5105 r5371  
    77
    88static bool writeHDU(psFits *fits,      // FITS file to which to write
    9                      p_pmHDU *hdu       // HDU to write
     9                     pmPixelData *pixelData // Pixel data to write
    1010    )
    1111{
    1212    bool status = true;                 // Status of write, to return
    13     for (int i = 0; i < hdu->pixels->n; i++) {
    14         status &= psFitsWriteImage(fits, hdu->header, hdu->pixels->data[i], i);
     13    for (int i = 0; i < pixelData->images->n; i++) {
     14        status &= psFitsWriteImage(fits, pixelData->header, pixelData->images->data[i], i);
     15        // XXX: Insert here the writing on mask and weight images
    1516    }
    1617
     
    4647                    pmCellOutgestConcepts(cell, db);
    4748
    48                     if (cell->private && strlen(cell->private->extname) > 0) {
    49                         status &= writeHDU(fits, cell->private);
     49                    if (cell->data && strlen(cell->data->extname) > 0) {
     50                        status &= writeHDU(fits, cell->data);
    5051                    }
    5152                }
    5253            }
    5354           
    54             if (chip->private && strlen(chip->private->extname) > 0) {
    55                 status &= writeHDU(fits, chip->private);
     55            if (chip->data && strlen(chip->data->extname) > 0) {
     56                status &= writeHDU(fits, chip->data);
    5657            }
    5758        }
     
    5960    }
    6061
    61     if (fpa->private && strlen(fpa->private->extname) > 0) {
    62         status &= writeHDU(fits, fpa->private);
     62    if (fpa->data && strlen(fpa->data->extname) > 0) {
     63        status &= writeHDU(fits, fpa->data);
    6364    }
    6465
Note: See TracChangeset for help on using the changeset viewer.