IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 17, 2009, 12:08:50 PM (17 years ago)
Author:
beaumont
Message:

merged with head

Location:
branches/cnb_branches/cnb_branch_20090301
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branches/cnb_branch_20090301

  • branches/cnb_branches/cnb_branch_20090301/ppImage

  • branches/cnb_branches/cnb_branch_20090301/ppImage/src/ppImageLoop.c

    r21183 r23352  
    2525    }
    2626
    27     psString dump_file = psMetadataLookupStr(&status, config->arguments, "DUMP_CONFIG");
    28     if (dump_file) {
    29         pmConfigCamerasCull(config, NULL);
    30         pmConfigRecipesCull(config, "PPIMAGE,PPSTATS,PSPHOT,MASKS,PSASTRO");
    31 
    32         pmConfigDump(config, input->fpa, dump_file);
    33     }
     27    pmConfigCamerasCull(config, NULL);
     28    pmConfigRecipesCull(config, "PPIMAGE,PPSTATS,PSPHOT,MASKS,PSASTRO,JPEG");
    3429
    3530    pmFPAview *view = pmFPAviewAlloc(0);// View for level of interest
     
    6358
    6459            // Put version information into the header
    65             pmHDU *hdu = pmHDUFromCell(cell);
     60            pmHDU *hdu = pmHDUGetHighest(input->fpa, chip, cell);
    6661            if (hdu && hdu != lastHDU) {
    67                 ppImageVersionMetadata(hdu->header);
     62                ppImageVersionHeader(hdu->header);
    6863                lastHDU = hdu;
    6964            }
     
    9691                }
    9792
    98                 // free detrend images potentially in use: MASK, BIAS, DARK, SHUTTER, FLAT
    99                 if (!ppImageDetrendFree (config, view)) {
    100                     ESCAPE("Unable to free detrend images");
    101                 }
     93                // free detrend images potentially in use: MASK, BIAS, DARK, SHUTTER, FLAT
     94                if (!ppImageDetrendFree (config, view)) {
     95                    ESCAPE("Unable to free detrend images");
     96                }
    10297            }
    10398
     
    105100                ppImageDetrendRecord(cell, config, options, view);
    106101            }
    107             // free detrend images potentially in use: MASK, BIAS, DARK, SHUTTER, FLAT
    108             if (!ppImageDetrendFree (config, view)) {
    109                 ESCAPE("Unable to free detrend images");
    110             }
    111         }
    112         // free detrend images potentially in use: MASK, BIAS, DARK, SHUTTER, FLAT
    113         if (!ppImageDetrendFree (config, view)) {
    114             ESCAPE("Unable to free detrend images");
    115         }
     102            // free detrend images potentially in use: MASK, BIAS, DARK, SHUTTER, FLAT
     103            if (!ppImageDetrendFree (config, view)) {
     104                ESCAPE("Unable to free detrend images");
     105            }
     106        }
     107        // free detrend images potentially in use: MASK, BIAS, DARK, SHUTTER, FLAT
     108        if (!ppImageDetrendFree (config, view)) {
     109            ESCAPE("Unable to free detrend images");
     110        }
    116111
    117112        // Apply the fringe correction
     
    121116            }
    122117        }
    123         // free detrend images potentially in use: MASK, BIAS, DARK, SHUTTER, FLAT
    124         if (!ppImageFringeFree (config, view)) {
    125             ESCAPE("Unable to free fringe images");
    126         }
     118        // free detrend images potentially in use: MASK, BIAS, DARK, SHUTTER, FLAT
     119        if (!ppImageFringeFree (config, view)) {
     120            ESCAPE("Unable to free fringe images");
     121        }
    127122
    128123        // measure various pixel-based statistics for this image
     
    152147        }
    153148
    154         // these may be used by ppImageSubtractBackground.
    155         // if these are defined as internal files, drop them here
    156         status = true;
    157         status &= pmFPAfileDropInternal (config->files, "PSPHOT.BACKMDL");
    158         status &= pmFPAfileDropInternal (config->files, "PSPHOT.BACKMDL.STDEV");
    159         status &= pmFPAfileDropInternal (config->files, "PSPHOT.BACKGND");
    160         if (!status) {
    161             psError(PSPHOT_ERR_PROG, false, "trouble dropping internal files");
    162             psFree (view);
    163             return false;
    164         }
     149        // these may be used by ppImageSubtractBackground.
     150        // if these are defined as internal files, drop them here
     151        status = true;
     152        status &= pmFPAfileDropInternal (config->files, "PSPHOT.BACKMDL");
     153        status &= pmFPAfileDropInternal (config->files, "PSPHOT.BACKMDL.STDEV");
     154        status &= pmFPAfileDropInternal (config->files, "PSPHOT.BACKGND");
     155        if (!status) {
     156            psError(PSPHOT_ERR_PROG, false, "trouble dropping internal files");
     157            psFree (view);
     158            return false;
     159        }
    165160
    166161        // binning (used for display) must take place after the background is replaced, if desired
     
    219214    }
    220215    psFree(view);
     216
     217    // Dump configuration
     218    psString dump_file = psMetadataLookupStr(&status, config->arguments, "DUMP_CONFIG");
     219    if (dump_file) {
     220        pmConfigDump(config, input->fpa, dump_file);
     221    }
    221222
    222223    // Write out summary statistics
Note: See TracChangeset for help on using the changeset viewer.