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/pswarpDataLoad.c

    r12505 r12523  
    99bool pswarpDataLoad (pmConfig *config) {
    1010
    11     bool status;
    1211    pmChip *chip;
    1312    pmCell *cell;
    1413    pmReadout *readout;
    1514    pmFPAview *view;
    16 
    17     // select the current recipe
    18     psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE);
    19     if (!recipe) {
    20         psError(PSWARP_ERR_CONFIG, false, "Can't find PSASTRO recipe needed for pixel scale!\n");
    21         return false;
    22     }
    23 
    24     // physical pixel scale in microns per pixel
    25     double pixelScale = psMetadataLookupF32 (&status, recipe, "PSASTRO.PIXEL.SCALE");
    26     if (!status) {
    27         psError(PS_ERR_IO, false, "Failed to lookup pixel scale");
    28         return false;
    29     }
    3015
    3116    // select the input data sources
     
    6146    view = pmFPAviewAlloc (0);
    6247
     48    // XXX need to read only the headers for the skycell
     49    // XXX these pmAstromReadBilevel functions seem to be broken
     50
    6351    // find the FPA phu
    64     // XXX wrap the test below into a function
    65     // XXX need to read only the headers for the skycell
    66     // XXX need to optionally load the astrometry datafile
    6752    bool bilevelAstrometry = false;
    6853    pmHDU *phu = pmFPAviewThisPHU (view, astrom->fpa);
    6954    if (phu) {
    70       char *ctype = psMetadataLookupStr (NULL, phu->header, "CTYPE1");
    71       if (ctype) {
    72         bilevelAstrometry = !strcmp (&ctype[4], "-DIS");
    73       }
     55        char *ctype = psMetadataLookupStr (NULL, phu->header, "CTYPE1");
     56        if (ctype) {
     57            bilevelAstrometry = !strcmp (&ctype[4], "-DIS");
     58        }
    7459    }
    7560    if (bilevelAstrometry) {
    76       pmAstromReadBilevelMosaic (input->fpa, phu->header, pixelScale);
     61        pmAstromReadBilevelMosaic (input->fpa, phu->header);
    7762    }
    7863
     
    8873        pmHDU *hdu = pmFPAviewThisHDU (view, astrom->fpa);
    8974        if (bilevelAstrometry) {
    90           pmAstromReadBilevelChip (chip, hdu->header);
     75            pmAstromReadBilevelChip (chip, hdu->header);
    9176        } else {
    92           pmAstromReadWCS (input->fpa, chip, hdu->header, pixelScale);
     77            // we use a default FPA pixel scale of 1.0
     78            pmAstromReadWCS (input->fpa, chip, hdu->header, 1.0);
    9379        }
    9480
Note: See TracChangeset for help on using the changeset viewer.