00001 /* @file pmFPA.h 00002 * @brief Tools to manipulate the FPA structure elements. 00003 * 00004 * @author Eugene Magnier, IfA 00005 * 00006 * @version $Revision: 1.6 $ $Name: $ 00007 * @date $Date: 2007/01/24 02:54:14 $ 00008 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 00009 */ 00010 00011 #ifndef PM_FPA_VIEW_H 00012 #define PM_FPA_VIEW_H 00013 00014 /// @addtogroup Camera Camera Layout 00015 /// @{ 00016 00017 #include "pmFPA.h" 00018 #include "pmFPALevel.h" 00019 00020 /// Identifier for FPA components 00021 /// 00022 /// This structure allows the identification of a single component of the focal plane hierarchy (or multiple, 00023 /// if we consider selecting all those components below the selected component). Components are identified on 00024 /// the basis of their chip, cell, readout index. An index of -1 means all components at that level. 00025 /// Additionally, since readouts may be read piecemeal, there are additional indices for these. 00026 typedef struct 00027 { 00028 int chip; ///< Number of the chip, or -1 for all 00029 int cell; ///< Number of the cell, or -1 for all 00030 int readout; ///< Number of the readout, or -1 for all 00031 int nRows; ///< Maximum number of rows per readout segment read, or 0 for all 00032 int iRows; ///< Starting point for this read 00033 } 00034 pmFPAview; 00035 00036 /// Allocator for pmFPAview 00037 pmFPAview *pmFPAviewAlloc(int nRows ///< Maximum number of rows per readout segment read, or 0 for all 00038 ); 00039 00040 /// Reset a view to select all components 00041 bool pmFPAviewReset(pmFPAview *view ///< View to reset 00042 ); 00043 00044 /// Determine the current view level 00045 /// 00046 /// Returns the level appropriate for the view 00047 pmFPALevel pmFPAviewLevel(const pmFPAview *view ///< View to examine 00048 ); 00049 00050 // Lookups 00051 00052 /// Return the currently selected chip for this view 00053 /// 00054 /// Returns NULL if the selection is not specific or invalid 00055 pmChip *pmFPAviewThisChip(const pmFPAview *view, ///< Current view 00056 const pmFPA *fpa ///< FPA containing chip 00057 ); 00058 00059 /// Return the currently selected cell for this view 00060 /// 00061 /// Returns NULL if the selection is not specific or invalid 00062 pmCell *pmFPAviewThisCell(const pmFPAview *view, ///< Current view 00063 const pmFPA *fpa ///< FPA containing cell 00064 ); 00065 00066 /// Return the currently selected readout for this view 00067 /// 00068 /// Returns NULL if the selection is not specific or invalid 00069 pmReadout *pmFPAviewThisReadout(const pmFPAview *view, ///< Current view 00070 const pmFPA *fpa ///< FPA containing readout 00071 ); 00072 00073 // Incrementors 00074 00075 /// Advance view to the next chip 00076 /// 00077 /// Returns NULL if there is no next 00078 pmChip *pmFPAviewNextChip(pmFPAview *view, ///< Current view 00079 const pmFPA *fpa, ///< FPA containing chips 00080 int nStep ///< Number of chips to increment 00081 ); 00082 00083 /// Advance view to the next cell 00084 /// 00085 /// Returns NULL if there is no next 00086 pmCell *pmFPAviewNextCell(pmFPAview *view, ///< Current view 00087 const pmFPA *fpa, ///< FPA containing cells 00088 int nStep ///< Number of cells to increment 00089 ); 00090 00091 /// Advance view to the next readout 00092 /// 00093 /// Returns NULL if there is no next 00094 pmReadout *pmFPAviewNextReadout(pmFPAview *view, ///< Current view 00095 const pmFPA *fpa, ///< FPA containing readouts 00096 int nStep ///< Number of readouts to increment 00097 ); 00098 00099 /// Return the HDU corresponding to the current view 00100 /// 00101 /// Uses the pmHDUFrom* functions, combined with the view. 00102 pmHDU *pmFPAviewThisHDU(const pmFPAview *view, ///< Current view 00103 const pmFPA *fpa ///< FPA for view 00104 ); 00105 00106 /// Return the blank Primary HDU corresponding to the current view, if any 00107 /// 00108 /// Similar to pmFPAviewThisHDU, except returns NULL if no HDU is found, or the HDU is not a blank Primary HDU 00109 pmHDU *pmFPAviewThisPHU(const pmFPAview *view, ///< Current view 00110 const pmFPA *fpa ///< FPA for view 00111 ); 00112 00113 /// @} 00114 #endif
1.5.1