IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 11, 2009, 4:26:17 PM (17 years ago)
Author:
bills
Message:

remove incorrect call to psFitsSetCompressoin and some dead code

File:
1 edited

Legend:

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

    r24286 r24381  
    2323    }
    2424
    25     psMetadata *masks = psMetadataLookupMetadata(&status, config->recipes, "MASKS");
    26     if (!status) {
    27         psError(PM_ERR_CONFIG, false, "failed to lookup MASKS in recipes\n");
    28         return PS_EXIT_CONFIG_ERROR;
    29     }
    30     psU8 poorWarp = (double) psMetadataLookupU8(&status, masks, "POOR.WARP");
    31     if (!status) {
    32         psError(PM_ERR_CONFIG, false, "failed to lookup mask value for POOR.WARP in recipes\n");
    33         return PS_EXIT_CONFIG_ERROR;
    34     }
    35     // we're setting pixels with any mask bits execpt POOR.WARP to NAN
    36     psU8 maskMask = ~poorWarp;
     25    // Values to set for masked pixels
     26    psU32 maskStreak = 0;           // for the image and weight (usually NAN, MAXINT for integer images)
     27    psU32 maskMask = 0;             // value looked up for MASK.STREAK
    3728
    3829    // Does true work here?
     
    6455        }
    6556
     57        // now that we've read the input files, lookup the mask values that we read
     58        if (maskStreak == 0) {
     59            strkGetMaskValues(sfiles, &maskStreak, &maskMask);
     60        }
     61
    6662        setMaskedToNAN(sfiles, maskMask, true);
    6763
     
    7773    printf("time to close images: %f\n", psTimerClear("CLOSE_IMAGES"));
    7874
    79 #ifdef NOTYET
    80     if (!replicateOutputs(sfiles)) {
    81         psError(PS_ERR_UNKNOWN, false, "failed to replicate output files");
    82         psErrorStackPrint(stderr, "");
    83         exit(PS_EXIT_UNKNOWN_ERROR);
    84     }
    85 
    86     if (psMetadataLookupBool(&status, config->arguments, "REPLACE")) {
    87         //     swap the instances for the input and output
    88         //     Note this is a database operation. No file I/O is performed
    89         if (!swapOutputsToInputs(sfiles)) {
    90             psError(PS_ERR_UNKNOWN, false, "failed to swap files");
    91 
    92             // XXX: Now what? I guess swapOutputsToInputs will need to undo anything that
    93             // it has done and give a detailed report of what happened
    94 
    95             psErrorStackPrint(stderr, "");
    96             exit(PS_EXIT_UNKNOWN_ERROR);
    97         }
    98 
    99         if (psMetadataLookupBool(&status, config->arguments, "REMOVE")) {
    100             //      delete the temporary storage objects (which now points to the original image(s)
    101             if (!deleteTemps(sfiles)) {
    102                 psError(PS_ERR_UNKNOWN, false, "failed to delete temporary files");
    103                 // XXX: Now what? At this point the output files have been swapped, so we can't
    104                 // repeat the operation.
    105 
    106                 // Returning error status here is problematic. The inputs have been streak removed
    107                 // but they're still lying around
    108                 // Maybe just print an error message and
    109                 // let other system tools clean up
    110                 psErrorStackPrint(stderr, "");
    111                 exit(PS_EXIT_UNKNOWN_ERROR);
    112             }
    113         }
    114     }
    115 #endif  // REPLACE, REMOVE
    11675    printf("time to run streaksrelease: %f\n", psTimerClear("STREAKSREMOVE"));
    11776
     
    297256            if (sf->outChMask) {
    298257                copyFitsOptions(sf->outChMask, sf->recChMask, sf->inMask, sf->tiles);
    299                 psFitsSetCompression(sf->outChMask->fits, PS_FITS_COMPRESS_PLIO, sf->tiles, 8, 0, 0);
    300                 if (sf->recChMask) {
    301                     psFitsSetCompression(sf->recChMask->fits, PS_FITS_COMPRESS_PLIO, sf->tiles, 8, 0, 0);
    302                 }
    303258            }
    304259        }
Note: See TracChangeset for help on using the changeset viewer.