Changeset 18137
- Timestamp:
- Jun 13, 2008, 4:16:47 PM (18 years ago)
- Files:
-
- 11 edited
-
branches/eam_branch_20080613/psModules/src/camera/pmFPAHeader.c (modified) (7 diffs)
-
branches/eam_branch_20080613/psModules/src/camera/pmFPAHeader.h (modified) (4 diffs)
-
branches/eam_branch_20080613/psModules/src/camera/pmFPARead.c (modified) (7 diffs)
-
branches/eam_branch_20080613/psModules/src/camera/pmFPARead.h (modified) (3 diffs)
-
trunk/ppStats/src/ppStatsCell.c (modified) (2 diffs)
-
trunk/ppStats/src/ppStatsChip.c (modified) (2 diffs)
-
trunk/ppStats/src/ppStatsLoop.c (modified) (2 diffs)
-
trunk/psModules/src/camera/pmFPAHeader.c (modified) (7 diffs)
-
trunk/psModules/src/camera/pmFPAHeader.h (modified) (4 diffs)
-
trunk/psModules/src/camera/pmFPARead.c (modified) (7 diffs)
-
trunk/psModules/src/camera/pmFPARead.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080613/psModules/src/camera/pmFPAHeader.c
r18136 r18137 17 17 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 18 18 19 bool pmCellReadHeader(pmCell *cell, psFits *fits, p mConfig *config)19 bool pmCellReadHeader(pmCell *cell, psFits *fits, psDB *db) 20 20 { 21 21 PS_ASSERT_PTR_NON_NULL(cell, false); … … 23 23 24 24 if (!cell->hdu) { 25 return pmChipReadHeader(cell->parent, fits );25 return pmChipReadHeader(cell->parent, fits, db); 26 26 } 27 27 if (!pmHDUReadHeader(cell->hdu, fits)) { … … 30 30 } 31 31 32 return pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, false, config->database);32 return pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, false, db); 33 33 } 34 34 35 35 36 bool pmChipReadHeader(pmChip *chip, psFits *fits, p mConfig *config)36 bool pmChipReadHeader(pmChip *chip, psFits *fits, psDB *db) 37 37 { 38 38 PS_ASSERT_PTR_NON_NULL(chip, false); … … 40 40 41 41 if (!chip->hdu) { 42 return pmFPAReadHeader(chip->parent, fits );42 return pmFPAReadHeader(chip->parent, fits, db); 43 43 } 44 44 if (!pmHDUReadHeader(chip->hdu, fits)) { … … 47 47 } 48 48 49 if (!pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, true, true, config->database)) {49 if (!pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, true, true, db)) { 50 50 psError(PS_ERR_UNKNOWN, false, "Unable to read concepts for chip.\n"); 51 51 return false; … … 56 56 57 57 58 bool pmFPAReadHeader(pmFPA *fpa, psFits *fits, p mConfig *config)58 bool pmFPAReadHeader(pmFPA *fpa, psFits *fits, psDB *db) 59 59 { 60 60 PS_ASSERT_PTR_NON_NULL(fpa, false); … … 69 69 } 70 70 71 if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, true, config->database)) {71 if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, true, db)) { 72 72 psError(PS_ERR_UNKNOWN, false, "Unable to read concepts for FPA.\n"); 73 73 return false; -
branches/eam_branch_20080613/psModules/src/camera/pmFPAHeader.h
r18136 r18137 4 4 * @author Paul Price, IfA 5 5 * 6 * @version $Revision: 1.3.42. 1$ $Name: not supported by cvs2svn $7 * @date $Date: 2008-06-14 0 1:52:05 $6 * @version $Revision: 1.3.42.2 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2008-06-14 02:14:35 $ 8 8 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 9 9 */ … … 21 21 bool pmFPAReadHeader(pmFPA *fpa, ///< FPA for which to read header 22 22 psFits *fits, ///< FITS file handle 23 p mConfig *config23 psDB *db 24 24 ); 25 25 … … 30 30 bool pmChipReadHeader(pmChip *chip, ///< Chip for which to read header 31 31 psFits *fits, ///< FITS file handle 32 p mConfig *config32 psDB *db 33 33 ); 34 34 … … 39 39 bool pmCellReadHeader(pmCell *cell, ///< Cell for which to read header 40 40 psFits *fits, ///< FITS file handle 41 p mConfig *config41 psDB *db 42 42 ); 43 43 /// @} -
branches/eam_branch_20080613/psModules/src/camera/pmFPARead.c
r18030 r18137 81 81 // In the process, reads the header and concepts 82 82 static bool cellNumReadouts(pmCell *cell, // Cell of interest 83 psFits *fits // FITS file 83 psFits *fits, // FITS file 84 psDB *db 84 85 ) 85 86 { … … 93 94 return false; 94 95 } 95 if (!pmCellReadHeader(cell, fits )) {96 if (!pmCellReadHeader(cell, fits, db)) { 96 97 psError(PS_ERR_IO, false, "Unable to read header for cell!\n"); 97 98 return false; … … 228 229 return false; 229 230 } 230 int naxis3 = cellNumReadouts(cell, fits ); // Number of planes231 int naxis3 = cellNumReadouts(cell, fits, db); // Number of planes 231 232 if (z >= naxis3) { 232 233 // No more to read … … 415 416 } 416 417 417 int naxis3 = cellNumReadouts(cell, fits ); // Number of image planes418 int naxis3 = cellNumReadouts(cell, fits, db); // Number of image planes 418 419 if (z >= naxis3) { 419 420 psError(PS_ERR_IO, false, "Desired image plane (%d) exceeds available number (%d).", … … 719 720 // pmReadoutReadNext is maintained here (for now) to maintain backwards compatibility. 720 721 // pmReadoutReadNext has been replaced by pmReadoutRead, pmReadoutReadChunk, pmReadoutMore 721 bool pmReadoutReadNext(bool *status, pmReadout *readout, psFits *fits, int z, int numScans )722 bool pmReadoutReadNext(bool *status, pmReadout *readout, psFits *fits, int z, int numScans, psDB *db) 722 723 { 723 724 PS_ASSERT_PTR_NON_NULL(readout, false); … … 740 741 } 741 742 742 if (!pmCellReadHeader(cell, fits )) {743 if (!pmCellReadHeader(cell, fits, db)) { 743 744 psError(PS_ERR_IO, false, "Unable to read header for cell!\n"); 744 745 return false; … … 921 922 } 922 923 923 int pmCellNumReadouts(pmCell *cell, psFits *fits )924 int pmCellNumReadouts(pmCell *cell, psFits *fits, psDB *db) 924 925 { 925 926 PS_ASSERT_PTR_NON_NULL(cell, false); 926 927 PS_ASSERT_FITS_NON_NULL(fits, false); 927 928 928 return cellNumReadouts(cell, fits );929 return cellNumReadouts(cell, fits, db); 929 930 } 930 931 -
branches/eam_branch_20080613/psModules/src/camera/pmFPARead.h
r18030 r18137 4 4 * @author Paul Price, IfA 5 5 * 6 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $7 * @date $Date: 2008-06- 09 22:59:02$6 * @version $Revision: 1.13.2.1 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2008-06-14 02:14:35 $ 8 8 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 9 9 */ … … 56 56 psFits *fits, // FITS file from which to read 57 57 int z, // Readout number/plane; zero-offset indexing 58 int numRows // The number of rows to read 58 int numRows, // The number of rows to read 59 psDB *db 59 60 ); 60 61 … … 62 63 /// 63 64 /// This function is type-independent (doesn't matter if you are interested in the image/mask/weight). 64 int pmCellNumReadouts(pmCell *cell, psFits *fits );65 int pmCellNumReadouts(pmCell *cell, psFits *fits, psDB *db); 65 66 66 67 /// Read an entire cell -
trunk/ppStats/src/ppStatsCell.c
r14149 r18137 49 49 // extract from existing headers 50 50 if (cell->hdu) { 51 if (fits && !pmCellReadHeader(cell, fits )) {51 if (fits && !pmCellReadHeader(cell, fits, config->database)) { 52 52 psError (PS_ERR_IO, false, "trouble reading cell header\n"); 53 53 psFree(cellResults); … … 65 65 // Extract Concept values 66 66 if (psListLength(data->concepts) > 0) { 67 if (fits && cell->hdu && !pmCellReadHeader(cell, fits )) {67 if (fits && cell->hdu && !pmCellReadHeader(cell, fits, config->database)) { 68 68 psError (PS_ERR_IO, false, "trouble reading cell header\n"); 69 69 psFree(cellResults); -
trunk/ppStats/src/ppStatsChip.c
r14561 r18137 38 38 // extract from existing headers 39 39 if (chip->hdu) { 40 if (fits && !pmChipReadHeader(chip, fits )) {40 if (fits && !pmChipReadHeader(chip, fits, config->database)) { 41 41 psError (PS_ERR_IO, false, "trouble reading chip header\n"); 42 42 psFree(chipResults); … … 54 54 // Extract Concept values 55 55 if (psListLength(data->concepts) > 0) { 56 if (fits && chip->hdu && !pmChipReadHeader(chip, fits )) {56 if (fits && chip->hdu && !pmChipReadHeader(chip, fits, config->database)) { 57 57 psError (PS_ERR_IO, false, "trouble reading chip header\n"); 58 58 psFree(chipResults); -
trunk/ppStats/src/ppStatsLoop.c
r14003 r18137 21 21 // Iterate through the FPA 22 22 if (psListLength(data->headers) > 0 && fpa->hdu) { 23 if (fits && !pmFPAReadHeader(fpa, fits )) {23 if (fits && !pmFPAReadHeader(fpa, fits, config->database)) { 24 24 psError(PS_ERR_IO, false, "Unable to read header for FPA."); 25 25 psFree(view); … … 32 32 } 33 33 if (psListLength(data->concepts) > 0) { 34 if (fits && fpa->hdu && !pmFPAReadHeader(fpa, fits )) {34 if (fits && fpa->hdu && !pmFPAReadHeader(fpa, fits, config->database)) { 35 35 psError(PS_ERR_IO, false, "Unable to read header for FPA."); 36 36 psFree(view); -
trunk/psModules/src/camera/pmFPAHeader.c
r18031 r18137 17 17 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 18 18 19 bool pmCellReadHeader(pmCell *cell, psFits *fits )19 bool pmCellReadHeader(pmCell *cell, psFits *fits, psDB *db) 20 20 { 21 21 PS_ASSERT_PTR_NON_NULL(cell, false); … … 23 23 24 24 if (!cell->hdu) { 25 return pmChipReadHeader(cell->parent, fits );25 return pmChipReadHeader(cell->parent, fits, db); 26 26 } 27 27 if (!pmHDUReadHeader(cell->hdu, fits)) { … … 30 30 } 31 31 32 return pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, false, NULL);32 return pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, false, db); 33 33 } 34 34 35 35 36 bool pmChipReadHeader(pmChip *chip, psFits *fits )36 bool pmChipReadHeader(pmChip *chip, psFits *fits, psDB *db) 37 37 { 38 38 PS_ASSERT_PTR_NON_NULL(chip, false); … … 40 40 41 41 if (!chip->hdu) { 42 return pmFPAReadHeader(chip->parent, fits );42 return pmFPAReadHeader(chip->parent, fits, db); 43 43 } 44 44 if (!pmHDUReadHeader(chip->hdu, fits)) { … … 47 47 } 48 48 49 if (!pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, true, true, NULL)) {49 if (!pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, true, true, db)) { 50 50 psError(PS_ERR_UNKNOWN, false, "Unable to read concepts for chip.\n"); 51 51 return false; … … 56 56 57 57 58 bool pmFPAReadHeader(pmFPA *fpa, psFits *fits )58 bool pmFPAReadHeader(pmFPA *fpa, psFits *fits, psDB *db) 59 59 { 60 60 PS_ASSERT_PTR_NON_NULL(fpa, false); … … 69 69 } 70 70 71 if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, true, NULL)) {71 if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, true, db)) { 72 72 psError(PS_ERR_UNKNOWN, false, "Unable to read concepts for FPA.\n"); 73 73 return false; -
trunk/psModules/src/camera/pmFPAHeader.h
r11253 r18137 4 4 * @author Paul Price, IfA 5 5 * 6 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $7 * @date $Date: 200 7-01-24 02:54:14$6 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2008-06-14 02:15:05 $ 8 8 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 9 9 */ … … 20 20 /// was already there. No iteration to lower levels is performed. 21 21 bool pmFPAReadHeader(pmFPA *fpa, ///< FPA for which to read header 22 psFits *fits ///< FITS file handle 22 psFits *fits, ///< FITS file handle 23 psDB *db 23 24 ); 24 25 … … 28 29 /// was already there. No iteration to lower levels is performed. 29 30 bool pmChipReadHeader(pmChip *chip, ///< Chip for which to read header 30 psFits *fits ///< FITS file handle 31 psFits *fits, ///< FITS file handle 32 psDB *db 31 33 ); 32 34 … … 36 38 /// was already there. No iteration to lower levels is performed. 37 39 bool pmCellReadHeader(pmCell *cell, ///< Cell for which to read header 38 psFits *fits ///< FITS file handle 40 psFits *fits, ///< FITS file handle 41 psDB *db 39 42 ); 40 43 /// @} -
trunk/psModules/src/camera/pmFPARead.c
r18030 r18137 81 81 // In the process, reads the header and concepts 82 82 static bool cellNumReadouts(pmCell *cell, // Cell of interest 83 psFits *fits // FITS file 83 psFits *fits, // FITS file 84 psDB *db 84 85 ) 85 86 { … … 93 94 return false; 94 95 } 95 if (!pmCellReadHeader(cell, fits )) {96 if (!pmCellReadHeader(cell, fits, db)) { 96 97 psError(PS_ERR_IO, false, "Unable to read header for cell!\n"); 97 98 return false; … … 228 229 return false; 229 230 } 230 int naxis3 = cellNumReadouts(cell, fits ); // Number of planes231 int naxis3 = cellNumReadouts(cell, fits, db); // Number of planes 231 232 if (z >= naxis3) { 232 233 // No more to read … … 415 416 } 416 417 417 int naxis3 = cellNumReadouts(cell, fits ); // Number of image planes418 int naxis3 = cellNumReadouts(cell, fits, db); // Number of image planes 418 419 if (z >= naxis3) { 419 420 psError(PS_ERR_IO, false, "Desired image plane (%d) exceeds available number (%d).", … … 719 720 // pmReadoutReadNext is maintained here (for now) to maintain backwards compatibility. 720 721 // pmReadoutReadNext has been replaced by pmReadoutRead, pmReadoutReadChunk, pmReadoutMore 721 bool pmReadoutReadNext(bool *status, pmReadout *readout, psFits *fits, int z, int numScans )722 bool pmReadoutReadNext(bool *status, pmReadout *readout, psFits *fits, int z, int numScans, psDB *db) 722 723 { 723 724 PS_ASSERT_PTR_NON_NULL(readout, false); … … 740 741 } 741 742 742 if (!pmCellReadHeader(cell, fits )) {743 if (!pmCellReadHeader(cell, fits, db)) { 743 744 psError(PS_ERR_IO, false, "Unable to read header for cell!\n"); 744 745 return false; … … 921 922 } 922 923 923 int pmCellNumReadouts(pmCell *cell, psFits *fits )924 int pmCellNumReadouts(pmCell *cell, psFits *fits, psDB *db) 924 925 { 925 926 PS_ASSERT_PTR_NON_NULL(cell, false); 926 927 PS_ASSERT_FITS_NON_NULL(fits, false); 927 928 928 return cellNumReadouts(cell, fits );929 return cellNumReadouts(cell, fits, db); 929 930 } 930 931 -
trunk/psModules/src/camera/pmFPARead.h
r18030 r18137 4 4 * @author Paul Price, IfA 5 5 * 6 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $7 * @date $Date: 2008-06- 09 22:59:02$6 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2008-06-14 02:15:05 $ 8 8 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 9 9 */ … … 56 56 psFits *fits, // FITS file from which to read 57 57 int z, // Readout number/plane; zero-offset indexing 58 int numRows // The number of rows to read 58 int numRows, // The number of rows to read 59 psDB *db 59 60 ); 60 61 … … 62 63 /// 63 64 /// This function is type-independent (doesn't matter if you are interested in the image/mask/weight). 64 int pmCellNumReadouts(pmCell *cell, psFits *fits );65 int pmCellNumReadouts(pmCell *cell, psFits *fits, psDB *db); 65 66 66 67 /// Read an entire cell
Note:
See TracChangeset
for help on using the changeset viewer.
