Changeset 23341 for trunk/ppStack/src/ppStack.h
- Timestamp:
- Mar 17, 2009, 10:00:02 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStack.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStack.h
r23195 r23341 1 #ifndef PP _STACK_H2 #define PP _STACK_H1 #ifndef PPSTACK_H 2 #define PPSTACK_H 3 3 4 4 #define PPSTACK_RECIPE "PPSTACK" // Name of the recipe … … 18 18 } ppStackMask; 19 19 20 // Thread for stacking chunks 21 // 22 // Each input file contributes a readout, into which is read a chunk from that file 23 typedef struct { 24 psArray *readouts; // Input readouts to read and stack 25 bool read; // Has the scan been read? 26 bool busy; // Is the scan being processed? 27 int firstScan; // First row of the chunk to be read for this group 28 int lastScan; // Last row of the chunk to be read for this group 29 } ppStackThread; 20 // List of files 21 typedef enum { 22 PPSTACK_FILES_PREPARE, // Files for preparation 23 PPSTACK_FILES_CONVOLVE, // Files for convolution 24 PPSTACK_FILES_COMBINE, // Files for combination 25 PPSTACK_FILES_PHOT // Files for photometry 26 } ppStackFileList; 30 27 31 // Allocator32 ppStackThread *ppStackThreadAlloc(psArray *readouts // Inputs readouts to read and stack33 );34 35 // Data for threads36 typedef struct {37 psArray *threads; // Threads doing stacking38 int lastScan; // Last row that's been read39 psArray *imageFits; // FITS file pointers for images40 psArray *maskFits; // FITS file pointers for masks41 psArray *varianceFits; // FITS file pointers for variances42 } ppStackThreadData;43 44 // Set up thread data45 ppStackThreadData *ppStackThreadDataSetup(const psArray *cells, // Array of input cells46 const psArray *imageNames, // Names of images to read47 const psArray *maskNames, // Names of masks to read48 const psArray *varianceNames, // Names of variance maps to read49 const psArray *covariances, // Covariance matrices (already read)50 const pmConfig *config // Configuration51 );52 53 // Read chunk into the first available file thread54 ppStackThread *ppStackThreadRead(bool *status, // Status of read55 ppStackThreadData *stack, // Stacks available for reading56 pmConfig *config, // Configuration57 int numChunk, // Chunk number (only for interest)58 int overlap // Overlap between subsequent scans59 );60 61 // Initialise the threads62 void ppStackThreadInit(void);63 28 64 29 // Setup command-line arguments … … 73 38 // Parse cameras 74 39 bool ppStackCamera(pmConfig *config // Configuration 75 );76 77 // Loop over the inputs, doing the combination78 bool ppStackLoop(pmConfig *config // Configuration79 40 ); 80 41 … … 127 88 ); 128 89 129 // Perform photometry on stack130 bool ppStackPhotometry(pmConfig *config, // Configuration131 const pmReadout *readout, // Readout to be photometered132 const pmFPAview *view // View to readout133 );134 135 90 // Return software version 136 91 psString ppStackVersion(void); … … 171 126 ); 172 127 128 /// Dump memory debugging information 129 void ppStackMemDump( 130 const char *name ///< Stage name, for inclusion in the output file name 131 ); 132 133 /// Activate/deactivate a list of files 134 void ppStackFileActivation( 135 pmConfig *config, // Configuration 136 ppStackFileList list, // Files to turn on/off 137 bool state // Activation state 138 ); 139 140 // Activate/deactivate a single element for a list 141 void ppStackFileActivationSingle( 142 pmConfig *config, // Configuration 143 ppStackFileList list, // Files to turn on/off 144 bool state, // Activation state 145 int num // Number of file in sequence 146 ); 147 148 /// Iterate down the hierarchy, loading files 149 /// 150 /// We can get away with this simplistic treatment of the FPA hierarchy because we're working on skycells. 151 pmFPAview *ppStackFilesIterateDown( 152 pmConfig *config // Configuration 153 ); 154 155 /// Iterate up the hierarchy, writing files 156 /// 157 /// We can get away with this simplistic treatment of the FPA hierarchy because we're working on skycells. 158 bool ppStackFilesIterateUp( 159 pmConfig *config // Configuration 160 ); 161 162 /// Write an image to a FITS file 163 bool ppStackWriteImage( 164 const char *name, // Name of image 165 psMetadata *header, // Header 166 const psImage *image, // Image 167 pmConfig *config // Configuration 168 ); 169 170 173 171 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
