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/src/astronomy/psAstrometry.c

    r2137 r2204  
    88 *  @author George Gusciora, MHPCC
    99 *
    10  *  @version $Revision: 1.42 $ $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 $
    1212 *
    1313 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3333psImage.
    3434 *****************************************************************************/
    35 static int checkValidImageCoords(double x,
    36                                  double y,
    37                                  psImage* tmpImage)
     35static psS32 checkValidImageCoords(double x,
     36                                   double y,
     37                                   psImage* tmpImage)
    3838{
    3939    if (tmpImage == NULL) {
     
    5656cooefficients of order 2 are higher are non-zero, then it is not linear.
    5757 *****************************************************************************/
    58 static int isProjectionLinear(psPlaneTransform *transform)
    59 {
    60     int i = 0;
     58static psS32 isProjectionLinear(psPlaneTransform *transform)
     59{
     60    psS32 i = 0;
    6161    PS_CHECK_NULL_PTR_RETURN_ZERO(transform);
    6262
     
    178178{
    179179    if (obs != NULL) {
    180         psFree((void*)obs->name);
     180        psFree((psPtr)obs->name);
    181181    }
    182182}
     
    185185{
    186186    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);
    191191    }
    192192}
     
    195195{
    196196    if (fp != NULL) {
    197         for (int i = 0; i < fp->p_ps_xRows; i++) {
     197        for (psS32 i = 0; i < fp->p_ps_xRows; i++) {
    198198            psFree(fp->x[i]);
    199199        }
    200200
    201         for (int j = 0; j < fp->p_ps_yRows; j++) {
     201        for (psS32 j = 0; j < fp->p_ps_yRows; j++) {
    202202            psFree(fp->y[j]);
    203203        }
     
    226226{
    227227    psFixedPattern *tmp;
    228     int i;
    229     int j;
     228    psS32 i;
     229    psS32 j;
    230230
    231231    PS_CHECK_NULL_IMAGE_RETURN_NULL(x);
     
    301301    *(float *)&exp->wavelength = wavelength;
    302302
    303     exp->time = psMemIncrRefCounter((void*)time);
    304     exp->observatory = psMemIncrRefCounter((void*)observatory);
     303    exp->time = psMemIncrRefCounter((psPtr)time);
     304    exp->observatory = psMemIncrRefCounter((psPtr)observatory);
    305305
    306306    // XXX: how is these value derived?
     
    343343}
    344344
    345 psFPA* psFPAAlloc(int nChips,
     345psFPA* psFPAAlloc(psS32 nChips,
    346346                  const psExposure* exp)
    347347{
     
    350350    // create array of NULL chips of the size nChips
    351351    newFPA->chips = psArrayAlloc(nChips);
    352     void** chips = newFPA->chips->data;
    353     for (int i=0;i<nChips;i++) {
     352    psPtr* chips = newFPA->chips->data;
     353    for (psS32 i=0;i<nChips;i++) {
    354354        chips[i] = NULL;
    355355    }
     
    384384 * psChip constructor
    385385 */
    386 psChip* psChipAlloc(int nCells,
     386psChip* psChipAlloc(psS32 nCells,
    387387                    psFPA *parentFPA)
    388388{
     
    391391    // create array of NULL psCells
    392392    chip->cells = psArrayAlloc(nCells);
    393     void** cells = chip->cells->data;
    394     for (int i=0;i<nCells;i++) {
     393    psPtr* cells = chip->cells->data;
     394    for (psS32 i=0;i<nCells;i++) {
    395395        cells[i] = NULL;
    396396    }
     
    412412 * psCell constructor
    413413 */
    414 psCell* psCellAlloc(int nReadouts,
     414psCell* psCellAlloc(psS32 nReadouts,
    415415                    psChip* parentChip)
    416416{
     
    419419    // create array of NULL psReadouts
    420420    cell->readouts = psArrayAlloc(nReadouts);
    421     void** readouts = cell->readouts->data;
    422     for (int i=0;i<nReadouts;i++) {
     421    psPtr* readouts = cell->readouts->data;
     422    for (psS32 i=0;i<nReadouts;i++) {
    423423        readouts[i] = NULL;
    424424    }
     
    440440}
    441441
    442 psReadout* psReadoutAlloc(int col0,
    443                           int row0,
     442psReadout* psReadoutAlloc(psS32 col0,
     443                          psS32 row0,
    444444                          const psImage* image)
    445445{
    446446    psReadout* readout = psAlloc(sizeof(psReadout));
    447447
    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;
    452452
    453453    readout->image = (psImage*)image;
     
    521521    PS_CHECK_NULL_PTR_RETURN_NULL(FPA->chips);
    522522    psArray* chips = FPA->chips;
    523     int nChips = chips->n;
     523    psS32 nChips = chips->n;
    524524    psPlane chipCoord;
    525525    psCell *tmpCell = NULL;
     
    529529    // cells in that chip contain those chip coordinates.
    530530
    531     for (int i = 0; i < nChips; i++) {
     531    for (psS32 i = 0; i < nChips; i++) {
    532532        psChip* tmpChip = chips->data[i];
    533533        psPlaneTransformApply(&chipCoord, tmpChip->fromFPA, fpaCoord);
     
    560560    // If so, then we return that cell.
    561561
    562     for (int i = 0; i < cells->n; i++) {
     562    for (psS32 i = 0; i < cells->n; i++) {
    563563        psCell* tmpCell = (psCell* ) cells->data[i];
    564564        psArray* readouts = tmpCell->readouts;
    565565
    566566        if (readouts != NULL) {
    567             for (int j = 0; j < readouts->n; j++) {
     567            for (psS32 j = 0; j < readouts->n; j++) {
    568568                psReadout* tmpReadout = readouts->data[j];
    569569
Note: See TracChangeset for help on using the changeset viewer.