DOcoordsys.h
Classes
- coordsys -- Implementation of the coordinate system functionality (full description)
Types
- ADDCOORDINATE
-
- AXESMAP
-
- AXISCOORDINATETYPES
-
- COORDINATETYPE
-
- CONVERSIONTYPE
-
- CONVERT
-
- CONVERTMANY
-
- EPOCH
-
- FINDAXIS
-
- FINDCOORDINATE
-
- FREQUENCYTOFREQUENCY
-
- FREQUENCYTOVELOCITY
-
- FROMRECORD
-
- INCREMENT
-
- LINEARTRANSFORM
-
- NAMES
-
- NAXES
-
- NCOORDINATES
-
- OBSERVER
-
- PARENTNAME
-
- PROJECTION
-
- REFERENCECODE
-
- REFERENCEPIXEL
-
- REFERENCEVALUE
-
- REPLACECOORDINATE
-
- REORDER
-
- RESTFREQUENCY
-
- SETCONVERSIONTYPE
-
- SETDIRECTION
-
- SETEPOCH
-
- SETINCREMENT
-
- SETLINEARTRANSFORM
-
- SETNAMES
-
- SETOBSERVER
-
- SETPARENTNAME
-
- SETPROJECTION
-
- SETREFERENCECODE
-
- SETREFERENCEPIXEL
-
- SETREFERENCEVALUE
-
- SETRESTFREQUENCY
-
- SETSPECTRAL
-
- SETSTOKES
-
- SETTABULAR
-
- SETTELESCOPE
-
- SETUNITS
-
- STOKES
-
- SUMMARY
-
- TELESCOPE
-
- TOABS
-
- TOABSMANY
-
- TOPIXEL
-
- TOPIXELMANY
-
- TORECORD
-
- TOREL
-
- TORELMANY
-
- TOWORLD
-
- TOWORLDMANY
-
- UNITS
-
- VELOCITYTOFREQUENCY
-
- NUM_METHODS
-
Interface
- Public Members
- coordsys(Bool direction, Bool spectral, const Vector<String>& stokes, Int linear, Bool tabular)
- coordsys(const CoordinateSystem& cSys)
- coordsys(const coordsys& other)
- coordsys& operator=(const coordsys& other)
- ~coordsys()
- void addCoordinate (Bool direction, Bool spectral, const Vector<String>& stokes, Int linear, Bool tabular)
- Vector<Int> axesMap (Bool toWorld) const
- Vector<String> axisCoordinateTypes (Bool world) const
- Vector<String> coordinateType (Index which) const
- Bool findAxis (Int& coordinate, Int& axisInCoordinate, Bool isWorld, Int axis) const
- Bool findCoordinate (Vector<Int>& pixelAxes, Vector<Int>& worldAxes, const String& coordType, Index which) const
- GlishRecord toGlishRecord () const
- void fromGlishRecord (const GlishRecord& rec)
- Vector<Double> frequencyToFrequency (const Vector<Double>& frequency, const String& freqUnit, const String& doppler, const Quantum<Double>& velUnit) const
- Vector<Double> frequencyToVelocity (const Vector<Double>& frequency, const String& freqUnit, const String& doppler, const String& velUnit) const
- Vector<Double> velocityToFrequency (const Vector<Double>& velocity, const String& freqUnit, const String& doppler, const String& velUnit) const
- Int nAxes (Bool world) const
- Int nCoordinates () const
- MEpoch epoch () const
- void setEpoch (const MEpoch& epoch)
- Vector<String> referenceCode (const String& coordinateType) const
- void setReferenceCode (const String& coordinateType, const String& code, Bool adjust)
- GlishRecord increment (const String& type, const String& format)
- void setIncrement (const String& coordinateType, const GlishRecord& incr)
- String observer () const
- void setObserver (const String& observer)
- String parentImageName () const
- void setParentImageName (const String& name)
- GlishRecord projection (const String& type) const
- void setProjection (const String& type, const Vector<Double>& pars)
- Vector<Double> referencePixel() const
- void setReferencePixel (const String& coordinateType, const Vector<Double>& refPix)
- GlishRecord referenceValue(const String& type, const String& format)
- void setReferenceValue (const String& coordinateType, const GlishRecord& gRec)
- Array<Double> linearTransform (const String& type)
- void setLinearTransform (const String& coordinateType, const Array<Double>& value)
- Quantum<Vector<Double> > restFrequency () const
- void setRestFrequency (const Quantum<Vector<Double> >& restFrequency, Index which, Bool append)
- Vector<String> stokes () const
- void setStokes (const Vector<String>& stokes)
- Bool setConversionType (const String& direction, const String& spectral)
- String getConversionType (const String& type)
- void setDirectionCoordinate (const String& ref, const String& proj, const Vector<Double>& projPar, const Vector<Double>& refPix, const GlishRecord& refVal, const GlishRecord& incr, const GlishRecord& poles, const Array<Double>& xform)
- void setSpectralCoordinate (const String& ref, const Quantum<Double>& restFrequency, const Quantum<Vector<Double> >& frequencies, const String& doppler, const Quantum<Vector<Double> >& velocities, Bool dofreq, Bool dovel)
- void setTabularCoordinate (const Vector<Double>& pixel, const Vector<Double>& world, Index which)
- void replaceCoordinate (const GlishRecord& cSys, Index in, Index out)
- String telescope () const
- void setTelescope (const String& telescope)
- Vector<String> worldAxisNames () const
- void setWorldAxisNames (const String& coordinateType, const Vector<String>& names)
- Vector<String> worldAxisUnits() const
- void setWorldAxisUnits (const String& coordinateType, const Vector<String>& units, Bool overwrite, Index which)
- Vector<String> summary (const String& velocity, Bool list) const
- Vector<Double> toPixel (const GlishRecord& gRec) const
- Array<Double> toPixelMany (const Array<Double>& world) const
- GlishRecord toWorld (const Vector<Double>& pixel, const String& format)
- Array<Double> toWorldMany (const Array<Double>& coordIn) const
- GlishRecord absoluteToRelative (const GlishRecord& absolute, Bool isWorld)
- Array<Double> absoluteToRelativeMany (const Array<Double>& absolute, Bool isWorld)
- GlishRecord relativeToAbsolute (const GlishRecord& relative, Bool isWorld)
- Array<Double> relativeToAbsoluteMany (const Array<Double>& absolute, Bool isWorld)
- Vector<Double> convert (const Vector<Double>& coordIn, const Vector<Bool>& absIn, const Vector<String>& unitsIn, const String& dopplerIn, const Vector<Bool>& absOut, const Vector<String>& unitsOut, const String& dopplerOut, const Vector<Int>& shape)
- Array<Double> convertMany (const Array<Double>& coordIn, const Vector<Bool>& absIn, const Vector<String>& unitsIn, const String& dopplerIn, const Vector<Bool>& absOut, const Vector<String>& unitsOut, const String& dopplerOut, const Vector<Int>& shape)
- void reorder (const Vector<Index>& order)
- virtual String className() const
- virtual Vector<String> methods() const
- virtual Vector<String> noTraceMethods() const
- virtual MethodResult runMethod(uInt which, ParameterSet &inputRecord, Bool runMethod)
- Private Members
- GlishRecord absRel (LogIO& os, const RecordInterface& recIn, Bool isWorld, Bool absToRel)
- Record absRelRecord (LogIO& os, const RecordInterface& recIn, Bool isWorld, Bool absToRel)
- void addCoordinate (CoordinateSystem& cSys, Bool direction, Bool spectral, const Vector<String>& stokes, Int linear, Bool tabular)
- void copyWorldAxes (Vector<Double>& out, const Vector<Double>& in, Int c) const
- Vector<Double> measuresToWorldVector (const RecordInterface& rec) const
- Record worldVectorToMeasures(const Vector<Double>& world, Int c, Bool abs) const
- Int findCoordinate (Coordinate::Type type, Bool warn) const
- void recordToWorldVector (Vector<Double>& world, String& type, Int c, const RecordInterface& rec) const
- Record worldVectorToRecord (const Vector<Double>& world, Int c, const String& format, Bool isAbsolute, Bool showAsAbsolute)
- Record quantumToRecord (LogIO& os, const Quantum<Double>& value) const
- void setDirectionCode (const String& code, Bool adjust)
- void setSpectralCode (const String& code, Bool adjust)
- Vector<Double> stringToWorldVector (LogIO& os, const Vector<String>& world, const Vector<String>& worldAxisUnits) const
- Coordinate::Type stringToType(const String& typeIn) const
- Record toWorldRecord (const Vector<Double>& pixel, const String& format)
- void trim (Vector<Double>& in, const Vector<Double>& replace) const
- Vector<Double> quantumVectorRecordToVectorDouble (const RecordInterface& recQ, const Vector<String>& units) const
or
Review Status
- Date Reviewed:
- yyyy/mm/dd
Prerequisite
Etymology
This implements the functionality for the coordinate system Distributed Object
Synopsis
The functionality that is bound to Glish and available via the
coordinate system DO is implemented here.
Example
Motivation
Template Type Argument Requirements (T)
Thrown Exceptions
To Do
Member Description
coordsys(Bool direction, Bool spectral, const Vector<String>& stokes, Int linear, Bool tabular)
"coordsys" constructor
Construct from given CoordinateSystem
coordsys(const coordsys& other)
copy constructor
coordsys& operator=(const coordsys& other)
assignment
Destructor
void addCoordinate (Bool direction, Bool spectral, const Vector<String>& stokes, Int linear, Bool tabular)
Add a new default coordinate. Only Tabular implemented presently.
Vector<Int> axesMap (Bool toWorld) const
Axes map
Axis coordinate types
Coordinate type
Bool findAxis (Int& coordinate, Int& axisInCoordinate, Bool isWorld, Int axis) const
Find the specified axis
Find the axes of the specified coordinate type.
Convert to/from a GlishRecord
Convert a vector of frequencies to frequency with an offset
Convert a vector of frequencies to velocity
Convert a vector of velocities to frequency
Int nAxes (Bool world) const
Number of coordinates
Number of coordinates
Get/set the Epoch
Get/set reference code
Set/Get increment
Get/set the Observer
Set/Get parent image name
Set/Get Direction Coordinate projection
Set/Get reference pixel
Set/Get reference value
Set/Get linear transform
Set/Get rest frequency
Get/Set new StokesCOordinate info
Set/get extra conversion layers
Set new DirectionCoordinate info
void setSpectralCoordinate (const String& ref, const Quantum<Double>& restFrequency, const Quantum<Vector<Double> >& frequencies, const String& doppler, const Quantum<Vector<Double> >& velocities, Bool dofreq, Bool dovel)
Set new SpectralCoordinate info
Set new TabularCoordinate info
Replace coordinates
Get/set the Telescope
Get/set the world axis names
Get/set the world axis units
Summary listing
absolute world to absolute pixel.
absolute world to absolute pixel for many conversions
absolute pixel to absolute world
absolute pixel to absolute world for many conversions
absolute coordinate to relative coordinate
absolute coordinate to relative coordinate for many conversions
relative coordinate to absolute coordinate
relative coordinate to absolute coordinate for many conversions
Vector<Double> convert (const Vector<Double>& coordIn, const Vector<Bool>& absIn, const Vector<String>& unitsIn, const String& dopplerIn, const Vector<Bool>& absOut, const Vector<String>& unitsOut, const String& dopplerOut, const Vector<Int>& shape)
General coordinate conversion
Array<Double> convertMany (const Array<Double>& coordIn, const Vector<Bool>& absIn, const Vector<String>& unitsIn, const String& dopplerIn, const Vector<Bool>& absOut, const Vector<String>& unitsOut, const String& dopplerOut, const Vector<Int>& shape)
General coordinate conversion for many conversions
reorder
Stuff needed for distributing this class
If your object has more than one method
GlishRecord absRel (LogIO& os, const RecordInterface& recIn, Bool isWorld, Bool absToRel)
Record absRelRecord (LogIO& os, const RecordInterface& recIn, Bool isWorld, Bool absToRel)
Inter convert absolute and relative world or pixel coordinates
void addCoordinate (CoordinateSystem& cSys, Bool direction, Bool spectral, const Vector<String>& stokes, Int linear, Bool tabular)
Add default coordinates to CS
void copyWorldAxes (Vector<Double>& out, const Vector<Double>& in, Int c) const
Copy the world axes of in to out
Convert record of measures to world coordinate vector
Convert world coordinate to measures and stick in record
Find coordinate of desired type
void recordToWorldVector (Vector<Double>& world, String& type, Int c, const RecordInterface& rec) const
Convert a record holding some mixture of numeric, measures, quantity, string
to a vector of doubles
Record worldVectorToRecord (const Vector<Double>& world, Int c, const String& format, Bool isAbsolute, Bool showAsAbsolute)
Convert a vector of world to a record holding some mixture
of numeric, measures, quantity, string
Convert Quantum to record
Set DirectionCoordinate reference code
Set SpectralCoordinate reference code
Convert world String to world vector double. World vector must be length
cSys.nWorldAxes()
Convert user coordinate type string to enum
absolute pixel to absolute world
void trim (Vector<Double>& in, const Vector<Double>& replace) const
Add missing values or tim excessive
Convert a vector of quantum doubles in a record to a vector of double
applying specified units
Runmethod enum