Changeset 6260 for trunk/ppImage/src/ppImage.h
- Timestamp:
- Jan 30, 2006, 6:00:06 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImage.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImage.h
r6125 r6260 2 2 #define PP_IMAGE_H 3 3 4 #include <stdio.h> 4 #include "pslib.h" 5 #include "pmFPA.h" 6 #include "ppConfig.h" 7 #include "ppFile.h" 8 #include "ppImageData.h" 9 #include "ppImageOptions.h" 10 11 12 #if 0 5 13 #include <strings.h> 6 7 #include "pslib.h"8 9 14 #include "psAdditionals.h" 10 11 15 #include "pmFPA.h" 12 16 #include "pmFPAConstruct.h" … … 15 19 #include "pmReadout.h" 16 20 #include "pmConfig.h" 17 18 21 #include "pmFlatField.h" 19 22 #include "pmMaskBadPixels.h" 20 23 #include "pmNonLinear.h" 24 #include "pmChipMosaic.h" 21 25 #include "pmSubtractBias.h" 22 #include "pmChipMosaic.h" 23 //#include "pmFPAMorph.h" 24 #include "pmSubtractBias.h" 26 #endif 27 25 28 26 29 #define RECIPE "PHASE2" // Name of the recipe to use 27 30 #define TIMERNAME "ppImage" // Name of timer 28 31 29 // How much of the FPA to load at a time 30 typedef enum { 31 PP_LOAD_NONE, // Don't load anything 32 PP_LOAD_FPA, // Load the entire FPA at once 33 PP_LOAD_CHIP, // Load by chip 34 PP_LOAD_CELL, // Load by cell 35 } ppImageLoadDepth; 36 37 // Configuration data 38 typedef struct { 39 psMetadata *site; // The site configuration 40 psMetadata *camera; // The camera configuration 41 psMetadata *recipe; // The recipe (i.e., specific setups) 42 psMetadata *arguments; // The command-line arguments 43 psDB *database; // Database handle 44 } ppConfig; 45 46 // Options 47 typedef struct { 48 bool doMask; // Mask bad pixels 49 bool doBias; // Bias subtraction 50 bool doDark; // Dark subtraction 51 bool doFlat; // Flat-field normalisation 52 bool doFringe; // Fringe subtraction 53 bool doSource; // Source identification and photometry 54 bool doAstrom; // Astrometry 55 bool doOverscan; // Overscan subtraction 56 pmOverscanOptions *overscan; // Overscan options 57 bool doNonLin; // Non-linearity correction 58 psDataType nonLinearType; 59 psMetadataItem *nonLinearData; 60 void *nonLinearSource; 61 ppImageLoadDepth imageLoadDepth; // How much of the FPA to load at once 62 } ppOptions; 63 64 // A file to process 65 typedef struct { 66 char *filename; // File name 67 psFits *fits; // The FITS file handle 68 psMetadata *phu; // The FITS header 69 pmFPA *fpa; // The FPA, with pixels and extensions 70 } ppFile; 71 72 // The data to be processed 73 typedef struct { 74 ppFile *input; // The input, to be operated upon 75 ppFile *mask; // The bad pixel mask image 76 ppFile *bias; // The bias correction image 77 ppFile *dark; // The dark correction image 78 ppFile *flat; // The flat-field correction image 79 ppFile *fringe; // The fringe correction image 80 psFits *output; // The output file 81 #if 0 82 ppFile *process; // A dummy file pointing out what needs to be processed 83 #endif 84 } ppData; 85 86 // Cells to be used in the detrend 87 typedef struct { 88 pmCell *input; // The input cell, to be operated upon 89 pmCell *mask; // The bad pixel mask 90 pmCell *bias; // The bias correction 91 pmCell *dark; // The dark correction 92 pmCell *flat; // The flat-field correction 93 } ppDetrend; 94 95 96 // Allocators 97 ppFile *ppFileAlloc(void); 98 99 100 101 // Parse the site configuration (and camera and recipe if specified); read the command-line arguments 102 bool ppImageConfig(ppConfig *config, // The configuration(output) 103 int argc, char **argv // Command-line arguments 104 ); 32 // Get the configuration 33 bool ppImageConfig(ppConfig *config, int argc, char **argv); 105 34 106 35 // Determine what type of camera, and initialise 107 bool ppImageParseCamera(pp Data *data, // The data to be processed36 bool ppImageParseCamera(ppImageData *data, // The data to be processed 108 37 ppConfig *config // Configuration 109 38 ); 110 39 111 // Determine the procession options112 bool ppImageOptions(ppData *data, // The data to be processed113 ppOptions *options, // Processing options114 ppConfig *config // Configuration115 );116 40 117 118 // Loop over the 119 bool ppImageLoop(ppData *data, ppOptions *options, ppConfig *config); 41 // Loop over the input 42 bool ppImageLoop(ppImageData *data, ppImageOptions *options, ppConfig *config); 120 43 121 44 // Load the pixels for the given file … … 126 49 ); 127 50 128 bool ppImageParseDetrend(pp Data *data, ppOptions *options, ppConfig *config);51 bool ppImageParseDetrend(ppImageData *data, ppImageOptions *options, ppConfig *config); 129 52 130 53 bool ppReadoutWeights(pmReadout *readout); 131 54 132 bool ppDetrendCell(ppDetrend *detrend, ppOptions *options, ppConfig *config);133 134 bool ppDetrendMask(pmCell *cell, pmReadout *input, pmReadout *mask);135 bool ppDetrendNonLinear(pmCell *cell, pmReadout *input, ppOptions *options);136 bool ppDetrendNonLinearLookup(pmReadout *input, psMetadataItem *dataItem);137 bool ppDetrendNonLinearPolynomial(pmReadout *input, psMetadataItem *dataItem);138 bool ppDetrendBias(pmReadout *inputReadout, pmReadout *bias, pmReadout *dark, ppOptions *options);139 55 #if 0 140 pmReadout* ppDetrendPedestal(pmReadout *pedestal, pmCell *input, pmReadout *bias, pmReadout *dark, float darkTime, ppOptions *options); 141 #endif 142 pmReadout* ppDetrendSelectFirst(pmCell *cell, char *name, bool doThis); 143 144 #if 0 56 // These functions are not implemented, or not needed 57 pmReadout* ppDetrendPedestal(pmReadout *pedestal, pmCell *input, pmReadout *bias, pmReadout *dark, float darkTime, ppImageOptions *options); 58 bool ppImageOutput(ppImageData *data, ppConfig *config); 59 bool ppImagePhot(ppImageData *data, ppImageOptions *options, ppConfig *config); 145 60 bool ppFileOpen(ppFile *fpa, psMetadata *camera, char *name, bool doThis); 146 61 #endif 147 62 148 bool ppImageOutput(ppData *data, ppConfig *config);149 bool ppImagePhot(ppData *data, ppOptions *options, ppConfig *config);150 151 63 #endif // Pau.
Note:
See TracChangeset
for help on using the changeset viewer.
