IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 23, 2018, 11:21:41 AM (8 years ago)
Author:
eugene
Message:

changing from numerical values to named enums for graphdata elements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/astrom/pmAstrometryVisual.c

    r40083 r40454  
    7272
    7373    graphdata.color = KapaColorByName ("black");
    74     graphdata.ptype = 7;
     74    graphdata.ptype = KAPA_POINT_BOX_SOLID;
    7575    graphdata.size = 0.5;
    76     graphdata.style = 2;
     76    graphdata.style = KAPA_PLOT_POINTS;
    7777
    7878    section.dx = 0.5;
     
    232232
    233233    graphdata.color = KapaColorByName ("black");
    234     graphdata.ptype = 7;
     234    graphdata.ptype = KAPA_POINT_BOX_SOLID;
    235235    graphdata.size = 0.5;
    236     graphdata.style = 2;
     236    graphdata.style = KAPA_PLOT_POINTS;
    237237
    238238    // initialize and populate plot vectors
     
    325325                       "Reference Star Luminosity Function, Shifted Raw Fit, and Cutoff",
    326326                       KAPA_LABEL_XP);
    327     graphdata.color=KapaColorByName("black");
    328     graphdata.style = 1;
     327    graphdata.color = KapaColorByName("black");
     328    graphdata.style = KAPA_PLOT_HISTOGRAM;
    329329    KapaPrepPlot (kapa1, lnMag->n, &graphdata);
    330330    KapaPlotVector(kapa1, lnMag->n,   Mag->data.F32, "x");
     
    332332
    333333    // Overplot fit
    334     graphdata.style=0;
     334    graphdata.style = KAPA_PLOT_CONNECT;
    335335    KapaPrepPlot(kapa1,2,&graphdata);
    336336    KapaPlotVector(kapa1, 2, x, "x");
     
    391391    psFree(section.name);
    392392
    393     graphdata.ptype = 7;
     393    graphdata.ptype = KAPA_POINT_BOX_SOLID;
    394394    graphdata.size = 0.5;
    395     graphdata.style = 2;
     395    graphdata.style = KAPA_PLOT_POINTS;
    396396    graphdata.color = KapaColorByName ("black");
    397397    KapaClearPlots(kapa1);
     
    441441
    442442    graphdata.color = KapaColorByName ("red");
    443     graphdata.style = 0;
     443    graphdata.style = KAPA_PLOT_CONNECT;
    444444
    445445    // overplot clumpy regions excluded from analysis
     
    507507    KapaInitGraph (&graphdata);
    508508    KapaClearPlots (kapa1);
    509     graphdata.ptype = 2;
    510     graphdata.style = 2;
     509    graphdata.ptype = KAPA_POINT_CROSS;
     510    graphdata.style = KAPA_PLOT_POINTS;
    511511
    512512    psVector *xNew = psVectorAllocEmpty (xOld->n, PS_TYPE_F32);
     
    556556    KapaPlotVector (kapa1, xOld->n, yOld->data.F32, "y");
    557557
    558     graphdata.ptype = 1;
     558    graphdata.ptype = KAPA_POINT_BOX_OPEN;
    559559    graphdata.color = KapaColorByName("red");
    560560    KapaPrepPlot (kapa1, xNew->n, &graphdata);
     
    590590
    591591    graphdata.color = KapaColorByName ("black");
    592     graphdata.ptype = 2;
     592    graphdata.ptype = KAPA_POINT_CROSS;
    593593    graphdata.size = 0.5;
    594     graphdata.style = 2;
     594    graphdata.style = KAPA_PLOT_POINTS;
    595595
    596596    section.dx = 0.4;
     
    619619    // New Corners
    620620    graphdata.color = KapaColorByName("red");
    621     graphdata.ptype = 7;
     621    graphdata.ptype = KAPA_POINT_BOX_SOLID;
    622622    graphdata.size = 1.5;
    623623    KapaPrepPlot (kapa1, cornerPn->n, &graphdata);
     
    812812    KapaSendLabel (kapa1, "pmAstromGridAngle residuals. Box: Correlation Peak.",
    813813                   KAPA_LABEL_XP);
    814     graphdata.style = 2;
    815     graphdata.ptype = 0;
     814    graphdata.style = KAPA_PLOT_POINTS;
     815    graphdata.ptype = KAPA_POINT_BOX_SOLID;
    816816    graphdata.size = 0.4;
    817817    graphdata.color = KapaColorByName ("black");
     
    861861                     offsetY - 0.5 * Scale};
    862862    graphdata.color = KapaColorByName("red");
    863     graphdata.style = 0;
     863    graphdata.style = KAPA_PLOT_CONNECT;
    864864    graphdata.size = 1.0;
    865865    KapaPrepPlot(kapa1, 5, &graphdata);
     
    873873    KapaSetSection(kapa1, &sectionX);
    874874    graphdata.color = KapaColorByName("black");
    875     graphdata.ptype = 1;
    876     graphdata.style = 1;
     875    graphdata.ptype = KAPA_POINT_BOX_OPEN;
     876    graphdata.style = KAPA_PLOT_HISTOGRAM;
    877877    graphdata.ymin = 0;
    878878    graphdata.ymax = maxHorizontalSlice + 0.5;
     
    887887    float xslice[2] = {offsetX - Scale / 2., offsetX - Scale / 2.};
    888888    float yslice[2] = {-5, 100};
    889     graphdata.style = 0;
     889    graphdata.style = KAPA_PLOT_CONNECT;
    890890    graphdata.color = KapaColorByName("red");
    891891    KapaPrepPlot(kapa1, 2, &graphdata);
     
    896896    KapaSetSection(kapa1, &sectionY);
    897897    graphdata.color = KapaColorByName("black");
    898     graphdata.ptype = 1;
    899     graphdata.style = 1;
     898    graphdata.ptype = KAPA_POINT_BOX_OPEN;
     899    graphdata.style = KAPA_PLOT_HISTOGRAM;
    900900    graphdata.ymin = -maxOffpix;
    901901    graphdata.ymax = maxOffpix;
     
    912912    yslice[0] = yslice[1] = offsetY - Scale / 2.;
    913913    xslice[0] = -5; xslice[1] = 100;
    914     graphdata.style = 0;
     914    graphdata.style = KAPA_PLOT_CONNECT;
    915915    graphdata.color = KapaColorByName("red");
    916916    KapaPrepPlot(kapa1, 2, &graphdata);
     
    982982
    983983    // the point size will be scaled from the z vector
    984     graphdata.style = 2;
    985     graphdata.ptype = 2;
     984    graphdata.style = KAPA_PLOT_POINTS;
     985    graphdata.ptype = KAPA_POINT_CROSS;
    986986    graphdata.size = -1;
    987987    graphdata.color = KapaColorByName ("black");
     
    10191019
    10201020    // the point size will be scaled from the z vector
    1021     graphdata.style = 2;
    1022     graphdata.ptype = 7;
     1021    graphdata.style = KAPA_PLOT_POINTS;
     1022    graphdata.ptype = KAPA_POINT_CIRCLE_OPEN;
    10231023    graphdata.size = -1;
    10241024    graphdata.color = KapaColorByName ("red");
     
    10791079    KapaSendLabel (kapa3, "Horizontal Profile",
    10801080                   KAPA_LABEL_XP);
    1081     graphdata.style = 1;
    1082     graphdata.ptype = 0;
     1081    graphdata.style = KAPA_PLOT_HISTOGRAM;
     1082    graphdata.ptype = KAPA_POINT_BOX_SOLID;
    10831083    graphdata.size = 0.4;
    10841084    graphdata.color = KapaColorByName ("black");
     
    11071107    KapaSendLabel (kapa3, "Vertical Profile",
    11081108                   KAPA_LABEL_XP);
    1109     graphdata.style = 1;
    1110     graphdata.ptype = 0;
     1109    graphdata.style = KAPA_PLOT_HISTOGRAM;
     1110    graphdata.ptype = KAPA_POINT_BOX_SOLID;
    11111111    graphdata.size = 0.4;
    11121112
     
    11501150
    11511151    graphdata.color = KapaColorByName ("black");
    1152     graphdata.ptype = 7;
     1152    graphdata.ptype = KAPA_POINT_CIRCLE_OPEN;
    11531153    graphdata.size = 0.5;
    1154     graphdata.style = 2;
     1154    graphdata.style = KAPA_PLOT_POINTS;
    11551155
    11561156    section.dx = 0.4;
     
    13171317
    13181318    // X vs Y by mag (ref)
    1319     graphdata.color = KapaColorByName ("red");
    1320     graphdata.ptype = 7;
    1321     graphdata.style = 2;
    1322 
    13231319    xVec = psVectorAlloc (refstars->n, PS_TYPE_F32);
    13241320    yVec = psVectorAlloc (refstars->n, PS_TYPE_F32);
     
    13381334    }
    13391335    xVec->n = yVec->n = zVec->n = n;
     1336
     1337    graphdata.color = KapaColorByName ("red");
     1338    graphdata.ptype = KAPA_POINT_X;
     1339    graphdata.style = KAPA_PLOT_POINTS;
     1340
    13401341    pmVisualTriplePlot (kapa2, &graphdata, xVec, yVec, zVec, false);
    13411342
     
    13561357
    13571358    // X vs Y by mag (raw)
    1358     graphdata.color = KapaColorByName ("black");
    1359     graphdata.ptype = 7;
    1360     graphdata.style = 2;
    1361 
    13621359    psFree (xVec);
    13631360    psFree (yVec);
     
    13811378    }
    13821379    xVec->n = yVec->n = zVec->n = n;
     1380
     1381    graphdata.color = KapaColorByName ("black");
     1382    graphdata.ptype = KAPA_POINT_BOX_OPEN;
     1383    graphdata.style = KAPA_PLOT_POINTS;
    13831384    pmVisualTripleOverplot (kapa2, &graphdata, xVec, yVec, zVec, false);
    13841385
     
    13921393    zVec = psVectorAlloc (match->n, PS_TYPE_F32);
    13931394
    1394     graphdata.ptype = 2;
    1395     graphdata.color = KapaColorByName ("blue");
    13961395    n = 0;
    13971396    for (int i = 0; i < match->n; i++) {
     
    14111410    xVec->n = yVec->n = zVec->n = n;
    14121411    fprintf (stderr, "plotting %d matched stars (raw = blue)\n", n);
     1412
     1413    graphdata.ptype = KAPA_POINT_CROSS;
     1414    graphdata.color = KapaColorByName ("blue");
    14131415    pmVisualTripleOverplot (kapa2, &graphdata, xVec, yVec, zVec, false);
    14141416
    14151417    if (0) {
    1416         graphdata.ptype = 3;
     1418        graphdata.ptype = KAPA_POINT_X;
    14171419        graphdata.color = KapaColorByName ("green");
    14181420        n = 0;
     
    14491451    KapaClearPlots (kapa3);
    14501452
    1451     // X vs Y by mag (ref)
    1452     graphdata.color = KapaColorByName ("black");
    1453     graphdata.ptype = 2;
    1454     graphdata.style = 2;
    1455     graphdata.size = 1;
     1453    // mag vs dX
    14561454
    14571455    section.x  = 0.0;
     
    14861484    KapaSendLabel(kapa1, "raw mag", KAPA_LABEL_XM);
    14871485    KapaSendLabel(kapa1, "dY", KAPA_LABEL_YM);
     1486
     1487    graphdata.color = KapaColorByName ("blue");
     1488    graphdata.ptype = KAPA_POINT_TRIANGLE_OPEN;
     1489    graphdata.style = KAPA_PLOT_POINTS;
     1490    graphdata.size = 2;
    14881491
    14891492    KapaPrepPlot (kapa3, xVec->n, &graphdata);
Note: See TracChangeset for help on using the changeset viewer.