IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 28, 2006, 2:26:49 PM (20 years ago)
Author:
eugene
Message:

adding ppFocus elements

File:
1 edited

Legend:

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

    r7706 r7738  
    2525    }
    2626   
    27    
    28    
    29 
    30     // Image Arithmetic Loop
    31     if (!ppImageLoop(config, options)) {
    32         psErrorStackPrint(stderr, "");
     27    // we search the argument data for the named fileset (argname)
     28    psArray *infiles = psMetadataLookupPtr(NULL, config->arguments, "INPUT");
     29    if (!infiles) {
     30        psTrace("pmFPAfile", 5, "Failed to find INPUT in argument list");
    3331        exit(1);
    3432    }
    3533
    36     psLogMsg ("ppImage", 3, "complete ppImage run: %f sec\n", psTimerMark (TIMERNAME));
     34    // allocate vectors for analysis
     35    psVector *focus = psVectorAlloc (infiles->n, PS_TYPE_F32);
     36    psVector *fwhm = psVectorAlloc (infiles->n, PS_TYPE_F32);
     37
     38    for (int i = 0; i < infiles->n; i++) {
     39
     40        // Image Arithmetic Loop
     41        if (!ppImageLoop(config, options)) {
     42            psErrorStackPrint(stderr, "");
     43            exit(1);
     44        }
     45       
     46        // determine FWHM at reference location in image
     47        // (also removes PPIMAGE.INPUT from config->files)
     48        ppFocusGetFWHM (config, focus, fwhm);
     49
     50        // silently ignore failure for (i == infiles->n)
     51        pmFPAfileDefineSingleFromArgs (NULL, config, "PPIMAGE.INPUT", "INPUT", i+1);
     52    }
     53
     54    ppFocusFitFWHM (config, focus, fwhm);
     55
     56    psLogMsg ("ppFocus", 3, "complete ppFocus run: %f sec\n", psTimerMark (TIMERNAME));
    3757
    3858    // Cleaning up
     
    4464// - the input list is a set of independent images (not multiple files for a single image)
    4565// - each pass to ppImageLoop performs the analysis on a different pmFPAfile
    46 // -
     66// - after each ppImageLoop, grap the input pmFPAfile and extract the FWHM stats
Note: See TracChangeset for help on using the changeset viewer.