IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26429


Ignore:
Timestamp:
Dec 15, 2009, 6:39:24 PM (16 years ago)
Author:
eugene
Message:

clean up visualization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/psModules/src/imcombine/pmSubtractionVisual.c

    r26373 r26429  
    242242
    243243        overlay[Noverlay].type = KII_OVERLAY_BOX;
     244        if ((stamp->x < 1.0) && (stamp->y < 1.0)) {
     245            fprintf (stderr, "stamp zero: %f %f\n", stamp->x, stamp->y);
     246            continue;
     247        }
     248        if (!isfinite(stamp->x) && !isfinite(stamp->y)) {
     249            fprintf (stderr, "stamp nan: %f %f\n", stamp->x, stamp->y);
     250            continue;
     251        }
    244252        overlay[Noverlay].x = stamp->x;
    245253        overlay[Noverlay].y = stamp->y;
     
    269277bool pmSubtractionVisualShowFitInit(pmSubtractionStampList *stamps) {
    270278
    271     // if (!pmVisualIsVisual()) return true;
     279    if (!pmVisualIsVisual()) return true;
    272280
    273281    // generate 4 storage images large enough to hold the N stamps:
     
    306314bool pmSubtractionVisualShowFitAddStamp(psKernel *target, psKernel *source, psKernel *convolution, double background, double norm, int index) {
    307315
    308     // if (!pmVisualIsVisual()) return true;
     316    if (!pmVisualIsVisual()) return true;
    309317
    310318    double sum;
     
    377385bool pmSubtractionVisualShowFit() {
    378386
    379     // if (!pmVisualIsVisual()) return true;
     387    if (!pmVisualIsVisual()) return true;
    380388    if (!pmVisualInitWindow(&kapa1, "ppSub:Images")) return false;
    381389    if (!pmVisualInitWindow(&kapa2, "ppSub:Misc")) return false;
     
    387395    pmVisualScaleImage(kapa1, sourceImage, "Source Stamps", 1, true);
    388396    pmVisualScaleImage(kapa1, convolutionImage, "Convolution Stamps", 2, true);
     397    KiiCenter (kapa1, 0.5*targetImage->numCols, 0.5*targetImage->numRows, 1);
    389398
    390399    pmVisualScaleImage(kapa2, fresidualImage, "Frac Residual Stamps", 2, true);
     400    pmVisualScaleImage(kapa2, differenceImage, "Difference Stamps", 0, true);
    391401    pmVisualScaleImage(kapa2, residualImage, "Residual Stamps", 1, true);
    392     pmVisualScaleImage(kapa2, differenceImage, "Difference Stamps", 0, true);
     402    KiiCenter (kapa2, 0.5*residualImage->numCols, 0.5*residualImage->numRows, 1);
     403
    393404    pmVisualAskUser(NULL);
    394405
     
    414425    Graphdata graphdata;
    415426
    416     // if (!pmVisualIsVisual()) return true;
     427    if (!pmVisualIsVisual()) return true;
    417428    if (!pmVisualInitWindow(&kapa3, "ppSub:plots")) return false;
    418429
Note: See TracChangeset for help on using the changeset viewer.