IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4997


Ignore:
Timestamp:
Sep 12, 2005, 10:38:25 AM (21 years ago)
Author:
gusciora
Message:

....

Location:
trunk/psModules/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/pmAstrometry.c

    r4992 r4997  
    88*  @author GLG, MHPCC
    99*
    10 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2005-09-11 22:25:39 $
     10*  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2005-09-12 20:38:25 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4747XXX: Is this the correct way to free metadata?
    4848XXX: Is this the correct way to free database structs?
     49 
     50XXX: The meory dereferencing is not quite right with these functions.  If I
     51call the alloc functions with non-NULL pointers, there will be memory leaks.
    4952 *****************************************************************************/
    50 
    5153static void FPAFree(pmFPA *fpa)
    5254{
     
    120122    tmpReadout->concepts = psMetadataAlloc();
    121123    tmpReadout->parent = cell;
    122 
     124    psMemIncrRefCounter((psPtr) cell);
    123125    if (cell != NULL) {
    124126        cell->readouts = psArrayAdd(cell->readouts, 1, (psPtr) tmpReadout);
     
    141143    tmpCell->readouts = psArrayAlloc(0);
    142144    tmpCell->parent = chip;
     145    psMemIncrRefCounter((psPtr) chip);
    143146    if (chip != NULL) {
    144147        chip->cells = psArrayAdd(chip->cells, 1, (psPtr) tmpCell);
     
    165168    tmpChip->cells = psArrayAlloc(0);
    166169    tmpChip->parent = fpa;
     170    psMemIncrRefCounter((psPtr) fpa);
    167171    if (fpa != NULL) {
    168172        fpa->chips = psArrayAdd(fpa->chips, 1, (psPtr) tmpChip);
     173        psMemIncrRefCounter((psPtr) tmpChip);
    169174    }
    170175    tmpChip->valid = false;
     
    189194    tmpFPA->analysis = psMetadataAlloc();
    190195    tmpFPA->camera = camera;
     196    psMemIncrRefCounter((psPtr) camera);
    191197    tmpFPA->chips = psArrayAlloc(0);
    192198    tmpFPA->header = NULL;
    193199    tmpFPA->db = db;
     200    psMemIncrRefCounter((psPtr) db);
    194201
    195202    psMemSetDeallocator(tmpFPA, (psFreeFunc) FPAFree);
  • trunk/psModules/src/pmFlatField.c

    r4770 r4997  
    1818 *  @author Ross Harman, MHPCC
    1919 *
    20  *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    21  *  @date $Date: 2005-08-16 01:10:34 $
     20 *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     21 *  @date $Date: 2005-09-12 20:38:25 $
    2222 *
    2323 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    7878    // Check input image and its mask are not larger than flat image
    7979
    80     if(inImage->numRows>flatImage->numRows || inImage->numCols>flatImage->numCols) {
     80    if (inImage->numRows>flatImage->numRows || inImage->numCols>flatImage->numCols) {
    8181        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
    8282                 PS_ERRORTEXT_pmFlatField_SIZE_INPUT_IMAGE,
    8383                 inImage->numRows, inImage->numCols, flatImage->numRows, flatImage->numCols);
    8484        return false;
    85     } else if(inMask->numRows>flatImage->numRows || inMask->numCols > flatImage->numCols) {
     85    }
     86    if (inMask->numRows > flatImage->numRows || inMask->numCols > flatImage->numCols) {
    8687        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
    8788                 PS_ERRORTEXT_pmFlatField_SIZE_MASK_IMAGE,
  • trunk/psModules/src/pmSubtractBias.c

    r4770 r4997  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-08-16 01:10:34 $
     8 *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-09-12 20:38:25 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    187187        myPoly = (psPolynomial1D *) fitSpec;
    188188        PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
    189         myPoly = psVectorFitPolynomial1D(myPoly, NULL, overscanVector, NULL);
     189        myPoly = psVectorFitPolynomial1D(myPoly, NULL, 0, overscanVector, NULL, NULL);
    190190        if (myPoly == NULL) {
    191             psError(PS_ERR_UNKNOWN, false, "ScaleOverscanVector(): Could not fit a polynomial to the psVector.\n");
     191            psError(PS_ERR_UNKNOWN, false, "ScaleOverscanVector()(1): Could not fit a polynomial to the psVector.\n");
    192192            return(NULL);
    193193        }
     
    215215        mySpline = psVectorFitSpline1D(mySpline, NULL, overscanVector, NULL);
    216216        if (mySpline == NULL) {
    217             psError(PS_ERR_UNKNOWN, false, "ScaleOverscanVector(): Could not fit a spline to the psVector.\n");
     217            psError(PS_ERR_UNKNOWN, false, "ScaleOverscanVector()(2): Could not fit a spline to the psVector.\n");
    218218            return(NULL);
    219219        }
     
    550550            if (fit == PM_FIT_POLYNOMIAL) {
    551551                myPoly = (psPolynomial1D *) fitSpec;
    552                 myPoly = psVectorFitPolynomial1D(myPoly, NULL, overscanVector, NULL);
     552                myPoly = psVectorFitPolynomial1D(myPoly, NULL, 0, overscanVector, NULL, NULL);
    553553                if (myPoly == NULL) {
    554                     psError(PS_ERR_UNKNOWN, false, "Could not fit a polynomial to overscan vector.  Returning in image.\n");
     554                    psError(PS_ERR_UNKNOWN, false, "(3) Could not fit a polynomial to overscan vector.  Returning in image.\n");
    555555                    psFree(overscanVector);
    556556                    return(in);
Note: See TracChangeset for help on using the changeset viewer.