IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25274


Ignore:
Timestamp:
Sep 4, 2009, 11:09:23 AM (17 years ago)
Author:
eugene
Message:

some minor plot cleanups

File:
1 edited

Legend:

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

    r24636 r25274  
    1414# if (HAVE_KAPA)
    1515# include <kapa.h>
     16
     17bool pmVisualLimitsFromVectors (Graphdata *graphdata, psVector *xVec, psVector *yVec);
    1618
    1719// functions used to visualize the analysis as it goes
     
    448450        overlay[Noverlay].dx = 2.0*axes.major;
    449451        overlay[Noverlay].dy = 2.0*axes.minor;
     452
    450453        overlay[Noverlay].angle = -axes.theta * PS_DEG_RAD;  // XXXXXXXX the axes angle is negative to display of object on kapa
     454        // XXX fixed??
     455
    451456        overlay[Noverlay].text = NULL;
    452457        Noverlay ++;
     
    16241629        if (source->type != PM_SOURCE_TYPE_STAR) continue;
    16251630        if (!isfinite (source->crNsigma)) continue;
     1631        if (!isfinite (source->peak->flux)) continue;
     1632        if (source->peak->flux < 0) continue;
    16261633
    16271634        x->data.F32[n] = -2.5*log10(source->peak->flux);
     
    16791686        if (source->type != PM_SOURCE_TYPE_STAR) continue;
    16801687        if (!isfinite (source->extNsigma)) continue;
     1688        if (!isfinite (source->peak->flux)) continue;
     1689        if (source->peak->flux < 0) continue;
    16811690
    16821691        x->data.F32[n] = -2.5*log10(source->peak->flux);
     
    18281837        psWarning("Unable to read option");
    18291838    }
     1839    return true;
     1840}
     1841
     1842bool psphotVisualShowPetrosian (pmSource *source, pmPetrosian *petrosian) {
     1843
     1844    KiiOverlay overlay[2];
     1845
     1846    if (source == NULL) return true;
     1847
     1848    if (!pmVisualIsVisual()) return true;
     1849
     1850    if (kapa == -1) {
     1851        fprintf (stderr, "kapa not opened, skipping\n");
     1852        return false;
     1853    }
     1854
     1855    overlay[0].type = KII_OVERLAY_CIRCLE;
     1856    overlay[0].x = source->peak->xf;
     1857    overlay[0].y = source->peak->yf;
     1858    overlay[0].dx = 2.0*petrosian->petrosianRadius;
     1859    overlay[0].dy = 2.0*petrosian->petrosianRadius*petrosian->axes.minor/petrosian->axes.major;
     1860    overlay[0].angle = petrosian->axes.theta * PS_DEG_RAD;
     1861    overlay[0].text = NULL;
     1862
     1863    overlay[1].type = KII_OVERLAY_CIRCLE;
     1864    overlay[1].x = source->peak->xf;
     1865    overlay[1].y = source->peak->yf;
     1866    overlay[1].dx = 4.0*petrosian->petrosianRadius;
     1867    overlay[1].dy = 4.0*petrosian->petrosianRadius*petrosian->axes.minor/petrosian->axes.major;
     1868    overlay[1].angle = petrosian->axes.theta * PS_DEG_RAD;
     1869    overlay[1].text = NULL;
     1870
     1871    KiiLoadOverlay (kapa, overlay, 2, "red");
     1872
    18301873    return true;
    18311874}
Note: See TracChangeset for help on using the changeset viewer.