Changeset 6887 for trunk/stac/src/stac.h
- Timestamp:
- Apr 18, 2006, 12:20:45 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/stac/src/stac.h (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/stac/src/stac.h
r5743 r6887 19 19 // Read the input files and return an array of images 20 20 psArray *stacReadImages(psArray **headers, // The image headers, to be returned 21 psArray *filenames // The file names of the images21 psArray *filenames // The file names of the images 22 22 ); 23 23 … … 38 38 // Calculate the error images 39 39 psArray *stacErrorImages(psArray *inputs, // Array of input images 40 float gain,// Gain, in e/ADU41 float rn// Read noise, in e40 float gain, // Gain, in e/ADU 41 float rn // Read noise, in e 42 42 ); 43 43 … … 47 47 48 48 // Transform input images, return success 49 bool stacTransform(psArray **outputs, // Transformed images for output50 psArray **outErrors, // Transformed error images for output51 const psArray *images, // Array of images to be transformed52 const psArray *maps, // Array of polynomials that do the transformation53 const psArray *errors, // Array of error images to be transformed54 const psArray *masks, // Masks of input images55 const psImage *region, // Region of interest for transformation56 const psVector *scales, // Relative scales57 const psVector *offsets, // Relative offsets58 int outnx, int outny// Size of output images49 bool stacTransform(psArray **outputs, // Transformed images for output 50 psArray **outErrors, // Transformed error images for output 51 const psArray *images, // Array of images to be transformed 52 const psArray *maps, // Array of polynomials that do the transformation 53 const psArray *errors, // Array of error images to be transformed 54 const psArray *masks, // Masks of input images 55 const psImage *region, // Region of interest for transformation 56 const psVector *scales, // Relative scales 57 const psVector *offsets, // Relative offsets 58 int outnx, int outny // Size of output images 59 59 ); 60 60 … … 68 68 // Print out the problem 69 69 void stacMemoryProblem(const psMemBlock* ptr, ///< the pointer to the problematic memory block. 70 const char *file, ///< the file in which the problem originated71 psS32 lineno///< the line number in which the problem originated70 const char *file, ///< the file in which the problem originated 71 psS32 lineno ///< the line number in which the problem originated 72 72 ); 73 73 … … 81 81 82 82 // Get the mean for a bunch of values 83 float stacCombineMean(psVector *values, // Values for which to take the mean84 psVector *errors,// Errors in the values85 psVector *masks// Masks for the values, 0 = don't use, 1 = use83 float stacCombineMean(psVector *values, // Values for which to take the mean 84 psVector *errors, // Errors in the values 85 psVector *masks // Masks for the values, 0 = don't use, 1 = use 86 86 ); 87 87 88 88 // Get the median for a bunch of values 89 89 float stacCombineMedian(psVector *values, // Values for which to take the median 90 psVector *errors, // Errors in the values91 psVector *masks// Masks for the values, 0 = don't use, 1 = use90 psVector *errors, // Errors in the values 91 psVector *masks // Masks for the values, 0 = don't use, 1 = use 92 92 ); 93 93 94 94 // Combine the transformed images 95 bool stacCombine(psImage **combined, // The combined image for output96 psArray **rejected,// Array of rejection masks97 psArray *images,// Array of transformed images98 psArray *errors,// Array of transformed error images99 int nReject,// Number of rejection iterations100 psImage *region,// Region to combine101 psVector *saturated,// Saturation limits for each image102 psVector *bad,// Bad pixel limits for each image103 float reject// Rejection (k-sigma)95 bool stacCombine(psImage **combined, // The combined image for output 96 psArray **rejected, // Array of rejection masks 97 psArray *images, // Array of transformed images 98 psArray *errors, // Array of transformed error images 99 int nReject, // Number of rejection iterations 100 psImage *region, // Region to combine 101 psVector *saturated, // Saturation limits for each image 102 psVector *bad, // Bad pixel limits for each image 103 float reject // Rejection (k-sigma) 104 104 ); 105 105 … … 110 110 // Invert an array of maps 111 111 psArray *stacInvertMaps(const psArray *maps, // Array of maps to invert 112 int outnx, int outny // Size of output image112 int outnx, int outny // Size of output image 113 113 ); 114 114 … … 118 118 119 119 // Return the relative gradient for a given pixel 120 float stacGradient(psImage *image, // Input for which to measure the gradient121 int x, int y// Coordinates at which to measure the gradient120 float stacGradient(psImage *image, // Input for which to measure the gradient 121 int x, int y // Coordinates at which to measure the gradient 122 122 ); 123 123 124 124 // Transform the rejection masks back to the source frame 125 psArray *stacRejection(psArray *inputs, // Input images126 psArray *rejected, // Rejected images127 psArray *regions, // Regions of interest128 psArray *maps,// Maps from input to transformed image129 psArray *inverseMaps, // Maps from transformed to input image130 float frac,// Fraction of pixel rejected before looking more carefully131 float grad,// Gradient limit for rejection132 psArray *names// Names of original images (only for writing out when TESTING)125 psArray *stacRejection(psArray *inputs, // Input images 126 psArray *rejected, // Rejected images 127 psArray *regions, // Regions of interest 128 psArray *maps, // Maps from input to transformed image 129 psArray *inverseMaps, // Maps from transformed to input image 130 float frac, // Fraction of pixel rejected before looking more carefully 131 float grad, // Gradient limit for rejection 132 psArray *names // Names of original images (only for writing out when TESTING) 133 133 ); 134 134 … … 139 139 // Returns the change in x' and y' for a change in x and y of 1 140 140 bool stacPlaneTransformDeriv(psPlane *out, // Output derivative, assumed already allocated 141 psPlaneTransform *transform, // The transform for which to obtain the derivative142 psPlane *in // The position at which to obtain the derivative141 psPlaneTransform *transform, // The transform for which to obtain the derivative 142 psPlane *in // The position at which to obtain the derivative 143 143 ); 144 144 … … 146 146 // Basically, uses derivatives of the transformation to work out what pixels in the source might be of interest 147 147 psImage *stacAreaOfInterest(psImage *mask, // Mask that is to be used to determine the area of interest 148 psPlaneTransform *map, // Map from the mask to the area of interest149 int nxOut, int nyOut // Size of the area of interest148 psPlaneTransform *map, // Map from the mask to the area of interest 149 int nxOut, int nyOut // Size of the area of interest 150 150 ); 151 151 … … 155 155 156 156 // Calculate the size of the output image 157 bool stacSize(int *outnx, int *outny, // Size of output image (returned) 158 float *xMapDiff, float *yMapDiff, // Difference applied to maps 159 const psArray *images, // Input images 160 psArray *maps // Transformation maps 157 bool stacSize(int *outnx, int *outny, // Size of output image (returned) 158 float *xMapDiff, float *yMapDiff, // Difference applied to maps 159 const psVector *xSizes, // Sizes of images in x 160 const psVector *ySizes, // Sizes of images in y 161 psArray *maps // Transformation maps 161 162 ); 162 163 … … 167 168 // Calculate the background in an image 168 169 float stacBackground(const psImage *image, // Image for which to get the background 169 int sample// Sample in increments of this value170 int sample // Sample in increments of this value 170 171 ); 171 172 172 173 173 174 // Calculate the relative scales and offsets between the images 174 bool stacScales(psVector **scalesPtr, // Scales to return175 psVector **offsetsPtr,// Offsets to return176 const psArray *images,// Images on which to measure the scales and offsets177 const char *starFile,// File containing coordinates to photometer178 const char *starMapFile, // Map for coodinates to the common output frame179 float xMapDiff, float yMapDiff, // Difference from the map to apply (due to size difference)180 float aper// Aperture to use for photometry (radius)175 bool stacScales(psVector **scalesPtr, // Scales to return 176 psVector **offsetsPtr, // Offsets to return 177 const psArray *images, // Images on which to measure the scales and offsets 178 const char *starFile, // File containing coordinates to photometer 179 const char *starMapFile, // Map for coodinates to the common output frame 180 float xMapDiff, float yMapDiff, // Difference from the map to apply (due to size difference) 181 float aper // Aperture to use for photometry (radius) 181 182 ); 182 183 183 184 // Rescale images 184 bool stacRescale(psArray *images, // Images to rescale185 psArray *errImages,// Variance images to rescale186 const psImage *mask,// Mask indicating which pixels to scale187 const psVector *scales,// Scales for images188 const psVector *offsets // Offsets for images185 bool stacRescale(psArray *images, // Images to rescale 186 psArray *errImages, // Variance images to rescale 187 const psImage *mask, // Mask indicating which pixels to scale 188 const psVector *scales,// Scales for images 189 const psVector *offsets // Offsets for images 189 190 ); 190 191 … … 196 197 197 198 // Write map out 198 bool stacWriteMap(const char *mapName, // Filename to write to199 psPlaneTransform *map// Map to write199 bool stacWriteMap(const char *mapName, // Filename to write to 200 psPlaneTransform *map // Map to write 200 201 ); 201 202 202 203 // Write multiple maps 203 204 bool stacWriteMaps(const psArray *names, // Filenames of the input images (will add ".map") 204 const psArray *maps// Maps to write205 const psArray *maps // Maps to write 205 206 ); 206 207
Note:
See TracChangeset
for help on using the changeset viewer.
