IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14642


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

adding output PPSIM.SOURCES for generated sources

Location:
branches/eam_branch_20070817/ppSim
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20070817/ppSim/notes.txt

    r14620 r14642  
     1
     2ppSim development work still needed:
     3
     4* save sources in output files
     5* load input image
     6
     7* optionally apply detrend data (bias, dark, etc).  when adding data
     8  to a loaded image, we only need to inject fake stars.
     9
     10* examine the range of star fluxes.  (too many are being generated). 
     11* check the overlap between the real and random star fluxes
     12
     13* generate stars with / without known exposure correction (ie, stars
     14  could be generated with known fluxes or know magnitudes)
     15
     16* generate galaxies (objects with random values for major, minor, theta)
     17* generate convolved galaxies
    118
    219* should not have to supply ZP, Seeing, PA, Scale on command line for all ppSim runs
     
    724* add generated stars to an output file (pmSource list?)
    825* make star source an option (random / dvo database)
    9 * generate PSF from PSF model
     26* add the gain to the metadata
    1027
    1128ppSimLoop:
  • branches/eam_branch_20070817/ppSim/src/ppSimCreate.c

    r14614 r14642  
    4848    }
    4949
     50    // XXX only invoke this code for OBJECT types of images
     51    // PPSIM.SOURCES carries the constructed, fake sources with their true parameters
     52    pmFPAfile *simSources = pmFPAfileDefineOutput (config, file->fpa, "PPSIM.SOURCES");
     53    if (!simSources) {
     54        psError(PS_ERR_UNKNOWN, false, "Cannot find a rule for PPSIM.SOURCES");
     55        return false;
     56    }
     57    simSources->save = true;
     58
    5059    pmFPALevel phuLevel = pmFPAPHULevel(file->format); // Level at which PHU goes
    5160
  • 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}
  • branches/eam_branch_20070817/ppSim/src/ppSimLoop.c

    r14614 r14642  
    2828
    2929    pmFPAview *view = pmFPAviewAlloc(0);// View for iterating over FPA
     30
     31    // XXX if we include the psphot analysis, we will need to activate the correct pmFPAfiles
     32    // at the correct times.  ppSim operates on PPSIM.OUTPUT and PPSIM.SOURCES
    3033
    3134    // load any needed files (eg, input image, PSF)
Note: See TracChangeset for help on using the changeset viewer.