Changeset 4997
- Timestamp:
- Sep 12, 2005, 10:38:25 AM (21 years ago)
- Location:
- trunk/psModules/src
- Files:
-
- 3 edited
-
pmAstrometry.c (modified) (6 diffs)
-
pmFlatField.c (modified) (2 diffs)
-
pmSubtractBias.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/pmAstrometry.c
r4992 r4997 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-09-1 1 22:25:39$10 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-09-12 20:38:25 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 47 47 XXX: Is this the correct way to free metadata? 48 48 XXX: Is this the correct way to free database structs? 49 50 XXX: The meory dereferencing is not quite right with these functions. If I 51 call the alloc functions with non-NULL pointers, there will be memory leaks. 49 52 *****************************************************************************/ 50 51 53 static void FPAFree(pmFPA *fpa) 52 54 { … … 120 122 tmpReadout->concepts = psMetadataAlloc(); 121 123 tmpReadout->parent = cell; 122 124 psMemIncrRefCounter((psPtr) cell); 123 125 if (cell != NULL) { 124 126 cell->readouts = psArrayAdd(cell->readouts, 1, (psPtr) tmpReadout); … … 141 143 tmpCell->readouts = psArrayAlloc(0); 142 144 tmpCell->parent = chip; 145 psMemIncrRefCounter((psPtr) chip); 143 146 if (chip != NULL) { 144 147 chip->cells = psArrayAdd(chip->cells, 1, (psPtr) tmpCell); … … 165 168 tmpChip->cells = psArrayAlloc(0); 166 169 tmpChip->parent = fpa; 170 psMemIncrRefCounter((psPtr) fpa); 167 171 if (fpa != NULL) { 168 172 fpa->chips = psArrayAdd(fpa->chips, 1, (psPtr) tmpChip); 173 psMemIncrRefCounter((psPtr) tmpChip); 169 174 } 170 175 tmpChip->valid = false; … … 189 194 tmpFPA->analysis = psMetadataAlloc(); 190 195 tmpFPA->camera = camera; 196 psMemIncrRefCounter((psPtr) camera); 191 197 tmpFPA->chips = psArrayAlloc(0); 192 198 tmpFPA->header = NULL; 193 199 tmpFPA->db = db; 200 psMemIncrRefCounter((psPtr) db); 194 201 195 202 psMemSetDeallocator(tmpFPA, (psFreeFunc) FPAFree); -
trunk/psModules/src/pmFlatField.c
r4770 r4997 18 18 * @author Ross Harman, MHPCC 19 19 * 20 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $21 * @date $Date: 2005-0 8-16 01:10:34$20 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 21 * @date $Date: 2005-09-12 20:38:25 $ 22 22 * 23 23 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 78 78 // Check input image and its mask are not larger than flat image 79 79 80 if (inImage->numRows>flatImage->numRows || inImage->numCols>flatImage->numCols) {80 if (inImage->numRows>flatImage->numRows || inImage->numCols>flatImage->numCols) { 81 81 psError( PS_ERR_BAD_PARAMETER_SIZE, true, 82 82 PS_ERRORTEXT_pmFlatField_SIZE_INPUT_IMAGE, 83 83 inImage->numRows, inImage->numCols, flatImage->numRows, flatImage->numCols); 84 84 return false; 85 } else if(inMask->numRows>flatImage->numRows || inMask->numCols > flatImage->numCols) { 85 } 86 if (inMask->numRows > flatImage->numRows || inMask->numCols > flatImage->numCols) { 86 87 psError( PS_ERR_BAD_PARAMETER_SIZE, true, 87 88 PS_ERRORTEXT_pmFlatField_SIZE_MASK_IMAGE, -
trunk/psModules/src/pmSubtractBias.c
r4770 r4997 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1.3 6$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-0 8-16 01:10:34$8 * @version $Revision: 1.37 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-09-12 20:38:25 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 187 187 myPoly = (psPolynomial1D *) fitSpec; 188 188 PS_ASSERT_POLY_NON_NULL(myPoly, NULL); 189 myPoly = psVectorFitPolynomial1D(myPoly, NULL, overscanVector, NULL);189 myPoly = psVectorFitPolynomial1D(myPoly, NULL, 0, overscanVector, NULL, NULL); 190 190 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"); 192 192 return(NULL); 193 193 } … … 215 215 mySpline = psVectorFitSpline1D(mySpline, NULL, overscanVector, NULL); 216 216 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"); 218 218 return(NULL); 219 219 } … … 550 550 if (fit == PM_FIT_POLYNOMIAL) { 551 551 myPoly = (psPolynomial1D *) fitSpec; 552 myPoly = psVectorFitPolynomial1D(myPoly, NULL, overscanVector, NULL);552 myPoly = psVectorFitPolynomial1D(myPoly, NULL, 0, overscanVector, NULL, NULL); 553 553 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"); 555 555 psFree(overscanVector); 556 556 return(in);
Note:
See TracChangeset
for help on using the changeset viewer.
