IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 7, 2007, 6:48:50 AM (19 years ago)
Author:
eugene
Message:

functioning pswarp, needs opt code

File:
1 edited

Legend:

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

    r10952 r10954  
    3232
    3333    // de-activate PSWARP.SKYCELL and PSWARP.OUTPUT
    34     //
     34    pmFPAfileActivate (config->files, false, "PSWARP.SKYCELL");
    3535    pmFPAfileActivate (config->files, false, "PSWARP.OUTPUT");
    36     pmFPAfileActivate (config->files, false, "PSWARP.SKYCELL");
    3736
    3837    pmFPAview *view = pmFPAviewAlloc (0);
     38
     39    // find the FPA phu
     40    // XXX wrap the test below into a function
     41    // XXX need to read only the headers for the skycell
     42    // XXX need to optionally load the astrometry datafile
     43    bool bilevelAstrometry = false;
     44    pmHDU *phu = pmFPAviewThisPHU (view, input->fpa);
     45    if (phu) {
     46      char *ctype = psMetadataLookupStr (NULL, phu->header, "CTYPE1");
     47      if (ctype) {
     48        bilevelAstrometry = !strcmp (&ctype[4], "-DIS");
     49      }
     50    }
     51    if (bilevelAstrometry) {
     52      pmAstromReadBilevelMosaic (input->fpa, phu->header);
     53    }
    3954
    4055    // files associated with the science image
     
    4560        if (!chip->process || !chip->file_exists) { continue; }
    4661        pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
     62
     63        // read WCS data from the corresponding header
     64        pmHDU *hdu = pmFPAviewThisHDU (view, input->fpa);
     65        if (bilevelAstrometry) {
     66          pmAstromReadBilevelChip (chip, hdu->header);
     67        } else {
     68          // XXX get pixelScale from recipes.  does it matter?
     69          float pixelScale = 13.5;
     70          pmAstromReadWCS (input->fpa, chip, hdu->header, pixelScale);
     71        }
    4772
    4873        while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) {
     
    5681                if (! readout->data_exists) { continue; }
    5782
    58                 pswarpConvertReadout (output, readout, config);
     83                pswarpTransformReadout (output, readout, config);
    5984
    6085                pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
Note: See TracChangeset for help on using the changeset viewer.