IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 28, 2008, 1:20:29 PM (18 years ago)
Author:
beaumont
Message:

New plots for fixChips and CommonScale

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branch_20081011/psModules/src/astrom/pmAstrometryVisual.c

    r20415 r20443  
    259259
    260260
    261 /** Plot the refinements that pmAstromGridTweak makes to the offset between raw and ref stars */
    262 bool pmAstromVisualPlotTweak (psVector *xHist, psVector *yHist, psVector *xHistNew, psVector *yHistNew, int xBin, int yBin)
     261/** Plot the refinements made within pmAstromGridTweak.
     262 * After pmAstromGridMatch finds the best rotaion/scale/offset between raw and reference stars
     263 * within a coarse grid of rotations/scales, pmAstromGridTweak computes a higher precision
     264 * estimate of the offset. It computes the 2 point correlation function between raw and ref
     265 * stars along horizontal and vertical cuts through the first-guess offset. It finds the peak
     266 * of these two profiles and adjusts the offset accordingly. This procedure plots the profiles.
     267 */
     268bool pmAstromVisualPlotTweak (psVector *xHist, psVector *yHist, int xBin, int yBin)
    263269{
    264270    //make sure we want to plot this
     
    274280    psVector *xIndices = psVectorAlloc (xHist->n, PS_TYPE_F32);
    275281    psVector *yIndices = psVectorAlloc (yHist->n, PS_TYPE_F32);
    276 
    277282
    278283    //populate the Indices vectors
     
    298303    KapaSendLabel (kapa, "Horizontal Profile",
    299304                   KAPA_LABEL_XP);
    300     graphdata.style = 2;
     305    graphdata.style = 1;
    301306    graphdata.ptype = 0;
    302307    graphdata.size = 0.4;
     
    307312    KapaPlotVector (kapa, xHist->n, xHist->data.F32, "y");
    308313
    309     //overplot smoothed line
    310     graphdata.style = 1;
    311     graphdata.color = KapaColorByName ("red");
    312     KapaPrepPlot (kapa, xHist->n, &graphdata);
    313     KapaPlotVector (kapa, xHist->n, xIndices->data.F32, "x");
    314     KapaPlotVector (kapa, xHist->n, xHistNew->data.F32, "y");
    315 
    316314    //overplot the peak
    317315    float x[2] = {xBin, xBin};
    318316    float y[2] = {-500, 500};
    319     graphdata.color = KapaColorByName ("black");
     317    graphdata.color = KapaColorByName ("red");
    320318    KapaPrepPlot (kapa, 2, &graphdata);
    321319    KapaPlotVector (kapa, 2, x, "x");
     
    328326    KapaSetFont(kapa, "helvetica", 14);
    329327    KapaBox(kapa, &graphdata);
    330     KapaSendLabel (kapa, "X offset Bin", KAPA_LABEL_XM);
     328    KapaSendLabel (kapa, "Y offset Bin", KAPA_LABEL_XM);
    331329    KapaSendLabel (kapa, "Number of Sources", KAPA_LABEL_YM);
    332330    KapaSendLabel (kapa, "Vertical Profile",
    333331                   KAPA_LABEL_XP);
    334     graphdata.style = 2;
     332    graphdata.style = 1;
    335333    graphdata.ptype = 0;
    336334    graphdata.size = 0.4;
     
    341339    KapaPlotVector (kapa, yHist->n, yHist->data.F32, "y");
    342340
    343     //overplot smoothed line
    344     graphdata.style = 1;
    345     graphdata.color = KapaColorByName ("red");
    346     KapaPrepPlot (kapa, yHist->n, &graphdata);
    347     KapaPlotVector (kapa, yHist->n, yIndices->data.F32, "x");
    348     KapaPlotVector (kapa, yHist->n, yHistNew->data.F32, "y");
    349 
    350341    //overplot the peak
    351342    x[0] = x[1] = yBin;
    352     graphdata.color = KapaColorByName ("black");
     343    graphdata.color = KapaColorByName ("red");
    353344    KapaPrepPlot (kapa, 2, &graphdata);
    354345    KapaPlotVector (kapa, 2, x, "x");
     
    356347
    357348    //plot title
     349    graphdata.color = KapaColorByName("black");
    358350    KapaSection section3 = {"s3", 0, 0, 1, 1};
    359351    KapaSetSection( kapa, &section3);
     
    366358    psFree(yIndices);
    367359    return true;
    368 }
    369 
    370 
    371 /** psastroVisualScaleGraphdata
     360} //end of pmAstromPlotTweak
     361
     362
     363/** pmAstromScaleGraphdata
    372364 * Scale the graphdata structure based on x and y coordinates. Use sigma clipping to
    373365 * prevent outliers from making te plot region too big.
     
    441433
    442434
    443 
    444435# else
    445436
     
    449440bool pmAstromVisualClose() { return true; }
    450441bool pmAstromVisualPlotGridMatch (const psArray *raw, const psArray *ref, psImage *gridNP, double offsetX, double offsetY, double maxOffpix, double Scale, double Offset) { return true; }
     442bool pmAstromVisualPlotTweak (psVector *xHist, psVector *yHist, int xBin, int yBin) {return true;}
    451443
    452444# endif
Note: See TracChangeset for help on using the changeset viewer.