IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 22, 2007, 3:05:47 PM (19 years ago)
Author:
eugene
Message:

load / apply psf model from external source

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20070817/ppSim/src/ppSimLoop.c

    r14547 r14614  
    11#include "ppSim.h"
    22
    3 psExit ppSimLoop(pmConfig *config)
     3bool ppSimLoop(pmConfig *config)
    44{
    55    PS_ASSERT_PTR_NON_NULL(config, PS_EXIT_PROG_ERROR);
     
    4848        }
    4949
    50         // XXX check for a supplied PSF, otherwise generate a basic one
    5150        if (type == PPSIM_TYPE_OBJECT) {
    52             // XXX TBD : ppSimSetPSF (chip, config);
     51            if (!ppSimSetPSF (chip, config)) {
     52                psError(PS_ERR_UNKNOWN, false, "failed IO for chip %d in ppSim\n", view->chip);
     53                psFree (view);
     54                return false;
     55            }
    5356        }
    5457
     
    6467                psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CELL.READDIR = 1 is the only supported mode.");
    6568                psFree(rng);
    66                 return PS_EXIT_CONFIG_ERROR;
     69                return false;
    6770            }
    6871
     
    9093                ppSimMakeSky (readout, expCorr, type, config);
    9194                if (type == PPSIM_TYPE_FLAT) goto done;
    92 
    93                 // if (type == PPSIM_TYPE_OBJECT) {
    94                 // ppSimInsertStars (readout, expCorr, stars, config, chip, cell);
    95                 // }
    9695
    9796                if (type == PPSIM_TYPE_OBJECT) {
     
    123122                psFree(rng);
    124123                psFree(view);
    125                 return PS_EXIT_SYS_ERROR;
     124                // return PS_EXIT_SYS_ERROR;
     125                return false;
    126126            }
    127127        }
     
    135135            psFree(rng);
    136136            psFree(view);
    137             return PS_EXIT_SYS_ERROR;
     137            // return PS_EXIT_SYS_ERROR;
     138            return false;
    138139        }
    139140
     
    148149        psFree(rng);
    149150        psFree(view);
    150         return PS_EXIT_SYS_ERROR;
     151        // return PS_EXIT_SYS_ERROR;
     152        return false;
    151153    }
    152154
     
    154156    psFree(view);
    155157
    156     return 0;
     158    return true;
    157159}
Note: See TracChangeset for help on using the changeset viewer.