IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 29, 2006, 11:00:41 AM (20 years ago)
Author:
Paul Price
Message:

Instead of doing open/close each time we want to read (which is really expensive), we hold an array of file pointers. This should make for a significant boost in speed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppMerge/src/ppMergeScaleZero.c

    r7355 r7759  
    176176        }
    177177        psTrace(__func__, 9, "Opening %s to get background...\n", name);
    178         psFits *inFile = psFitsOpen(filenames->data[i], "r"); // The FITS file to read
    179         if (!inFile) {
    180             psLogMsg(__func__, PS_LOG_WARN, "Unable to open input file %s --- ignored.\n", name);
    181             status = false;
    182             continue;
    183         }
    184 
     178        psFits *inFile = data->files->data[i]; // The FITS file to read
    185179        pmFPA *fpa = data->in->data[i]; // The FPA for this input
    186180        int cellNum = -1;               // Number of the cell
     
    282276        }
    283277        pmFPAFreeData(fpa);
    284         psFitsClose(inFile);
    285278    }
    286279    psFree(bgStats);
Note: See TracChangeset for help on using the changeset viewer.