IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 27, 2008, 12:50:07 PM (18 years ago)
Author:
beaumont
Message:

Added a plot for the grid tweaking

File:
1 edited

Legend:

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

    r20335 r20415  
    88*  @author EAM, IfA
    99*
    10 *  @version $Revision: 1.41.4.1 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2008-10-22 23:35:13 $
     10*  @version $Revision: 1.41.4.2 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2008-10-27 22:50:07 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    120120        i++;
    121121    }
    122 
    123122    return (matches);
    124123}
     
    659658        }
    660659
    661         pmAstromVisualPlotGridMatch (raw, ref,gridNP, stats->offset.x, stats->offset.y,
    662                                      maxOffpix, Scale, Offset);
     660        pmAstromVisualPlotGridMatch(raw, ref, gridNP, stats->offset.x, stats->offset.y,
     661                                    maxOffpix, Scale, Offset);
    663662
    664663        psFree (imStats);
     
    847846    psVector *xHistNew = psVectorSmooth(NULL, xHist, tweakSmooth, tweakNsigma);
    848847    psVector *yHistNew = psVectorSmooth(NULL, yHist, tweakSmooth, tweakNsigma);
    849     psFree(xHist);
    850     psFree(yHist);
    851     xHist = xHistNew;
    852     yHist = yHistNew;
    853848
    854849    // select peak in x and in y
     
    857852    double yMax = 0;
    858853    for (int i = 0; i < nBin; i++) {
    859         if (xHist->data.F32[i] > xMax) {
     854        if (xHistNew->data.F32[i] > xMax) {
    860855            xBin = i;
    861             xMax = xHist->data.F32[i];
    862         }
    863         if (yHist->data.F32[i] > yMax) {
     856            xMax = xHistNew->data.F32[i];
     857        }
     858        if (yHistNew->data.F32[i] > yMax) {
    864859            yBin = i;
    865             yMax = yHist->data.F32[i];
     860            yMax = yHistNew->data.F32[i];
    866861        }
    867862    }
     
    876871    tweak->offset.y += yPeak;
    877872
     873    pmAstromVisualPlotTweak (xHist, yHist, xHistNew, yHistNew, xBin, yBin);
     874
    878875    psFree (rot);
    879876    psFree (xHist);
    880877    psFree (yHist);
     878    psFree (xHistNew);
     879    psFree (yHistNew);
    881880
    882881    return tweak;
Note: See TracChangeset for help on using the changeset viewer.