IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

add an option for a grid of stars

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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    }
Note: See TracChangeset for help on using the changeset viewer.