Changeset 2855 for trunk/psLib/src/astronomy/psAstrometry.c
- Timestamp:
- Dec 30, 2004, 10:18:37 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astronomy/psAstrometry.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astronomy/psAstrometry.c
r2600 r2855 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1.5 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-12- 02 21:12:51$10 * @version $Revision: 1.53 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-12-30 20:18:36 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 399 399 400 400 // create array of NULL psCells 401 chip->cells = psArrayAlloc(nCells); 401 int n = (nCells > 0) ? nCells : 1; 402 chip->cells = psArrayAlloc(n); 402 403 psPtr* cells = chip->cells->data; 403 for (psS32 i=0;i<n Cells;i++) {404 for (psS32 i=0;i<n;i++) { 404 405 cells[i] = NULL; 405 406 } 407 chip->cells->n = 0; // per requirement 408 409 *(int*)&chip->row0 = 0; 410 *(int*)&chip->col0 = 0; 406 411 407 412 chip->metadata = NULL; … … 429 434 430 435 // create array of NULL psReadouts 431 cell->readouts = psArrayAlloc(nReadouts); 436 int n = (nReadouts > 0) ? nReadouts : 1; 437 cell->readouts = psArrayAlloc(n); 432 438 psPtr* readouts = cell->readouts->data; 433 for (psS32 i=0;i<n Readouts;i++) {439 for (psS32 i=0;i<n;i++) { 434 440 readouts[i] = NULL; 435 441 } 442 cell->readouts->n = 0; // per requirement 443 444 *(int*)&cell->row0 = 0; 445 *(int*)&cell->col0 = 0; 436 446 437 447 cell->metadata = NULL; … … 452 462 } 453 463 454 psReadout* psReadoutAlloc(psS32 col0, 455 psS32 row0, 456 const psImage* image) 457 { 458 PS_INT_CHECK_NON_NEGATIVE(col0, NULL); 459 PS_INT_CHECK_NON_NEGATIVE(row0, NULL); 460 464 psReadout* psReadoutAlloc() 465 { 461 466 psReadout* readout = psAlloc(sizeof(psReadout)); 462 467 463 *(psU32*)&readout->colBins = 1; 464 *(psU32*)&readout->rowBins = 1; 465 *(psS32*)&readout->col0 = col0; 466 *(psS32*)&readout->row0 = row0; 467 468 readout->image = (psImage*)image; 468 *(psU32*)&readout->colBins = 0; 469 *(psU32*)&readout->rowBins = 0; 470 *(psU32*)&readout->rowParity = 0; 471 *(psU32*)&readout->colParity = 0; 472 *(psS32*)&readout->col0 = 0; 473 *(psS32*)&readout->row0 = 0; 474 475 readout->image = NULL; 469 476 readout->mask = NULL; 470 477 readout->objects = NULL; … … 718 725 PS_PTR_CHECK_NULL(cellCoord, NULL); 719 726 PS_PTR_CHECK_NULL(cell, NULL); 720 PS_PTR_CHECK_NULL(cell->to TP, NULL);727 PS_PTR_CHECK_NULL(cell->toSky, NULL); 721 728 PS_PTR_CHECK_NULL(cell->parent, NULL); 722 729 PS_PTR_CHECK_NULL(cell->parent->parent, NULL);
Note:
See TracChangeset
for help on using the changeset viewer.
