IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26374


Ignore:
Timestamp:
Dec 8, 2009, 7:11:15 PM (16 years ago)
Author:
eugene
Message:

add an option for a grid of stars

Location:
branches/eam_branches/20091201/ppSim/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/ppSim/src/Makefile.am

    r23808 r26374  
    3030        ppSimLoadStars.c          \
    3131        ppSimMakeStars.c          \
     32        ppSimMakeStarGrid.c       \
    3233        ppSimMakeGalaxies.c       \
    3334        ppSimMakeBiassec.c        \
  • branches/eam_branches/20091201/ppSim/src/ppSim.h

    r23836 r26374  
    103103bool ppSimLoadStars (psArray *stars, pmFPA *fpa, pmConfig *config);
    104104bool ppSimMakeStars(psArray *stars, pmFPA *fpa, pmConfig *config, const psRandom *rng);
     105bool ppSimMakeStarGrid(psArray *stars, pmFPA *fpa, pmConfig *config, const psRandom *rng);
    105106bool ppSimInsertStars (pmReadout *readout, psImage *expCorr, psArray *stars, pmConfig *config);
    106107
  • branches/eam_branches/20091201/ppSim/src/ppSimAddNoise.c

    r18011 r26374  
    1616    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSIM_RECIPE); // Recipe
    1717
    18     float gain = psMetadataLookupF32(NULL, cell->concepts, "CELL.GAIN"); // CCD gain, e/ADU
     18    // the recipe should set GAIN to NAN, and only modify to override the concept value
     19    float gain = psMetadataLookupF32(&mdok, recipe, "GAIN"); // CCD gain, e/ADU
    1920    if (isnan(gain)) {
    20         psWarning("CELL.GAIN is not set; reverting to recipe value GAIN.");
    21         gain = psMetadataLookupF32(&mdok, recipe, "GAIN");
     21        gain = psMetadataLookupF32(&mdok, cell->concepts, "CELL.GAIN");
    2222        if (!mdok) {
    23             psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Unable to find GAIN in recipe.");
    24             return false;
     23            psWarning("CELL.GAIN is not set; assuming gain of 1.0.");
     24            gain = 1.0;
    2525        }
    2626    }
  • branches/eam_branches/20091201/ppSim/src/ppSimLoop.c

    r25760 r26374  
    4747        // Add random stars
    4848        if (!ppSimMakeStars (stars, fpa, config, rng)) ESCAPE (PS_ERR_UNKNOWN, "failed to make random stars");
     49
     50        // Add random stars
     51        if (!ppSimMakeStarGrid (stars, fpa, config, rng)) ESCAPE (PS_ERR_UNKNOWN, "failed to make random stars");
    4952
    5053        // Add random galaxies
  • branches/eam_branches/20091201/ppSim/src/ppSimSetPSF.c

    r18011 r26374  
    2020    // ppSimArguments)
    2121    float seeing   = psMetadataLookupF32(&status, recipe, "SEEING"); // Seeing SIGMA (pixels)
     22    float aRatio   = psMetadataLookupF32(&status, recipe, "PSF.ARATIO"); // Seeing SIGMA (pixels)
     23    float theta    = psMetadataLookupF32(&status, recipe, "PSF.THETA"); // Seeing SIGMA (pixels)
    2224
    2325    char *psfModelName = psMetadataLookupStr(&status, recipe, "PSF.MODEL"); // Name of PSF model
     
    5557    // supply the semi-major axis (these are SIGMA values in PIXELS)
    5658    axes.major = seeing;
    57     axes.minor = seeing;
    58     axes.theta = 0.0;
     59    axes.minor = aRatio * seeing;
     60    axes.theta = theta * PS_RAD_DEG;
    5961
    6062    pol = psEllipseAxesToPol (axes);
Note: See TracChangeset for help on using the changeset viewer.