IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11382


Ignore:
Timestamp:
Jan 29, 2007, 12:37:04 PM (19 years ago)
Author:
eugene
Message:

added psphotAddPhotcode

Location:
trunk/psphot/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphot.h

    r11263 r11382  
    6767
    6868// output functions
     69bool            psphotAddPhotcode (psMetadata *recipe, pmConfig *config, pmFPAview *view);
    6970bool            psphotDumpMoments (psMetadata *recipe, psArray *sources);
    7071psMetadata     *psphotDefineHeader (psMetadata *recipe);
  • trunk/psphot/src/psphotOutput.c

    r11313 r11382  
    7373    }
    7474    fclose (f);
     75    return true;
     76}
     77
     78bool psphotAddPhotcode (psMetadata *recipe, pmConfig *config, pmFPAview *view) {
     79
     80    bool status;
     81
     82    pmFPAfile *input = psMetadataLookupPtr (&status, config->files, "PSPHOT.INPUT");
     83    assert (status);
     84
     85    // determine PHOTCODE from fpa & view, overwrite in recipe
     86    // XXX test this:
     87    char *photcode = pmConceptsPhotcodeForView (config, input, view);
     88    assert (photcode);
     89
     90    psMetadataAddStr (recipe, PS_LIST_TAIL, "PHOTCODE", PS_META_REPLACE, "photcode from FPA concepts", photcode);
     91    psLogMsg ("psphot", 3, "PHOTCODE is %s", photcode);
     92
     93    psFree (photcode);
    7594    return true;
    7695}
  • trunk/psphot/src/psphotReadout.c

    r11263 r11382  
    2121    if (!pmReadoutGenerateMaskWeight (readout, true)) {
    2222        psError (PSPHOT_ERR_CONFIG, false, "trouble creating mask and/or weight");
     23        return false;
     24    }
     25
     26    // set the photcode for this image
     27    if (!psphotAddPhotcode (recipe, config, view)) {
     28        psError (PSPHOT_ERR_CONFIG, false, "trouble defining the photcode");
    2329        return false;
    2430    }
Note: See TracChangeset for help on using the changeset viewer.