Changeset 4579 for trunk/psModules/src
- Timestamp:
- Jul 18, 2005, 3:44:48 PM (21 years ago)
- Location:
- trunk/psModules/src
- Files:
-
- 13 edited
-
Makefile.am (modified) (2 diffs)
-
pmFlatField.h (modified) (1 diff)
-
pmImageSubtract.c (modified) (3 diffs)
-
pmMaskBadPixels.h (modified) (2 diffs)
-
pmNonLinear.h (modified) (2 diffs)
-
pmObjects.c (modified) (9 diffs)
-
pmObjects.h (modified) (2 diffs)
-
pmReadoutCombine.h (modified) (2 diffs)
-
pmSubtractBias.c (modified) (2 diffs)
-
pmSubtractBias.h (modified) (2 diffs)
-
pmSubtractSky.h (modified) (2 diffs)
-
psAstrometry.c (modified) (47 diffs)
-
psAstrometry.h (modified) (45 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/Makefile.am
r3877 r4579 9 9 pmReadoutCombine.c \ 10 10 pmSubtractBias.c \ 11 pmSubtractSky.c 11 pmSubtractSky.c \ 12 psAstrometry.c 12 13 13 14 libpsmodule_a_HEADERS = pmFlatFieldErrors.h \ … … 21 22 pmReadoutCombine.h \ 22 23 pmSubtractBias.h \ 23 pmSubtractSky.h 24 pmSubtractSky.h \ 25 psAstrometry.h 24 26 25 27 EXTRA_DIST = psErrorCodes.dat -
trunk/psModules/src/pmFlatField.h
r1849 r4579 18 18 * @author Ross Harman, MHPCC 19 19 * 20 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $21 * @date $Date: 200 4-09-22 19:58:57$20 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 21 * @date $Date: 2005-07-19 01:44:48 $ 22 22 * 23 23 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 24 24 */ 25 26 #include "pslib.h" 27 #include "psAstrometry.h" 28 25 29 26 30 /** Execute flat field module. -
trunk/psModules/src/pmImageSubtract.c
r4424 r4579 7 7 * @author GLG, MHPCC 8 8 * 9 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 6-29 01:17:23$9 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-07-19 01:44:48 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 65 65 stamp->status = status; 66 66 67 psMemSetDeallocator(stamp, (psFreeF cn)p_pmStampFree);67 psMemSetDeallocator(stamp, (psFreeFunc)p_pmStampFree); 68 68 69 69 return(stamp); … … 88 88 89 89 tmp->type = type; 90 psMemSetDeallocator(tmp, (psFreeF cn) p_pmSubtractionKernelsFree);90 psMemSetDeallocator(tmp, (psFreeFunc) p_pmSubtractionKernelsFree); 91 91 return(tmp); 92 92 } -
trunk/psModules/src/pmMaskBadPixels.h
r1822 r4579 19 19 * @author Ross Harman, MHPCC 20 20 * 21 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $22 * @date $Date: 200 4-09-17 00:49:04$21 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 22 * @date $Date: 2005-07-19 01:44:48 $ 23 23 * 24 24 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 26 26 27 27 #include "pslib.h" 28 #include "psAstrometry.h" 28 29 29 30 /** Mask values */ -
trunk/psModules/src/pmNonLinear.h
r3024 r4579 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-0 1-17 19:58:18 $7 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-07-19 01:44:48 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 16 16 17 17 #include "pslib.h" 18 #include "psAstrometry.h" 18 19 19 20 psReadout *pmNonLinearityPolynomial(psReadout *in, -
trunk/psModules/src/pmObjects.c
r4222 r4579 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1. 29$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-0 6-13 20:00:49$8 * @version $Revision: 1.30 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-07-19 01:44:48 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 108 108 } 109 109 110 psMemSetDeallocator(tmp, (psFreeF cn) modelFree);110 psMemSetDeallocator(tmp, (psFreeFunc) modelFree); 111 111 return(tmp); 112 112 } … … 138 138 tmp->models = NULL; 139 139 tmp->type = 0; 140 psMemSetDeallocator(tmp, (psFreeF cn) sourceFree);140 psMemSetDeallocator(tmp, (psFreeFunc) sourceFree); 141 141 142 142 return(tmp); … … 1895 1895 params->data.F32[6] = Sxy; 1896 1896 *****************************************************************************/ 1897 psF64 pmMinLM_Gauss2D(psVector *deriv, 1898 psVector *params, 1899 psVector *x) 1897 float pmMinLM_Gauss2D( 1898 psVector *deriv, 1899 const psVector *params, 1900 const psVector *x) 1900 1901 { 1901 1902 PS_ASSERT_VECTOR_NON_NULL(params, NAN); … … 1931 1932 params->data.F32[6] = Sxy; 1932 1933 *****************************************************************************/ 1933 psF64 pmMinLM_PsuedoGauss2D(psVector *deriv, 1934 psVector *params, 1935 psVector *x) 1934 float pmMinLM_PsuedoGauss2D( 1935 psVector *deriv, 1936 const psVector *params, 1937 const psVector *x) 1936 1938 { 1937 1939 PS_ASSERT_VECTOR_NON_NULL(params, NAN); … … 1971 1973 params->data.F32[8] = B3; 1972 1974 *****************************************************************************/ 1973 psF64 pmMinLM_Wauss2D(psVector *deriv, 1974 psVector *params, 1975 psVector *x) 1975 float pmMinLM_Wauss2D( 1976 psVector *deriv, 1977 const psVector *params, 1978 const psVector *x) 1976 1979 { 1977 1980 PS_ASSERT_VECTOR_NON_NULL(params, NAN); … … 2019 2022 params->data.F32[10] = N; 2020 2023 *****************************************************************************/ 2021 psF64 pmMinLM_TwistGauss2D(psVector *deriv, 2022 psVector *params, 2023 psVector *x) 2024 float pmMinLM_TwistGauss2D( 2025 psVector *deriv, 2026 const psVector *params, 2027 const psVector *x) 2024 2028 { 2025 2029 PS_ASSERT_VECTOR_NON_NULL(params, NAN); … … 2077 2081 params->data.F32[7] = Nexp; 2078 2082 *****************************************************************************/ 2079 psF64 pmMinLM_Sersic(psVector *deriv, 2080 psVector *params, 2081 psVector *x) 2083 float pmMinLM_Sersic( 2084 psVector *deriv, 2085 const psVector *params, 2086 const psVector *x) 2082 2087 { 2083 2088 PS_ASSERT_VECTOR_NON_NULL(params, NAN); … … 2102 2107 params->data.F32[11] = Nexp; 2103 2108 *****************************************************************************/ 2104 psF64 pmMinLM_SersicCore(psVector *deriv, 2105 psVector *params, 2106 psVector *x) 2109 float pmMinLM_SersicCore( 2110 psVector *deriv, 2111 const psVector *params, 2112 const psVector *x) 2107 2113 { 2108 2114 PS_ASSERT_VECTOR_NON_NULL(params, NAN); -
trunk/psModules/src/pmObjects.h
r4187 r4579 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-0 6-09 06:19:27$7 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-07-19 01:44:48 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 209 209 XXX EAM: psMinimizeLMChi2Func returns psF64, not psF32 210 210 *****************************************************************************/ 211 psF64 pmMinLM_Gauss2D(psVector *deriv, ///< A possibly-NULL structure for the output derivatives 212 psVector *params, ///< A psVector which holds the parameters of this function 213 psVector *x ///< A psVector which holds the row/col coordinate 214 ); 215 216 /****************************************************************************** 217 *****************************************************************************/ 218 psF64 pmMinLM_PsuedoGauss2D(psVector *deriv, ///< A possibly-NULL structure for the output derivatives 219 psVector *params, ///< A psVector which holds the parameters of this function 220 psVector *x ///< A psVector which holds the row/col coordinate 221 ); 222 223 /****************************************************************************** 224 *****************************************************************************/ 225 psF64 pmMinLM_Wauss2D(psVector *deriv, ///< A possibly-NULL structure for the output derivatives 226 psVector *params, ///< A psVector which holds the parameters of this function 227 psVector *x ///< A psVector which holds the row/col coordinate 228 ); 229 230 /****************************************************************************** 231 *****************************************************************************/ 232 psF64 pmMinLM_TwistGauss2D(psVector *deriv, ///< A possibly-NULL structure for the output derivatives 233 psVector *params, ///< A psVector which holds the parameters of this function 234 psVector *x ///< A psVector which holds the row/col coordinate 235 ); 236 237 /****************************************************************************** 238 *****************************************************************************/ 239 psF64 pmMinLM_Sersic(psVector *deriv, ///< A possibly-NULL structure for the output derivatives 240 psVector *params, ///< A psVector which holds the parameters of this function 241 psVector *x ///< A psVector which holds the row/col coordinate 242 ); 243 244 /****************************************************************************** 245 *****************************************************************************/ 246 psF64 pmMinLM_SersicCore(psVector *deriv, ///< A possibly-NULL structure for the output derivatives 247 psVector *params, ///< A psVector which holds the parameters of this function 248 psVector *x ///< A psVector which holds the row/col coordinate 249 ); 250 251 /****************************************************************************** 252 *****************************************************************************/ 253 psF64 pmMinLM_PsuedoSersic(psVector *deriv, ///< A possibly-NULL structure for the output derivatives 254 psVector *params, ///< A psVector which holds the parameters of this function 255 psVector *x ///< A psVector which holds the row/col coordinate 256 ); 211 float pmMinLM_Gauss2D( 212 psVector *deriv, ///< A possibly-NULL structure for the output derivatives 213 const psVector *params, ///< A psVector which holds the parameters of this function 214 const psVector *x ///< A psVector which holds the row/col coordinate 215 ); 216 217 /****************************************************************************** 218 *****************************************************************************/ 219 float pmMinLM_PsuedoGauss2D( 220 psVector *deriv, ///< A possibly-NULL structure for the output derivatives 221 const psVector *params, ///< A psVector which holds the parameters of this function 222 const psVector *x ///< A psVector which holds the row/col coordinate 223 ); 224 225 /****************************************************************************** 226 *****************************************************************************/ 227 float pmMinLM_Wauss2D( 228 psVector *deriv, ///< A possibly-NULL structure for the output derivatives 229 const psVector *params, ///< A psVector which holds the parameters of this function 230 const psVector *x ///< A psVector which holds the row/col coordinate 231 ); 232 233 /****************************************************************************** 234 *****************************************************************************/ 235 float pmMinLM_TwistGauss2D( 236 psVector *deriv, ///< A possibly-NULL structure for the output derivatives 237 const psVector *params, ///< A psVector which holds the parameters of this function 238 const psVector *x ///< A psVector which holds the row/col coordinate 239 ); 240 241 /****************************************************************************** 242 *****************************************************************************/ 243 float pmMinLM_Sersic( 244 psVector *deriv, ///< A possibly-NULL structure for the output derivatives 245 const psVector *params, ///< A psVector which holds the parameters of this function 246 const psVector *x ///< A psVector which holds the row/col coordinate 247 ); 248 249 /****************************************************************************** 250 *****************************************************************************/ 251 float pmMinLM_SersicCore( 252 psVector *deriv, ///< A possibly-NULL structure for the output derivatives 253 const psVector *params, ///< A psVector which holds the parameters of this function 254 const psVector *x ///< A psVector which holds the row/col coordinate 255 ); 256 257 /****************************************************************************** 258 *****************************************************************************/ 259 float pmMinLM_PsuedoSersic( 260 psVector *deriv, ///< A possibly-NULL structure for the output derivatives 261 const psVector *params, ///< A psVector which holds the parameters of this function 262 const psVector *x ///< A psVector which holds the row/col coordinate 263 ); 257 264 258 265 -
trunk/psModules/src/pmReadoutCombine.h
r3668 r4579 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-0 4-05 22:55:05$7 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-07-19 01:44:48 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 23 23 #include "pslib.h" 24 24 #include "psConstants.h" 25 #include "psAstrometry.h" 25 26 26 27 typedef struct -
trunk/psModules/src/pmSubtractBias.c
r4131 r4579 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1.3 4$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-0 6-07 22:13:42$8 * @version $Revision: 1.35 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-07-19 01:44:48 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 352 352 353 353 PS_ASSERT_IMAGE_TYPE(myOverscanImage, PS_TYPE_F32, NULL); 354 psStats *rc = psImageStats(myStats, myOverscanImage, NULL, 0xffffffff);354 psStats *rc = psImageStats(myStats, myOverscanImage, NULL, (psMaskType)0xffffffff); 355 355 if (rc == NULL) { 356 356 psError(PS_ERR_UNKNOWN, false, "psImageStats(): could not perform requested statistical operation. Returning in image.\n"); -
trunk/psModules/src/pmSubtractBias.h
r4132 r4579 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-0 6-07 22:20:55$8 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-07-19 01:44:48 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 23 23 #include<math.h> 24 24 #include "pslib.h" 25 #include "psAstrometry.h" 25 26 26 27 typedef enum { -
trunk/psModules/src/pmSubtractSky.h
r3668 r4579 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-0 4-05 22:55:05$8 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-07-19 01:44:48 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 23 23 #include<math.h> 24 24 #include "pslib.h" 25 #include "psAstrometry.h" 25 26 26 27 // XXX: this is pmFit in pmSubtractBias.c, named psFit here. -
trunk/psModules/src/psAstrometry.c
r4577 r4579 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-07-1 8 18:48:29$10 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-07-19 01:44:48 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 25 25 #include "psError.h" 26 26 #include "psConstants.h" 27 #include "psAstronomyErrors.h"27 //#include "psAstronomyErrors.h" 28 28 #include "psMatrix.h" 29 29 #include "psTrace.h" 30 30 #include "psLogMsg.h" 31 31 32 32 33 /***************************************************************************** … … 35 36 psImage. 36 37 *****************************************************************************/ 38 /* 37 39 static psS32 checkValidImageCoords(double x, 38 40 double y, … … 40 42 { 41 43 PS_ASSERT_IMAGE_NON_NULL(tmpImage, 0); 42 44 43 45 if ((x < 0.0) || (x > (double)tmpImage->numCols) || 44 46 (y < 0.0) || (y > (double)tmpImage->numRows)) { 45 47 return (0); 46 48 } 47 49 48 50 return (1); 49 51 } 50 51 52 */ 53 /* 52 54 static void FPAFree(psFPA* fpa) 53 55 { … … 65 67 } 66 68 } 67 69 */ 70 71 /* 68 72 static void chipFree(psChip* chip) 69 73 { … … 75 79 } 76 80 } 77 81 */ 82 83 /* 78 84 static void cellFree(psCell* cell) 79 85 { … … 88 94 } 89 95 } 96 */ 90 97 91 98 static void readoutFree(psReadout* readout) … … 99 106 } 100 107 108 /* 101 109 static void observatoryFree(psObservatory* obs) 102 110 { … … 105 113 } 106 114 } 107 115 */ 116 /* 108 117 static void exposureFree(psExposure* exp) 109 118 { … … 115 124 } 116 125 } 117 126 */ 127 /* 118 128 static void fixedPatternFree(psFixedPattern* fp) 119 129 { … … 122 132 psFree(fp->x[i]); 123 133 } 124 134 125 135 for (psS32 j = 0; j < fp->p_ps_yRows; j++) { 126 136 psFree(fp->y[j]); 127 137 } 128 138 129 139 psFree(fp->x); 130 140 psFree(fp->y); 131 141 } 132 142 } 133 143 */ 134 144 /*****************************************************************************/ 135 145 /* FUNCTION IMPLEMENTATION - PUBLIC */ … … 141 151 * XXX: This assumes that x,y must be of type F64 142 152 */ 153 /* 143 154 psFixedPattern* psFixedPatternAlloc(double x0, 144 double y0,145 double xScale,146 double yScale,147 const psImage *x,148 const psImage *y)149 { 150 psFixedPattern *tmp;151 psS32 i;152 psS32 j;153 154 PS_ASSERT_IMAGE_NON_NULL(x, NULL);155 PS_ASSERT_IMAGE_NON_NULL(y, NULL);156 PS_ASSERT_IMAGE_TYPE(x, PS_TYPE_F64, NULL);157 PS_ASSERT_IMAGE_TYPE(y, PS_TYPE_F64, NULL);158 159 tmp = (psFixedPattern *) psAlloc(sizeof(psFixedPattern));160 // XXX: Is this correct?161 tmp->nX = (x->numCols * x->numRows);162 tmp->nY = (y->numCols * y->numRows);163 tmp->x0 = x0;164 tmp->y0 = y0;165 tmp->xScale = xScale;166 tmp->yScale = yScale;167 tmp->p_ps_xRows = x->numRows;168 tmp->p_ps_xCols = x->numCols;169 tmp->p_ps_yRows = y->numRows;170 tmp->p_ps_yCols = y->numCols;171 tmp->x = (double **) psAlloc(x->numRows * sizeof(double *));172 for (i=0;i<x->numRows;i++) {173 (tmp->x)[i] = (double *) psAlloc(x->numCols * sizeof(double));174 }175 for (i=0;i<x->numRows;i++) {176 for (j=0;j<x->numCols;j++) {177 (tmp->x)[i][j] = x->data.F64[i][j];178 }179 }180 181 tmp->y = (double **) psAlloc(y->numRows * sizeof(double *));182 for (i=0;i<y->numRows;i++) {183 (tmp->y)[i] = (double *) psAlloc(y->numCols * sizeof(double));184 }185 for (i=0;i<y->numRows;i++) {186 for (j=0;j<y->numCols;j++) {187 (tmp->y)[i][j] = y->data.F64[i][j];188 }189 }190 191 psMemSetDeallocator(tmp,(psFreeFunc)fixedPatternFree);192 193 return(tmp);194 } 195 196 155 double y0, 156 double xScale, 157 double yScale, 158 const psImage *x, 159 const psImage *y) 160 { 161 psFixedPattern *tmp; 162 psS32 i; 163 psS32 j; 164 165 PS_ASSERT_IMAGE_NON_NULL(x, NULL); 166 PS_ASSERT_IMAGE_NON_NULL(y, NULL); 167 PS_ASSERT_IMAGE_TYPE(x, PS_TYPE_F64, NULL); 168 PS_ASSERT_IMAGE_TYPE(y, PS_TYPE_F64, NULL); 169 170 tmp = (psFixedPattern *) psAlloc(sizeof(psFixedPattern)); 171 // XXX: Is this correct? 172 tmp->nX = (x->numCols * x->numRows); 173 tmp->nY = (y->numCols * y->numRows); 174 tmp->x0 = x0; 175 tmp->y0 = y0; 176 tmp->xScale = xScale; 177 tmp->yScale = yScale; 178 tmp->p_ps_xRows = x->numRows; 179 tmp->p_ps_xCols = x->numCols; 180 tmp->p_ps_yRows = y->numRows; 181 tmp->p_ps_yCols = y->numCols; 182 tmp->x = (double **) psAlloc(x->numRows * sizeof(double *)); 183 for (i=0;i<x->numRows;i++) { 184 (tmp->x)[i] = (double *) psAlloc(x->numCols * sizeof(double)); 185 } 186 for (i=0;i<x->numRows;i++) { 187 for (j=0;j<x->numCols;j++) { 188 (tmp->x)[i][j] = x->data.F64[i][j]; 189 } 190 } 191 192 tmp->y = (double **) psAlloc(y->numRows * sizeof(double *)); 193 for (i=0;i<y->numRows;i++) { 194 (tmp->y)[i] = (double *) psAlloc(y->numCols * sizeof(double)); 195 } 196 for (i=0;i<y->numRows;i++) { 197 for (j=0;j<y->numCols;j++) { 198 (tmp->y)[i][j] = y->data.F64[i][j]; 199 } 200 } 201 202 psMemSetDeallocator(tmp,(psFreeFunc)fixedPatternFree); 203 204 return(tmp); 205 } 206 */ 207 /* 197 208 psExposure* psExposureAlloc(double ra, 198 209 double dec, … … 210 221 { 211 222 PS_ASSERT_PTR_NON_NULL(observatory, NULL); 212 223 213 224 psExposure* exp = psAlloc(sizeof(psExposure)); 214 225 *(double *)&exp->ra = ra; … … 223 234 *(float *)&exp->exposureTime = exposureTime; 224 235 *(float *)&exp->wavelength = wavelength; 225 236 226 237 exp->time = psMemIncrRefCounter((psPtr)time); 227 238 exp->observatory = psMemIncrRefCounter((psPtr)observatory); 228 239 229 240 // XXX: how is this value derived? 230 241 *(double *)&exp->lst = psTimeToLMST((psTime*)time,observatory->longitude); … … 235 246 exp->cameraName = NULL; 236 247 exp->telescopeName = NULL; 237 248 238 249 psMemSetDeallocator(exp,(psFreeFunc)exposureFree); 239 250 240 251 return exp; 241 252 } 242 253 */ 254 /* 243 255 psObservatory* psObservatoryAlloc(const char* name, 244 256 double latitude, … … 248 260 { 249 261 psObservatory* obs = psAlloc(sizeof(psObservatory)); 250 262 251 263 if (name == NULL) { 252 264 obs->name = NULL; … … 255 267 strcpy((char*)obs->name, name); 256 268 } 257 269 258 270 *(double *)&obs->latitude = latitude; 259 271 *(double *)&obs->longitude = longitude; 260 272 *(double *)&obs->height = height; 261 273 *(double *)&obs->tlr = tlr; 262 274 263 275 psMemSetDeallocator(obs,(psFreeFunc)observatoryFree); 264 276 265 277 return obs; 266 278 } 267 279 */ 280 /* 268 281 psFPA* psFPAAlloc(psS32 nChips, 269 282 const psExposure* exp) 270 283 { 271 284 PS_ASSERT_INT_NONNEGATIVE(nChips, NULL); 272 285 273 286 psFPA* newFPA = psAlloc(sizeof(psFPA)); 274 287 275 288 // create array of NULL chips of the size nChips 276 289 newFPA->chips = psArrayAlloc(nChips); … … 280 293 } 281 294 newFPA->chips->n = 0; // per requirement 282 295 283 296 newFPA->metadata = NULL; 284 297 newFPA->fromTangentPlane = NULL; 285 298 newFPA->toTangentPlane = NULL; 286 299 newFPA->pattern = NULL; 287 300 288 301 if (exp != NULL) { 289 302 newFPA->exposure = psMemIncrRefCounter((psExposure*)exp); … … 293 306 newFPA->grommit = NULL; 294 307 } 295 308 296 309 newFPA->colorPlus = NULL; 297 310 newFPA->colorMinus = NULL; 298 311 newFPA->projection = NULL; 299 312 300 313 newFPA->rmsX = 0.0f; 301 314 newFPA->rmsY = 0.0f; 302 315 newFPA->chi2 = 0.0f; 303 316 304 317 psMemSetDeallocator(newFPA,(psFreeFunc)FPAFree); 305 318 306 319 return newFPA; 307 320 } 308 321 */ 309 322 /* 310 323 * psChip constructor 311 324 */ 325 /* 312 326 psChip* psChipAlloc(psS32 nCells, 313 327 psFPA *parentFPA) 314 328 { 315 329 PS_ASSERT_INT_NONNEGATIVE(nCells, NULL); 316 330 317 331 psChip* chip = psAlloc(sizeof(psChip)); 318 332 319 333 // create array of NULL psCells 320 334 int n = (nCells > 0) ? nCells : 1; … … 325 339 } 326 340 chip->cells->n = 0; // per requirement 327 341 328 342 *(int*)&chip->row0 = 0; 329 343 *(int*)&chip->col0 = 0; 330 344 331 345 chip->metadata = NULL; 332 346 333 347 chip->toFPA = NULL; 334 348 chip->fromFPA = NULL; 335 349 336 350 chip->parent = parentFPA; 337 351 338 352 psMemSetDeallocator(chip,(psFreeFunc)chipFree); 339 353 340 354 return chip; 341 342 } 343 355 356 } 357 */ 344 358 /* 345 359 * psCell constructor 346 360 */ 361 /* 347 362 psCell* psCellAlloc(psS32 nReadouts, 348 363 psChip* parentChip) 349 364 { 350 365 PS_ASSERT_INT_NONNEGATIVE(nReadouts, NULL); 351 366 352 367 psCell* cell = psAlloc(sizeof(psCell)); 353 368 354 369 // create array of NULL psReadouts 355 370 int n = (nReadouts > 0) ? nReadouts : 1; … … 360 375 } 361 376 cell->readouts->n = 0; // per requirement 362 377 363 378 *(int*)&cell->row0 = 0; 364 379 *(int*)&cell->col0 = 0; 365 380 366 381 cell->metadata = NULL; 367 382 368 383 cell->toChip = NULL; 369 384 cell->fromChip = NULL; … … 371 386 cell->toTP = NULL; 372 387 cell->toSky = NULL; 373 388 374 389 cell->parent = parentChip; 375 390 376 391 psMemSetDeallocator(cell,(psFreeFunc)cellFree); 377 392 378 393 return cell; 379 380 381 } 382 394 395 396 } 397 */ 383 398 psReadout* psReadoutAlloc() 384 399 { … … 402 417 } 403 418 419 /* 404 420 psGrommit* psGrommitAlloc(const psExposure* exp) 405 421 { 406 422 PS_ASSERT_PTR_NON_NULL(exp, NULL); 407 423 408 424 psSphere* polarMotion = p_psTimeGetPoleCoords(exp->time); 409 425 410 426 psGrommit* grommit = (psGrommit* ) psAlloc(sizeof(psGrommit)); 411 427 412 428 *(double*)&grommit->latitude = exp->observatory->latitude; 413 429 *(double*)&grommit->longitude = exp->observatory->longitude; … … 422 438 *(double*)&grommit->refractB = polarMotion->d; // XXX: need to figure out what to set here too. 423 439 *(double*)&grommit->siderealTime = psTimeToMJD(exp->time); // XXX: this is probably not correct 424 440 425 441 psFree(polarMotion); 426 442 427 443 return (grommit); 428 444 } 429 445 */ 446 /* 430 447 psCell* psCellInFPA(const psPlane* fpaCoord, 431 448 const psFPA* FPA) … … 433 450 PS_ASSERT_PTR_NON_NULL(fpaCoord, NULL); 434 451 PS_ASSERT_PTR_NON_NULL(FPA, NULL); 435 452 436 453 psChip* tmpChip = NULL; 437 454 psPlane chipCoord; 438 455 psCell* outCell = NULL; 439 456 440 457 // Determine which chip contains the fpaCoords. 441 458 tmpChip = psChipInFPA(fpaCoord, FPA); … … 443 460 return(NULL); 444 461 } 445 462 446 463 // Convert to those chip coordinates. 447 464 psCoordFPAToChip(&chipCoord, fpaCoord, tmpChip); 448 465 449 466 // Determine which cell contains those chip coordinates. 450 467 outCell = psCellInChip(&chipCoord, tmpChip); 451 468 452 469 return (outCell); 453 470 } 454 471 */ 472 /* 455 473 psChip* psChipInFPA(const psPlane* fpaCoord, 456 474 const psFPA* FPA) … … 459 477 PS_ASSERT_PTR_NON_NULL(FPA, NULL); 460 478 PS_ASSERT_PTR_NON_NULL(FPA->chips, NULL); 461 479 462 480 psArray* chips = FPA->chips; 463 481 psS32 nChips = chips->n; 464 482 psPlane chipCoord; 465 483 psCell *tmpCell = NULL; 466 484 467 485 // Loop through every chip in this FPA. Convert the original FPA 468 486 // coordinates to chip coordinates for that chip. Then, determine if any 469 487 // cells in that chip contain those chip coordinates. 470 488 471 489 for (psS32 i = 0; i < nChips; i++) { 472 490 psChip* tmpChip = chips->data[i]; 473 491 PS_ASSERT_PTR_NON_NULL(tmpChip, NULL); 474 492 PS_ASSERT_PTR_NON_NULL(tmpChip->fromFPA, NULL); 475 493 476 494 psPlaneTransformApply(&chipCoord, tmpChip->fromFPA, fpaCoord); 477 495 478 496 tmpCell = psCellInChip(&chipCoord, tmpChip); 479 497 if (tmpCell != NULL) { … … 481 499 } 482 500 } 483 501 484 502 // XXX: Print warning here? 485 503 return (NULL); 486 504 } 487 505 */ 506 /* 488 507 psCell* psCellInChip(const psPlane* chipCoord, 489 508 const psChip* chip) … … 491 510 PS_ASSERT_PTR_NON_NULL(chipCoord, NULL); 492 511 PS_ASSERT_PTR_NON_NULL(chip, NULL); 493 512 494 513 psPlane cellCoord; 495 514 psArray* cells; 496 515 497 516 cells = chip->cells; 498 517 if (cells == NULL) { 499 518 return NULL; 500 519 } 501 520 502 521 // We loop over each cell in the chip. We transform the chipCoord into 503 522 // a cellCoord for that cell and determine if that cellCoord is valid. 504 523 // If so, then we return that cell. 505 524 506 525 for (psS32 i = 0; i < cells->n; i++) { 507 526 psCell* tmpCell = (psCell* ) cells->data[i]; … … 509 528 PS_ASSERT_PTR_NON_NULL(tmpCell->fromChip, NULL); 510 529 psArray* readouts = tmpCell->readouts; 511 530 512 531 if (readouts != NULL) { 513 532 for (psS32 j = 0; j < readouts->n; j++) { 514 533 psReadout* tmpReadout = readouts->data[j]; 515 534 PS_ASSERT_READOUT_NON_NULL(tmpReadout, NULL); 516 535 517 536 psPlaneTransformApply(&cellCoord, 518 537 tmpCell->fromChip, 519 538 chipCoord); 520 539 521 540 if (checkValidImageCoords(cellCoord.x, 522 541 cellCoord.y, … … 527 546 } 528 547 } 529 548 530 549 return (NULL); 531 550 } 532 551 */ 552 /* 533 553 psPlane* psCoordCellToChip(psPlane* outCoord, 534 554 const psPlane* inCoord, … … 537 557 PS_ASSERT_PTR_NON_NULL(inCoord, NULL); 538 558 PS_ASSERT_PTR_NON_NULL(cell, NULL); 539 559 540 560 return (psPlaneTransformApply(outCoord, cell->toChip, inCoord)); 541 561 } 542 562 */ 563 /* 543 564 psPlane* psCoordChipToFPA(psPlane* outCoord, 544 565 const psPlane* inCoord, … … 547 568 PS_ASSERT_PTR_NON_NULL(inCoord, NULL); 548 569 PS_ASSERT_PTR_NON_NULL(chip, NULL); 549 570 550 571 return (psPlaneTransformApply(outCoord, chip->toFPA, inCoord)); 551 572 } 552 573 */ 574 /* 553 575 psPlane* psCoordFPAToTP(psPlane* outCoord, 554 576 const psPlane* inCoord, … … 559 581 PS_ASSERT_PTR_NON_NULL(inCoord, NULL); 560 582 PS_ASSERT_PTR_NON_NULL(fpa, NULL); 561 583 562 584 return(psPlaneDistortApply(outCoord, fpa->toTangentPlane, inCoord, 563 585 color, magnitude)); 564 586 } 565 587 */ 566 588 /***************************************************************************** 567 589 XXX: What about units for the (x,y) coords? 568 590 *****************************************************************************/ 591 /* 569 592 psSphere* psCoordTPToSky(psSphere* outSphere, 570 593 const psPlane* tpCoord, … … 573 596 PS_ASSERT_PTR_NON_NULL(tpCoord, NULL); 574 597 PS_ASSERT_PTR_NON_NULL(grommit, NULL); 575 598 576 599 if (outSphere == NULL) { 577 600 outSphere = (psSphere* ) psAlloc(sizeof(psSphere)); 578 601 } 579 602 580 603 // XXX: this was done by a SLALIB call -- needs to be reimplemented 581 604 psWarning("Warning! psCoordTPToSky functionality is no longer implemented"); 582 / *slaAopqk(tpCoord->x, tpCoord->y, (double*)grommit,583 &AOB, &ZOB, &HOB, &outSphere->r, &outSphere->d); */584 605 // slaAopqk(tpCoord->x, tpCoord->y, (double*)grommit, 606 // &AOB, &ZOB, &HOB, &outSphere->r, &outSphere->d); 607 585 608 return (outSphere); 586 609 } 587 610 */ 611 /* 588 612 psPlane* psCoordCellToFPA(psPlane* fpaCoord, 589 613 const psPlane* cellCoord, … … 592 616 PS_ASSERT_PTR_NON_NULL(cellCoord, NULL); 593 617 PS_ASSERT_PTR_NON_NULL(cell, NULL); 594 618 595 619 return (psPlaneTransformApply(fpaCoord, cell->toFPA, cellCoord)); 596 620 } 597 621 */ 622 /* 598 623 psSphere* psCoordCellToSky(psSphere* skyCoord, 599 624 const psPlane* cellCoord, … … 609 634 PS_ASSERT_PTR_NON_NULL(cell->parent->parent->toTangentPlane, NULL); 610 635 PS_ASSERT_PTR_NON_NULL(cell->parent->parent->exposure, NULL); 611 636 612 637 psPlane* fpaCoord = NULL; 613 638 psPlane* tpCoord = NULL; 614 639 psFPA* parFPA = (cell->parent)->parent; 615 640 psGrommit* tmpGrommit = NULL; 616 641 617 642 // Convert the input cell coordinates to FPA coordinates. 618 643 fpaCoord = psPlaneTransformApply(fpaCoord, cell->toFPA, cellCoord); 619 644 620 645 // Convert the FPA coordinates to tangent plane Coordinates. 621 646 tpCoord = psPlaneDistortApply(tpCoord, parFPA->toTangentPlane, 622 647 fpaCoord, color, magnitude); 623 648 624 649 // Generate a grommit for this FPA. 625 650 tmpGrommit = psGrommitAlloc(parFPA->exposure); 626 651 627 652 // Convert the tangent plane Coordinates to sky coordinates. 628 653 skyCoord = psCoordTPToSky(skyCoord, tpCoord, tmpGrommit); 629 654 630 655 psFree(fpaCoord); 631 656 psFree(tpCoord); 632 657 psFree(tmpGrommit); 633 658 634 659 return(skyCoord); 635 660 } 636 661 662 */ 663 /* 637 664 psSphere* psCoordCellToSkyQuick(psSphere* outSphere, 638 665 const psPlane* cellCoord, … … 650 677 "WARNING: psCoordCellToSkyQuick(): The cell->toSky transform is ignored. The cell->toTP transform is being used."); 651 678 } 652 679 653 680 psPlane *tpCoord = NULL; 654 681 psChip *chip = cell->parent; 655 682 psFPA *FPA = chip->parent; 656 683 psProjectionType oldProjectionType; 657 684 658 685 if (outSphere == NULL) { 659 686 outSphere = (psSphere* ) psAlloc(sizeof(psSphere)); 660 687 } 661 688 662 689 // Determine the tangent plane coordinates. 663 690 tpCoord = psPlaneTransformApply(NULL, cell->toTP, cellCoord); 664 691 665 692 // Save the old projection type and set the new projection type to TAN. 666 693 oldProjectionType = FPA->projection->type; 667 694 FPA->projection->type = PS_PROJ_TAN; 668 695 669 696 // Deproject the tangent plane coordinates a sphere. 670 697 outSphere = psDeproject(tpCoord, FPA->projection); 671 698 672 699 // Restore old projection type. Free memory. 673 700 FPA->projection->type = oldProjectionType; 674 701 psFree(tpCoord); 675 702 676 703 return (outSphere); 677 704 } 705 */ 678 706 679 707 /***************************************************************************** 680 708 XXX: What about units for the (x,y) coords? 681 709 *****************************************************************************/ 710 /* 682 711 psPlane* psCoordSkyToTP(psPlane* tpCoord, 683 712 const psSphere* in, … … 686 715 PS_ASSERT_PTR_NON_NULL(in, NULL); 687 716 PS_ASSERT_PTR_NON_NULL(grommit, NULL); 688 717 689 718 // char* type = "RA"; 690 719 691 720 if (tpCoord == NULL) { 692 721 tpCoord = (psPlane* ) psAlloc(sizeof(psPlane)); 693 722 } 694 723 695 724 // XXX: this was done by a SLALIB call -- needs to be reimplemented 696 725 psWarning("Warning! psCoordSkyToTP functionality is no longer implemented"); 697 / * slaOapqk(type, in->r, in->d, (double*)grommit, &tpCoord->x, &tpCoord->y); */698 726 // slaOapqk(type, in->r, in->d, (double*)grommit, &tpCoord->x, &tpCoord->y); 727 699 728 return(tpCoord); 700 729 } 701 702 730 */ 731 /* 703 732 psPlane* psCoordTPToFPA(psPlane* fpaCoord, 704 733 const psPlane* tpCoord, … … 710 739 PS_ASSERT_PTR_NON_NULL(fpa, NULL); 711 740 PS_ASSERT_PTR_NON_NULL(fpa->fromTangentPlane, NULL); 712 741 713 742 return (psPlaneDistortApply(fpaCoord, fpa->fromTangentPlane, 714 743 tpCoord, color, magnitude)); 715 744 } 716 745 */ 746 /* 717 747 psPlane* psCoordFPAToChip(psPlane* chipCoord, 718 748 const psPlane* fpaCoord, … … 722 752 PS_ASSERT_PTR_NON_NULL(chip, NULL); 723 753 PS_ASSERT_PTR_NON_NULL(chip->fromFPA, NULL); 724 754 725 755 chipCoord = psPlaneTransformApply(chipCoord, chip->fromFPA, fpaCoord); 726 756 return(chipCoord); 727 757 } 728 758 */ 759 /* 729 760 psPlane* psCoordChipToCell(psPlane* cellCoord, 730 761 const psPlane* chipCoord, … … 734 765 PS_ASSERT_PTR_NON_NULL(cell, NULL); 735 766 PS_ASSERT_PTR_NON_NULL(cell->fromChip, NULL); 736 767 737 768 cellCoord = psPlaneTransformApply(cellCoord, cell->fromChip, chipCoord); 738 769 return(cellCoord); 739 770 } 740 771 */ 772 /* 741 773 psPlane* psCoordSkyToCell(psPlane* cellCoord, 742 774 const psSphere* skyCoord, … … 750 782 PS_ASSERT_PTR_NON_NULL(cell->parent->parent, NULL); 751 783 PS_ASSERT_PTR_NON_NULL(cell->parent->parent->grommit, NULL); 752 784 753 785 psChip *parChip = cell->parent; 754 786 psFPA *parFPA = parChip->parent; 755 787 psGrommit* grommit = parFPA->grommit; 756 788 757 789 // Convert the skyCoords to tangent plane coords. 758 790 psPlane *tpCoord = psCoordSkyToTP(tpCoord, skyCoord, grommit); 759 791 760 792 // Convert the tangent plane coords to FPA coords. 761 793 psPlane *fpaCoord = psCoordTPToFPA(fpaCoord, tpCoord, color, 762 794 magnitude, parFPA); 763 795 764 796 // Convert the FPA coords to chip coords. 765 797 psPlane *chipCoord = psCoordFPAToChip(chipCoord, fpaCoord, parChip); 766 798 767 799 // Convert the chip coords to cell coords. 768 800 cellCoord = psCoordChipToCell(cellCoord, chipCoord, cell); 769 801 770 802 psFree(tpCoord); 771 803 psFree(fpaCoord); 772 804 psFree(chipCoord); 773 805 774 806 return (cellCoord); 775 807 } 776 808 */ 809 /* 777 810 psPlane* psCoordSkyToCellQuick(psPlane* cellCoord, 778 811 const psSphere* skyCoord, … … 790 823 "WARNING: psCoordSkyToCellQuick(): The cell->toSky transform is ignored. The cell->toTP transform is being used."); 791 824 } 792 825 793 826 psPlane *tpCoord = NULL; 794 827 psChip *whichChip = cell->parent; … … 796 829 psProjectionType oldProjectionType; 797 830 psPlaneTransform *TPtoCell = NULL; 798 831 799 832 // Save the old projection type and set the new projection type to TAN. 800 833 oldProjectionType = whichFPA->projection->type; 801 834 whichFPA->projection->type = PS_PROJ_TAN; 802 835 803 836 if (cellCoord == NULL) { 804 837 cellCoord = (psPlane* ) psAlloc(sizeof(psPlane)); 805 838 } 806 839 807 840 tpCoord = psProject(skyCoord, whichFPA->projection); 808 841 809 842 // generate an error if cell->toTP is not linear. 810 843 if (0 == p_psIsProjectionLinear(cell->toTP)) { … … 813 846 "cell to tangent plane"); 814 847 } 815 848 816 849 TPtoCell = p_psPlaneTransformLinearInvert(cell->toTP); 817 850 cellCoord = psPlaneTransformApply(cellCoord, TPtoCell, tpCoord); 818 851 819 852 // Restore old projection type. Free memory. 820 853 whichFPA->projection->type = oldProjectionType; … … 822 855 return (cellCoord); 823 856 } 824 825 826 857 */ 858 859 -
trunk/psModules/src/psAstrometry.h
r4577 r4579 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-07-1 8 18:48:29$10 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-07-19 01:44:48 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 17 17 #define PS_ASTROMETRY_H 18 18 19 #include "psType.h" 20 #include "psImage.h" 21 #include "psArray.h" 22 #include "psList.h" 23 #include "psFunctions.h" 24 #include "psMetadata.h" 25 #include "psCoord.h" 26 #include "psPhotometry.h" 27 19 #include "pslib.h" 20 21 /* 28 22 struct psCell; 29 23 struct psChip; 30 24 struct psFPA; 31 25 struct psExposure; 32 26 */ 33 27 /// @addtogroup AstroImage 34 28 /// @{ … … 42 36 * 43 37 */ 38 39 /* 44 40 typedef struct 45 41 { 46 const double latitude; ///< geodetic latitude (radians)47 const double longitude; ///< longitude + ... (radians)48 const double height; ///< height (HM)49 const double abberationMag; ///< magnitude of diurnal aberration vector50 const double temperature; ///< ambient temperature (TDK)51 const double pressure; ///< pressure (PMB)52 const double humidity; ///< relative humidity (RH)53 const double wavelength; ///< wavelength (WL)54 const double lapseRate; ///< lapse rate (TLR)55 const double refractA, refractB; ///< refraction constants A and B (radians)56 const double siderealTime; ///< local apparent sidereal time (radians)42 const double latitude; ///< geodetic latitude (radians) 43 const double longitude; ///< longitude + ... (radians) 44 const double height; ///< height (HM) 45 const double abberationMag; ///< magnitude of diurnal aberration vector 46 const double temperature; ///< ambient temperature (TDK) 47 const double pressure; ///< pressure (PMB) 48 const double humidity; ///< relative humidity (RH) 49 const double wavelength; ///< wavelength (WL) 50 const double lapseRate; ///< lapse rate (TLR) 51 const double refractA, refractB; ///< refraction constants A and B (radians) 52 const double siderealTime; ///< local apparent sidereal time (radians) 57 53 } 58 54 psGrommit; 55 */ 56 59 57 60 58 /** Fixed Pattern Corrections … … 67 65 * of the grid in x and y as well as the origin of the grid. 68 66 */ 67 /* 69 68 typedef struct 70 69 { … … 84 83 } 85 84 psFixedPattern; 85 */ 86 86 87 87 /** Readout data structure. 88 88 89 * 89 90 * A readout is the result of a single read of a cell (or a portion thereof). … … 121 122 * 122 123 */ 124 /* 123 125 typedef struct 124 126 { 125 127 const psS32 col0; ///< Offset from the left of chip 126 128 const psS32 row0; ///< Offset from the bottom of chip 127 129 128 130 psArray* readouts; ///< readouts from the cell 129 131 130 132 psMetadata* metadata; ///< cell-level metadata 131 133 132 134 psPlaneTransform* toChip; ///< transformations from cell to chip coordinates 133 135 psPlaneTransform* fromChip; ///< transformations from cell to chip coordinates … … 135 137 psPlaneTransform* toTP; ///< transformations from cell to FPA coordinates 136 138 psPlaneTransform* toSky; ///< transformations from cell to tangent plane coordinates 137 139 138 140 struct psChip* parent; ///< chip in which contains this cell 139 141 } 140 142 psCell; 143 */ 141 144 142 145 /** Chip data structure … … 148 151 * 149 152 */ 150 typedef struct psChip153 /*typedef struct psChip 151 154 { 152 155 const psS32 col0; ///< Offset from the left of FPA 153 156 const psS32 row0; ///< Offset from the bottom of FPA 154 157 155 158 psArray* cells; ///< cells in the chip 156 159 157 160 psMetadata* metadata; ///< chip-level metadata 158 161 159 162 psPlaneTransform* toFPA; ///< transformation from chip to FPA coordinates 160 163 psPlaneTransform* fromFPA; ///< transformation from FPA to chip coordinates 161 164 162 165 struct psFPA* parent; ///< FPA which contains this chip 163 166 } 164 167 psChip; 168 */ 165 169 166 170 /** A Focal-Plane … … 177 181 * 178 182 */ 179 typedef struct psFPA183 /*typedef struct psFPA 180 184 { 181 185 psArray* chips; ///< chips in the focal plane array 182 186 psMetadata* metadata; ///< focal-plane's metadata 183 187 184 188 psPlaneDistort* fromTangentPlane; ///< transformation from tangent plane to focal plane 185 189 psPlaneDistort* toTangentPlane; ///< transformation from focal plane to tangent plane 186 190 psFixedPattern* pattern; ///< fixed pattern residual offsets 187 191 188 192 const struct psExposure* exposure; ///< information about this exposure 189 193 psGrommit *grommit; ///< Wallace's grommit 190 194 191 195 psPhotSystem* colorPlus; ///< Color reference 192 196 psPhotSystem* colorMinus; ///< Color reference 193 197 psProjection *projection; ///< projection 194 198 195 199 float rmsX; ///< RMS for x transformation fits 196 200 float rmsY; ///< RMS for y transformation fits … … 198 202 } 199 203 psFPA; 204 */ 200 205 201 206 /** Observatory Information … … 204 209 * 205 210 */ 206 typedef struct211 /*typedef struct 207 212 { 208 213 const char* name; ///< Name of observatory … … 213 218 } 214 219 psObservatory; 220 */ 215 221 216 222 /** Exposure Information … … 221 227 * 222 228 */ 223 typedef struct psExposure229 /*typedef struct psExposure 224 230 { 225 231 const double ra; ///< Telescope boresight, right ascention … … 236 242 const float wavelength; ///< Wavelength in microns 237 243 const psObservatory* observatory; ///< Observatory data 238 239 / * Derived quantities */244 245 // Derived quantities 240 246 const double lst; ///< Local Sidereal Time 241 247 const float positionAngle; ///< Position angle … … 247 253 } 248 254 psExposure; 255 */ 249 256 250 257 /** Allocator for psFixedPattern struct … … 255 262 * @return psFixedPattern* New psFixedPattern struct. 256 263 */ 257 psFixedPattern* psFixedPatternAlloc(264 /*psFixedPattern* psFixedPatternAlloc( 258 265 double x0, ///< X Position of 0,0 corner on focal plane 259 266 double y0, ///< Y Position of 0,0 corner on focal plane … … 263 270 const psImage *y ///< The grid of offsets in y 264 271 ); 265 272 */ 266 273 267 274 /** Allocator for psExposure … … 273 280 * @return psExposure* New psExposure struct 274 281 */ 275 psExposure* psExposureAlloc(282 /*psExposure* psExposureAlloc( 276 283 double ra, ///< Telescope boresight, right ascention 277 284 double dec, ///< Telescope boresight, declination … … 288 295 const psObservatory* observatory ///< Observatory data 289 296 ); 297 */ 290 298 291 299 /** Allocator for psObservatory … … 296 304 * @return psObservatory* new psObservatory struct 297 305 */ 298 psObservatory* psObservatoryAlloc(306 /*psObservatory* psObservatoryAlloc( 299 307 const char* name, ///< Name of observatory 300 308 double latitude, ///< Latitude of observatory, east positive … … 303 311 double tlr ///< Tropospheric Lapse Rate 304 312 ); 313 */ 305 314 306 315 /** Allocator for psFPA … … 313 322 * @return psFPA* a newly allocated psFPA 314 323 */ 315 psFPA* psFPAAlloc(324 /*psFPA* psFPAAlloc( 316 325 psS32 nChips, ///< number of chips in the FPA 317 326 const psExposure* exp ///< the exposure information 318 327 ); 328 */ 319 329 320 330 /** Allocates a psChip … … 326 336 * @return psChip* newly allocated psChip 327 337 */ 328 psChip* psChipAlloc(338 /*psChip* psChipAlloc( 329 339 psS32 nCells, ///< number of cells in Chip 330 340 psFPA* parentFPA ///< parent FPA 331 341 ); 342 */ 332 343 333 344 /** Allocates a psCell … … 339 350 * @return psCell* newly allocated psCell 340 351 */ 341 psCell* psCellAlloc(352 /*psCell* psCellAlloc( 342 353 psS32 nReadouts, ///< number of readouts in cell 343 354 psChip* parentChip ///< parent Chip 344 355 ); 356 */ 345 357 346 358 /** Allocates a psReadout … … 360 372 * @return psGrommit* New grommit structure. 361 373 */ 362 psGrommit* psGrommitAlloc(374 /*psGrommit* psGrommitAlloc( 363 375 const psExposure* exp ///< the cooresponding exposure structure. 364 376 ); 377 */ 365 378 366 379 /** Find cooresponding cell for given FPA coordinate … … 368 381 * @return psCell* the cell cooresponding to the coord in FPA 369 382 */ 370 psCell* psCellInFPA(383 /*psCell* psCellInFPA( 371 384 const psPlane* coord, ///< the coordinate in FPA plane 372 385 const psFPA* FPA ///< the FPA to search for the cell 373 386 ); 387 */ 374 388 375 389 /** Find cooresponding chip for given FPA coordinate … … 377 391 * @return psChip* the chip cooresponding to coord 378 392 */ 379 psChip* psChipInFPA(393 /*psChip* psChipInFPA( 380 394 const psPlane* coord, ///< the coordinate in FPA plane 381 395 const psFPA* FPA ///< the FPA to search for the cell 382 396 ); 397 */ 383 398 384 399 /** Find cooresponding cell for given Chip coordinate … … 386 401 * @return psCell* the cell cooresponding to coord 387 402 */ 388 psCell* psCellInChip(403 /*psCell* psCellInChip( 389 404 const psPlane* coord, ///< the coordinate in Chip plane 390 405 const psChip* chip ///< the chip to search for the cell 391 406 ); 407 */ 392 408 393 409 /** Translate a cell coordinate into a chip coordinate … … 395 411 * @return psPlane* the resulting chip coordinate 396 412 */ 397 psPlane* psCoordCellToChip(413 /*psPlane* psCoordCellToChip( 398 414 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 399 415 const psPlane* in, ///< the coordinate within Cell 400 416 const psCell* cell ///< the Cell in interest 401 417 ); 418 */ 402 419 403 420 /** Translate a chip coordinate into a FPA coordinate … … 405 422 * @return psPlane* the resulting FPA coordinate 406 423 */ 407 psPlane* psCoordChipToFPA(424 /*psPlane* psCoordChipToFPA( 408 425 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 409 426 const psPlane* in, ///< the coordinate within Chip 410 427 const psChip* chip ///< the chip in interest 411 428 ); 429 */ 412 430 413 431 /** Translate a FPA coordinate into a Tangent Plane coordinate … … 415 433 * @return psPlane* the resulting Tangent Plane coordinate 416 434 */ 417 psPlane* psCoordFPAToTP(435 /*psPlane* psCoordFPAToTP( 418 436 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 419 437 const psPlane* in, ///< the coordinate within FPA … … 422 440 const psFPA* fpa ///< the FPA in interest 423 441 ); 442 */ 424 443 425 444 /** Translate a Tangent Plane coordinate into a Sky coordinate … … 427 446 * @return psSphere* the resulting Sky coordinate 428 447 */ 429 psSphere* psCoordTPToSky(448 /*psSphere* psCoordTPToSky( 430 449 psSphere* out, ///< a sphere struct to recycle. If NULL, a new struct is created 431 450 const psPlane* in, ///< the coordinate within Tangent Plane 432 451 const psGrommit* grommit ///< the grommit of the tangent plane 433 452 ); 453 */ 434 454 435 455 /** Translate a cell coordinate into a FPA coordinate … … 437 457 * @return psPlane* the resulting FPA coordinate 438 458 */ 439 psPlane* psCoordCellToFPA(459 /*psPlane* psCoordCellToFPA( 440 460 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 441 461 const psPlane* in, ///< the coordinate within cell 442 462 const psCell* cell ///< the cell in interest 443 463 ); 464 */ 444 465 445 466 /** Translate a cell coordinate into a Sky coordinate … … 447 468 * @return psSphere* the resulting Sky coordinate 448 469 */ 449 psSphere* psCoordCellToSky(470 /*psSphere* psCoordCellToSky( 450 471 psSphere* out, ///< a sphere struct to recycle. If NULL, a new struct is created 451 472 const psPlane* in, ///< the coordinate within cell … … 454 475 const psCell* cell ///< the cell in interest 455 476 ); 477 */ 456 478 457 479 /** Translate a cell coordinate into a Sky coordinate using a 'quick and … … 460 482 * @return psSphere* the resulting Sky coordinate 461 483 */ 462 psSphere* psCoordCellToSkyQuick(484 /*psSphere* psCoordCellToSkyQuick( 463 485 psSphere* out, ///< a sphere struct to recycle. If NULL, a new struct is created 464 486 const psPlane* in, ///< the coordinate within cell 465 487 const psCell* cell ///< the cell in interest 466 488 ); 489 */ 467 490 468 491 /** Translate a Sky coordinate into a Tangent Plane coordinate … … 470 493 * @return psPlane* the resulting Tangent Plane coordinate 471 494 */ 472 psPlane* psCoordSkyToTP(495 /*psPlane* psCoordSkyToTP( 473 496 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 474 497 const psSphere* in, ///< the sky coordinate 475 498 const psGrommit* grommit ///< the grommit 476 499 ); 500 */ 477 501 478 502 /** Translate a Tangent Plane coordinate into a FPA coordinate … … 480 504 * @return psPlane* the resulting FPA coordinate 481 505 */ 482 psPlane* psCoordTPToFPA(506 /*psPlane* psCoordTPToFPA( 483 507 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 484 508 const psPlane* in, ///< the coordinate within tangent plane … … 487 511 const psFPA* fpa ///< the FPA of interest 488 512 ); 513 */ 489 514 490 515 /** Translate a FPA coordinate into a chip coordinate … … 492 517 * @return psPlane* the resulting chip coordinate 493 518 */ 494 psPlane* psCoordFPAToChip(519 /*psPlane* psCoordFPAToChip( 495 520 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 496 521 const psPlane* in, ///< the FPA coordinate 497 522 const psChip* chip ///< the chip of interest 498 523 ); 524 */ 499 525 500 526 /** Translate a chip coordinate into a cell coordinate … … 502 528 * @return psPlane* the resulting cell coordinate 503 529 */ 504 psPlane* psCoordChipToCell(530 /*psPlane* psCoordChipToCell( 505 531 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 506 532 const psPlane* in, ///< the Chip coordinate 507 533 const psCell* cell ///< the cell of interest 508 534 ); 535 */ 509 536 510 537 /** Translate a sky coordinate into a cell coordinate … … 512 539 * @return psPlane* the resulting cell coordinate 513 540 */ 514 psPlane* psCoordSkyToCell(541 /*psPlane* psCoordSkyToCell( 515 542 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 516 543 const psSphere* in, ///< the Sky coordinate … … 519 546 const psCell* cell ///< the cell of interest 520 547 ); 548 */ 521 549 522 550 /** Translate a sky coordinate into a cell coordinate using a 'quick and … … 525 553 * @return psPlane* the resulting cell coordinate 526 554 */ 527 psPlane* psCoordSkyToCellQuick(555 /*psPlane* psCoordSkyToCellQuick( 528 556 psPlane* out, ///< a plane struct to recycle. If NULL, a new struct is created 529 557 const psSphere* in, ///< the Sky coordinate 530 558 const psCell* cell ///< the cell of interest 531 559 ); 532 560 */ 533 561 534 562 #endif // #ifndef PS_ASTROMETRY_H
Note:
See TracChangeset
for help on using the changeset viewer.
