IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 8, 2013, 4:41:42 PM (13 years ago)
Author:
eugene
Message:

warping of background model appears to work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130419/pswarp/src/pswarpParseCamera.c

    r35527 r35535  
    3838    }
    3939
     40    // once we have read the input mask headers (if any), we can use that to set the mask bits
     41    if (!pswarpSetMaskBits(config)) {
     42        psError(psErrorCodeLast(), false, "failed to set mask bits");
     43        return false;
     44    }
     45
    4046    // *** parse the output information (output target, output astrometry [skycell])
    4147
     
    95101    // only create an output background if an input background is supplied
    96102    if (foundBackground && psMetadataLookupBool(&status, recipe, "BACKGROUND.MODEL")) {
    97       pmFPAfile *outBackground = pmFPAfileDefineSkycell(config, NULL, "PSWARP.OUTPUT.BKGMODEL");
    98       outBackground->xBin = psMetadataLookupS32(&status, recipe, "BKG.XGRID");
    99       outBackground->yBin = psMetadataLookupS32(&status, recipe, "BKG.YGRID");
    100      
    101       if (!outBackground) {
    102         psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.OUTPUT.BKGMODEL");
    103         return false;
    104       }
    105       outBackground->save = true;
     103        // pmFPAfile *outBackground = pmFPAfileDefineSkycell(config, NULL, "PSWARP.OUTPUT.BKGMODEL");
     104        pmFPAfile *outBackground = pmFPAfileDefineOutputForFormat(config, NULL, "PSWARP.OUTPUT.BKGMODEL", skycell->cameraName, skycell->formatName);
     105        outBackground->xBin = psMetadataLookupS32(&status, recipe, "BKG.XGRID");
     106        outBackground->yBin = psMetadataLookupS32(&status, recipe, "BKG.YGRID");
     107       
     108        if (!outBackground) {
     109            psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.OUTPUT.BKGMODEL");
     110            return false;
     111        }
     112        outBackground->save = true;
    106113    }
    107114
     
    152159    }
    153160 
     161    // only keep the necessary (output) camera configs and relevant recipes
     162    const char *skyCamera = psMetadataLookupStr(NULL, config->arguments, "SKYCELL.CAMERA");
     163    pmConfigCamerasCull(config, skyCamera);
     164    pmConfigRecipesCull(config, "PSWARP,PPSTATS,PSPHOT,PSASTRO,MASKS,JPEG");
     165
    154166    psTrace("pswarp", 1, "Done with pswarpParseCamera...\n");
    155167    return true;
Note: See TracChangeset for help on using the changeset viewer.