Object.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2004 CSIRO ICT Centre
00003  *
00004  * $Id: Object.h 1161 2005-09-12 17:52:16Z rsc $
00005  */
00006 
00007 /*
00008  * An object from a catalogue which has a location
00009  * defined as it's RA and Dec in decimal degrees.
00010  * There may also be errors associated with these
00011  * values, defined as the standard deviation.
00012  * the errors may be different in the RA and Dec
00013  * dimensions (getOrthoSD and getDecSD), or be the same
00014  * for each (getSD). When different, getSD should return 
00015  * the max of getOrthoSD and getDecSD.
00016  *
00017  * zAlpha is the value that puts a probability of alpha
00018  * into the tail of a normal distribution and is used
00019  * in computing the distance bound between two objects.
00020  * A value of 1.96 corresponds to a 95% confidence that
00021  * two objects are not spatially coincident.
00022  */
00023 
00024 #ifndef OBJECT_DEFINED
00025 #define OBJECT_DEFINED
00026 
00027 #include <iostream>
00028 
00029 #include "Constants.h"
00030 
00031 
00032 class Object
00033 {
00034   public:
00035     Object(double ra, double dec);
00036     virtual ~Object() {};
00037 
00038     virtual double getRa()      const { return ra; };
00039     virtual double getDec()     const { return dec; };
00040     virtual double getSD()      const { return 0.0; };
00041     virtual double getOrthoSD() const { return 0.0; };
00042     virtual double getDecSD()   const { return 0.0; };
00043     virtual void print(std::ostream & os) const;
00044 
00045     double gcDistance(Object const & other) const;
00046     float gcDistanceMins(Object const & other) const
00047     {
00048       return Constants::s_minutes * gcDistance(other);
00049     }
00050 
00051     bool isSmallSeparation(Object const & other) const;
00052 
00053     // the zAlpha for the required confidence
00054     static double zAlpha;
00055 
00056     static double computeDistanceBound(double redSD, double blueSD);
00057     static double computeRACorrection(double radius, double dec);
00058 
00059   private:
00060     double ra;
00061     double dec;
00062 
00063     Object();
00064     Object(Object const & other);
00065     Object & operator=(Object const &);
00066 
00067     double haversineDistance(Object const & other) const;
00068 };
00069 
00070 std::ostream & operator<<(std::ostream & os, Object const & object);
00071 
00072 #endif // ifndef OBJECT_DEFINED
00073 
Generated on Mon Oct 4 10:39:55 2010 for Matching.kdevelop by  doxygen 1.6.3