IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 7, 2006, 8:52:03 PM (20 years ago)
Author:
eugene
Message:

extensive cleanup of memory handling : no more leaks!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotModelTest.c

    r6311 r6379  
    11# include "psphot.h"
    22# include "psEllipse.h"
     3static char DEFAULT_MODE[] = "EXT";
    34
    45bool psphotModelTest (pmReadout *readout, psMetadata *arguments, psMetadata *recipe) {
     
    1718
    1819    // what fitting mode to use?
    19     char *psfModeWord = psMetadataLookupPtr (&status, arguments, "TEST_FIT_MODE");
     20    char *psfModeWord = psMetadataLookupStr (&status, arguments, "TEST_FIT_MODE");
    2021    if (!status) {
    21         psfModeWord = psStringCopy ("EXT");
     22        psfModeWord = DEFAULT_MODE;
    2223    }
    2324    bool psfMode = !strcasecmp (psfModeWord, "PSF");
     
    2526    // in psfMode, psf sets the model type
    2627    if (psfMode) {
    27         char *psfFile = psMetadataLookupPtr (&status, arguments, "PSF_INPUT_FILE");
     28        char *psfFile = psMetadataLookupStr (&status, arguments, "PSF_INPUT_FILE");
    2829        if (!status) psAbort ("psphotModelTest", "PSF_INPUT_FILE not supplied");
    2930        psMetadata *psfData = psMetadataConfigParse (NULL, &Nfail, psfFile, FALSE);
     
    3233    } else {
    3334        // find the model: supplied by user or first in the PSF_MODEL list
    34         char *modelName  = psMetadataLookupPtr (&status, arguments, "TEST_FIT_MODEL");
     35        char *modelName  = psMetadataLookupStr (&status, arguments, "TEST_FIT_MODEL");
    3536        if (modelName == NULL) {
    3637            // get the list pointers for the PSF_MODEL entries
     
    153154    psImageKeepCircle (source->mask, xObj, yObj, RADIUS, "OR", PSPHOT_MASK_MARKED);
    154155
    155     char *fitset = psMetadataLookupPtr (&status, arguments, "TEST_FIT_SET");
     156    char *fitset = psMetadataLookupStr (&status, arguments, "TEST_FIT_SET");
    156157    if (status) {
    157158        status = psphotFitSet (source, model, fitset, psfMode);
Note: See TracChangeset for help on using the changeset viewer.