Changeset 18554 for trunk/psModules/src/camera
- Timestamp:
- Jul 15, 2008, 10:25:00 AM (18 years ago)
- Location:
- trunk/psModules/src/camera
- Files:
-
- 6 edited
-
pmFPAMaskWeight.h (modified) (3 diffs)
-
pmFPAfileDefine.c (modified) (5 diffs)
-
pmFPAfileFitsIO.c (modified) (2 diffs)
-
pmFPAfileIO.c (modified) (3 diffs)
-
pmHDUUtils.c (modified) (1 diff)
-
pmHDUUtils.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAMaskWeight.h
r17732 r18554 5 5 * @author Eugene Magnier, IfA 6 6 * 7 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $8 * @date $Date: 2008-0 5-17 02:42:01$7 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2008-07-15 20:25:00 $ 9 9 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 10 10 */ … … 32 32 PM_MASK_MARK = 0x80, ///< The pixel is marked as temporarily ignored 33 33 } pmMaskValue; 34 #else35 34 #define PM_MASK_MARK 0x80 ///< The pixel is marked as temporarily ignored 36 35 #define PM_MASK_SAT 0x04 ///< The pixel is saturated in the image of interest … … 43 42 /// iterating using pmReadoutReadNext, in which case the HDU can't be generated. 44 43 bool pmReadoutSetMask(pmReadout *readout, ///< Readout for which to set mask 45 psMaskType sat ,///< Mask value to give saturated pixels46 psMaskType bad ///< Mask value to give bad (low) pixels44 psMaskType satMask, ///< Mask value to give saturated pixels 45 psMaskType badMask ///< Mask value to give bad (low) pixels 47 46 ); 48 47 -
trunk/psModules/src/camera/pmFPAfileDefine.c
r18061 r18554 10 10 #include "pmErrorCodes.h" 11 11 #include "pmConfig.h" 12 #include "pmConfigMask.h" 12 13 #include "pmDetrendDB.h" 13 14 … … 489 490 psFree(realName); 490 491 return NULL; 492 } 493 494 if (file->type == PM_FPA_FILE_MASK) { 495 if (!pmConfigMaskReadHeader (config, phu)) { 496 psError(PS_ERR_IO, false, "error in mask bits"); 497 return NULL; 498 } 491 499 } 492 500 … … 660 668 file->fileLevel = input->fileLevel; 661 669 670 662 671 // define the rule to identify these files in the file->names data 663 672 psFree (file->filerule); … … 735 744 psMetadataAddStr (file->names, PS_LIST_TAIL, name, 0, "", infiles->data[i]); 736 745 746 if ((i == 0) && (file->type == PM_FPA_FILE_MASK)) { 747 if (!pmConfigMaskReadHeader (config, phu)) { 748 psError(PS_ERR_IO, false, "error in mask bits"); 749 return NULL; 750 } 751 } 752 737 753 psFree(view); 738 754 psFree(name); … … 806 822 psFree(formatName); 807 823 return NULL; 824 } 825 826 if (file->type == PM_FPA_FILE_MASK) { 827 if (!pmConfigMaskReadHeader (config, phu)) { 828 psError(PS_ERR_IO, false, "error in mask bits"); 829 return NULL; 830 } 808 831 } 809 832 -
trunk/psModules/src/camera/pmFPAfileFitsIO.c
r18330 r18554 7 7 8 8 #include "pmConfig.h" 9 #include "pmConfigMask.h" 9 10 #include "pmDetrendDB.h" 10 11 … … 496 497 } 497 498 499 // whenever we write out a mask image, we should define the bits which represent mask concepts 500 if (file->type == PM_FPA_FILE_MASK) { 501 assert (phu->header); 502 if (!pmConfigMaskWriteHeader (config, phu->header)) { 503 psError(PS_ERR_UNKNOWN, false, "failed to set the bitmask names in the PHU header for Image %s (%s)\n", file->filename, file->name); 504 return false; 505 } 506 } 507 498 508 switch (file->fileLevel) { 499 509 case PM_FPA_LEVEL_FPA: -
trunk/psModules/src/camera/pmFPAfileIO.c
r18330 r18554 9 9 10 10 #include "pmConfig.h" 11 #include "pmConfigMask.h" 11 12 #include "pmDetrendDB.h" 12 13 … … 428 429 } 429 430 pmConfigConformHeader(hdu->header, file->format); 431 432 // whenever we write out a mask image, we should define the bits which represent mask concepts 433 if (file->type == PM_FPA_FILE_MASK) { 434 assert (hdu->header); 435 if (!pmConfigMaskWriteHeader (config, hdu->header)) { 436 psError(PS_ERR_UNKNOWN, false, "failed to set the bitmask names in the PHU header for Image %s (%s)\n", file->filename, file->name); 437 return false; 438 } 439 } 430 440 } 431 441 … … 792 802 } 793 803 804 // XXX if we have a mask file, then we need to read the mask bit names 805 // defined for this file 806 if (file->type == PM_FPA_FILE_MASK) { 807 if (!pmConfigMaskReadHeader (config, phu)) { 808 psError(PS_ERR_IO, false, "error in mask bits"); 809 return false; 810 } 811 } 812 794 813 // determine the current format from the header 795 814 // determine camera if not specified already -
trunk/psModules/src/camera/pmHDUUtils.c
r12768 r18554 9 9 #include "pmFPA.h" 10 10 #include "pmHDUUtils.h" 11 12 pmHDU *pmHDUGetFirst (const pmFPA *fpa) { 13 14 // XXX we probably should have an indicator in pmFPA about the depths. 15 16 if (!fpa) return NULL; 17 if (fpa->hdu) return fpa->hdu; 18 19 for (int i = 0; i < fpa->chips->n; i++) { 20 pmChip *chip = fpa->chips->data[i]; 21 if (!chip) continue; 22 if (chip->hdu) return chip->hdu; 23 if (!chip->cells) continue; 24 for (int j = 0; j < chip->cells->n; j++) { 25 pmCell *cell = chip->cells->data[j]; 26 if (!cell) continue; 27 if (cell->hdu) return cell->hdu; 28 } 29 } 30 return NULL; 31 } 11 32 12 33 pmHDU *pmHDUFromFPA(const pmFPA *fpa) -
trunk/psModules/src/camera/pmHDUUtils.h
r12696 r18554 4 4 * @author Paul Price, IfA 5 5 * 6 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $7 * @date $Date: 200 7-03-30 21:12:56$6 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2008-07-15 20:25:00 $ 8 8 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 9 9 */ … … 14 14 /// @addtogroup Camera Camera Layout 15 15 /// @{ 16 17 /// Get the first HDU encountered in the hierarchy 18 pmHDU *pmHDUGetFirst (const pmFPA *fpa); 16 19 17 20 /// Get the lowest HDU in the hierarchy
Note:
See TracChangeset
for help on using the changeset viewer.
