* pmObjects.c: - changed psModel.params & psModel.dparams to psVector - adjusted pmModelAlloc to match - added default to source->type (pmSourceAlloc) - changed return value for pmFindImagePeaks to psArray from psList - changed MyListAddPeak to reflect change to psArray - fixed error in pmFindImagePeaks: tmpRow = p_psGetRowVectorFromImage((psImage *) image, row); changed '0' to 'row' NOTE: also fixed by George - added pmPeaksSubset to replace pmCullPeaks: returns a new array with a subset of the peaks. - added tests in pmSourceLocalSky to keep subimage on main image NOTE: also fixed by George - CheckRadius2 seems inefficient, but I did not change it (function should be inlined; we should store and compare against radius2, not radius) NOTE: looks like these were changed to macros - added code to pmSourceMoments to do the second-order moments in two passes rather than one, but since it made no impact, it is ifdef'ed out. - forced the Sx,Sy values in pmSourceMoments to bottom-out at 0.0 - added pmComparePeakAscend and pmComparePeakDescend functions (used by pmSourceRoughClass) - implemented the pmSourceRoughClass as I envisioned it - added tests in pmSourceSetPixelCircle to keep subimage on main image - fixed definitions of radius in pmSourceSetPixelsCircle NOTE: also fixed by George - inverted meaning of mask in pmSourceSetPixelsCircle (0 - valid, 1 - invalid) - changed source->models->params to vectors in pmSourceModelGuess, - changed source->models->params to vectors in evalModel - evalModel declared static - findValue declared static - modified default TOLERANCE, NUM_ITERATIONS in pmSourceFitModel - added the yErr entry to the model fit (yErr is currently set approximately -- needs GAIN & RDNOISE) - changed the psMinimizeLMChi2 calls to work with the psF64 versions of the models rather than the _Vec versions (to match the API for psMinimizeLMChi2) - added elements nDOF and nIter to pmModel - set nDOF and nIter after fit result * for all of the models: - dropped the input checking for speed (allow for #ifdef in/out?) (these functions are only called by psMinimizeLMChi2, so should already be valid) - dropped the _Vec versions of the model functions - changed return type of scalar versions of functions to psF64 (allows the cast of psMinimizeLMChi2Func to be dropped in pmSourceFit)