IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 24, 2006, 3:56:53 PM (20 years ago)
Author:
eugene
Message:

finished up the mosaic astrometry code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroAstromGuess.c

    r10784 r10830  
    1111    bool newFPA = true;
    1212    bool status = false;
    13     bool isMosaic = false;
    1413    double RAmin = NAN;
    1514    double RAmax = NAN;
     
    2524    DECmin = DECmax = -90;
    2625    RAmin = RAmax = RAminSky = RAmaxSky = 0;
    27 
    28     // is this a mosaic astrometry analysis?
    29     psMetadataLookupStr (&isMosaic, config->arguments, "MOSASTRO");
    3026
    3127    // select the current recipe
     
    4339    }
    4440
    45     double plateScale = psMetadataLookupF32 (&status, recipe, "PSASTRO.PLATE.SCALE");
    46     if (!status) plateScale = 1.0;
    47     plateScale = 1.0;
     41    // physical pixel scale in microns per pixel
     42    double pixelScale = psMetadataLookupF32 (&status, recipe, "PSASTRO.PIXEL.SCALE");
     43    if (!status) {
     44        psError(PS_ERR_IO, false, "Failed to lookup pixel scale");
     45        return false;
     46    }
    4847
    4948    pmFPAview *view = pmFPAviewAlloc (0);
     
    5756        pmHDU *hdu = pmFPAviewThisHDU (view, fpa);
    5857
    59         pmAstromReadWCS (fpa, chip, hdu->header, plateScale, isMosaic);
     58        pmAstromReadWCS (fpa, chip, hdu->header, pixelScale);
    6059        if (newFPA) {
    6160            newFPA = false;
     
    6968
    7069        // apply the new WCS guess data to all of the data in the readouts
    71         // XXX should this go into a different function? this would separate WCS interpretation from application
    7270        while ((cell = pmFPAviewNextCell (view, fpa, 1)) != NULL) {
    7371            psTrace ("psastro", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
     
    8583
    8684                    psPlaneTransformApply (raw->FP, chip->toFPA, raw->chip);
    87                     psPlaneDistortApply (raw->TP, fpa->toTPA, raw->FP, 0.0, 0.0);
     85                    psPlaneTransformApply (raw->TP, fpa->toTPA, raw->FP);
    8886                    psDeproject (raw->sky, raw->TP, fpa->toSky);
    8987
     
    10098                       
    10199                        psProject (tp, raw->sky, fpa->toSky);
    102                         psPlaneDistortApply (fp, fpa->fromTPA, tp, 0.0, 0.0);
     100                        psPlaneTransformApply (fp, fpa->fromTPA, tp);
    103101                        psPlaneTransformApply (ch, chip->fromFPA, fp);
    104102                       
Note: See TracChangeset for help on using the changeset viewer.