Changeset 5974 for branches/eam_rel9_p0/psModules/src/astrom/pmAstrometry.c
- Timestamp:
- Jan 13, 2006, 5:10:19 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_rel9_p0/psModules/src/astrom/pmAstrometry.c
r5795 r5974 13 13 * XXX: Should we implement non-linear cell->chip transforms? 14 14 * 15 * @version $Revision: 1.11.2.1 $ $Name: not supported by cvs2svn $16 * @date $Date: 200 5-12-17 03:18:38$15 * @version $Revision: 1.11.2.1.2.1 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2006-01-14 03:10:19 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 25 25 #include <math.h> 26 26 #include "pslib.h" 27 27 28 #include "pmAstrometry.h" 29 #include "pmConcepts.h" 28 30 29 31 /***************************************************************************** … … 201 203 chip->cells = psArrayAdd(chip->cells, 1, (psPtr) tmpCell); 202 204 } 203 tmpCell->valid = true; // All cells are valid by default 205 tmpCell->process = true; // All cells are processed by default 206 tmpCell->exists = false; // Not yet read in 204 207 tmpCell->hdu = NULL; 208 209 pmConceptsBlankCell(tmpCell); 205 210 206 211 psMemSetDeallocator(tmpCell, (psFreeFunc) cellFree); … … 231 236 fpa->chips = psArrayAdd(fpa->chips, 1, (psPtr) tmpChip); 232 237 } 233 tmpChip->valid = true; // Work on all chips, by default 238 tmpChip->process = true; // Work on all chips, by default 239 tmpChip->exists = false; // Not read in yet 234 240 tmpChip->hdu = NULL; 241 242 pmConceptsBlankChip(tmpChip); 235 243 236 244 psMemSetDeallocator(tmpChip, (psFreeFunc) chipFree); … … 251 259 tmpFPA->hdu = NULL; 252 260 tmpFPA->phu = NULL; 261 262 pmConceptsBlankFPA(tmpFPA); 253 263 254 264 psMemSetDeallocator(tmpFPA, (psFreeFunc) FPAFree); … … 817 827 *****************************************************************************/ 818 828 819 // Set cells within a chip to a specified validity820 static bool setCells Valid(const pmChip *chip, // Chip of interest821 bool valid // Valid?822 )829 // Set cells within a chip to be processed or not 830 static bool setCellsProcess(const pmChip *chip, // Chip of interest 831 bool process // Process this chip? 832 ) 823 833 { 824 834 PS_ASSERT_PTR_NON_NULL(chip, false); … … 831 841 pmCell *tmpCell = cells->data[i]; // Cell of interest 832 842 if (tmpCell) { 833 tmpCell-> valid = valid;843 tmpCell->process = process; 834 844 } 835 845 } … … 857 867 } 858 868 if (i == chipNum) { 859 tmpChip-> valid= true;860 setCells Valid(tmpChip, true);869 tmpChip->process = true; 870 setCellsProcess(tmpChip, true); 861 871 } else { 862 tmpChip-> valid= false;863 setCells Valid(tmpChip, false);872 tmpChip->process = false; 873 setCellsProcess(tmpChip, false); 864 874 } 865 875 … … 872 882 /***************************************************************************** 873 883 XXX: The SDRS is ambiguous on a few things: 874 Whether or not the other chips should be set valid=true. [PAP: No]875 Should we return the number of chip valid=true before or after they're set, [PAP: After]884 Whether or not the other chips should be set process=true. [PAP: No] 885 Should we return the number of chip process=true before or after they're set, [PAP: After] 876 886 *****************************************************************************/ 877 887 /** 878 888 * 879 * pmFPAExcludeChip shall set validto false only for the specified chip889 * pmFPAExcludeChip shall set process to false only for the specified chip 880 890 * number (chipNum). In the event that the specified chip number does not exist 881 891 * within the fpa, the function shall generate a warning, and perform no action. 882 * The function shall return the number of chips within the fpa that have valid892 * The function shall return the number of chips within the fpa that have process 883 893 * set to true. 884 894 * … … 900 910 } 901 911 902 int numChips = 0; // Number of valid chips912 int numChips = 0; // Number of chips to be processed 903 913 for (int i = 0 ; i < chips->n ; i++) { 904 914 pmChip *tmpChip = (pmChip *) chips->data[i]; // Chip of interest 905 915 if (tmpChip != NULL) { 906 916 if (i == chipNum) { 907 tmpChip-> valid= false;908 setCells Valid(tmpChip, false); // Wipe out the cell as well909 } else if (tmpChip-> valid) {917 tmpChip->process = false; 918 setCellsProcess(tmpChip, false); // Wipe out the cell as well 919 } else if (tmpChip->process) { 910 920 numChips++; 911 921 }
Note:
See TracChangeset
for help on using the changeset viewer.
