Changeset 14652 for trunk/psModules/src/objects/pmPSFtry.c
- Timestamp:
- Aug 23, 2007, 2:11:02 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmPSFtry.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmPSFtry.c
r13898 r14652 5 5 * @author EAM, IfA 6 6 * 7 * @version $Revision: 1.4 3$ $Name: not supported by cvs2svn $8 * @date $Date: 2007-0 6-20 02:22:26$7 * @version $Revision: 1.44 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2007-08-24 00:11:02 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 23 23 #include "pmMoments.h" 24 24 #include "pmResiduals.h" 25 #include "pmGrowthCurve.h" 26 #include "pmPSF.h" 25 27 #include "pmModel.h" 26 28 #include "pmSource.h" 27 #include "pmGrowthCurve.h" 28 #include "pmPSF.h" 29 #include "pmSourceUtils.h" 29 30 #include "pmPSFtry.h" 30 #include "pmModelGroup.h" 31 #include "pmModelClass.h" 32 #include "pmModelUtils.h" 31 33 #include "pmSourceFitModel.h" 32 34 #include "pmSourcePhotometry.h" … … 59 61 60 62 // validate the requested model name 61 pmModelType type = pmModel SetType (modelName);63 pmModelType type = pmModelClassGetType (modelName); 62 64 if (type == -1) { 63 65 psError (PS_ERR_UNKNOWN, true, "invalid model name %s", modelName); … … 412 414 // This way, the parameters masked by one of the fits will be applied to the others 413 415 for (int i = 0; i < stats->clipIter; i++) { 414 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); 415 417 psTrace ("psModules.pmPSFtry", 4, "clipped E0 : keeping %ld of %ld\n", stats->clippedNvalues, e0->n); 416 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); 417 419 psTrace ("psModules.pmPSFtry", 4, "clipped E1 : keeping %ld of %ld\n", stats->clippedNvalues, e1->n); 418 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); 419 421 psTrace ("psModules.pmPSFtry", 4, "clipped E2 : keeping %ld of %ld\n", stats->clippedNvalues, e2->n); 420 422 } … … 436 438 437 439 // skip the unfitted parameters (X, Y, Io, Sky) and the shape parameters (SXX, SYY, SXY) 438 for (int i = 0; i < psf->params _NEW->n; i++) {440 for (int i = 0; i < psf->params->n; i++) { 439 441 switch (i) { 440 442 case PM_PAR_SKY: … … 461 463 // the mask is carried from previous steps and updated with this operation 462 464 // the weight is either the flux error or NULL, depending on 'applyWeights' 463 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)) { 464 466 psError(PS_ERR_UNKNOWN, false, "failed to build psf model for parameter %d", i); 465 467 psFree(stats); … … 489 491 fprintf (f, "%f %f : ", model->params->data.F32[PM_PAR_XPOS], model->params->data.F32[PM_PAR_YPOS]); 490 492 491 for (int i = 0; i < psf->params _NEW->n; i++) {492 if (psf->params _NEW->data[i] == NULL)493 for (int i = 0; i < psf->params->n; i++) { 494 if (psf->params->data[i] == NULL) 493 495 continue; 494 496 fprintf (f, "%f %f : ", model->params->data.F32[i], modelPSF->params->data.F32[i]);
Note:
See TracChangeset
for help on using the changeset viewer.
