IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 28, 2009, 1:36:37 PM (18 years ago)
Author:
beaumont
Message:

Added QA plots to ppSub. Migrated psastro QA plots to psModules/extras.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branch_20090113/psastro/src/psastroLoadRefstars.c

    r20805 r21208  
    138138    }
    139139
    140     psastroVisualPlotRefStars (refstars, recipe);
     140    pmAstromVisualPlotRefStars (refstars, recipe);
    141141
    142142    if (psTraceGetLevel("psastro.plot") > 0) {
     
    239239    pmFPAfile *input = psMetadataLookupPtr (NULL, config->files, "PSASTRO.INPUT");
    240240    if (!input) {
    241         psLogMsg ("psastro", PS_LOG_DETAIL, "no supplied reference header data");
    242         photcode = psStringCopy ("NONE");
    243         return photcode;
     241        psLogMsg ("psastro", PS_LOG_DETAIL, "no supplied reference header data");
     242        photcode = psStringCopy ("NONE");
     243        return photcode;
    244244    }
    245245    assert (input->fpa);
     
    247247    *maxRho = psMetadataLookupF32(&status, recipe, "DVO.GETSTAR.MAX.RHO");
    248248    if (!status) {
    249         psError(PSASTRO_ERR_CONFIG, false, "DVO.GETSTAR.MAX.RHO missing from recipe");
    250         return NULL;
     249        psError(PSASTRO_ERR_CONFIG, false, "DVO.GETSTAR.MAX.RHO missing from recipe");
     250        return NULL;
    251251    }
    252252
     
    266266    if (!status) ESCAPE ("missing DVO.GETSTAR.MIN.MAG.INST");
    267267
    268     // PHOTCODE.DATA is a multi of metadata items 
     268    // PHOTCODE.DATA is a multi of metadata items
    269269    psListIterator *iter = psListIteratorAlloc(item->data.list, PS_LIST_HEAD, false);
    270270
    271271    psMetadataItem *refItem = NULL;
    272272    while ((refItem = psListGetAndIncrement (iter))) {
    273         if (refItem->type != PS_DATA_METADATA) ESCAPE ("PHOTCODE.DATA entry is not a metadata folder");
    274    
    275         char *refFilter = psMetadataLookupStr (&status, refItem->data.md, "FILTER");
    276         if (!status) {
    277             psLogMsg ("psastro", PS_LOG_INFO, "a PHOTCODE.DATA recipe folder is missing FILTER");
    278             continue;
    279         }
    280 
    281         // does this entry match the current filter?
    282         if (strcmp (refFilter, filter)) continue;
    283 
    284         psLogMsg ("psastro", PS_LOG_DETAIL, "PHOTCODE.DATA found for filter %s", filter);
    285 
    286         float zeropt = psMetadataLookupF32 (&status, refItem->data.md, "ZEROPT");
    287         if (!status) {
    288             psLogMsg ("psastro", PS_LOG_INFO, "a PHOTCODE.DATA recipe folder is missing FILTER");
    289             continue;
    290         }
    291         photcode = psMetadataLookupStr (&status, refItem->data.md, "PHOTCODE");
    292         if (!status) {
    293             psLogMsg ("psastro", PS_LOG_INFO, "a PHOTCODE.DATA recipe folder is missing FILTER");
    294             continue;
    295         }
    296 
    297         // convert the minInst to a calibrated minimum magnitude
    298         *minMag = minInst + 2.5*log10(exptime) + zeropt;
    299 
    300         psFree (iter);
    301         return photcode;
    302     }   
     273        if (refItem->type != PS_DATA_METADATA) ESCAPE ("PHOTCODE.DATA entry is not a metadata folder");
     274
     275        char *refFilter = psMetadataLookupStr (&status, refItem->data.md, "FILTER");
     276        if (!status) {
     277            psLogMsg ("psastro", PS_LOG_INFO, "a PHOTCODE.DATA recipe folder is missing FILTER");
     278            continue;
     279        }
     280
     281        // does this entry match the current filter?
     282        if (strcmp (refFilter, filter)) continue;
     283
     284        psLogMsg ("psastro", PS_LOG_DETAIL, "PHOTCODE.DATA found for filter %s", filter);
     285
     286        float zeropt = psMetadataLookupF32 (&status, refItem->data.md, "ZEROPT");
     287        if (!status) {
     288            psLogMsg ("psastro", PS_LOG_INFO, "a PHOTCODE.DATA recipe folder is missing FILTER");
     289            continue;
     290        }
     291        photcode = psMetadataLookupStr (&status, refItem->data.md, "PHOTCODE");
     292        if (!status) {
     293            psLogMsg ("psastro", PS_LOG_INFO, "a PHOTCODE.DATA recipe folder is missing FILTER");
     294            continue;
     295        }
     296
     297        // convert the minInst to a calibrated minimum magnitude
     298        *minMag = minInst + 2.5*log10(exptime) + zeropt;
     299
     300        psFree (iter);
     301        return photcode;
     302    }
    303303    psFree (iter);
    304304
     
    306306    photcode = psMetadataLookupStr(NULL, recipe, "DVO.GETSTAR.PHOTCODE");
    307307    PS_ASSERT (photcode, NULL);
    308        
     308
    309309    // give up and use fixed value
    310310    *minMag = psMetadataLookupF32(NULL, recipe, "DVO.GETSTAR.MIN.MAG");
Note: See TracChangeset for help on using the changeset viewer.