IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 26, 2004, 2:57:34 PM (22 years ago)
Author:
desonia
Message:

converted native C types to ps Types, where practical.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/astronomy/tst_psAstrometry01.c

    r2109 r2204  
    55*  @author GLG, MHPCC
    66*
    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 $
    99*
    1010*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1414#include "pslib.h"
    1515
    16 static int test1( void );
    17 static int test2( void );
    18 static int test3( void );
     16static psS32 test1( void );
     17static psS32 test2( void );
     18static psS32 test3( void );
    1919
    2020testDescription tests[] = {
     
    115115psFPA *genSystem()
    116116{
    117     int i;
    118     int j;
    119     int k;
     117    psS32 i;
     118    psS32 j;
     119    psS32 k;
    120120    psImage *tmpImage;
    121121    //    psTime* now = psTimeGetTime(PS_TIME_UTC);
     
    170170            for (k=0;k<NUM_READOUTS;k++) {
    171171                tmpImage = psImageAlloc(READOUT_NUM_COLS, READOUT_NUM_ROWS, PS_TYPE_F32);
    172                 for (int row=0;row<READOUT_NUM_ROWS;row++) {
    173                     for(int col=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++) {
    174174                        tmpImage->data.F32[row][col] = (float) ((i * (CHIP_WIDTH + CHIP_GAP)) +
    175175                                                                (j * (CELL_WIDTH + CELL_GAP)));
     
    185185}
    186186
    187 int main( int argc, char* argv[] )
     187psS32 main( psS32 argc, char* argv[] )
    188188{
    189189    psLogSetLevel( PS_LOG_INFO );
     
    201201#define Y0  60.0
    202202
    203 int test1( void )
    204 {
    205     int i;
    206     int j;
     203psS32 test1( void )
     204{
     205    psS32 i;
     206    psS32 j;
    207207    psFixedPattern *tmp = NULL;
    208208    float x0 = X0;
     
    212212    psImage *x = psImageAlloc(X_NUM_COLS, X_NUM_ROWS, PS_TYPE_F64);
    213213    psImage *y = psImageAlloc(Y_NUM_COLS, Y_NUM_ROWS, PS_TYPE_F64);
    214     int testStatus = 0;
    215     int numPixels = 0;
     214    psS32 testStatus = 0;
     215    psS32 numPixels = 0;
    216216
    217217    for (i=0;i<X_NUM_ROWS;i++) {
     
    295295}
    296296
    297 int test2()
    298 {
    299     int testStatus = 0;
     297psS32 test2()
     298{
     299    psS32 testStatus = 0;
    300300
    301301    psTime* now = psTimeGetTime(PS_TIME_UTC);
     
    371371}
    372372
    373 int printCell(psCell *cell)
     373psS32 printCell(psCell *cell)
    374374{
    375375    psReadout **readouts = (psReadout **) cell->readouts->data;
     
    377377
    378378    printf("-------------------------------\n");
    379     for (int i = 0; i < readout->image->numRows ; i++) {
    380         for (int j = 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++) {
    381381            printf("(%.1f) ", readout->image->data.F32[i][j]);
    382382        }
     
    415415 
    416416 *****************************************************************************/
    417 int test3( void )
    418 {
    419     int x;
    420     int y;
     417psS32 test3( void )
     418{
     419    psS32 x;
     420    psS32 y;
    421421    psPlane fpaCoord;
    422422    psFPA *myFPA = genSystem();
     
    426426    psPlane testCoord;
    427427
    428     int xReadout = 0;
    429     int xFPA = 0;
    430     for (int chip=0;chip<NUM_CHIPS;chip++) {
    431         for (int cell=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++) {
    432432            for(x=0;x<CELL_WIDTH;x++) {
    433433                for (y=0;y<CELL_HEIGHT;y++) {
     
    444444                        psCoordChipToCell(&cellCoord, &chipCoord, myCell);
    445445
    446                         if (x != (int) cellCoord.x) {
     446                        if (x != (psS32) cellCoord.x) {
    447447                            printf("ERROR: x coord was %f, should be %d\n", cellCoord.x, x);
    448448                        }
    449                         if (y != (int) cellCoord.y) {
     449                        if (y != (psS32) cellCoord.y) {
    450450                            printf("ERROR: y coord was %f, should be %d\n", cellCoord.y, y);
    451451                        }
Note: See TracChangeset for help on using the changeset viewer.