Changeset 19337 for trunk/ppStack/src/ppStack.h
- Timestamp:
- Sep 3, 2008, 9:50:19 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStack.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStack.h
r19214 r19337 5 5 #define PPSTACK_INSPECT_PIXELS "PPSTACK.PIXELS" // Name of rejected pixels metadata items 6 6 7 #include <pslib.h> 7 8 #include <psmodules.h> 9 10 // Mask values for inputs 11 typedef enum { 12 PPSTACK_MASK_MATCH = 0x01, // PSF-matching failed 13 PPSTACK_MASK_REJECT = 0x02, // Rejection failed 14 PPSTACK_MASK_BAD = 0x04, // Bad image (too many pixels rejected) 15 PPSTACK_MASK_ALL = 0xff // All errors 16 } ppStackMask; 17 18 // Thread for stacking chunks 19 // 20 // Each input file contributes a readout, into which is read a chunk from that file 21 typedef struct { 22 psArray *readouts; // Input readouts to read and stack 23 bool read; // Has the scan been read? 24 bool busy; // Is the scan being processed? 25 int firstScan; // First row of the chunk to be read for this group 26 int lastScan; // Last row of the chunk to be read for this group 27 } ppStackThread; 28 29 // Allocator 30 ppStackThread *ppStackThreadAlloc(psArray *readouts // Inputs readouts to read and stack 31 ); 32 33 // Data for threads 34 typedef struct { 35 psArray *threads; // Threads doing stacking 36 int lastScan; // Last row that's been read 37 psArray *imageFits; // FITS file pointers for images 38 psArray *maskFits; // FITS file pointers for masks 39 psArray *weightFits; // FITS file pointers for weights 40 } ppStackThreadData; 41 42 // Set up thread data 43 ppStackThreadData *ppStackThreadDataSetup(const psArray *cells, // Array of input cells 44 const psArray *imageNames, // Names of images to read 45 const psArray *maskNames, // Names of masks to read 46 const psArray *weightNames, // Names of weight maps to read 47 const pmConfig *config // Configuration 48 ); 49 50 // Read chunk into the first available file thread 51 ppStackThread *ppStackThreadRead(bool *status, // Status of read 52 ppStackThreadData *stack, // Stacks available for reading 53 pmConfig *config, // Configuration 54 int numChunk, // Chunk number (only for interest) 55 int overlap // Overlap between subsequent scans 56 ); 57 58 // Initialise the threads 59 void ppStackThreadInit(void); 8 60 9 61 // Setup command-line arguments … … 31 83 32 84 // Perform stacking on a readout 33 bool ppStackReadoutInitial(const pmConfig *config, // Configuration 34 pmReadout *outRO, // Output readout 35 const psArray *readouts, // Input readouts 36 const psArray *regions, // Array with array of regions used in each PSF matching 37 const psArray *kernels // Array with array of kernels used in each PSF matching 85 // 86 // Returns an array of pixels to inspect for each input image 87 psArray *ppStackReadoutInitial(const pmConfig *config, // Configuration 88 pmReadout *outRO, // Output readout 89 const psArray *readouts, // Input readouts 90 const psArray *regions, // Array with array of regions used in each PSF match 91 const psArray *kernels // Array with array of kernels used in each PSF match 92 ); 93 94 // Thread entry point for ppStackReadoutInitial 95 bool ppStackReadoutInitialThread(psThreadJob *job // Job to process 38 96 ); 39 97 … … 43 101 const psArray *readouts, // Input readouts 44 102 const psArray *rejected // Array with pixels rejected in each image 103 ); 104 105 // Thread entry point for ppStackReadoutFinal 106 bool ppStackReadoutFinalThread(psThreadJob *job // Job to process 45 107 ); 46 108 … … 62 124 63 125 /// Convolve image to match specified seeing 64 bool ppStackMatch(pmReadout *readout, // /<Readout to be convolved; replaced with output126 bool ppStackMatch(pmReadout *readout, // Readout to be convolved; replaced with output 65 127 psArray **regions, // Array of regions used in each PSF matching, returned 66 128 psArray **kernels, // Array of kernels used in each PSF matching, returned 67 const psArray *sources, // /<Array of sources68 const pmPSF *psf, // /<Target PSF69 psRandom *rng, // /<Random number generator70 const pmConfig *config // /<Configuration129 const psArray *sources, // Array of sources 130 const pmPSF *psf, // Target PSF 131 psRandom *rng, // Random number generator 132 const pmConfig *config // Configuration 71 133 ); 72 134 … … 75 137 /// 76 138 /// Corrects the sources to have consistent magnitudes. Returns the source lists. 77 psArray *ppStackSourceListAdd(psArray *lists, // /<List to which to add, or NULL78 psArray *sources, // /<Sources to add79 const pmConfig *config // /<Configuration139 psArray *ppStackSourceListAdd(psArray *lists, // List to which to add, or NULL 140 psArray *sources, // Sources to add 141 const pmConfig *config // Configuration 80 142 ); 81 143 … … 83 145 /// 84 146 /// Corrects the sources to have consistent magnitudes where possible. Returns the sources 85 psArray *ppStackSourceListCombine(psArray *lists, // /<Source lists86 const pmConfig *config // /<Configuration147 psArray *ppStackSourceListCombine(psArray *lists, // Source lists 148 const pmConfig *config // Configuration 87 149 ); 88 150 89 151 /// Print sources into a ds9 regions file 90 void ppStackSourcesPrint(const psArray *sources // /<Sources to print152 void ppStackSourcesPrint(const psArray *sources // Sources to print 91 153 ); 92 154
Note:
See TracChangeset
for help on using the changeset viewer.
