IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 25, 2007, 11:57:36 AM (19 years ago)
Author:
eugene
Message:

added galaxies, some tweaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSim/src/ppSimInsertSources.c

    r14657 r14667  
    55    bool mdok;
    66
     7    assert (readout);
    78    assert (stars);
    8     assert (readout);
    9    
     9
     10    if (!stars->n) { return true; }
     11
    1012    // XXX is this needed?
    1113    // pmFPAfile *simSources = psMetadataLookupPtr(NULL, config->files, "PPSIM.SOURCES"); // Output sources
     
    8890        pmSource *source = pmSourceFromModel (model, readout, radius, PM_SOURCE_TYPE_STAR);
    8991
     92        // XXX set the mag & err values (should this be done in pmSourceFromModel?)
     93        // XXX i should be applying the gain and the correct effective area
     94        psEllipseAxes axes = pmPSF_ModelToAxes (model->params->data.F32, 20.0);
     95        psF64 Area = 2.0 * M_PI * axes.major * axes.minor;
     96
     97        source->psfMag = -2.5*log10(star->flux);
     98        source->errMag = sqrt(Area*PS_SQR(roughNoise) + star->flux) / star->flux;       
     99       
    90100        // XXX add the sources to a source array
    91101
Note: See TracChangeset for help on using the changeset viewer.