IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7687


Ignore:
Timestamp:
Jun 24, 2006, 1:13:51 PM (20 years ago)
Author:
eugene
Message:

added photcode support, cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppImagePhotom.c

    r7639 r7687  
    1515    // XXX place this in a psphot library function?
    1616    psMetadataAddStr (recipe, PS_LIST_TAIL, "FITMODE",         PS_META_NO_REPLACE, "default fitting mode", "NONE");
    17     psMetadataAddStr (recipe, PS_LIST_TAIL, "PHOTCODE",        PS_META_NO_REPLACE, "default photcode",     "NONE");
    1817    psMetadataAddStr (recipe, PS_LIST_TAIL, "BREAK_POINT",     PS_META_NO_REPLACE, "default break point",  "NONE");
    1918    psMetadataAddF32 (recipe, PS_LIST_TAIL, "ZERO_PT",         PS_META_NO_REPLACE, "default zero point",    25.00);
     
    3332        pmFPAfile *outfile = pmFPAfileDefineOutput (config, input->fpa, "PSPHOT.OUTPUT");
    3433        outfile->freeLevel = PM_FPA_LEVEL_FPA;
     34    }
     35
     36    // determine PHOTCODE from fpa & view, overwrite in recipe
     37    char *photcode = pmConceptsPhotcodeForView (config, input, view);
     38    if (photcode) {
     39        psMetadataAddStr (recipe, PS_LIST_TAIL, "PHOTCODE", PS_META_REPLACE, "photcode from FPA concepts", photcode);
     40        psFree (photcode);
    3541    }
    3642
     
    6975    // pmFPAfileConstruct (config->files, format, config->camera, "PSPHOT.PSF_SAMPLE");
    7076
     77    // XXX worry about this not having unique PHOTCODES...
    7178    // view->cell = -1;
    7279    // iterate over the cells in the current chip
    7380    while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) {
    74         psLogMsg ("ppImagePhot", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
     81        psLogMsg ("ppImagePhotom", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
    7582        if (! cell->process || ! cell->file_exists) { continue; }
    7683
     
    8188            // run the actual photometry analysis
    8289            psphotReadout (config, view);
    83             fprintf (stderr, "psphot done\n");
    8490        }
    8591    }
    8692    return true;
    8793}
    88 
    89     // we only want to operate on PSPHOT pmFPAfiles here:
    90     // XXX is this necessary?  why invoke I/O during this function?
    91     // the psphot constructed files, if chosen, will be saved at the chip level
    92     // in the next call outside of this function.
    93     // XXX there could be an issue if those files are set for 'cell' or 'readout'
    94     // pmFPAfileActivate (config->files, false, NULL);
    95     // pmFPAfileActivate (config->files, true, "PSPHOT.INPUT");
    96     // pmFPAfileActivate (config->files, true, "PSPHOT.RESID");
    97     // pmFPAfileActivate (config->files, true, "PSPHOT.OUTPUT");
    98     // pmFPAfileActivate (config->files, true, "PSPHOT.BACKSUB");
    99     // pmFPAfileActivate (config->files, true, "PSPHOT.BACKGND");
    100     // pmFPAfileActivate (config->files, true, "PSPHOT.BACKMDL");
    101 
    102 
    103 
    104     // de-activate the PSPHOT image files, activate the PPIMAGE ones
    105     # if 0
    106     pmFPAfileActivate (config->files, false, NULL);
    107     pmFPAfileActivate (config->files, true, "PPIMAGE.INPUT");
    108     pmFPAfileActivate (config->files, true, "PPIMAGE.BIAS");
    109     pmFPAfileActivate (config->files, true, "PPIMAGE.DARK");
    110     pmFPAfileActivate (config->files, true, "PPIMAGE.MASK");
    111     pmFPAfileActivate (config->files, true, "PPIMAGE.FLAT");
    112     pmFPAfileActivate (config->files, true, "PPIMAGE.OUTPUT");
    113     pmFPAfileActivate (config->files, true, "PPIMAGE.BIN1");
    114     pmFPAfileActivate (config->files, true, "PPIMAGE.JPEG1");
    115     pmFPAfileActivate (config->files, true, "PPIMAGE.BIN2");
    116     pmFPAfileActivate (config->files, true, "PPIMAGE.JPEG2");
    117     # endif
    118 
Note: See TracChangeset for help on using the changeset viewer.