Changeset 2204 for trunk/psLib/src/astronomy/psAstrometry.c
- Timestamp:
- Oct 26, 2004, 2:57:34 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astronomy/psAstrometry.c (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astronomy/psAstrometry.c
r2137 r2204 8 8 * @author George Gusciora, MHPCC 9 9 * 10 * @version $Revision: 1.4 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-10- 14 23:45:53$10 * @version $Revision: 1.43 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-10-27 00:57:30 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 33 33 psImage. 34 34 *****************************************************************************/ 35 static intcheckValidImageCoords(double x,36 double y,37 psImage* tmpImage)35 static psS32 checkValidImageCoords(double x, 36 double y, 37 psImage* tmpImage) 38 38 { 39 39 if (tmpImage == NULL) { … … 56 56 cooefficients of order 2 are higher are non-zero, then it is not linear. 57 57 *****************************************************************************/ 58 static intisProjectionLinear(psPlaneTransform *transform)59 { 60 inti = 0;58 static psS32 isProjectionLinear(psPlaneTransform *transform) 59 { 60 psS32 i = 0; 61 61 PS_CHECK_NULL_PTR_RETURN_ZERO(transform); 62 62 … … 178 178 { 179 179 if (obs != NULL) { 180 psFree(( void*)obs->name);180 psFree((psPtr)obs->name); 181 181 } 182 182 } … … 185 185 { 186 186 if (exp != NULL) { 187 psFree(( void*)exp->time);188 psFree(( void*)exp->observatory);189 psFree(( void*)exp->cameraName);190 psFree(( void*)exp->telescopeName);187 psFree((psPtr)exp->time); 188 psFree((psPtr)exp->observatory); 189 psFree((psPtr)exp->cameraName); 190 psFree((psPtr)exp->telescopeName); 191 191 } 192 192 } … … 195 195 { 196 196 if (fp != NULL) { 197 for ( inti = 0; i < fp->p_ps_xRows; i++) {197 for (psS32 i = 0; i < fp->p_ps_xRows; i++) { 198 198 psFree(fp->x[i]); 199 199 } 200 200 201 for ( intj = 0; j < fp->p_ps_yRows; j++) {201 for (psS32 j = 0; j < fp->p_ps_yRows; j++) { 202 202 psFree(fp->y[j]); 203 203 } … … 226 226 { 227 227 psFixedPattern *tmp; 228 inti;229 intj;228 psS32 i; 229 psS32 j; 230 230 231 231 PS_CHECK_NULL_IMAGE_RETURN_NULL(x); … … 301 301 *(float *)&exp->wavelength = wavelength; 302 302 303 exp->time = psMemIncrRefCounter(( void*)time);304 exp->observatory = psMemIncrRefCounter(( void*)observatory);303 exp->time = psMemIncrRefCounter((psPtr)time); 304 exp->observatory = psMemIncrRefCounter((psPtr)observatory); 305 305 306 306 // XXX: how is these value derived? … … 343 343 } 344 344 345 psFPA* psFPAAlloc( intnChips,345 psFPA* psFPAAlloc(psS32 nChips, 346 346 const psExposure* exp) 347 347 { … … 350 350 // create array of NULL chips of the size nChips 351 351 newFPA->chips = psArrayAlloc(nChips); 352 void** chips = newFPA->chips->data;353 for ( inti=0;i<nChips;i++) {352 psPtr* chips = newFPA->chips->data; 353 for (psS32 i=0;i<nChips;i++) { 354 354 chips[i] = NULL; 355 355 } … … 384 384 * psChip constructor 385 385 */ 386 psChip* psChipAlloc( intnCells,386 psChip* psChipAlloc(psS32 nCells, 387 387 psFPA *parentFPA) 388 388 { … … 391 391 // create array of NULL psCells 392 392 chip->cells = psArrayAlloc(nCells); 393 void** cells = chip->cells->data;394 for ( inti=0;i<nCells;i++) {393 psPtr* cells = chip->cells->data; 394 for (psS32 i=0;i<nCells;i++) { 395 395 cells[i] = NULL; 396 396 } … … 412 412 * psCell constructor 413 413 */ 414 psCell* psCellAlloc( intnReadouts,414 psCell* psCellAlloc(psS32 nReadouts, 415 415 psChip* parentChip) 416 416 { … … 419 419 // create array of NULL psReadouts 420 420 cell->readouts = psArrayAlloc(nReadouts); 421 void** readouts = cell->readouts->data;422 for ( inti=0;i<nReadouts;i++) {421 psPtr* readouts = cell->readouts->data; 422 for (psS32 i=0;i<nReadouts;i++) { 423 423 readouts[i] = NULL; 424 424 } … … 440 440 } 441 441 442 psReadout* psReadoutAlloc( intcol0,443 introw0,442 psReadout* psReadoutAlloc(psS32 col0, 443 psS32 row0, 444 444 const psImage* image) 445 445 { 446 446 psReadout* readout = psAlloc(sizeof(psReadout)); 447 447 448 *( unsigned int*)&readout->colBins = 1;449 *( unsigned int*)&readout->rowBins = 1;450 *( int*)&readout->col0 = col0;451 *( int*)&readout->row0 = row0;448 *(psU32*)&readout->colBins = 1; 449 *(psU32*)&readout->rowBins = 1; 450 *(psS32*)&readout->col0 = col0; 451 *(psS32*)&readout->row0 = row0; 452 452 453 453 readout->image = (psImage*)image; … … 521 521 PS_CHECK_NULL_PTR_RETURN_NULL(FPA->chips); 522 522 psArray* chips = FPA->chips; 523 intnChips = chips->n;523 psS32 nChips = chips->n; 524 524 psPlane chipCoord; 525 525 psCell *tmpCell = NULL; … … 529 529 // cells in that chip contain those chip coordinates. 530 530 531 for ( inti = 0; i < nChips; i++) {531 for (psS32 i = 0; i < nChips; i++) { 532 532 psChip* tmpChip = chips->data[i]; 533 533 psPlaneTransformApply(&chipCoord, tmpChip->fromFPA, fpaCoord); … … 560 560 // If so, then we return that cell. 561 561 562 for ( inti = 0; i < cells->n; i++) {562 for (psS32 i = 0; i < cells->n; i++) { 563 563 psCell* tmpCell = (psCell* ) cells->data[i]; 564 564 psArray* readouts = tmpCell->readouts; 565 565 566 566 if (readouts != NULL) { 567 for ( intj = 0; j < readouts->n; j++) {567 for (psS32 j = 0; j < readouts->n; j++) { 568 568 psReadout* tmpReadout = readouts->data[j]; 569 569
Note:
See TracChangeset
for help on using the changeset viewer.
