IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 19, 2007, 3:58:02 PM (19 years ago)
Author:
eugene
Message:

updates to fix mosaic astrometry

File:
1 edited

Legend:

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

    r11281 r12505  
    44bool pswarpDefine (pmConfig *config) {
    55
    6     // select the current recipe
    7     psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, PSWARP_RECIPE);
     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
     22    // load the PSWARP recipe
     23    recipe  = psMetadataLookupPtr (NULL, config->recipes, PSWARP_RECIPE);
    824    if (!recipe) {
    925        psError(PSWARP_ERR_CONFIG, true, "Can't find PSWARP recipe!\n");
     
    3652    }
    3753    if (bilevelAstrometry) {
    38       pmAstromReadBilevelMosaic (skycell->fpa, phu->header);
     54      pmAstromReadBilevelMosaic (skycell->fpa, phu->header, pixelScale);
    3955      pmAstromReadBilevelChip (chip, hdu->header);
    4056    } else {
    41       // XXX get pixelScale from recipes.  does it matter?
    42       float pixelScale = 13.5;
    4357      pmAstromReadWCS (skycell->fpa, chip, hdu->header, pixelScale);
    4458    }
Note: See TracChangeset for help on using the changeset viewer.