IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 21, 2007, 9:30:37 PM (19 years ago)
Author:
eugene
Message:

update to new psAstromWCS APIs; drop old files, old functions from psastroUtils.c

File:
1 edited

Legend:

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

    r12492 r12536  
    44// XXX require this fpa to have multiple chip extensions and a PHU?
    55bool psastroMosaicAstrom (pmConfig *config, psArray *refs) {
    6 
    7     bool status;
    86
    97    // select the current recipe
     
    1311        return false;
    1412    }
    15 
    16     // physical pixel scale in microns per pixel
    17     double pixelScale = psMetadataLookupF32 (&status, recipe, "PSASTRO.PIXEL.SCALE");
    18     if (!status) {
    19         psError(PS_ERR_IO, false, "Failed to lookup pixel scale");
    20         return false;
    21     }
    2213
    2314    // select the input data sources
     
    10192    if (psTraceGetLevel("psastro.dump") > 0) { psastroDumpMatches (fpa, "match.6.dat"); }
    10293
    103     // save WCS and analysis metadata in update header XXX this is still wrong: the pmFPAExtent
    104     // function returns the FP dimensions in pixel units relative to the 0,0 corner of chip
    105     // 0,0.  I need to have a function which loops over all cells, determines the pixel
    106     // dimensions for each cell, converts them to chip pixels, then uses the fpa astrometry
    107     // structures to get the total dimensions of the fpa in fpa units.  equivalent to
    108     // pmFPAExtent
    109     psRegion *region = pmFPAExtent (fpa);
    110     region->x0 *= pixelScale;
    111     region->x1 *= pixelScale;
    112     region->y0 *= pixelScale;
    113     region->y1 *= pixelScale;
    114 
    115     // XXX also need to add DATE/TIME info and NAXIS1, NAXIS2
     94    // save WCS and analysis metadata in update header.
    11695    psMetadata *updates = psMetadataAlloc();
    117     psMetadataAddS32 (updates, PS_LIST_TAIL, "NAXIS1",   PS_META_REPLACE, "fpa dimensions (mm)", region->x1 - region->x0);
    118     psMetadataAddS32 (updates, PS_LIST_TAIL, "NAXIS2",   PS_META_REPLACE, "fpa dimensions (mm)", region->y1 - region->y0);
    119     psFree (region);
    120    
    12196    if (!pmAstromWriteBilevelMosaic (updates, fpa, NONLIN_TOL)) {
    12297        psAbort ("failed to save header terms");
Note: See TracChangeset for help on using the changeset viewer.