IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 5, 2008, 3:29:09 AM (18 years ago)
Author:
eugene
Message:

added forced photometry code; compiles, not tested

File:
1 edited

Legend:

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

    r17901 r17935  
    3737    }
    3838
     39# if 0   
    3940    // set the photcode for this image
    4041    if (!psphotAddPhotcode (recipe, config, view, "PPSIM.CHIP")) {
     
    4243        return false;
    4344    }
     45# endif
    4446
    4547    // find the currently selected readout.
     
    119121    psFree (sources); // only frees the merged references
    120122
    121     // linear fit to real + forced sources
    122     sources = ppSimMergeSources (realSources, forceSources);
    123     psphotFitSourcesLinear (readout, sources, recipe, psf, FALSE); // XXX option to NOT subtract
    124     psphotReplaceAllSources (sources, recipe);
    125     psFree (sources); // only frees the merged references
     123    // linear fit to real + forced sources (if any were selected)
     124    if (forceSources->n) {
     125      sources = ppSimMergeSources (realSources, forceSources);
     126      psphotFitSourcesLinear (readout, sources, recipe, psf, FALSE); // XXX option to NOT subtract
     127      psphotReplaceAllSources (sources, recipe);
     128      psFree (sources); // only frees the merged references
     129    }
    126130
    127131    // XXX do we need to measure aperture photometry corrections?
     
    157161    psMetadataAdd (fakeReadout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY, "fake photometry ", fakeSources);
    158162
    159     // psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PPSIM.FORCE.SOURCES", PS_DATA_ARRAY, "forced photometry ", forceSources);
     163    psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PPSIM.FORCE.SOURCES", PS_DATA_ARRAY, "forced photometry ", forceSources);
    160164    psFree (forceSources);
    161165    return true;
Note: See TracChangeset for help on using the changeset viewer.