Changeset 6511 for trunk/psModules/src/imsubtract
- Timestamp:
- Mar 3, 2006, 3:01:34 PM (20 years ago)
- Location:
- trunk/psModules/src/imsubtract
- Files:
-
- 3 edited
-
pmImageSubtract.c (modified) (9 diffs)
-
pmSubtractBias.c (modified) (12 diffs)
-
pmSubtractSky.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imsubtract/pmImageSubtract.c
r5170 r6511 7 7 * @author GLG, MHPCC 8 8 * 9 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $10 * @date $Date: 200 5-09-28 20:43:52$9 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-03-04 01:01:33 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 119 119 tmp->u = psVectorAlloc(nBF, PS_TYPE_F32); 120 120 tmp->v = psVectorAlloc(nBF, PS_TYPE_F32); 121 tmp->u->n = tmp->u->nalloc; 122 tmp->v->n = tmp->v->nalloc; 121 123 tmp->sigma = NULL; 122 124 tmp->xOrder = psVectorAlloc(nBF, PS_TYPE_F32); 125 tmp->xOrder->n = tmp->xOrder->nalloc; 123 126 tmp->yOrder = psVectorAlloc(nBF, PS_TYPE_F32); 127 tmp->yOrder->n = tmp->yOrder->nalloc; 124 128 tmp->subIndex = 0; 125 129 tmp->preCalc = NULL; … … 216 220 tmp->u = psVectorAlloc(nBF, PS_TYPE_F32); 217 221 tmp->v = psVectorAlloc(nBF, PS_TYPE_F32); 222 tmp->u->n = tmp->u->nalloc; 223 tmp->v->n = tmp->v->nalloc; 218 224 tmp->sigma = psVectorAlloc(nBF, PS_TYPE_F32); 219 225 tmp->xOrder = psVectorAlloc(nBF, PS_TYPE_F32); … … 223 229 tmp->spatialOrder = spatialOrder; 224 230 tmp->preCalc = psArrayAlloc(nBF); 231 tmp->u->n = tmp->u->nalloc; 232 tmp->v->n = tmp->v->nalloc; 233 tmp->sigma->n = tmp->sigma->nalloc; 234 tmp->xOrder->n = tmp->xOrder->nalloc; 235 tmp->yOrder->n = tmp->yOrder->nalloc; 236 tmp->preCalc->n = tmp->preCalc->nalloc; 225 237 226 238 // … … 352 364 } else { 353 365 stamps = (psArray *) psArrayAlloc(xNum * yNum); 366 stamps->n = stamps->nalloc; 354 367 for (psS32 s = 0 ; s < (xNum * yNum) ; s++) { 355 368 stamps->data[s] = (psPtr *) p_pmStampAlloc(PM_STAMP_REJECTED); … … 810 823 if (stampVector == NULL) { 811 824 stampVector = psVectorAlloc(numSolveParams, PS_TYPE_F64); 825 stampVector->n = stampVector->nalloc; 812 826 stamp->vector = stampVector; 813 827 } else { … … 1028 1042 } else { 1029 1043 solution = psVectorAlloc(size, PS_TYPE_F64); 1044 solution->n = solution->nalloc; 1030 1045 } 1031 1046 … … 1039 1054 psImage *sumMatrix = psImageAlloc(size, size, PS_TYPE_F64); 1040 1055 psVector *sumVector = psVectorAlloc(size, PS_TYPE_F64); 1056 sumVector->n = sumVector->nalloc; 1041 1057 PS_VECTOR_SET_F64(sumVector, 0.0); 1042 1058 PS_IMAGE_SET_F64(sumMatrix, 0.0); … … 1131 1147 } else { 1132 1148 deviations = psVectorAlloc(stamps->n, PS_TYPE_F32); 1149 deviations->n = deviations->nalloc; 1133 1150 // XXX: Probably not necessary. 1134 1151 PS_VECTOR_SET_F32(deviations, 0.0); -
trunk/psModules/src/imsubtract/pmSubtractBias.c
r6506 r6511 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-03-0 2 23:16:05$8 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-03-04 01:01:33 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 307 307 // XXX: use psVectorCopy if they get it working. 308 308 out->knots = psVectorAlloc(in->knots->n, in->knots->type.type); 309 out->knots->n = out->knots->nalloc; 309 310 for (psS32 i = 0 ; i < in->knots->n ; i++) { 310 311 out->knots->data.F32[i] = in->knots->data.F32[i]; … … 346 347 // Allocate the new vector. 347 348 psVector *newVec = psVectorAlloc(n, PS_TYPE_F32); 348 349 newVec->n = newVec->nalloc; 349 350 // 350 351 // If the new vector is the same size as the old, simply copy the data. … … 491 492 psS32 numOverscanImages = my_psListLength(bias); 492 493 psVector *statsAll = psVectorAlloc(numOverscanImages, PS_TYPE_F32); 494 statsAll->n = statsAll->nalloc; 493 495 psListElem *tmpOverscan = (psListElem *) bias->head; 494 496 psS32 i = 0; … … 554 556 psVector *tmpRow = psVectorAlloc(overscanImage->numCols, PS_TYPE_F32); 555 557 psVector *tmpCol = psVectorAlloc(overscanImage->numRows, PS_TYPE_F32); 558 tmpRow->n = tmpRow->nalloc; 559 tmpCol->n = tmpCol->nalloc; 556 560 557 561 // … … 594 598 psVector *tmpRow = psVectorAlloc(overscanImage->numCols, PS_TYPE_F32); 595 599 psVector *tmpCol = psVectorAlloc(overscanImage->numRows, PS_TYPE_F32); 600 tmpRow->n = tmpRow->nalloc; 601 tmpCol->n = tmpCol->nalloc; 596 602 597 603 // … … 649 655 psS32 vecSize = GetOverscanSize(inImg, overScanAxis); 650 656 psVector *overscanVector = psVectorAlloc(vecSize, PS_TYPE_F32); 657 overscanVector->n = overscanVector->nalloc; 651 658 652 659 // … … 658 665 psS32 numOverscanImages = my_psListLength(bias); 659 666 psVector **overscanVectors = (psVector **) psAlloc(numOverscanImages * sizeof(psVector *)); 667 // (*overscanVectors)->n = (*overscanVectors)->nalloc; 660 668 for (psS32 i = 0 ; i < numOverscanImages ; i++) { 661 669 overscanVectors[i] = NULL; … … 711 719 // 712 720 psVector *tmpVec = psVectorAlloc(numOverscanImages, PS_TYPE_F32); 721 tmpVec->n = tmpVec->nalloc; 713 722 psF64 statValue; 714 723 for (psS32 i = 0 ; i < vecSize ; i++) { … … 772 781 psVector *myBin = psVectorAlloc(numBins, PS_TYPE_F32); 773 782 psVector *binVec = psVectorAlloc(nBinOrig, PS_TYPE_F32); 783 myBin->n = myBin->nalloc; 784 binVec->n = binVec->nalloc; 774 785 775 786 for (psS32 i=0;i<numBins;i++) { … … 859 870 psS32 vecSize = GetOverscanSize(inImg, overScanAxis); 860 871 psVector *newVec = psVectorAlloc(vecSize, PS_TYPE_F32); 872 newVec->n = newVec->nalloc; 861 873 if ((nBin > 1) && (nBin < overscanVector->n)) { 862 874 for (psS32 i = 0 ; i < vecSize ; i++) { … … 905 917 906 918 psVector *newVec = psVectorAlloc(vecSize, PS_TYPE_F32); 919 newVec->n = newVec->nalloc; 907 920 for (psS32 i = 0 ; i < vecSize ; i++) { 908 921 newVec->data.F32[i] = overscanVector->data.F32[i/nBin]; -
trunk/psModules/src/imsubtract/pmSubtractSky.c
r6325 r6511 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 2-06 21:03:25$8 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-03-04 01:01:33 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 12 12 * 13 * 13 * 14 14 * 15 15 */ … … 341 341 psImage *Aout = psImageAlloc(localPolyTerms, localPolyTerms, PS_TYPE_F64); 342 342 psVector *B = psVectorAlloc(localPolyTerms, PS_TYPE_F64); 343 B->n = B->nalloc; 343 344 psVector *outPerm = NULL; 344 345 … … 407 408 PS_ASSERT_IMAGE_NON_EMPTY(Aout, NULL); 408 409 psVector *C = psVectorAlloc(localPolyTerms, PS_TYPE_F64); 410 C->n = C->nalloc; 409 411 psMatrixLUSolve(C, Aout, B, outPerm); 410 412
Note:
See TracChangeset
for help on using the changeset viewer.
