[TRANSFORM] What is a "frame"?

Ed Shaya Edward.J.Shaya.1 at gsfc.nasa.gov
Thu Nov 6 07:54:56 PST 2003


I cleaned this up and filled it out a bit, making sure nesting and 
subclassing is logical
and added comments.  I note that Mapping applies to any Q, so one could have
mapping on FluxQ or just i-axis or Equinox.

/* Flux as a function of RA,DE or GL,GB positions */
FluxQ
  Argument 
     positionQRef  /* The Axes are described by this Argument.
                    * We chose to use a ref for clarity. */  
  ValueList
     list of flux values   /* All of the Flux numbers */
  Units
       ergs/s/cm2/A

PositionQ  /*  A two dimensional position */
  Argument
     Index(NAxis1)  /* Index is an object that simply
                     * generates the numbers 0,1... N-1 */
             name
                 "i-axis"
  Argument
     Index(NAxis2) 
             name
                 "j-axis"
  DataFormat
     tuple  /* Values of  positionQ are (i-axis,j-axis) pairs
           int
           int
  ValueList 
        0,0 0,1 0,2 ...
        1,0 1,1 1,2 ...
           ...
  Mapping  
/*Mapping always maps ValueList numbers to new numbers. 
 *Arguments are untouched, but new units may be part of output.
 *Generally, the errors need to be remapped too, but pixel numbers
 *don't have errors, hopefully. */
     PixeltoCoordsAlgorithm
       algorithmID 
       /*Provides unique identification of algorithm to use.
        *Perhaps the code could actually be at this URL */
             "http://ivoa.net/algorithms/WCS/position/pixelToCoords.c"
           Inputs
           /* These are parameters of the Algorithm. 
            *Each algorithm has its own requirements
            *on the number of Inputs, their type, and the order.
            *In this case, they happen to specify the output frame.*/
              Frame1
                Equinox
                ReferenceSystem
              CenterPixel 
                 445 420
              CenterRADE
              PixelsPerArcsec
              OutputUnits
              /* The algorithm also needs to know the output units */
                (hour min sec)
                (degree arcmin)       
  Mapping
/*An alternate mapping to Galactic coordinates.  It differs only in
 *the input values because I assumed that the algorithm knows
 *how to handle both coordinate systems*/
     PixeltoCoordsAlgorithm
        algorithmID
             http://ivoa.net/algorithms/WCS/position/pixelToCoords.c
           Inputs
              AlternateFrame2
                 Equinox
                   "1900"
                 ReferenceSystem
                   "GalacticII"
              CenterGlGb
              CenterPixel
                  445 420
              PixelsPerArcsec
              OutputUnits
                   degree
                   degree

Ed




More information about the dm mailing list