IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 8, 2011, 5:33:15 PM (15 years ago)
Author:
bills
Message:

fix some silly bugs in streaksreplace

File:
1 edited

Legend:

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

    r30315 r30527  
    7575                if (sfiles->inWeight) {
    7676                    double recWeightValue = psImageGet(sfiles->recWeight->image, x, y);
    77                     if (recWeightValue != NAN) {
     77                    if (!isnan(recWeightValue)) {
    7878                        psImageSet(sfiles->inWeight->image, x, y, recWeightValue);
    7979                    }
     
    8686
    8787    } while (streakFilesNextExtension(sfiles));
     88
     89    // check the weight and mask files for extra extensions that might be in files
     90    // (covariance matrix for example)
     91    copyExtraExtensions(sfiles);
    8892
    8993    // close all files
     
    235239            usage();
    236240        }
    237         psMetadataAddStr(config->arguments, PS_LIST_TAIL, "INPUT.MASK", 0,
     241        psMetadataAddStr(config->arguments, PS_LIST_TAIL, "RECOVERY.MASK", 0,
    238242                "name of input mask image", argv[argnum]);
    239243        psArgumentRemove(argnum, &argc, argv);
     
    251255            usage();
    252256        }
    253         psMetadataAddStr(config->arguments, PS_LIST_TAIL, "INPUT.WEIGHT", 0,
     257        psMetadataAddStr(config->arguments, PS_LIST_TAIL, "RECOVERY.WEIGHT", 0,
    254258                "name of input weight image", argv[argnum]);
    255259        psArgumentRemove(argnum, &argc, argv);
     
    321325        addDestreakKeyword(sf->outMask->header, false);
    322326
    323         // XXX: TODO
    324327        setupImageRefs(sf->outMask, NULL, sf->inMask, sf->extnum, false);
    325328
     
    333336        sf->outWeight->header = (psMetadata*) psMemIncrRefCounter(sf->inWeight->header);
    334337        addDestreakKeyword(sf->outWeight->header, false);
    335         setupImageRefs(sf->outMask, NULL, sf->inMask, sf->extnum, false);
     338        setupImageRefs(sf->outWeight, NULL, sf->inWeight, sf->extnum, false);
    336339
    337340        copyFitsOptions(sf->outWeight, NULL, sf->inWeight, sf->tiles);
Note: See TracChangeset for help on using the changeset viewer.