IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25356


Ignore:
Timestamp:
Sep 13, 2009, 4:53:31 PM (17 years ago)
Author:
eugene
Message:

adjust to use pixel coords instead of pixel index; other cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715/psphot/src/psphotVisual.c

    r25274 r25356  
    235235    // note: this uses the Ohana allocation tools:
    236236    // ALLOCATE (overlay, KiiOverlay, 3*peaks->n + 1);
    237     ALLOCATE (overlay, KiiOverlay, peaks->n);
     237    ALLOCATE (overlay, KiiOverlay, peaks->n + 2);
    238238
    239239    Noverlay = 0;
     
    273273    }
    274274
    275 # if (0)
     275# if (1)
    276276    overlay[Noverlay].type = KII_OVERLAY_BOX;
    277277    overlay[Noverlay].x = 10.0;
    278278    overlay[Noverlay].y = 10.0;
    279     overlay[Noverlay].dx = 0.5;
    280     overlay[Noverlay].dy = 0.5;
     279    overlay[Noverlay].dx = 1.0;
     280    overlay[Noverlay].dy = 1.0;
    281281    overlay[Noverlay].angle = 0.0;
    282282    overlay[Noverlay].text = NULL;
     
    327327
    328328        // draw the top
     329        // XXX need to allow top (and bottom) to have more than one span
    329330        span = footprint->spans->data[0];
    330331        overlay[Noverlay].type = KII_OVERLAY_LINE;
     
    426427    }
    427428
     429    // XXX mark the different source classes with different color/shape dots
     430    // XXX are moments S/N and peak S/N consistent?
     431
    428432    // note: this uses the Ohana allocation tools:
    429433    ALLOCATE (overlay, KiiOverlay, sources->n);
     
    451455        overlay[Noverlay].dy = 2.0*axes.minor;
    452456
    453         overlay[Noverlay].angle = -axes.theta * PS_DEG_RAD;  // XXXXXXXX the axes angle is negative to display of object on kapa
    454         // XXX fixed??
     457        overlay[Noverlay].angle = axes.theta * PS_DEG_RAD;
    455458
    456459        overlay[Noverlay].text = NULL;
     
    496499
    497500    // select the max psfX,Y values for the plot limits
    498     float Xmin = 0.0, Xmax = 0.0;
    499     float Ymin = 0.0, Ymax = 0.0;
     501    float Xmin = 1000.0, Xmax = 0.0;
     502    float Ymin = 1000.0, Ymax = 0.0;
    500503    {
    501504        int nRegions = psMetadataLookupS32 (&status, recipe, "PSF.CLUMP.NREGIONS");
     
    516519            float Y1 = psfY + 4.0*psfdY;
    517520
    518             if (isfinite(X0)) { Xmin = PS_MAX(Xmin, X0); }
     521            if (isfinite(X0)) { Xmin = PS_MIN(Xmin, X0); }
    519522            if (isfinite(X1)) { Xmax = PS_MAX(Xmax, X1); }
    520             if (isfinite(Y0)) { Ymin = PS_MAX(Ymin, Y0); }
     523            if (isfinite(Y0)) { Ymin = PS_MIN(Ymin, Y0); }
    521524            if (isfinite(Y1)) { Ymax = PS_MAX(Ymax, Y1); }
    522525        }
     
    807810        overlay[Noverlay].dx = 2.0*axes.major;
    808811        overlay[Noverlay].dy = 2.0*axes.minor;
    809         overlay[Noverlay].angle = -axes.theta * PS_DEG_RAD;
     812        overlay[Noverlay].angle = axes.theta * PS_DEG_RAD;
    810813        overlay[Noverlay].text = NULL;
    811814        Noverlay ++;
     
    12451248        for (int ix = 0; ix < source->pixels->numCols; ix++) {
    12461249            if (source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA[iy][ix]) {
    1247                 // rb->data.F32[nb] = hypot (ix + 0.5 - Xo, iy + 0.5 - Yo) ;
    1248                 rb->data.F32[nb] = hypot (ix - Xo, iy - Yo) ;
     1250                rb->data.F32[nb] = hypot (ix + 0.5 - Xo, iy + 0.5 - Yo) ;
     1251                // rb->data.F32[nb] = hypot (ix - Xo, iy - Yo) ;
    12491252                Rb->data.F32[nb] = log10(rb->data.F32[nb]);
    12501253                fb->data.F32[nb] = log10(source->pixels->data.F32[iy][ix]);
    12511254                nb++;
    12521255            } else {
    1253                 // rg->data.F32[ng] = hypot (ix + 0.5 - Xo, iy + 0.5 - Yo) ;
    1254                 rg->data.F32[ng] = hypot (ix - Xo, iy - Yo) ;
     1256                rg->data.F32[ng] = hypot (ix + 0.5 - Xo, iy + 0.5 - Yo) ;
     1257                // rg->data.F32[ng] = hypot (ix - Xo, iy - Yo) ;
    12551258                Rg->data.F32[ng] = log10(rg->data.F32[ng]);
    12561259                fg->data.F32[ng] = log10(source->pixels->data.F32[iy][ix]);
Note: See TracChangeset for help on using the changeset viewer.