IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 14, 2009, 3:58:07 PM (17 years ago)
Author:
Paul Price
Message:

Fix streaksremove so that output CMF files have PHU called ext.hdr and table called ext.psf. Turned on -Wall -Werror and fixed a host of little problems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/magic/remove/src/streaksio.c

    r24853 r25082  
    1212// Assumptions about the file structure of non-raw files
    1313// The 'image' for each file (image, mask weight) is contained in the first
    14 // extension. 
     14// extension.
    1515
    1616
     
    625625        streaksExit("", PS_EXIT_DATA_ERROR);
    626626    }
    627  
     627
    628628    bool status;
    629629    in->extname = psMetadataLookupStr(&status, in->header, "EXTNAME");
     
    654654            streaksExit("", PS_EXIT_DATA_ERROR);
    655655        }
    656         psImage *image = (psImage *) (in->imagecube->data[0]);
    657656    }
    658657    setDataExtent(stage, in, (stage == IPP_STAGE_RAW) && !isMask);
     
    925924replicateOutputs(streakFiles *sfiles)
    926925{
    927     bool status = false;
    928 
    929926    if (!replicate(sfiles->outImage, sfiles->inImage)) {
    930927        psError(PM_ERR_SYS, false, "failed to replicate outImage.");
     
    973970
    974971        if (!nebSwap(server, in->name, out->name)) {
    975             psError(PM_ERR_SYS, true, "failed to swap files for: %s.",
     972            psError(PM_ERR_SYS, true, "failed to swap files for %s: %s.",
    976973                in->name, nebErr(server));
    977974            return false;
     
    10971094setMaskedToNAN(streakFiles *sfiles, psU32 maskMask, bool printCounts)
    10981095{
    1099         int maskedPixels = 0;
    1100         int nandPixels = 0;
    1101         int nandWeights = 0;
     1096        long maskedPixels = 0;
     1097        long nandPixels = 0;
     1098        long nandWeights = 0;
    11021099
    11031100        psImage *image = sfiles->outImage->image;
     
    11201117                psU32 maskVal;
    11211118                if (sfiles->stage == IPP_STAGE_RAW) {
    1122                     int xChip, yChip;
     1119                    unsigned int xChip, yChip;
    11231120                    cellToChipInt(&xChip, &yChip, sfiles->astrom, x, y);
    11241121                    maskVal = psImageGet(mask, xChip, yChip);
     
    11441141        if (printCounts) {
    11451142            psLogMsg(sfiles->program_name, PS_LOG_INFO, "time to NAN mask pixels: %f\n", psTimerClear("NAN_MASKED"));
    1146             int totalPixels = image->numRows * image->numCols;
     1143            long totalPixels = image->numRows * image->numCols;
    11471144            psLogMsg(sfiles->program_name, PS_LOG_INFO, "pixels:        %10ld\n", totalPixels);
    11481145            psLogMsg(sfiles->program_name, PS_LOG_INFO, "masked pixels: %10ld %4.2f%%\n", maskedPixels, 100. * maskedPixels / totalPixels);
Note: See TracChangeset for help on using the changeset viewer.