IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 9, 2004, 1:34:58 PM (22 years ago)
Author:
desonia
Message:

cleanup of some indent-induced madness.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astronomy/psAstrometry.c

    r1407 r1440  
    99*  @author George Gusciora, MHPCC
    1010*
    11 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2004-08-07 00:06:06 $
     11*  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2004-08-09 23:34:57 $
    1313*
    1414*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2121#include "psMemory.h"
    2222
    23 static void grommitFree(psGrommit * grommit);
    24 static int checkValidChipCoords(double x, double y, psChip * tmpChip);
    25 static int checkValidImageCoords(double x, double y, psImage * tmpImage);
    26 
    27 psExposure *psExposureAlloc(double ra, double dec, double hourAngle,
     23static void grommitFree(psGrommit* grommit);
     24static int checkValidChipCoords(double x, double y, psChip* tmpChip);
     25static int checkValidImageCoords(double x, double y, psImage* tmpImage);
     26
     27psExposure* psExposureAlloc(double ra, double dec, double hourAngle,
    2828                            double zenith, double azimuth, double localTime, float date,
    2929                            float rotAngle, float temperature, float pressure, float humidity,
    3030                            float exposureTime)
    3131{
    32     psExposure *exp = psAlloc(sizeof(psExposure));
     32    psExposure* exp = psAlloc(sizeof(psExposure));
    3333
    3434    *(double *)&exp->ra = ra;
     
    4949}
    5050
    51 psGrommit *psGrommitAlloc(const psExposure * exp)
     51psGrommit* psGrommitAlloc(const psExposure* exp)
    5252{
    5353    double *slaGrommit = (double *)psAlloc(14 * sizeof(double));
    54     psGrommit *grommit = (psGrommit *) psAlloc(sizeof(psGrommit));
     54    psGrommit* grommit = (psGrommit* ) psAlloc(sizeof(psGrommit));
    5555
    5656    /*
     
    7979}
    8080
    81 void p_psGrommitFree(psGrommit * grommit)
     81void p_psGrommitFree(psGrommit* grommit)
    8282{
    8383    psFree(grommit);
    8484}
    8585
    86 psCell *psCellinFPA(psCell * out, const psPlane * coord, const psFPA * FPA)
    87 {
    88     psChip *tmpChip = NULL;
    89     psCell *tmpCell = NULL;
     86psCell* psCellinFPA(psCell* out, const psPlane* coord, const psFPA* FPA)
     87{
     88    psChip* tmpChip = NULL;
     89    psCell* tmpCell = NULL;
    9090
    9191    tmpChip = psChipinFPA(tmpChip, coord, FPA);
     
    9494}
    9595
    96 int checkValidChipCoords(double x, double y, psChip * tmpChip)
     96int checkValidChipCoords(double x, double y, psChip* tmpChip)
    9797{
    9898    return (0);
    9999}
    100100
    101 psChip *psChipinFPA(psChip * out, const psPlane * coord, const psFPA * FPA)
    102 {
    103     psArray *chips = FPA->chips;
     101psChip* psChipinFPA(psChip* out, const psPlane* coord, const psFPA* FPA)
     102{
     103    psArray* chips = FPA->chips;
    104104    int nChips = chips->n;
    105     psPlane *tmpCoord = NULL;
     105    psPlane* tmpCoord = NULL;
    106106
    107107    for (int i = 0; i < nChips; i++) {
    108         psChip *tmpChip = chips->data[i];
     108        psChip* tmpChip = chips->data[i];
    109109
    110110        tmpCoord = psPlaneTransformApply(tmpCoord, tmpChip->fromFPA, coord);
     
    120120}
    121121
    122 int checkValidImageCoords(double x, double y, psImage * tmpImage)
     122int checkValidImageCoords(double x, double y, psImage* tmpImage)
    123123{
    124124    if ((x < 0.0) || (x > (double)tmpImage->numCols) || (y < 0.0) || (y > (double)tmpImage->numRows)) {
     
    140140XXX: must deallocate memory.
    141141 *****************************************************************************/
    142 psCell *psCellinChip(psCell * out, const psPlane * coord, const psChip * chip)
    143 {
    144     psPlane *tmpCoord = NULL;
    145     psArray *cells;
     142psCell* psCellinChip(psCell* out, const psPlane* coord, const psChip* chip)
     143{
     144    psPlane* tmpCoord = NULL;
     145    psArray* cells;
    146146
    147147    if (chip == NULL) {
     
    156156
    157157    for (int i = 0; i < cells->n; i++) {
    158         psCell *tmpCell = (psCell *) cells->data[i];
    159         psArray *readouts = tmpCell->readouts;
     158        psCell* tmpCell = (psCell* ) cells->data[i];
     159        psArray* readouts = tmpCell->readouts;
    160160
    161161        if (readouts != NULL) {
    162162            for (int j = 0; j < readouts->n; j++) {
    163                 psReadout *tmpReadout = readouts->data[j];
     163                psReadout* tmpReadout = readouts->data[j];
    164164
    165165                tmpCoord = psPlaneTransformApply(tmpCoord, tmpCell->fromChip, coord);
     
    173173}
    174174
    175 psPlane *psCoordCelltoChip(psPlane * out, const psPlane * in, const psCell * cell)
     175psPlane* psCoordCelltoChip(psPlane* out, const psPlane* in, const psCell* cell)
    176176{
    177177    return (psPlaneTransformApply(out, cell->toChip, in));
    178178}
    179179
    180 psPlane *psCoordChipToFPA(psPlane * out, const psPlane * in, const psChip * chip)
     180psPlane* psCoordChipToFPA(psPlane* out, const psPlane* in, const psChip* chip)
    181181{
    182182    return (psPlaneTransformApply(out, chip->toFPA, in));
    183183}
    184184
    185 psPlane *psCoordFPAtoTP(psPlane * out, const psPlane * in, const psFPA * fpa)
     185psPlane* psCoordFPAtoTP(psPlane* out, const psPlane* in, const psFPA* fpa)
    186186{
    187187    // XXX: This code doesn't work; fpa->toTangentPlane is of the wrong type.
     
    191191
    192192// XXX: must wrap SLA_QAPQK here.
    193 psSphere *psCoordTPtoSky(psSphere * out, const psPlane * in, const psGrommit * grommit)
     193psSphere* psCoordTPtoSky(psSphere* out, const psPlane* in, const psGrommit* grommit)
    194194{
    195195    /*
     
    202202}
    203203
    204 psPlane *psCoordCellToFPA(psPlane * out, const psPlane * in, const psCell * cell)
     204psPlane* psCoordCellToFPA(psPlane* out, const psPlane* in, const psCell* cell)
    205205{
    206206    return (psPlaneTransformApply(out, cell->toFPA, in));
     
    210210// transformation, as well as a few psPlane structs.  Can this be implemented
    211211// better?
    212 psSphere *psCoordCelltoSky(psSphere * out, const psPlane * in, const psCell * cell)
    213 {
    214     psPlane *tmp1 = NULL;
    215     psPlane *tmp2 = NULL;
    216     psFPA *parFPA = (cell->parent)->parent;
    217     psGrommit *tmpGrommit = NULL;
     212psSphere* psCoordCelltoSky(psSphere* out, const psPlane* in, const psCell* cell)
     213{
     214    psPlane* tmp1 = NULL;
     215    psPlane* tmp2 = NULL;
     216    psFPA* parFPA = (cell->parent)->parent;
     217    psGrommit* tmpGrommit = NULL;
    218218
    219219    tmp1 = psPlaneTransformApply(tmp1, cell->toFPA, in);
     
    230230}
    231231
    232 psSphere *psCoordCelltoSkyQuick(psSphere * out, const psPlane * in, const psCell * cell)
    233 {
    234     psPlane *tmp1 = NULL;
     232psSphere* psCoordCelltoSkyQuick(psSphere* out, const psPlane* in, const psCell* cell)
     233{
     234    psPlane* tmp1 = NULL;
    235235
    236236    tmp1 = psPlaneTransformApply(tmp1, cell->toSky, in);
     
    245245
    246246// XXX: must wrap SLA_AOPQK here.
    247 psPlane *psCoordSkytoTP(psPlane * out, const psSphere * in, const psGrommit * grommit)
     247psPlane* psCoordSkytoTP(psPlane* out, const psSphere* in, const psGrommit* grommit)
    248248{
    249249    extern void sla_AOPQK(RAP, DAP, AOPRMS, AOB, ZOB, HOB, DOB, ROB);
     
    255255
    256256    if (out == NULL) {
    257         out = (psPlane *) psAlloc(sizeof(psPlane));
     257        out = (psPlane* ) psAlloc(sizeof(psPlane));
    258258    }
    259259
     
    264264}
    265265
    266 psPlane *psCoordTPtoFPA(psPlane * out, const psPlane * in, const psFPA * fpa)
     266psPlane* psCoordTPtoFPA(psPlane* out, const psPlane* in, const psFPA* fpa)
    267267{
    268268    return (psPlaneTransformApply(out, fpa->fromTangentPlane, in));
    269269}
    270270
    271 psPlane *psCoordFPAtoChip(psPlane * out, const psPlane * in, const psChip * chip)
     271psPlane* psCoordFPAtoChip(psPlane* out, const psPlane* in, const psChip* chip)
    272272{
    273273    return (psPlaneTransformApply(out, chip->fromFPA, in));
    274274}
    275275
    276 psPlane *psCoordChiptoCell(psPlane * out, const psPlane * in, const psCell * cell)
     276psPlane* psCoordChiptoCell(psPlane* out, const psPlane* in, const psCell* cell)
    277277{
    278278    return (psPlaneTransformApply(out, cell->fromChip, in));
    279279}
    280280
    281 psPlane *psCoordSkytoCell(psPlane * out, const psSphere * in, const psCell * cell)
     281psPlane* psCoordSkytoCell(psPlane* out, const psSphere* in, const psCell* cell)
    282282{
    283283    out = psCoordSkytoTP(out, in, tmpGrommit);
     
    289289}
    290290
    291 psPlane *psCoordSkytoCellQuick(psPlane * out, const psSphere * in, const psCell * cell)
     291psPlane* psCoordSkytoCellQuick(psPlane* out, const psSphere* in, const psCell* cell)
    292292{
    293293    if (out == NULL) {
    294         out = (psPlane *) psAlloc(sizeof(psPlane));
    295     }
    296 
    297     return (out);
    298 }
     294        out = (psPlane* ) psAlloc(sizeof(psPlane));
     295    }
     296
     297    return (out);
     298}
Note: See TracChangeset for help on using the changeset viewer.