IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 22, 2007, 2:55:49 PM (19 years ago)
Author:
magnier
Message:

adjusted pmModel.h to allow pmModel to use functions which use pmModel
as an argument.

adjusted the order of the pmPSF.h entries to allow that as an argument
as well

changed pmPSF I/O functions to load/save the psf on the
chip->analysis, not the readout->analysis

fixed the modelRadius function for PGAUSS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20070817/psModules/src/objects/pmPSFtry.c

    r14544 r14612  
    55 *  @author EAM, IfA
    66 *
    7  *  @version $Revision: 1.43.6.1 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2007-08-17 21:01:59 $
     7 *  @version $Revision: 1.43.6.2 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2007-08-23 00:55:49 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2323#include "pmMoments.h"
    2424#include "pmResiduals.h"
     25#include "pmGrowthCurve.h"
     26#include "pmPSF.h"
    2527#include "pmModel.h"
    2628#include "pmSource.h"
    2729#include "pmSourceUtils.h"
    28 #include "pmGrowthCurve.h"
    29 #include "pmPSF.h"
    3030#include "pmPSFtry.h"
    3131#include "pmModelClass.h"
     32#include "pmModelUtils.h"
    3233#include "pmSourceFitModel.h"
    3334#include "pmSourcePhotometry.h"
     
    413414    // This way, the parameters masked by one of the fits will be applied to the others
    414415    for (int i = 0; i < stats->clipIter; i++) {
    415         psVectorClipFitPolynomial2D (psf->params_NEW->data[PM_PAR_E0], stats, psfTry->mask, 0xff, e0, dz, x, y);
     416        psVectorClipFitPolynomial2D (psf->params->data[PM_PAR_E0], stats, psfTry->mask, 0xff, e0, dz, x, y);
    416417        psTrace ("psModules.pmPSFtry", 4, "clipped E0 : keeping %ld of %ld\n", stats->clippedNvalues, e0->n);
    417         psVectorClipFitPolynomial2D (psf->params_NEW->data[PM_PAR_E1], stats, psfTry->mask, 0xff, e1, dz, x, y);
     418        psVectorClipFitPolynomial2D (psf->params->data[PM_PAR_E1], stats, psfTry->mask, 0xff, e1, dz, x, y);
    418419        psTrace ("psModules.pmPSFtry", 4, "clipped E1 : keeping %ld of %ld\n", stats->clippedNvalues, e1->n);
    419         psVectorClipFitPolynomial2D (psf->params_NEW->data[PM_PAR_E2], stats, psfTry->mask, 0xff, e2, dz, x, y);
     420        psVectorClipFitPolynomial2D (psf->params->data[PM_PAR_E2], stats, psfTry->mask, 0xff, e2, dz, x, y);
    420421        psTrace ("psModules.pmPSFtry", 4, "clipped E2 : keeping %ld of %ld\n", stats->clippedNvalues, e2->n);
    421422    }
     
    437438
    438439    // skip the unfitted parameters (X, Y, Io, Sky) and the shape parameters (SXX, SYY, SXY)
    439     for (int i = 0; i < psf->params_NEW->n; i++) {
     440    for (int i = 0; i < psf->params->n; i++) {
    440441        switch (i) {
    441442          case PM_PAR_SKY:
     
    462463        // the mask is carried from previous steps and updated with this operation
    463464        // the weight is either the flux error or NULL, depending on 'applyWeights'
    464         if (!psVectorClipFitPolynomial2D(psf->params_NEW->data[i], stats, psfTry->mask, 0xff, z, NULL, x, y)) {
     465        if (!psVectorClipFitPolynomial2D(psf->params->data[i], stats, psfTry->mask, 0xff, z, NULL, x, y)) {
    465466            psError(PS_ERR_UNKNOWN, false, "failed to build psf model for parameter %d", i);
    466467            psFree(stats);
     
    490491            fprintf (f, "%f %f : ", model->params->data.F32[PM_PAR_XPOS], model->params->data.F32[PM_PAR_YPOS]);
    491492
    492             for (int i = 0; i < psf->params_NEW->n; i++) {
    493                 if (psf->params_NEW->data[i] == NULL)
     493            for (int i = 0; i < psf->params->n; i++) {
     494                if (psf->params->data[i] == NULL)
    494495                    continue;
    495496                fprintf (f, "%f %f : ", model->params->data.F32[i], modelPSF->params->data.F32[i]);
Note: See TracChangeset for help on using the changeset viewer.