Changeset 3666 for trunk/stac/src/stac.h
- Timestamp:
- Apr 5, 2005, 11:51:26 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/stac/src/stac.h (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/stac/src/stac.h
r3660 r3666 13 13 /************************************************************************************************************/ 14 14 15 // stacConfig.c16 17 // Configuration options18 typedef struct {19 int verbose; // Verbosity level20 float gain, readnoise; // Gain and readnoise for detectors21 psArray *inputs; // Input file names22 const char *output; // Output file name23 bool saveShifts; // Save shifted images?24 const char *starFile; // File with star coordinates25 const char *starMapFile; // File with map for stars26 int outnx, outny; // Size of output image27 float xOffset, yOffset; // Offset to get lower-left corner at 0,028 psVector *saturated; // Saturation level for each image29 psVector *bad; // Bad level for each image30 float reject; // Rejection level31 float frac; // Fraction of input pixel that must be masked before the pixel is32 // considered bad33 float grad; // Multiplier of the gradient34 int nReject; // Number of rejection iterations35 float xMapDiff, yMapDiff; // Difference between pure map and output image coordinates36 float aper; // Aperture size (pixels)37 } stacConfig;38 39 // Allocator40 stacConfig *stacConfigAlloc(void);41 // Deallocator42 void stacConfigFree(stacConfig *config);43 44 // Help message45 void help(const char *name);46 47 // Parse the command line and return config48 stacConfig *stacParseConfig(int argc, // Number of command-line arguments49 char **argv // Command-line arguments50 );51 52 53 /************************************************************************************************************/54 55 15 // stacRead.c 56 16 57 17 // Read the input files and return an array of images 58 psArray *stacReadImages(stacConfig *config); 18 psArray *stacReadImages(psArray *filenames // The file names of the images 19 ); 59 20 60 21 // Read a file of coordinates (x,y) … … 65 26 66 27 // Read the map files and return an array of transformations 67 psArray *stacReadMaps(stacConfig *config); 28 psArray *stacReadMaps(psArray *filenames // The file names of the images whose maps are to be read 29 ); 68 30 69 31 /************************************************************************************************************/ … … 73 35 // Calculate the error images 74 36 psArray *stacErrorImages(psArray *inputs, // Array of input images 75 stacConfig *config // Configuration details 37 float gain, // Gain, in e/ADU 38 float rn // Read noise, in e 76 39 ); 77 40 … … 90 53 const psVector *scales, // Relative scales 91 54 const psVector *offsets, // Relative offsets 92 const stacConfig *config // Configuration55 int outnx, int outny // Size of output images 93 56 ); 94 57 … … 133 96 int nReject, // Number of rejection iterations 134 97 psImage *region, // Region to combine 135 stacConfig *config // Configuration 98 psVector *saturated, // Saturation limits for each image 99 psVector *bad, // Bad pixel limits for each image 100 float reject // Rejection (k-sigma) 136 101 ); 137 102 … … 142 107 // Invert an array of maps 143 108 psArray *stacInvertMaps(const psArray *maps, // Array of maps to invert 144 const stacConfig *config // Configuration 145 ); 146 109 int outnx, int outny // Size of output image 110 ); 147 111 148 112 /************************************************************************************************************/ … … 161 125 psArray *maps, // Maps from input to transformed image 162 126 psArray *inverseMaps, // Maps from transformed to input image 163 stacConfig *config // Configuration 127 float frac, // Fraction of pixel rejected before looking more carefully 128 float grad, // Gradient limit for rejection 129 psArray *names // Names of original images (only for writing out when TESTING) 164 130 ); 165 131 … … 186 152 187 153 // Calculate the size of the output image 188 bool stacSize(stacConfig *config, // Configuration, containing the output size 154 bool stacSize(int *outnx, int *outny, // Size of output image (returned) 155 float *xMapDiff, float *yMapDiff, // Difference applied to maps 189 156 const psArray *images, // Input images 190 157 psArray *maps // Transformation maps 191 158 ); 192 193 159 194 160 /************************************************************************************************************/ … … 206 172 psVector **offsetsPtr, // Offsets to return 207 173 const psArray *images, // Images on which to measure the scales and offsets 208 const stacConfig *config // Configuration 174 const char *starFile, // File containing coordinates to photometer 175 const char *starMapFile, // Map for coodinates to the common output frame 176 float xMapDiff, float yMapDiff, // Difference from the map to apply (due to size difference) 177 float aper // Aperture to use for photometry (radius) 209 178 ); 210 179 … … 224 193 225 194 // Write maps out 226 bool stacWriteMap s(const psArray *maps, // Maps to write227 const stacConfig *config // Configuration195 bool stacWriteMap(const char *mapName, // Filename to write to 196 psPlaneTransform *map // Map to write 228 197 ); 229 198
Note:
See TracChangeset
for help on using the changeset viewer.
