- Timestamp:
- Jun 12, 2009, 3:53:07 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/extsrc/gpcsw/gpcsrc/analysis/libpscoords/pscoords.h
r23924 r24391 2 2 #define NINT(x) (x<0?(int)((x)-0.5):(int)((x)+0.5)) 3 3 4 #define OTA_CTE (5.0e-6) /* Coefficient of thermal expansion of Si+Mo */ 5 #define CFFP_CTE (0.5e-6) /* Coefficient of thermal expansion of CFFP */ 6 #define DELTA_T (-100.0) /* Operating temp minus metrology temp */ 7 8 #define OTA_SCALE (1.0+OTA_CTE*DELTA_T) /* Room temp um to operating um of Si+Mo */ 9 #define CFFP_SCALE ((1.0+CFFP_CTE*DELTA_T)*25400) /* Room temp inches to um on CFFP */ 10 4 11 /* Silicon layout of OTAs (um) */ 5 #define PSC_PIXEL 10.0/* Pixel size of an OTA */6 #define PSC_HCELL 5900.0/* Horizontal cell size */7 #define PSC_VCELL 5980.0/* Vertical cell size */8 #define PSC_HSTREET 120.0/* Horizontal street between cells (HS) */9 #define PSC_VSTREET 180.0/* Vertical street between cells (VS) */10 #define PSC_LBORDER 442.0/* Left border (to left-most cell) (LB) */11 #define PSC_RBORDER 418.0/* Right border (to right-most vertical street) (RB) */12 #define PSC_TBORDER 354.5/* Top border (to top-most cell) (TB) */13 #define PSC_BBORDER 975.5/* Bottom border (to lowest horizontal street) (BB) */14 #define PSC_HDIE 49500.0/* Horizontal size of silicon die */15 #define PSC_VDIE 50130.0/* Vertical size of silicon die */12 #define PSC_PIXEL (10.0*OTA_SCALE) /* Pixel size of an OTA */ 13 #define PSC_HCELL (5900.0*OTA_SCALE) /* Horizontal cell size */ 14 #define PSC_VCELL (5980.0*OTA_SCALE) /* Vertical cell size */ 15 #define PSC_HSTREET (120.0*OTA_SCALE) /* Horizontal street between cells (HS) */ 16 #define PSC_VSTREET (180.0*OTA_SCALE) /* Vertical street between cells (VS) */ 17 #define PSC_LBORDER (442.0*OTA_SCALE) /* Left border (to left-most cell) (LB) */ 18 #define PSC_RBORDER (418.0*OTA_SCALE) /* Right border (to right-most vertical street) (RB) */ 19 #define PSC_TBORDER (354.5*OTA_SCALE) /* Top border (to top-most cell) (TB) */ 20 #define PSC_BBORDER (975.5*OTA_SCALE) /* Bottom border (to lowest horizontal street) (BB) */ 21 #define PSC_HDIE (49500.0*OTA_SCALE) /* Horizontal size of silicon die */ 22 #define PSC_VDIE (50130.0*OTA_SCALE) /* Vertical size of silicon die */ 16 23 17 24 /* Mechanical layout of OTAs (um) */ 18 #define PSC_HMECH (1.957* 25400) /* Horizontal mech spacing of OTA placement */19 #define PSC_VMECH (2.025* 25400) /* Vertical mech spacing of OTA placement */20 #define PSC_VMOFF (PSC_VDIE-(1.568+0.375)* 25400) /* Vert die offset between sides */25 #define PSC_HMECH (1.957*CFFP_SCALE) /* Horizontal mech spacing of OTA placement */ 26 #define PSC_VMECH (2.025*CFFP_SCALE) /* Vertical mech spacing of OTA placement */ 27 #define PSC_VMOFF (PSC_VDIE-(1.568+0.375)*CFFP_SCALE) /* Vert die offset between sides */ 21 28 22 29 #define PSC_REFRACT_CONST 60.0 /* Standard refraction ("/tanz) at STP */ … … 123 130 124 131 /* Overall focal plane offset and rotation (um, rad) */ 125 constPSC_OFFROT_T psc_fpoff;132 PSC_OFFROT_T psc_fpoff; 126 133 127 134 /* Offsets and rotations of each OTA (um, millirad) */ 128 const PSC_OFFROT_T psc_otaoff[PSC_NX*PSC_NY]; 129 135 PSC_OFFROT_T psc_otaoff[PSC_NX*PSC_NY]; 136 137 138 /* This is from Run 3, 090516 */ 139 #define PS_scale 38.7932 /* Default PS plate scale [um/arcsec] */ 140 #define PS_d2 9.78e-7 /* Default quadratic PS distortion [arcsec^-1] */ 141 #define PS_d3 3.16e-11 /* Default cubic PS distortion [arcsec^-2] */ 142 143 144 #ifdef RUN_THREE_V1 /* This is from Run 3, 090228 */ 130 145 #define PS_scale 38.860 /* Default PS plate scale [um/arcsec] */ 131 #define PS_d3 1.49e-10 /* Default PS distortion [arcsec^-2] */ 146 #define PS_d3 1.49e-10 /* Default cubic PS distortion [arcsec^-2] */ 147 #endif 148 149 132 150 #define PS_airdens 0.71 /* Default PS1 qir density (Haleakala) */ 133 151 … … 139 157 * --------------------------------------------------------------------------- 140 158 * psc_tproject(a, d, a0, d0, pa, density, pi/2-alt, vertical, &x, &y); 141 * psc_psoptics (x/sec2rad, y/sec2rad, dx, dy, dpa, pscale, d3, &xfp, &yfp);159 * psc_psoptics2(x/sec2rad, y/sec2rad, dx, dy, dpa, pscale, d2, d3, &xfp, &yfp); 142 160 * psc_fp_to_pixel(xfp, yfp, &ota_xid, &ota_yid, &xota, &yota); 143 161 * psc_pixel_to_cell(xota, yota, &cell_xid, &cell_yid, &xcell, &ycell); 162 * 163 * can also use 164 * psc_psoptics(x/sec2rad, y/sec2rad, dx, dy, dpa, pscale, d3, &xfp, &yfp); 165 * 144 166 * 145 167 * To go from cell coords to a position (a,d) relative to (a0,d0,pa) pointing: … … 147 169 * psc_cell_to_pixel(cell_xid,cell_yid, xcell,ycell, &xota,&yota); 148 170 * psc_pixel_to_fp(ota_xid, ota_yid, xota, yota, &xfp, &yfp); 171 * psc_invoptics2(xfp, yfp, dx, dy, dpa, pscale, d2, d3, &x, &y); 172 * psc_tplonglat(x*sec2rad, y*sec2rad, a0, d0, pa, density, pi/2-alt, vertical, &a, &d); 173 * 174 * can also use 149 175 * psc_invoptics(xfp, yfp, dx, dy, dpa, pscale, d3, &x, &y); 150 * psc_tplonglat(x*sec2rad, y*sec2rad, a0, d0, pa, density, pi/2-alt, vertical, &a, &d);151 176 */ 152 177 … … 155 180 /**************/ 156 181 /* Enable application of chip offsets? */ 157 int psc_do_chipoff(int doit); /* Apply chip offsets? (0/1, default= 0) */182 int psc_do_chipoff(int doit); /* Apply chip offsets? (0/1, default=1) */ 158 183 159 184 /* Convert a focal plane position to OTA otax,otay, Cell cellx,celly, Pixel */ … … 202 227 double pscale/*38.86um/sec*/, double d3/*1.49e-10sec^-2*/, 203 228 double *xfp_um, double *yfp_um); 229 230 /* Evaluate an inverse optical model: microns -> arcsec notionally */ 231 /* Offset, scale with *small* distortion, rotate */ 232 int psc_invoptics2(double xfp_um, double yfp_um, double dx_sec, double dy_sec, double dpa_rad, 233 double pscale/*38.793um/sec*/, 234 double d2/*9.8e-7sec^-2*/, double d3/*3.1e-11sec^-2*/, 235 double *x_sec, double *y_sec); 236 237 /* Evaluate an optical model: arcsec -> microns notionally */ 238 /* Offset, scale with distortion, rotate */ 239 int psc_psoptics2(double x_sec, double y_sec, double dx_sec, double dy_sec, double dpa_rad, 240 double pscale/*38.793um/sec*/, 241 double d2/*9.8e-7sec^-2*/, double d3/*3.1e-11sec^-2*/, 242 double *xfp_um, double *yfp_um); 243 244 /* Enable application of chip offsets (um, mrad)? */ 245 int psc_load_otaoff(const char *fname);
Note:
See TracChangeset
for help on using the changeset viewer.
