IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 23, 2007, 1:24:04 PM (19 years ago)
Author:
eugene
Message:

adding output PPSIM.SOURCES for generated sources

File:
1 edited

Legend:

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

    r14614 r14642  
    88    assert (readout);
    99   
     10    // XXX is this needed?
     11    // pmFPAfile *simSources = psMetadataLookupPtr(NULL, config->files, "PPSIM.SOURCES"); // Output sources
     12
    1013    pmCell *cell = readout->parent;
    1114    pmChip *chip = cell->parent;
     
    5053    int dY = PM_CELL_TO_CHIP (0.0, y0Cell, yParityCell, binning);
    5154
     55    psArray *sources = psArrayAllocEmpty (stars->n);
     56
    5257    // add sources to the readout image & weight
    5358    for (long i = 0; i < stars->n; i++) {
     
    8792        // insert the source flux in the image
    8893        pmSourceAddWithOffset (source, PM_MODEL_OP_FULL, 0xff, dX, dY);
     94        psArrayAdd (sources, 100,source);
    8995    }
    9096
    91     // XXX add the source array to the readout analysis
     97    // NOTE: readout must be part of the pmFPAfile named "PPSIM.OUTPUT"
     98    psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY, "psphot sources", sources);
    9299
     100    // XXX many leaks in here, i think
    93101    return true;
    94102}
Note: See TracChangeset for help on using the changeset viewer.