IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 7, 2008, 10:55:21 AM (18 years ago)
Author:
eugene
Message:

fix errors with star density normalizations and flux consistency

File:
1 edited

Legend:

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

    r14798 r17557  
    88                     pmCell *cell)
    99{
     10    bool mdok;
    1011
    11     float ra0 = psMetadataLookupF32(NULL, config->arguments, "RA"); // Boresight RA (radians)
    12     float dec0 = psMetadataLookupF32(NULL, config->arguments, "DEC"); // Boresight Dec (radians)
    13     float pa = psMetadataLookupF32(NULL, config->arguments, "PA"); // Position angle (radians)
    14     float scale = psMetadataLookupF32(NULL, config->arguments, "SCALE"); // plate scale in arcsec / pixel
     12    psMetadata *recipe = psMetadataLookupMetadata(&mdok, config->recipes, PPSIM_RECIPE); // Recipe
     13
     14    float ra0   = psMetadataLookupF32(NULL, recipe, "RA");  // Boresight RA (radians)
     15    float dec0  = psMetadataLookupF32(NULL, recipe, "DEC"); // Boresight Dec (radians)
     16    float pa    = psMetadataLookupF32(NULL, recipe, "PA");  // Position angle (radians)
     17    float scale = psMetadataLookupF32(NULL, recipe, "SCALE"); // plate scale in arcsec / pixel
    1518    scale *= M_PI / 3600.0 / 180.0; // convert plate scale to radians/pixel
    1619
     
    9497bool ppSimUpdateConceptsFPA (pmFPA *fpa, pmConfig *config) {
    9598
    96     float expTime = psMetadataLookupF32(NULL, config->arguments, "EXPTIME"); // Exposure time
     99    bool mdok;
     100
     101    psMetadata *recipe = psMetadataLookupMetadata(&mdok, config->recipes, PPSIM_RECIPE); // Recipe
     102
     103    float expTime = psMetadataLookupF32(NULL, recipe, "EXPTIME"); // Exposure time
    97104
    98105    const char *filter = psMetadataLookupStr(NULL, config->arguments, "FILTER"); // Filter name
     
    128135bool ppSimUpdateConceptsCell (pmCell *cell, pmConfig *config) {
    129136
     137    bool mdok;
     138
     139    psMetadata *recipe = psMetadataLookupMetadata(&mdok, config->recipes, PPSIM_RECIPE); // Recipe
     140
    130141    int binning = psMetadataLookupS32(NULL, config->arguments, "BINNING"); // Binning in x and y
    131     float expTime = psMetadataLookupF32(NULL, config->arguments, "EXPTIME"); // Exposure time
     142    float expTime = psMetadataLookupF32(NULL, recipe, "EXPTIME"); // Exposure time
    132143
    133144    psMetadataAddF32(cell->concepts, PS_LIST_TAIL, "CELL.EXPOSURE", PS_META_REPLACE,
Note: See TracChangeset for help on using the changeset viewer.