Changeset 23719 for branches/pap/ppSub/src/ppSub.h
- Timestamp:
- Apr 6, 2009, 6:52:51 PM (17 years ago)
- Location:
- branches/pap/ppSub/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/ppSub/src
- Property svn:ignore
-
old new 10 10 stamp-h1 11 11 ppSubKernel 12 ppSubErrorCodes.h 13 ppSubErrorCodes.c
-
- Property svn:ignore
-
branches/pap/ppSub/src/ppSub.h
r23711 r23719 14 14 #define PP_SUB_H 15 15 16 #include <stdio.h> 16 17 #include <pslib.h> 17 18 #include <psmodules.h> 19 20 #include "ppSubErrorCodes.h" 18 21 19 22 /// @addtogroup ppSub … … 28 31 PPSUB_FILES_SUB = 0x04, // Subtracted files (output) 29 32 PPSUB_FILES_INV = 0x08, // Inverse subtracted files (output) 30 PPSUB_FILES_P HOT = 0x10, // psphot photometry files33 PPSUB_FILES_PSF = 0x10, // PSF files (output) 31 34 PPSUB_FILES_PHOT_SUB = 0x20, // Subtraction photometry files (output) 32 35 PPSUB_FILES_PHOT_INV = 0x40, // Inverse subtraction photometry files (output) 36 PPSUB_FILES_PHOT = 0x80, // General photometry files (internal) 33 37 PPSUB_FILES_ALL = 0xFF, // All files 34 38 } ppSubFiles; … … 39 43 bool photometry; // Perform photometry? 40 44 bool inverse; // Output inverse subtraction as well? 41 const char *statsFile; // Statistics file 45 psString stamps; // Stamps file 46 pmPSF *psf; // Point Spread Function 47 FILE *statsFile; // Statistics file 42 48 psMetadata *stats; // Statistics 43 49 } ppSubData; … … 47 53 48 54 /// Setup the arguments parsing 49 bool ppSubArgumentsSetup(int argc, char *argv[], ///< Command-line arguments 50 pmConfig *config ///< Configuration 51 ); 52 53 /// Parse the arguments 54 bool ppSubArgumentsParse(pmConfig *config ///< Configuration 55 bool ppSubArguments(int argc, char *argv[], ///< Command-line arguments 56 pmConfig *config, ///< Configuration 57 ppSubData *data ///< Processing data 55 58 ); 56 59 57 60 /// Parse the camera input 58 bool ppSubCamera(pmConfig *config ///< Configuration 61 bool ppSubCamera(pmConfig *config, ///< Configuration 62 ppSubData *data ///< Processing data 59 63 ); 60 64 61 65 /// Loop over the FPA hierarchy 62 bool ppSubLoop(pmConfig *config ///< Configuration 66 bool ppSubLoop(pmConfig *config, ///< Configuration 67 ppSubData *data ///< Processing data 63 68 ); 64 69 65 70 /// Perform PSF-matched image subtraction on the readout 66 71 bool ppSubReadout(pmConfig *config, ///< Configuration 67 ppSubData *data, ///< Processing data 68 const pmFPAview *view ///< View of readout to subtract 72 ppSubData *data ///< Processing data 69 73 ); 70 74 71 75 /// Generate (if needed) and set or update the masks for input and reference images 72 bool ppSubSetMasks(pmConfig *config, ///< Configuration 73 const pmFPAview *view ///< View of active readout 76 bool ppSubSetMasks(pmConfig *config ///< Configuration 74 77 ); 75 78 76 79 /// Generate the PSF-matching kernel and convolve the images as needed. Most of this function involves 77 80 /// looking up the parameters in the recipe and supplying them to the function pmSubtractionMatch() 78 bool ppSubMatchPSFs(pmConfig *config, ///< Configuration 79 ppSubData *data, ///< Processing data 80 const pmFPAview *view ///< View of active readout 81 bool ppSubMatchPSFs(pmConfig *config, ///< Configuration 82 ppSubData *data ///< Processing data 81 83 ); 82 84 83 85 /// Generate the output readout and pass the kernel info to the header 84 bool ppSubDefineOutput( pmConfig *config, ///< Configuration85 const pmFPAview *view ///< View of active readout86 bool ppSubDefineOutput(const char *name,///< Name of output to define 87 pmConfig *config ///< Configuration 86 88 ); 87 89 88 90 /// Photometry stage 1: measure the PSF from the minuend image 89 bool ppSubMakePSF(pmConfig *config, ///< Configuration 90 ppSubData *data, ///< Processing data 91 const pmFPAview *view ///< View of active readout 91 bool ppSubMakePSF(pmConfig *config, ///< Configuration 92 ppSubData *data ///< Processing data 92 93 ); 93 94 94 95 /// Perform the actual image subtraction, update output concepts 95 bool ppSubReadoutSubtract(pmConfig *config, ///< Configuration 96 const pmFPAview *view ///< View of active readout 96 bool ppSubReadoutSubtract(pmConfig *config ///< Configuration 97 97 ); 98 98 99 99 100 100 /// Photometry stage 2: find and measure sources on the subtracted image 101 bool ppSubReadoutPhotometry( pmConfig *config, ///< Configuration102 p pSubData *data, ///< Processing data103 const pmFPAview *view ///< View of active readout101 bool ppSubReadoutPhotometry(const char *name, ///< Name of file to photometer 102 pmConfig *config, ///< Configuration 103 ppSubData *data ///< Processing data 104 104 ); 105 105 106 106 /// Renormalize, update headers and generate JPEGs 107 107 bool ppSubReadoutUpdate(pmConfig *config, ///< Configuration 108 ppSubData *data, ///< Processing data 109 const pmFPAview *view ///< View of active readout 108 ppSubData *data ///< Processing data 110 109 ); 111 110 112 111 /// Higher-order background subtraction 113 bool ppSubBackground(pmConfig *config, ///< Configuration 114 const pmFPAview *view ///< View to readout 112 bool ppSubBackground(pmConfig *config ///< Configuration 115 113 ); 116 114 … … 129 127 ); 130 128 129 130 /// Activate or deactivate files 131 void ppSubFilesActivate(pmConfig *config, // Configuration 132 ppSubFiles files, // File to activate/deactivate 133 bool state // Activation state 134 ); 135 136 /// Generate a view suitable for a readout 137 /// 138 /// Assumes we're working with skycells 139 pmFPAview *ppSubViewReadout(void); 140 141 /// Iterate down the FPA hierarchy, opening files 142 bool ppSubFilesIterateDown(pmConfig *config, // Configuration 143 ppSubFiles files // Files to open 144 ); 145 146 /// Iterate up the FPA hierarchy, closing files 147 bool ppSubFilesIterateUp(pmConfig *config, // Configuration 148 ppSubFiles files // Files to open 149 ); 150 151 /// Collect statistics 152 bool ppSubReadoutStats(pmConfig *config,// Configuration 153 ppSubData *data // Processing data 154 ); 155 156 /// Generate JPEG images 157 bool ppSubReadoutJpeg(pmConfig *config // Configuration 158 ); 159 160 /// Generate inverse subtraction 161 bool ppSubReadoutInverse(pmConfig *config // Configuration 162 ); 163 164 131 165 // Copy every instance of a single keyword from one metadata to another 132 166 bool psMetadataCopySingle(psMetadata *target, psMetadata *source, const char *name);
Note:
See TracChangeset
for help on using the changeset viewer.
