IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 8, 2008, 4:03:31 PM (18 years ago)
Author:
eugene
Message:

update from changes on eam_branch_20080511 : adding photometry of fake sources, force photometry; major cleanups

File:
1 edited

Legend:

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

    r17616 r18011  
    11# include "ppSim.h"
     2
     3# define ESCAPE(MSG) { \
     4  psError(PS_ERR_BAD_PARAMETER_VALUE, true, MSG); \
     5  return false; }
    26
    37bool ppSimMakeStars(psArray *stars, pmFPA *fpa, pmConfig *config, const psRandom *rng) {
     
    2327    float zp           = psMetadataLookupF32(&status, recipe, "ZEROPOINT"); // Photometric zero point
    2428    float seeing       = psMetadataLookupF32(&status, recipe, "SEEING"); // Seeing SIGMA (pixels)
    25     float scale        = psMetadataLookupF32(&status, recipe, "SCALE") * M_PI / 3600.0 / 180.0; // Plate scale (radians/pixel)
     29    float scale        = psMetadataLookupF32(&status, recipe, "PIXEL.SCALE") * M_PI / 3600.0 / 180.0; // Plate scale (radians/pixel)
     30
     31    if (isnan(darkRate)) darkRate = 0.0;
     32    if (isnan(expTime))  ESCAPE("EXPTIME is not defined");
     33    if (isnan(zp))       ESCAPE("ZEROPOINT is not defined");
     34    if (isnan(seeing))   ESCAPE("SEEING is not defined");
     35    if (isnan(scale))    ESCAPE("PIXEL.SCALE is not defined");
    2636
    2737    bool flatLum       = psMetadataLookupBool(&status,recipe, "STARS.FLAT.LUM"); // were real stars generated?
     
    4757        refMag = psMetadataLookupF32(&status, fpa->concepts, "STARS.REAL.MAG.PEAK"); // Star brightest magnitude
    4858        refSum = psMetadataLookupF32(&status, fpa->concepts, "STARS.REAL.SUM.PEAK"); // Star brightest magnitude
    49         assert (status);
     59
     60        // if we tried and failed to load reference stars, set more artificial limits
     61        if (!status) {
     62            refMag = brightMag;
     63            refSum = 1;
     64        }
    5065    } else {
    5166        refMag = brightMag;
Note: See TracChangeset for help on using the changeset viewer.