- Timestamp:
- Dec 30, 2008, 10:40:00 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20081230/psLib/src/imageops/psImageMapFit.c
r20075 r21074 7 7 * @author Eugene Magnier, IfA 8 8 * 9 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $10 * @date $Date: 2008-1 0-13 01:55:48$9 * @version $Revision: 1.11.8.1 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2008-12-30 20:40:00 $ 11 11 * 12 12 * Copyright 2007 Institute for Astronomy, University of Hawaii … … 47 47 48 48 // map defines the output image dimensions and scaling. 49 bool psImageMapFit(psImageMap *map, const psVector *mask, ps MaskType maskValue,49 bool psImageMapFit(psImageMap *map, const psVector *mask, psVectorMaskType maskValue, 50 50 const psVector *x, const psVector *y, const psVector *f, const psVector *df) 51 51 { … … 145 145 for (int i = 0; i < x->n; i++) { 146 146 147 if (mask && (mask->data. U8[i] & maskValue)) continue;147 if (mask && (mask->data.PS_TYPE_VECTOR_MASK_DATA[i] & maskValue)) continue; 148 148 149 149 // base coordinate offset for this point (x,y) relative to this map element (n,m) … … 338 338 339 339 // measure residuals on each pass and clip outliers based on stats 340 bool psImageMapClipFit(psImageMap *map, psStats *stats, psVector *inMask, ps MaskType maskValue,340 bool psImageMapClipFit(psImageMap *map, psStats *stats, psVector *inMask, psVectorMaskType maskValue, 341 341 const psVector *x, const psVector *y, const psVector *f, const psVector *df) 342 342 { … … 377 377 psVector *mask = inMask; 378 378 if (!inMask) { 379 mask = psVectorAlloc (x->n, PS_TYPE_ U8);379 mask = psVectorAlloc (x->n, PS_TYPE_VECTOR_MASK); 380 380 psVectorInit (mask, 0); 381 381 } … … 429 429 for (psS32 i = 0; i < resid->n; i++) { 430 430 // XXX this prevents recovery of previously masked values 431 if (mask->data. U8[i] & maskValue) {431 if (mask->data.PS_TYPE_VECTOR_MASK_DATA[i] & maskValue) { 432 432 continue; 433 433 } … … 435 435 if ((resid->data.F32[i] - meanValue > maxClipValue) || (resid->data.F32[i] - meanValue < minClipValue)) { 436 436 psTrace("psLib.imageops", 6, "Masking element %d : %f vs %f : resid is %f\n", i, f->data.F32[i], fit->data.F32[i], resid->data.F32[i]); 437 mask->data. U8[i] |= 0x01;437 mask->data.PS_TYPE_VECTOR_MASK_DATA[i] |= 0x01; 438 438 continue; 439 439 } … … 455 455 456 456 // map defines the output image dimensions and scaling. 457 bool psImageMapFit1DinY(psImageMap *map, const psVector *mask, ps MaskType maskValue,457 bool psImageMapFit1DinY(psImageMap *map, const psVector *mask, psVectorMaskType maskValue, 458 458 const psVector *x, const psVector *y, const psVector *f, const psVector *df) 459 459 { … … 490 490 for (int i = 0; i < y->n; i++) { 491 491 492 if (mask && (mask->data. U8[i] & maskValue)) continue;492 if (mask && (mask->data.PS_TYPE_VECTOR_MASK_DATA[i] & maskValue)) continue; 493 493 494 494 float dy = psImageBinningGetRuffY (map->binning, y->data.F32[i]) - (m + 0.5); … … 603 603 604 604 // map defines the output image dimensions and scaling. 605 bool psImageMapFit1DinX(psImageMap *map, const psVector *mask, ps MaskType maskValue,605 bool psImageMapFit1DinX(psImageMap *map, const psVector *mask, psVectorMaskType maskValue, 606 606 const psVector *x, const psVector *y, const psVector *f, const psVector *df) 607 607 { … … 638 638 for (int i = 0; i < x->n; i++) { 639 639 640 if (mask && (mask->data. U8[i] & maskValue)) continue;640 if (mask && (mask->data.PS_TYPE_VECTOR_MASK_DATA[i] & maskValue)) continue; 641 641 642 642 float dx = psImageBinningGetRuffX (map->binning, x->data.F32[i]) - (m + 0.5);
Note:
See TracChangeset
for help on using the changeset viewer.
