IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 27, 2008, 7:12:46 PM (18 years ago)
Author:
eugene
Message:

working on the photometry of fake sources

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080511/ppSim/src/ppSimMergeReadouts.c

    r17703 r17818  
    22
    33// XXX add bounds to the inputs?
    4 bool ppSimMergeReadouts (pmReadout *outReadout, pmReadout *inReadout) {
     4bool ppSimMergeReadouts (pmConfig *config, pmFPAview *view) {
    55
    66    // bool mdok;
     7
     8    // if we have an input image, we need to add the synthetic data on top of it below
     9    // XXX we may potentially use this input file to skip missing elements
     10    pmFPAfile *input = psMetadataLookupPtr(NULL, config->files, "PPSIM.INPUT");
     11    if (!input) return true;
     12
     13    pmReadout *inReadout = pmFPAviewThisReadout (view, input->fpa);
     14    if (!inReadout) return true;
     15
     16    if (!inReadout->weight) {
     17      if (!pmReadoutGenerateWeight(inReadout, true)) {
     18        psError (PS_ERR_UNKNOWN, false, "trouble creating weight");
     19        return false;
     20      }
     21    }
     22
     23    // output must exist or we made a programming error
     24    pmFPAfile *output = psMetadataLookupPtr(NULL, config->files, "PPSIM.OUTPUT"); // Output file
     25    assert(output);
     26
     27    // XXX require outReadout?
     28    pmReadout *outReadout = pmFPAviewThisReadout (view, output->fpa);
     29    if (!outReadout) return true;
    730
    831    psImage *inSignal = inReadout->image;
     
    1235    psImage *outVariance = outReadout->weight;
    1336
    14     // psMetadata *recipe = psMetadataLookupMetadata(&mdok, config->recipes, PPSIM_RECIPE); // Recipe
    1537    assert (inSignal->numRows == outSignal->numRows);
    1638    assert (inSignal->numCols == outSignal->numCols);
Note: See TracChangeset for help on using the changeset viewer.