IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 28, 2006, 10:23:51 AM (20 years ago)
Author:
magnier
Message:

This is an important change to the PSF shape model.

  • I have changed the definition of the elliptical contour parameters

(PM_PAR_SXX,SYY are now sigma_x,y/sqrt(2), rather than
sqrt(2)/sigma_x.

  • I have changed the way in which the SXY term is modelled. rather

than fit SXY to a polynomial, I now fit SXY / (1/SXX2 + 1/SYY2)2.
this representation is more likely to be well-described by a
polynomial. the other form is likely to vary as xy/r
N rather than xy
rN.

these changes imply that the models all need to treat the SXX,SYY,SXY
terms in the same fashion (ie, fitting a contour of the form (x/SXX)2
+ (y/SYY)
2 + SXY*x*y). If an arbitrary model uses some other meaning
for SXX, SYY, SXY, then it will have to define its own exceptions in
the functions pmPSFFromModels and pmModelFromPSF (the latter has an
implementation for each model already).

  • I have cleaned up the pmModel_NAME.c functions to use the #define names

for the parameters (PM_PAR_XXX) everywhere, and to use #def names for
the functions. this latter change makes it easy to specify the model
function names in a single location.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmPSF_IO.c

    r9563 r9770  
    66 *  @author EAM, IfA
    77 *
    8  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-10-14 00:56:13 $
     8 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-10-28 20:23:51 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5050    psMetadataAdd (metadata, PS_LIST_TAIL, "PSF_MODEL_NPAR", PS_DATA_S32, "PSF model parameter count", nPar);
    5151
    52     for (int i = 0; i < nPar - 4; i++) {
    53         psPolynomial2D *poly = psf->params->data[i];
     52    for (int i = 0; i < nPar; i++) {
     53        psPolynomial2D *poly = psf->params_NEW->data[i];
     54        if (poly == NULL)
     55            continue;
    5456        psPolynomial2DtoMetadata (metadata, poly, "PSF_PAR%02d", i);
    5557    }
     
    8789        psAbort ("read PSF" , "mismatch model par count");
    8890
    89     for (int i = 0; i < nPar - 4; i++) {
     91    // un-fitted terms, not in the Metadata, are left NULL
     92    // XXX add a double-check of the expected number?
     93    for (int i = 0; i < nPar; i++) {
    9094        sprintf (keyword, "PSF_PAR%02d", i);
    9195        psMetadata *folder = psMetadataLookupPtr (&status, metadata, keyword);
     96        if (!status)
     97            continue;
    9298        psPolynomial2D *poly = psPolynomial2DfromMetadata (folder);
    93         psFree (psf->params->data[i]);
    94         psf->params->data[i] = poly;
     99        psFree (psf->params_NEW->data[i]);
     100        psf->params_NEW->data[i] = poly;
    95101    }
    96102    sprintf (keyword, "APTREND");
Note: See TracChangeset for help on using the changeset viewer.