IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17569


Ignore:
Timestamp:
May 7, 2008, 2:05:37 PM (18 years ago)
Author:
Paul Price
Message:

List of files did not contain PSPHOT.RESID, which points to
PSWARP.OUTPUT. Since the list of files didn't contain it, it was
turned on, and was being iterated over, and the readout in
PSWARP.OUTPUT was being freed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpLoop.c

    r17554 r17569  
    88static char *detectorFiles[] = { "PSWARP.INPUT", "PSWARP.MASK", "PSWARP.WEIGHT", NULL };
    99static char *skycellFiles[] = { "PSWARP.OUTPUT", "PSWARP.OUTPUT.MASK", "PSWARP.OUTPUT.WEIGHT",
    10                                 "PSPHOT.OUTPUT", "PSPHOT.BACKMDL", "PSPHOT.BACKMDL.STDEV", "PSPHOT.BACKGND",
    11                                 "PSPHOT.BACKSUB", "PSPHOT.PSF.SAVE", "SOURCE.PLOT.MOMENTS",
     10                                "PSPHOT.OUTPUT", "PSPHOT.RESID", "PSPHOT.BACKMDL", "PSPHOT.BACKMDL.STDEV",
     11                                "PSPHOT.BACKGND", "PSPHOT.BACKSUB", "PSPHOT.PSF.SAVE", "SOURCE.PLOT.MOMENTS",
    1212                                "SOURCE.PLOT.PSFMODEL", "SOURCE.PLOT.APRESID", NULL };
    1313static char *independentFiles[] = { "PSWARP.ASTROM", // Read independently from the input pixels
     
    2727    }
    2828    return;
     29}
     30
     31// Run down the FPA hierarchy, checking files
     32static bool ioChecksBefore(pmConfig *config // Configuration
     33                           )
     34{
     35    pmFPAview *view = pmFPAviewAlloc(0); // View for checking
     36    bool status = true;                 // Status of checks
     37    status &= pmFPAfileIOChecks(config, view, PM_FPA_BEFORE);
     38    view->chip = 0;
     39    status &= pmFPAfileIOChecks(config, view, PM_FPA_BEFORE);
     40    view->cell = 0;
     41    status &= pmFPAfileIOChecks(config, view, PM_FPA_BEFORE);
     42    psFree(view);
     43    return status;
     44}
     45
     46// Run up the FPA hierarchy, checking files
     47static bool ioChecksAfter(pmConfig *config // Configuration
     48                          )
     49{
     50    pmFPAview *view = pmFPAviewAlloc(0); // View for checking
     51    view->chip = view->cell = 0;
     52    bool status = true;                 // Status of checks
     53    status &= pmFPAfileIOChecks(config, view, PM_FPA_AFTER);
     54    view->cell = -1;
     55    status &= pmFPAfileIOChecks(config, view, PM_FPA_AFTER);
     56    view->chip = -1;
     57    status &= pmFPAfileIOChecks(config, view, PM_FPA_AFTER);
     58    psFree(view);
     59    return status;
    2960}
    3061
     
    89120        fileActivation(config, independentFiles, false);
    90121        fileActivation(config, skycellFiles, true);
    91 
    92         pmFPAview *view = pmFPAviewAlloc(0);
    93         pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
    94         // They should all be defined at the FPA level, so that should be enough
    95         psFree(view);
    96 
     122        ioChecksBefore(config);
    97123        fileActivation(config, skycellFiles, false);
    98124    }
    99 
    100125
    101126    // Read the input astrometry
     
    317342    psFree(md5string);
    318343    psFree(headerName);
     344    psFree(view);
    319345
    320346    // Ensure everything is written out, at every level
    321     view->chip = view->cell = view->readout = 0;
    322     pmFPAfileIOChecks(config, view, PM_FPA_AFTER);
    323     view->readout = -1;
    324     pmFPAfileIOChecks(config, view, PM_FPA_AFTER);
    325     view->cell = -1;
    326     pmFPAfileIOChecks(config, view, PM_FPA_AFTER);
    327     view->chip = -1;
    328     pmFPAfileIOChecks(config, view, PM_FPA_AFTER);
    329     psFree(view);
     347    ioChecksAfter(config);
     348
    330349    // Now done with the skycell side of things
    331350
Note: See TracChangeset for help on using the changeset viewer.