IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24649


Ignore:
Timestamp:
Jul 2, 2009, 3:40:49 PM (17 years ago)
Author:
eugene
Message:

add option to return GHOST_MAX_MAG in psastroZeroPointFromRecipe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroZeroPoint.c

    r23989 r24649  
    5050
    5151    // really error-out here?  or just skip?
    52     if (!psastroZeroPointFromRecipe (&zeropt, &exptime, fpa, recipe)) {
     52    if (!psastroZeroPointFromRecipe (&zeropt, &exptime, NULL, fpa, recipe)) {
    5353        psLogMsg ("psastro", PS_LOG_INFO, "failed to load zeropt data from recipe");
    5454        return false;
     
    148148  return false; }
    149149
    150 bool psastroZeroPointFromRecipe (float *zeropt, float *exptime, pmFPA *fpa, psMetadata *recipe) {
     150bool psastroZeroPointFromRecipe (float *zeropt, float *exptime, float *ghostMaxMag, pmFPA *fpa, psMetadata *recipe) {
    151151
    152152    bool status;
     
    173173        char *refFilter = psMetadataLookupStr (&status, refItem->data.md, "FILTER");
    174174        if (!status) {
    175             psLogMsg ("psastro", PS_LOG_INFO, "a PHOTCODE.DATA recipe folder is missing FILTER");
     175            // psLogMsg ("psastro", PS_LOG_INFO, "a PHOTCODE.DATA recipe folder is missing FILTER");
    176176            continue;
    177177        }
     
    184184        *zeropt = psMetadataLookupF32 (&status, refItem->data.md, "ZEROPT");
    185185        if (!status) {
    186             psLogMsg ("psastro", PS_LOG_INFO, "a PHOTCODE.DATA recipe folder is missing FILTER");
     186            psLogMsg ("psastro", PS_LOG_INFO, "a PHOTCODE.DATA recipe folder is missing ZEROPT");
    187187            continue;
     188        }
     189        if (ghostMaxMag) {
     190            *ghostMaxMag = psMetadataLookupF32 (&status, refItem->data.md, "GHOST_MAX_MAG");
     191            if (!status) {
     192                psLogMsg ("psastro", PS_LOG_INFO, "a PHOTCODE.DATA recipe folder is missing GHOST_MAX_MAG");
     193                continue;
     194            }
    188195        }
    189196        psFree (iter);
Note: See TracChangeset for help on using the changeset viewer.