IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35846 for trunk/ppImage


Ignore:
Timestamp:
Jul 22, 2013, 12:21:11 PM (13 years ago)
Author:
watersc1
Message:

Speed improvements for the chip stage. Disable CROSSTALK.MEASURE for gpc1 (it's not used). Wrap ppImageRebinChip calls so that they are only performed when we need the rebinned images.

File:
1 edited

Legend:

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

    r35533 r35846  
    4141        ESCAPE("load failure for FPA");
    4242    }
    43    
     43
    4444    pmChip *chip;                       // Chip from FPA
    4545    while ((chip = pmFPAviewNextChip(view, input->fpa, 1)) != NULL) {
     
    134134                    ESCAPE("Unable to degrade MD image to 3pi");
    135135                }
     136
    136137            }
    137138
     
    156157                ESCAPE("Unable to free detrend images");
    157158            }
     159
    158160        }
    159161        // free detrend images potentially in use: MASK, BIAS, DARK, SHUTTER, FLAT
     
    168170            }
    169171        }
     172
    170173        // free detrend images potentially in use: MASK, BIAS, DARK, SHUTTER, FLAT
    171174        if (!ppImageFringeFree (config, view)) {
     
    218221          }
    219222        }
    220        
     223
    221224        // these may be used by ppImageSubtractBackground.
    222225        // if these are defined as internal files, drop them here
     
    232235
    233236        // binning (used for display) must take place after the background is replaced, if desired
    234         if (!ppImageRebinChip(config, view, options, "PPIMAGE.BIN1")) {
     237        if ((options->Bin1FITS)||(options->Bin1JPEG)||(options->FPA1FITS)) {
     238          if (!ppImageRebinChip(config, view, options, "PPIMAGE.BIN1")) {
    235239            ESCAPE("Unable to bin chip (level 1).");
    236         }
    237         if (!ppImageRebinChip(config, view, options, "PPIMAGE.BIN2")) {
     240          }
     241        }
     242        if ((options->Bin2FITS)||(options->Bin2JPEG)||(options->FPA2FITS)) {
     243          if (!ppImageRebinChip(config, view, options, "PPIMAGE.BIN2")) {
    238244            ESCAPE("Unable to bin chip (level 2).");
    239         }
     245          }
     246        }
     247
    240248        if (options->doBackgroundContinuity) {
    241249          pmFPAfile *out = psMetadataLookupPtr(NULL, config->files, "PPIMAGE.BACKMDL");
    242250          pmFPAfileCopyView(out->fpa,out->src,view);
    243251        }
     252
    244253        // Close cells (XXX shouldn't pmFPAfileClose iterate down as needed?)
    245254        view->cell = -1;
     
    263272      ESCAPE("failure in Background Mosaic");
    264273    }
    265    
     274
    266275    // generate the full-scale FPA mosaic
    267     if (!ppImageMosaicFPA(config, options, "PPIMAGE.OUTPUT.FPA1", "PPIMAGE.BIN1")) {
     276    if (options->FPA1FITS) {
     277      if (!ppImageMosaicFPA(config, options, "PPIMAGE.OUTPUT.FPA1", "PPIMAGE.BIN1")) {
    268278        ESCAPE("failure in FPA Mosaic (level 1)");
    269     }
    270     if (!ppImageMosaicFPA(config, options, "PPIMAGE.OUTPUT.FPA2", "PPIMAGE.BIN2")) {
     279      }
     280    }
     281    if (options->FPA2FITS) {
     282      if (!ppImageMosaicFPA(config, options, "PPIMAGE.OUTPUT.FPA2", "PPIMAGE.BIN2")) {
    271283        ESCAPE("failure in FPA Mosaic (level 2)");
     284      }
    272285    }
    273286
     
    283296        ppImageFileCheck(config);
    284297    }
    285    
     298
    286299    // Calculate summary statistics from FPA Metadata
    287300    if (!ppImageMetadataStats(config, stats, options)) {
Note: See TracChangeset for help on using the changeset viewer.