Changeset 2204 for trunk/psLib/test/astronomy/tst_psAstrometry01.c
- Timestamp:
- Oct 26, 2004, 2:57:34 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/astronomy/tst_psAstrometry01.c (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astronomy/tst_psAstrometry01.c
r2109 r2204 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $8 * @date $Date: 2004-10- 14 02:05:00$7 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2004-10-27 00:57:31 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 14 14 #include "pslib.h" 15 15 16 static inttest1( void );17 static inttest2( void );18 static inttest3( void );16 static psS32 test1( void ); 17 static psS32 test2( void ); 18 static psS32 test3( void ); 19 19 20 20 testDescription tests[] = { … … 115 115 psFPA *genSystem() 116 116 { 117 inti;118 intj;119 intk;117 psS32 i; 118 psS32 j; 119 psS32 k; 120 120 psImage *tmpImage; 121 121 // psTime* now = psTimeGetTime(PS_TIME_UTC); … … 170 170 for (k=0;k<NUM_READOUTS;k++) { 171 171 tmpImage = psImageAlloc(READOUT_NUM_COLS, READOUT_NUM_ROWS, PS_TYPE_F32); 172 for ( introw=0;row<READOUT_NUM_ROWS;row++) {173 for( intcol=0;col<READOUT_NUM_COLS;col++) {172 for (psS32 row=0;row<READOUT_NUM_ROWS;row++) { 173 for(psS32 col=0;col<READOUT_NUM_COLS;col++) { 174 174 tmpImage->data.F32[row][col] = (float) ((i * (CHIP_WIDTH + CHIP_GAP)) + 175 175 (j * (CELL_WIDTH + CELL_GAP))); … … 185 185 } 186 186 187 int main( intargc, char* argv[] )187 psS32 main( psS32 argc, char* argv[] ) 188 188 { 189 189 psLogSetLevel( PS_LOG_INFO ); … … 201 201 #define Y0 60.0 202 202 203 inttest1( void )204 { 205 inti;206 intj;203 psS32 test1( void ) 204 { 205 psS32 i; 206 psS32 j; 207 207 psFixedPattern *tmp = NULL; 208 208 float x0 = X0; … … 212 212 psImage *x = psImageAlloc(X_NUM_COLS, X_NUM_ROWS, PS_TYPE_F64); 213 213 psImage *y = psImageAlloc(Y_NUM_COLS, Y_NUM_ROWS, PS_TYPE_F64); 214 inttestStatus = 0;215 intnumPixels = 0;214 psS32 testStatus = 0; 215 psS32 numPixels = 0; 216 216 217 217 for (i=0;i<X_NUM_ROWS;i++) { … … 295 295 } 296 296 297 inttest2()298 { 299 inttestStatus = 0;297 psS32 test2() 298 { 299 psS32 testStatus = 0; 300 300 301 301 psTime* now = psTimeGetTime(PS_TIME_UTC); … … 371 371 } 372 372 373 intprintCell(psCell *cell)373 psS32 printCell(psCell *cell) 374 374 { 375 375 psReadout **readouts = (psReadout **) cell->readouts->data; … … 377 377 378 378 printf("-------------------------------\n"); 379 for ( inti = 0; i < readout->image->numRows ; i++) {380 for ( intj = 0; j < readout->image->numCols ; j++) {379 for (psS32 i = 0; i < readout->image->numRows ; i++) { 380 for (psS32 j = 0; j < readout->image->numCols ; j++) { 381 381 printf("(%.1f) ", readout->image->data.F32[i][j]); 382 382 } … … 415 415 416 416 *****************************************************************************/ 417 inttest3( void )418 { 419 intx;420 inty;417 psS32 test3( void ) 418 { 419 psS32 x; 420 psS32 y; 421 421 psPlane fpaCoord; 422 422 psFPA *myFPA = genSystem(); … … 426 426 psPlane testCoord; 427 427 428 intxReadout = 0;429 intxFPA = 0;430 for ( intchip=0;chip<NUM_CHIPS;chip++) {431 for ( intcell=0;cell<NUM_CELLS;cell++) {428 psS32 xReadout = 0; 429 psS32 xFPA = 0; 430 for (psS32 chip=0;chip<NUM_CHIPS;chip++) { 431 for (psS32 cell=0;cell<NUM_CELLS;cell++) { 432 432 for(x=0;x<CELL_WIDTH;x++) { 433 433 for (y=0;y<CELL_HEIGHT;y++) { … … 444 444 psCoordChipToCell(&cellCoord, &chipCoord, myCell); 445 445 446 if (x != ( int) cellCoord.x) {446 if (x != (psS32) cellCoord.x) { 447 447 printf("ERROR: x coord was %f, should be %d\n", cellCoord.x, x); 448 448 } 449 if (y != ( int) cellCoord.y) {449 if (y != (psS32) cellCoord.y) { 450 450 printf("ERROR: y coord was %f, should be %d\n", cellCoord.y, y); 451 451 }
Note:
See TracChangeset
for help on using the changeset viewer.
