- Timestamp:
- Sep 19, 2014, 4:05:27 PM (12 years ago)
- Location:
- branches/eam_branches/ps2-tc3-20130727
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ps2-tc3-20130727
- Property svn:mergeinfo changed
-
branches/eam_branches/ps2-tc3-20130727/Ohana
- Property svn:mergeinfo changed
-
branches/eam_branches/ps2-tc3-20130727/Ohana/src/libdvo/src/TessellationTable.c
r36680 r37403 28 28 tess[i].dPix = NAN; 29 29 30 tess[i].dX = 0;31 tess[i].dY = 0;32 33 tess[i].NX_SUB = 0;34 tess[i].NY_SUB = 0;30 tess[i].dX = NAN; 31 tess[i].dY = NAN; 32 33 tess[i].NX_SUB = NAN; 34 tess[i].NY_SUB = NAN; 35 35 36 36 tess[i].basename = NULL; … … 123 123 GET_COLUMN_NEW(Xo, "X_CENT", double); 124 124 GET_COLUMN_NEW(Yo, "Y_CENT", double); 125 GET_COLUMN_NEW(dX, "X_GRID", int);126 GET_COLUMN_NEW(dY, "Y_GRID", int);125 GET_COLUMN_NEW(dX, "X_GRID", float); 126 GET_COLUMN_NEW(dY, "Y_GRID", float); 127 127 GET_COLUMN_NEW(Rmin, "R_MIN", double); 128 128 GET_COLUMN_NEW(Rmax, "R_MAX", double); … … 130 130 GET_COLUMN_NEW(Dmax, "D_MAX", double); 131 131 GET_COLUMN_NEW(dPix, "SCALE", double); 132 GET_COLUMN_NEW(NX_SUB, "NX_SUB", int);133 GET_COLUMN_NEW(NY_SUB, "NY_SUB", int);132 GET_COLUMN_NEW(NX_SUB, "NX_SUB", float); 133 GET_COLUMN_NEW(NY_SUB, "NY_SUB", float); 134 134 GET_COLUMN_NEW(TYPE, "TYPE", int); 135 135 … … 280 280 gfits_modify (&header, "DEC_OFF", "%lf", 1, rings->DEC_offset); 281 281 282 gfits_modify (&header, "NX_SUB", "% d", 1, rings->NX_SUB);283 gfits_modify (&header, "NY_SUB", "% d", 1, rings->NY_SUB);282 gfits_modify (&header, "NX_SUB", "%f", 1, rings->NX_SUB); 283 gfits_modify (&header, "NY_SUB", "%f", 1, rings->NY_SUB); 284 284 gfits_modify (&header, "PIXSCALE", "%lf", 1, rings->dPix); 285 285 } … … 300 300 gfits_define_bintable_column (&theader, "D", "X_CENT", "projection cell center pixel", "none", 1.0, 0.0); 301 301 gfits_define_bintable_column (&theader, "D", "Y_CENT", "projection cell center pixel", "none", 1.0, 0.0); 302 gfits_define_bintable_column (&theader, " J", "X_GRID", "skycell grid spacing", "none", 1.0, 0.0);303 gfits_define_bintable_column (&theader, " J", "Y_GRID", "skycell grid spacing", "none", 1.0, 0.0);302 gfits_define_bintable_column (&theader, "E", "X_GRID", "skycell grid spacing", "none", 1.0, 0.0); 303 gfits_define_bintable_column (&theader, "E", "Y_GRID", "skycell grid spacing", "none", 1.0, 0.0); 304 304 gfits_define_bintable_column (&theader, "D", "R_MIN", "RA limit (lower)", "none", 1.0, 0.0); 305 305 gfits_define_bintable_column (&theader, "D", "R_MAX", "RA limit (upper)", "none", 1.0, 0.0); … … 307 307 gfits_define_bintable_column (&theader, "D", "D_MAX", "DEC limit (upper)", "none", 1.0, 0.0); 308 308 gfits_define_bintable_column (&theader, "D", "SCALE", "pixel scale for projection cell", "none", 1.0, 0.0); 309 gfits_define_bintable_column (&theader, " J", "NX_SUB", "skycell subdivision in x", "none", 1.0, 0.0);310 gfits_define_bintable_column (&theader, " J", "NY_SUB", "skycell subdivision in y", "none", 1.0, 0.0);309 gfits_define_bintable_column (&theader, "E", "NX_SUB", "skycell subdivision in x", "none", 1.0, 0.0); 310 gfits_define_bintable_column (&theader, "E", "NY_SUB", "skycell subdivision in y", "none", 1.0, 0.0); 311 311 gfits_define_bintable_column (&theader, "J", "TYPE", "type of tessellation", "none", 1.0, 0.0); 312 312 … … 330 330 double *Xo ; ALLOCATE (Xo , double, Nout); 331 331 double *Yo ; ALLOCATE (Yo , double, Nout); 332 int *dX ; ALLOCATE (dX , int,Nout);333 int *dY ; ALLOCATE (dY , int,Nout);332 float *dX ; ALLOCATE (dX , float, Nout); 333 float *dY ; ALLOCATE (dY , float, Nout); 334 334 double *Rmin ; ALLOCATE (Rmin , double, Nout); 335 335 double *Rmax ; ALLOCATE (Rmax , double, Nout); … … 337 337 double *Dmax ; ALLOCATE (Dmax , double, Nout); 338 338 double *dPix ; ALLOCATE (dPix , double, Nout); 339 int *NX_SUB ; ALLOCATE (NX_SUB, int,Nout);340 int *NY_SUB ; ALLOCATE (NY_SUB, int,Nout);339 float *NX_SUB ; ALLOCATE (NX_SUB, float, Nout); 340 float *NY_SUB ; ALLOCATE (NY_SUB, float, Nout); 341 341 int *TYPE ; ALLOCATE (TYPE, int, Nout); 342 342 … … 559 559 int xi = x / tess[myTess].tree->dX[zone][band]; 560 560 int yi = y / tess[myTess].tree->dY[zone][band]; 561 562 xi = MAX(MIN(xi, tess[myTess].tree->NX_SUB - 1.0), 0); 563 yi = MAX(MIN(yi, tess[myTess].tree->NY_SUB - 1.0), 0); 564 561 565 int N = xi + tess[myTess].tree->NX_SUB * yi; 562 566
Note:
See TracChangeset
for help on using the changeset viewer.
