IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 20, 2006, 8:57:16 PM (20 years ago)
Author:
eugene
Message:

modifications to support psphot on pmReadout with full IPP config files

File:
1 edited

Legend:

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

    r5993 r6117  
    3434
    3535    // get the list pointers for the PSF_MODEL entries
     36    psList *list = NULL;
    3637    psMetadataItem *mdi = psMetadataLookup (config, "PSF_MODEL");
    3738    if (mdi == NULL) psAbort ("psphotChoosePSF", "missing PSF_MODEL selection");
    38 
    39     psList *list = (psList *) mdi->data.list;
    40     psListIterator *iter = psListIteratorAlloc (list, PS_LIST_HEAD, FALSE);
     39    if (mdi->type == PS_DATA_STRING) {
     40        list = psListAlloc(NULL);
     41        psListAdd (list, PS_LIST_HEAD, mdi);
     42    } else {
     43        if (mdi->type != PS_DATA_METADATA_MULTI) psAbort ("psphotChoosePSF", "missing PSF_MODEL selection");
     44        list = psMemIncrRefCounter(mdi->data.list);
     45    }
    4146
    4247    // set up an array to store the results
     
    4449
    4550    // try each model option listed in config
     51    psListIterator *iter = psListIteratorAlloc (list, PS_LIST_HEAD, FALSE);
    4652    for (int i = 0; i < models->n; i++) {
    4753
     
    5460    }
    5561    psFree (iter);
    56     // psFree (list); XXX is list freed with iter?
     62    psFree (list);
    5763    psFree (stars);
    5864
Note: See TracChangeset for help on using the changeset viewer.