IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 5, 2017, 5:31:17 PM (9 years ago)
Author:
eugene
Message:

add some extra visualizations

File:
1 edited

Legend:

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

    r36834 r40083  
    10451045    if (!plotTweak) return true;
    10461046    if (!pmVisualTestLevel("psastro.plot13", 1)) return true;
    1047     if (!pmVisualInitWindow(&kapa1, "psastro:plots")) return false;
     1047    if (!pmVisualInitWindow(&kapa3, "psastro:plots")) return false;
    10481048
    10491049    Graphdata graphdata;
     
    10661066
    10671067    // set up plot information
    1068     KapaClearPlots(kapa1);
     1068    KapaClearPlots(kapa3);
    10691069    KapaInitGraph(&graphdata);
    10701070
    10711071    // plot the X histogram
    10721072    pmVisualScaleGraphdata(&graphdata, xIndices, xHist, false);
    1073     KapaSetSection(kapa1, &section1);
    1074     KapaSetLimits (kapa1, &graphdata);
    1075     KapaSetFont(kapa1, "helvetica", 14);
    1076     KapaBox(kapa1, &graphdata);
    1077     KapaSendLabel (kapa1, "X offset Bin", KAPA_LABEL_XM);
    1078     KapaSendLabel (kapa1, "Number of Sources", KAPA_LABEL_YM);
    1079     KapaSendLabel (kapa1, "Horizontal Profile",
     1073    KapaSetSection(kapa3, &section1);
     1074    KapaSetLimits (kapa3, &graphdata);
     1075    KapaSetFont(kapa3, "helvetica", 14);
     1076    KapaBox(kapa3, &graphdata);
     1077    KapaSendLabel (kapa3, "X offset Bin", KAPA_LABEL_XM);
     1078    KapaSendLabel (kapa3, "Number of Sources", KAPA_LABEL_YM);
     1079    KapaSendLabel (kapa3, "Horizontal Profile",
    10801080                   KAPA_LABEL_XP);
    10811081    graphdata.style = 1;
     
    10841084    graphdata.color = KapaColorByName ("black");
    10851085
    1086     KapaPrepPlot (kapa1, xHist->n, &graphdata);
    1087     KapaPlotVector (kapa1, xHist->n, xIndices->data.F32, "x");
    1088     KapaPlotVector (kapa1, xHist->n, xHist->data.F32, "y");
     1086    KapaPrepPlot (kapa3, xHist->n, &graphdata);
     1087    KapaPlotVector (kapa3, xHist->n, xIndices->data.F32, "x");
     1088    KapaPlotVector (kapa3, xHist->n, xHist->data.F32, "y");
    10891089
    10901090    // overplot the peak
     
    10921092    float y[2] = {-500, 500};
    10931093    graphdata.color = KapaColorByName ("red");
    1094     KapaPrepPlot (kapa1, 2, &graphdata);
    1095     KapaPlotVector (kapa1, 2, x, "x");
    1096     KapaPlotVector (kapa1, 2, y, "y");
     1094    KapaPrepPlot (kapa3, 2, &graphdata);
     1095    KapaPlotVector (kapa3, 2, x, "x");
     1096    KapaPlotVector (kapa3, 2, y, "y");
    10971097
    10981098    // plot the Y histogram
    10991099    pmVisualScaleGraphdata(&graphdata, yIndices, yHist, false);
    1100     KapaSetSection(kapa1, &section2);
    1101     KapaSetLimits (kapa1, &graphdata);
    1102     KapaSetFont(kapa1, "helvetica", 14);
     1100    KapaSetSection(kapa3, &section2);
     1101    KapaSetLimits (kapa3, &graphdata);
     1102    KapaSetFont(kapa3, "helvetica", 14);
    11031103    graphdata.color = KapaColorByName ("black");
    1104     KapaBox(kapa1, &graphdata);
    1105     KapaSendLabel (kapa1, "Y offset Bin", KAPA_LABEL_XM);
    1106     KapaSendLabel (kapa1, "Number of Sources", KAPA_LABEL_YM);
    1107     KapaSendLabel (kapa1, "Vertical Profile",
     1104    KapaBox(kapa3, &graphdata);
     1105    KapaSendLabel (kapa3, "Y offset Bin", KAPA_LABEL_XM);
     1106    KapaSendLabel (kapa3, "Number of Sources", KAPA_LABEL_YM);
     1107    KapaSendLabel (kapa3, "Vertical Profile",
    11081108                   KAPA_LABEL_XP);
    11091109    graphdata.style = 1;
     
    11111111    graphdata.size = 0.4;
    11121112
    1113     KapaPrepPlot (kapa1, yHist->n, &graphdata);
    1114     KapaPlotVector (kapa1, yHist->n, yIndices->data.F32, "x");
    1115     KapaPlotVector (kapa1, yHist->n, yHist->data.F32, "y");
     1113    KapaPrepPlot (kapa3, yHist->n, &graphdata);
     1114    KapaPlotVector (kapa3, yHist->n, yIndices->data.F32, "x");
     1115    KapaPlotVector (kapa3, yHist->n, yHist->data.F32, "y");
    11161116
    11171117    // overplot the peak
    11181118    x[0] = x[1] = yBin;
    11191119    graphdata.color = KapaColorByName ("red");
    1120     KapaPrepPlot (kapa1, 2, &graphdata);
    1121     KapaPlotVector (kapa1, 2, x, "x");
    1122     KapaPlotVector (kapa1, 2, y, "y");
     1120    KapaPrepPlot (kapa3, 2, &graphdata);
     1121    KapaPlotVector (kapa3, 2, x, "x");
     1122    KapaPlotVector (kapa3, 2, y, "y");
    11231123
    11241124    // plot title
    11251125    graphdata.color = KapaColorByName("black");
    11261126
    1127     KapaSetSection( kapa1, &section3);
    1128     KapaSendLabel (kapa1, "Tweaking the Astrometry Grid Solution. Smoothed profiles + peak location",
     1127    KapaSetSection( kapa3, &section3);
     1128    KapaSendLabel (kapa3, "Tweaking the Astrometry Grid Solution. Smoothed profiles + peak location",
    11291129                   KAPA_LABEL_XP);
    11301130
Note: See TracChangeset for help on using the changeset viewer.