Changeset 7567 for trunk/psModules/src/detrend/pmFringeStats.c
- Timestamp:
- Jun 14, 2006, 12:34:46 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/detrend/pmFringeStats.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/detrend/pmFringeStats.c
r7566 r7567 3 3 * @author Eugene Magnier, IfA 4 4 * 5 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-06-14 22: 23:18$5 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-06-14 22:34:46 $ 7 7 * 8 8 * Copyright 2004 IfA … … 542 542 pmFringeRegions *regions = science->regions; // The fringe regions 543 543 int numRegions = regions->nRequested; // Number of regions 544 545 // Ensure we are dealing with the SAME fringe points for all the inputs. 546 // Otherwise, we're going to get crazy results. 547 for (long i = 0; i < numRegions; i++) { 548 float xScience = regions->x->data.F32[i]; // The x position for the science image 549 float yScience = regions->y->data.F32[i]; // The y position for the science image 550 for (long j = 0; j < fringes->n; j++) { 551 pmFringeStats *fringe = fringes->data[j]; // The fringe statistics from a fringe image 552 pmFringeRegions *fringeRegions = fringe->regions; // The fringe regions for that fringe image 553 if (fringeRegions->x->data.F32[i] != xScience || 554 fringeRegions->y->data.F32[i] != yScience) { 555 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Science and fringe measurement regions " 556 "don't match.\n"); 557 return NULL; 558 } 559 } 560 } 561 562 // Set up the mask 544 563 if (!regions->mask) { 545 564 regions->mask = psVectorAlloc(numRegions, PS_TYPE_U8); … … 547 566 psVectorInit(regions->mask, 0); 548 567 } 549 550 568 psVector *mask = regions->mask; // The region mask 551 569 psStats *median = psStatsAlloc(PS_STAT_SAMPLE_MEDIAN); // Median statistics
Note:
See TracChangeset
for help on using the changeset viewer.
