Changeset 21323 for trunk/pswarp/src/pswarpTransformReadout.c
- Timestamp:
- Feb 5, 2009, 10:44:04 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpTransformReadout.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpTransformReadout.c
r21183 r21323 1 /** @file pswarpTransformReadout.c 2 * 3 * @brief 4 * 5 * @ingroup pswarp 6 * 7 * @author IfA 8 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-05 20:44:04 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #include "pswarp.h" 2 14 3 // NOTE: in this function, the coordinates are transformed from the OUTPUT to the INPUT 15 /** 16 * NOTE: in this function, the coordinates are transformed from the OUTPUT to the INPUT 17 */ 4 18 bool pswarpTransformReadout(pmReadout *output, pmReadout *input, pmConfig *config) 5 19 { 6 20 // XXX this implementation currently ignores the use of the region 7 psImage *region = NULL; // Region to transform21 psImage *region = NULL; ///< Region to transform 8 22 9 23 psTimerStart("warp"); 10 24 11 25 // Get warp parameters 12 bool mdok; // Status of MD lookup13 int nGridX = psMetadataLookupS32(NULL, config->arguments, "GRID.NX"); // Number of grid points in x14 int nGridY = psMetadataLookupS32(NULL, config->arguments, "GRID.NY"); // Number of grid points in y26 bool mdok; ///< Status of MD lookup 27 int nGridX = psMetadataLookupS32(NULL, config->arguments, "GRID.NX"); ///< Number of grid points in x 28 int nGridY = psMetadataLookupS32(NULL, config->arguments, "GRID.NY"); ///< Number of grid points in y 15 29 psImageInterpolateMode interpolationMode = psMetadataLookupS32(NULL, config->arguments, 16 "INTERPOLATION.MODE"); // Mode for interp17 int numKernels = psMetadataLookupS32(NULL, config->arguments, "INTERPOLATION.NUM"); // Number of kernels30 "INTERPOLATION.MODE"); ///< Mode for interp 31 int numKernels = psMetadataLookupS32(NULL, config->arguments, "INTERPOLATION.NUM"); ///< Number of kernels 18 32 19 33 // load the recipe … … 27 41 psAssert(mdok, "MASK.INPUT was not defined"); 28 42 29 int nThreads = psMetadataLookupS32(&mdok, config->arguments, "NTHREADS"); // Number of threads43 int nThreads = psMetadataLookupS32(&mdok, config->arguments, "NTHREADS"); ///< Number of threads 30 44 if (!mdok) { 31 45 nThreads = 0; 32 46 } 33 float poorFrac = psMetadataLookupF32(NULL, config->arguments, "POOR.FRAC"); // Flux fraction for "poor"47 float poorFrac = psMetadataLookupF32(NULL, config->arguments, "POOR.FRAC"); ///< Flux fraction for "poor" 34 48 35 49 // pswarpMapGridFromImage builds a set of locally-linear maps which convert the … … 42 56 43 57 // Get range of interest 44 int xOutMin, xOutMax, yOutMin, yOutMax; // Output pixel range58 int xOutMin, xOutMax, yOutMin, yOutMax; ///< Output pixel range 45 59 pswarpMatchRange(&xOutMin, &yOutMin, &xOutMax, &yOutMax, input, output); 46 60 … … 53 67 } 54 68 55 int xGridMin = nGridX, xGridMax = 0, yGridMin = nGridY, yGridMax = 0; // Grid range56 int xGrid, yGrid; // Grid coordinates69 int xGridMin = nGridX, xGridMax = 0, yGridMin = nGridY, yGridMax = 0; ///< Grid range 70 int xGrid, yGrid; ///< Grid coordinates 57 71 pswarpMapGridSetGrid(grid, xOutMin, yOutMin, &xGrid, &yGrid); 58 72 CHECK_GRID_RANGE(); … … 121 135 psThreadJob *job = NULL; 122 136 int xMin = output->image->numCols, xMax = 0, yMin = output->image->numRows, yMax = 0; // Bounds 123 int goodPixels = 0; // total number of good pixels across all tiles137 int goodPixels = 0; ///< total number of good pixels across all tiles 124 138 while ((job = psThreadJobGetDone()) != NULL) { 125 139 if (job->args->n < 1) {
Note:
See TracChangeset
for help on using the changeset viewer.
