Changeset 21244 for trunk/ppMerge/src/ppMerge.h
- Timestamp:
- Feb 1, 2009, 11:43:05 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ppMerge/src/ppMerge.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMerge.h
r18967 r21244 1 /** @file ppMerge.h 2 * 3 * @brief 4 * 5 * @ingroup ppMerge 6 * 7 * @author IfA 8 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-01 21:43:05 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #ifndef PP_MERGE_H 2 14 #define PP_MERGE_H … … 13 25 #include <ppStats.h> 14 26 15 #define TIMERNAME "ppMerge" // Name for timer 16 #define PPMERGE_RECIPE "PPMERGE" // Recipe name 17 #define THREADED 1 // Compile with threads? 27 /// @addtogroup ppArith 28 /// @{ 18 29 19 // Type of frame to merge 30 #define TIMERNAME "ppMerge" ///< Name for timer 31 #define PPMERGE_RECIPE "PPMERGE" ///< Recipe name 32 #define THREADED 1 ///< Compile with threads? 33 34 /** 35 * Type of frame to merge 36 */ 20 37 typedef enum { 21 PPMERGE_TYPE_UNKNOWN, // Unknown type22 PPMERGE_TYPE_BIAS, // Bias frame23 PPMERGE_TYPE_DARK, // (Multi-)Dark frame24 PPMERGE_TYPE_MASK, // Mask frame25 PPMERGE_TYPE_SHUTTER, // Shutter frame26 PPMERGE_TYPE_FLAT, // Flat-field frame (dome or sky)27 PPMERGE_TYPE_FRINGE, // Fringe frame38 PPMERGE_TYPE_UNKNOWN, ///< Unknown type 39 PPMERGE_TYPE_BIAS, ///< Bias frame 40 PPMERGE_TYPE_DARK, ///< (Multi-)Dark frame 41 PPMERGE_TYPE_MASK, ///< Mask frame 42 PPMERGE_TYPE_SHUTTER, ///< Shutter frame 43 PPMERGE_TYPE_FLAT, ///< Flat-field frame (dome or sky) 44 PPMERGE_TYPE_FRINGE, ///< Fringe frame 28 45 } ppMergeType; 29 46 30 // Files, for activation 47 /** 48 * Files, for activation 49 */ 31 50 typedef enum { 32 PPMERGE_FILES_ALL, // All files33 PPMERGE_FILES_INPUT, // Input files34 PPMERGE_FILES_OUTPUT // Output files51 PPMERGE_FILES_ALL, ///< All files 52 PPMERGE_FILES_INPUT, ///< Input files 53 PPMERGE_FILES_OUTPUT ///< Output files 35 54 } ppMergeFiles; 36 55 37 // Group of files to read 38 // 39 // Each file contributes a readout, into which is read a chunk from that file 56 /** 57 * \brief Group of files to read 58 * 59 * Each file contributes a readout, into which is read a chunk from that file 60 */ 40 61 typedef struct { 41 psArray *readouts; // Input readouts42 bool read; // Has the scan been read?43 bool busy; // Is the scan being processed?44 int firstScan; // First row of the chunk to be read for this group45 int lastScan; // Last row of the chunk to be read for this group62 psArray *readouts; ///< Input readouts 63 bool read; ///< Has the scan been read? 64 bool busy; ///< Is the scan being processed? 65 int firstScan; ///< First row of the chunk to be read for this group 66 int lastScan; ///< Last row of the chunk to be read for this group 46 67 } ppMergeFileGroup; 47 68 48 // Parse command-line arguments and recipe 49 bool ppMergeArguments(int argc, char *argv[], // Command-line arguments 50 pmConfig *config // Configuration 69 /** 70 * Parse command-line arguments and recipe 71 */ 72 bool ppMergeArguments(int argc, char *argv[], ///< Command-line arguments 73 pmConfig *config ///< Configuration 51 74 ); 52 75 53 // Set up camera files 54 bool ppMergeCamera(pmConfig *config // Configuration 76 /** 77 * Set up camera files 78 */ 79 bool ppMergeCamera(pmConfig *config ///< Configuration 55 80 ); 56 81 57 // Measure scale and zero-points 58 bool ppMergeScaleZero(pmConfig *config // Configuration 82 /** 83 * Measure scale and zero-points 84 */ 85 bool ppMergeScaleZero(pmConfig *config ///< Configuration 59 86 ); 60 87 61 // Main loop to do the merging 62 bool ppMergeLoop(pmConfig *config // Configuration 88 /** 89 * Main loop to do the merging 90 */ 91 bool ppMergeLoop(pmConfig *config ///< Configuration 63 92 ); 64 93 65 // Main loop for masks 66 bool ppMergeMask(pmConfig *config // Configuration 94 /** 95 * Main loop for masks 96 */ 97 bool ppMergeMask(pmConfig *config ///< Configuration 67 98 ); 68 99 69 // Read nominated input file 70 bool ppMergeFileReadInput(pmConfig *config, // Configuration 71 pmReadout *readout, // Readout into which to read 72 int num, // Number of file in sequence 73 int rows // Number of rows to read at once 100 /** 101 * Read nominated input file 102 */ 103 bool ppMergeFileReadInput(pmConfig *config, ///< Configuration 104 pmReadout *readout, ///< Readout into which to read 105 int num, ///< Number of file in sequence 106 int rows ///< Number of rows to read at once 74 107 ); 75 108 76 // Open nominated input file 77 bool ppMergeFileOpenInput(pmConfig *config, // Configuration 78 const pmFPAview *view, // View to open 79 int num // Number of file in sequence 109 /** 110 * Open nominated input file 111 */ 112 bool ppMergeFileOpenInput(pmConfig *config, ///< Configuration 113 const pmFPAview *view, ///< View to open 114 int num ///< Number of file in sequence 80 115 ); 81 116 82 // Set the data level for files specified by name; return an array of the files 83 psArray *ppMergeFileDataLevel(const pmConfig *config, // Configuration 84 const char *name, // Name of files 85 pmFPALevel level // Level for file data level 117 /** 118 * Set the data level for files specified by name; return an array of the files 119 */ 120 psArray *ppMergeFileDataLevel(const pmConfig *config, ///< Configuration 121 const char *name, ///< Name of files 122 pmFPALevel level ///< Level for file data level 86 123 ); 87 124 88 // Activate/deactivate a list of files 89 bool ppMergeFileActivate(const pmConfig *config, // Configuration 90 ppMergeFiles files, // Files to turn on/off 91 bool state // Activation state 125 /** 126 * Activate/deactivate a list of files 127 */ 128 bool ppMergeFileActivate(const pmConfig *config, ///< Configuration 129 ppMergeFiles files, ///< Files to turn on/off 130 bool state ///< Activation state 92 131 ); 93 132 94 // Activate/deactivate a single element for a list; return array of files 95 psArray *ppMergeFileActivateSingle(const pmConfig *config, // Configuration 96 ppMergeFiles files, // Files to turn on/off 97 bool state, // Activation state 98 int num // Number of file in sequence 133 /** 134 * Activate/deactivate a single element for a list; return array of files 135 */ 136 psArray *ppMergeFileActivateSingle(const pmConfig *config, ///< Configuration 137 ppMergeFiles files, ///< Files to turn on/off 138 bool state, ///< Activation state 139 int num ///< Number of file in sequence 99 140 ); 100 141 101 // Return name of output pmFPAfile 102 psString ppMergeOutputFile(const pmConfig *config // Configuration 142 /** 143 * Return name of output pmFPAfile 144 */ 145 psString ppMergeOutputFile(const pmConfig *config ///< Configuration 103 146 ); 104 147 105 148 106 // Allocator for group of files 149 /** 150 * Allocator for group of files 151 */ 107 152 ppMergeFileGroup *ppMergeFileGroupAlloc(void); 108 153 109 // Read chunk into the first available file group 110 ppMergeFileGroup *ppMergeReadChunk(bool *status, // Status of read 111 psArray *fileGroups, // All groups 112 pmConfig *config, // Configuration 113 int numChunk // Chunk number (only for interest) 154 /** 155 * Read chunk into the first available file group 156 */ 157 ppMergeFileGroup *ppMergeReadChunk(bool *status, ///< Status of read 158 psArray *fileGroups, ///< All groups 159 pmConfig *config, ///< Configuration 160 int numChunk ///< Chunk number (only for interest) 114 161 ); 115 162 116 // Set up thread handling 163 /** 164 * Set up thread handling 165 */ 117 166 bool ppMergeSetThreads(void); 118 167 168 ///@} 119 169 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
