Changeset 23740 for trunk/ppSub/src/ppSub.h
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/pap merged: 23690,23704,23711,23719,23723,23730-23735
- Property svn:mergeinfo changed
-
trunk/ppSub
- Property svn:mergeinfo changed
/branches/pap/ppSub merged: 23704,23711,23719,23723,23730,23732-23734
- Property svn:mergeinfo changed
-
trunk/ppSub/src
- Property svn:ignore
-
old new 10 10 stamp-h1 11 11 ppSubKernel 12 ppSubErrorCodes.h 13 ppSubErrorCodes.c
-
- Property svn:ignore
-
trunk/ppSub/src/ppSub.h
r23688 r23740 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 … … 24 27 // Output files, for activation/deactivation 25 28 typedef enum { 26 PPSUB_FILES_IMAGE = 0x01, // Image files 27 PPSUB_FILES_PHOT = 0x02, // Photometry files 28 PPSUB_FILES_ALL = 0xFF, // All files 29 PPSUB_FILES_INPUT = 0x01, // Input files 30 PPSUB_FILES_CONV = 0x02, // Convolved files (output) 31 PPSUB_FILES_SUB = 0x04, // Subtracted files (output) 32 PPSUB_FILES_INV = 0x08, // Inverse subtracted files (output) 33 PPSUB_FILES_PSF = 0x10, // PSF files (output) 34 PPSUB_FILES_PHOT_SUB = 0x20, // Subtraction photometry files (output) 35 PPSUB_FILES_PHOT_INV = 0x40, // Inverse subtraction photometry files (output) 36 PPSUB_FILES_PHOT = 0x80, // General photometry files (internal) 37 PPSUB_FILES_ALL = 0xFF, // All files 29 38 } ppSubFiles; 30 39 31 40 /// Data for processing 32 41 typedef struct { 33 psErrorCode quality; /// Quality code; 0 for no problem 34 psMetadata *stats; /// Statistics 42 psErrorCode quality; // Quality code; 0 for no problem 43 bool photometry; // Perform photometry? 44 bool inverse; // Output inverse subtraction as well? 45 psString stamps; // Stamps file 46 pmPSF *psf; // Point Spread Function 47 FILE *statsFile; // Statistics file 48 psMetadata *stats; // Statistics 35 49 } ppSubData; 36 50 … … 39 53 40 54 /// Setup the arguments parsing 41 bool ppSubArgumentsSetup(int argc, char *argv[], ///< Command-line arguments 42 pmConfig *config ///< Configuration 43 ); 44 45 /// Parse the arguments 46 bool ppSubArgumentsParse(pmConfig *config ///< Configuration 55 bool ppSubArguments(int argc, char *argv[], ///< Command-line arguments 56 pmConfig *config, ///< Configuration 57 ppSubData *data ///< Processing data 47 58 ); 48 59 49 60 /// Parse the camera input 50 bool ppSubCamera(pmConfig *config ///< Configuration 61 bool ppSubCamera(pmConfig *config, ///< Configuration 62 ppSubData *data ///< Processing data 51 63 ); 52 64 53 65 /// Loop over the FPA hierarchy 54 bool ppSubLoop(pmConfig *config ///< Configuration 66 bool ppSubLoop(pmConfig *config, ///< Configuration 67 ppSubData *data ///< Processing data 55 68 ); 56 69 57 70 /// Perform PSF-matched image subtraction on the readout 58 71 bool ppSubReadout(pmConfig *config, ///< Configuration 59 ppSubData *data, ///< Processing data 60 const pmFPAview *view ///< View of readout to subtract 72 ppSubData *data ///< Processing data 61 73 ); 62 74 63 75 /// Generate (if needed) and set or update the masks for input and reference images 64 bool ppSubSetMasks(pmConfig *config, ///< Configuration 65 const pmFPAview *view ///< View of active readout 76 bool ppSubSetMasks(pmConfig *config ///< Configuration 66 77 ); 67 78 68 79 /// Generate the PSF-matching kernel and convolve the images as needed. Most of this function involves 69 80 /// looking up the parameters in the recipe and supplying them to the function pmSubtractionMatch() 70 bool ppSubMatchPSFs(pmConfig *config, ///< Configuration 71 ppSubData *data, ///< Processing data 72 const pmFPAview *view ///< View of active readout 81 bool ppSubMatchPSFs(pmConfig *config, ///< Configuration 82 ppSubData *data ///< Processing data 73 83 ); 74 84 75 85 /// Generate the output readout and pass the kernel info to the header 76 bool ppSubDefineOutput( pmConfig *config, ///< Configuration77 const pmFPAview *view ///< View of active readout86 bool ppSubDefineOutput(const char *name,///< Name of output to define 87 pmConfig *config ///< Configuration 78 88 ); 79 89 80 90 /// Photometry stage 1: measure the PSF from the minuend image 81 bool ppSubMakePSF(pmConfig *config, ///< Configuration 82 ppSubData *data, ///< Processing data 83 const pmFPAview *view ///< View of active readout 91 bool ppSubMakePSF(pmConfig *config, ///< Configuration 92 ppSubData *data ///< Processing data 84 93 ); 85 94 86 95 /// Perform the actual image subtraction, update output concepts 87 bool ppSubReadoutSubtract(pmConfig *config, ///< Configuration 88 const pmFPAview *view ///< View of active readout 96 bool ppSubReadoutSubtract(pmConfig *config ///< Configuration 89 97 ); 90 98 91 99 92 100 /// Photometry stage 2: find and measure sources on the subtracted image 93 bool ppSubReadoutPhotometry( pmConfig *config, ///< Configuration94 p pSubData *data, ///< Processing data95 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 96 104 ); 97 105 98 106 /// Renormalize, update headers and generate JPEGs 99 107 bool ppSubReadoutUpdate(pmConfig *config, ///< Configuration 100 ppSubData *data, ///< Processing data 101 const pmFPAview *view ///< View of active readout 108 ppSubData *data ///< Processing data 102 109 ); 103 110 104 111 /// Higher-order background subtraction 105 bool ppSubBackground(pmConfig *config, ///< Configuration 106 const pmFPAview *view ///< View to readout 112 bool ppSubBackground(pmConfig *config ///< Configuration 107 113 ); 108 114 … … 121 127 ); 122 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 123 165 // Copy every instance of a single keyword from one metadata to another 124 166 bool psMetadataCopySingle(psMetadata *target, psMetadata *source, const char *name);
Note:
See TracChangeset
for help on using the changeset viewer.
