IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 21, 2007, 12:09:22 PM (19 years ago)
Author:
eugene
Message:

fpa field is now determined by the header and/or the chip regions; pixel scale is not needed for readBilevelMosaic, etc; fixed trimsec errors on input/output; fixed errors on map boundaries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpDefine.c

    r12505 r12523  
    44bool pswarpDefine (pmConfig *config) {
    55
    6     bool status;
    7     psMetadata *recipe = NULL;
    8 
    9     // load the pixel scale from the PSASTRO recipe
    10     recipe  = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE);
    11     if (!recipe) {
    12         psError(PSWARP_ERR_CONFIG, false, "Can't find PSASTRO recipe needed for pixel scale!\n");
    13         return false;
    14     }
    15     // physical pixel scale in microns per pixel
    16     double pixelScale = psMetadataLookupF32 (&status, recipe, "PSASTRO.PIXEL.SCALE");
    17     if (!status) {
    18         psError(PS_ERR_IO, false, "Failed to lookup pixel scale");
    19         return false;
    20     }
    21 
    226    // load the PSWARP recipe
    23     recipe = psMetadataLookupPtr (NULL, config->recipes, PSWARP_RECIPE);
     7    psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSWARP_RECIPE);
    248    if (!recipe) {
    259        psError(PSWARP_ERR_CONFIG, true, "Can't find PSWARP recipe!\n");
     
    4630    bool bilevelAstrometry = false;
    4731    if (phu) {
    48       char *ctype = psMetadataLookupStr (NULL, phu->header, "CTYPE1");
    49       if (ctype) {
    50         bilevelAstrometry = !strcmp (&ctype[4], "-DIS");
    51       }
     32        char *ctype = psMetadataLookupStr (NULL, phu->header, "CTYPE1");
     33        if (ctype) {
     34            bilevelAstrometry = !strcmp (&ctype[4], "-DIS");
     35        }
    5236    }
    5337    if (bilevelAstrometry) {
    54       pmAstromReadBilevelMosaic (skycell->fpa, phu->header, pixelScale);
    55       pmAstromReadBilevelChip (chip, hdu->header);
     38        pmAstromReadBilevelMosaic (skycell->fpa, phu->header);
     39        pmAstromReadBilevelChip (chip, hdu->header);
    5640    } else {
    57       pmAstromReadWCS (skycell->fpa, chip, hdu->header, pixelScale);
     41        // we use a default FPA pixel scale of 1.0
     42        pmAstromReadWCS (skycell->fpa, chip, hdu->header, 1.0);
    5843    }
    5944
Note: See TracChangeset for help on using the changeset viewer.