IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1785


Ignore:
Timestamp:
Sep 10, 2004, 1:41:45 PM (22 years ago)
Author:
gusciora
Message:

* empty log message *

Location:
trunk/psLib/src/astronomy
Files:
2 edited

Legend:

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

    r1665 r1785  
    88*  @author George Gusciora, MHPCC
    99*
    10 *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2004-09-01 00:57:48 $
     10*  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2004-09-10 23:41:45 $
    1212*
    1313*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    206206/*****************************************************************************/
    207207
     208
     209/*
     210 *
     211 * XXX: Verify that you interpreted the SDR correctly.
     212 *
     213 * XXX: Must add memory deallocater.
     214 */
     215psFixedPattern *psFixedPatternAlloc(double x0,
     216                                    double y0,
     217                                    double xScale,
     218                                    double yScale,
     219                                    const psImage *x,
     220                                    const psImage *y)
     221{
     222    psFixedPattern *tmp;
     223    int i;
     224    int j;
     225
     226    tmp = (psFixedPattern *) psAlloc(sizeof(psFixedPattern));
     227    tmp->nX = x->numRows * x->numCols;
     228    tmp->nY = y->numRows * y->numCols;
     229    tmp->x0 = x0;
     230    tmp->y0 = y0;
     231    tmp->xScale = xScale;
     232    tmp->yScale = yScale;
     233    tmp->x = (double **) psAlloc(x->numRows * sizeof(float *));
     234    for (i=0;i<x->numRows;i++) {
     235        (tmp->x)[i] = (double *) psAlloc(x->numCols * sizeof(float));
     236    }
     237    for (i=0;i<x->numRows;i++) {
     238        for (j=0;j<x->numRows;j++) {
     239            (tmp->x)[i][j] = x->data.F64[i][j];
     240        }
     241    }
     242
     243    tmp->y = (double **) psAlloc(y->numRows * sizeof(float *));
     244    for (i=0;i<y->numRows;i++) {
     245        (tmp->y)[i] = (double *) psAlloc(y->numCols * sizeof(float));
     246    }
     247    for (i=0;i<y->numRows;i++) {
     248        for (j=0;j<y->numRows;j++) {
     249            (tmp->y)[i][j] = y->data.F64[i][j];
     250        }
     251    }
     252    return(tmp);
     253}
     254
     255
    208256psExposure* psExposureAlloc(double ra, double dec, double hourAngle,
    209257                            double zenith, double azimuth, double localTime, float date,
  • trunk/psLib/src/astronomy/psAstrometry.h

    r1665 r1785  
    88*  @author George Gusciora, MHPCC
    99*
    10 *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2004-09-01 00:57:48 $
     10*  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2004-09-10 23:41:45 $
    1212*
    1313*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    8383psFixedPattern;
    8484
     85psFixedPattern *psFixedPatternAlloc(double x0,           ///< X Position of 0,0 corner on focal plane
     86                                    double y0,           ///< Y Position of 0,0 corner on focal plane
     87                                    double xScale,       ///< Scale of the grid in x direction
     88                                    double yScale,       ///< Scale of the grid in x direction
     89                                    const psImage *x,    ///< The grid of offsets in x
     90                                    const psImage *y     ///< The grid of offsets in y
     91                                   );
     92
    8593/** Readout data structure.
    8694 *
Note: See TracChangeset for help on using the changeset viewer.