IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 18, 2010, 5:06:01 PM (16 years ago)
Author:
watersc1
Message:

Almost working version of the mask-stats/software revision code.

Almost.

Location:
branches/czw_branch/20100427
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20100427

  • branches/czw_branch/20100427/pstamp/src/ppstampMakeStamp.c

    r27461 r28017  
    3636    double d_before = check->sky->d;
    3737    psLogMsg("ppstampMakeStamp", 2, "Before fit  Center Pixel RA: %f   DEC: %f (degrees)\n",
    38              r_before * PS_DEG_RAD, d_before * PS_DEG_RAD);
     38             r_before * PS_DEG_RAD, d_before * PS_DEG_RAD);
    3939
    4040    if (outFPA->toSky->type != PS_PROJ_TAN) {
    41         // we need to make astrometry terms for the output which are centered on the output chip center,
    42         // but we keep the original plate scale
    43         psFree(outFPA->toSky);
    44         outFPA->toSky = psProjectionAlloc (r_before, d_before, inFPA->toSky->Xs, inFPA->toSky->Ys, PS_PROJ_TAN);
    45 
    46         if (!pmAstromLinearizeToSky(inFPA, inChip, outFPA, outChip, roi)) {
     41        // we need to make astrometry terms for the output which are centered on the output chip center,
     42        // but we keep the original plate scale
     43        psFree(outFPA->toSky);
     44        outFPA->toSky = psProjectionAlloc (r_before, d_before, inFPA->toSky->Xs, inFPA->toSky->Ys, PS_PROJ_TAN);
     45
     46        if (!pmAstromLinearizeToSky(inFPA, inChip, outFPA, outChip, roi)) {
    4747            psFree(check);
    4848            psError(PS_ERR_UNKNOWN, false, "Failed to linearize astrometry\n");
     
    5656
    5757        psLogMsg("ppstampMakeStamp", 2, "After fit:  Center Pixel RA: %f   DEC: %f (degrees)\n",
    58                 r_after * PS_DEG_RAD, d_after * PS_DEG_RAD);
    59         psLogMsg("ppstampMakeStamp", 2, "Error in fit to astrometry %.2f    %.2f (arcseconds)\n", 
    60                 (r_after - r_before) *  PS_DEG_RAD * 3600, (d_after - d_before) * PS_DEG_RAD * 3600);
     58                r_after * PS_DEG_RAD, d_after * PS_DEG_RAD);
     59        psLogMsg("ppstampMakeStamp", 2, "Error in fit to astrometry %.2f    %.2f (arcseconds)\n",
     60                (r_after - r_before) *  PS_DEG_RAD * 3600, (d_after - d_before) * PS_DEG_RAD * 3600);
    6161
    6262        // XXX: should we fail if the fit is bad ??
     
    238238        return PS_EXIT_DATA_ERROR;
    239239    }
    240     char *fpaName = psMetadataLookupStr(NULL, input->fpa->concepts, "FPA.OBS"); // Name of FPA
    241240    pmFPAview *outview = pmFPAviewAlloc(0);
    242     pmFPAAddSourceFromView(output->fpa, fpaName, outview, output->format);
     241    pmFPAAddSourceFromView(output->fpa, outview, output->format);
    243242
    244243    outview->chip = 0;
  • branches/czw_branch/20100427/pstamp/src/ppstampMosaic.c

    r18712 r28017  
    2424    pmChip  *inChip = pmFPAviewThisChip(view, input->fpa);
    2525    if (!mChip->hdu && !mChip->parent->hdu) {
    26         const char *name = psMetadataLookupStr(&status, input->fpa->concepts, "FPA.OBS"); // Name of FPA
    27         pmFPAAddSourceFromView(mosaic->fpa, name, mosaicView, mosaic->format);
     26        pmFPAAddSourceFromView(mosaic->fpa, mosaicView, mosaic->format);
    2827    }
    2928    psFree(mosaicView);
Note: See TracChangeset for help on using the changeset viewer.