MeasuresProxy.h

Go to the documentation of this file.
00001 //# MeasuresProxy.h: This class gives a high-level interface to Measures
00002 //# Copyright (C) 2006
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This program is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU General Public License as published by the Free
00007 //# Software Foundation; either version 2 of the License, or (at your option)
00008 //# any later version.
00009 //#
00010 //# This program is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
00013 //# more details.
00014 //#
00015 //# You should have received a copy of the GNU General Public License along
00016 //# with this program; if not, write to the Free Software Foundation, Inc.,
00017 //# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id$
00027 
00028 #ifndef MEASURES_MEASURESPROXY_H
00029 #define MEASURES_MEASURESPROXY_H
00030 
00031 //# Includes
00032 
00033 #include <casacore/casa/aips.h>
00034 #include <casacore/casa/Containers/Record.h>
00035 #include <casacore/casa/Arrays/Vector.h>
00036 #include <casacore/casa/Quanta/Quantum.h>
00037 #include <casacore/measures/Measures/Measure.h>
00038 #include <casacore/measures/Measures/MeasFrame.h>
00039 #include <casacore/casa/BasicSL/String.h>
00040 
00041 //# Forward declarations
00042 namespace casacore { //# NAMESPACE CASACORE - BEGIN
00043 class String;
00044 class MeasureHolder;
00045 class MeasComet;
00046 
00047 class MeasuresProxy
00048 {
00049 public:
00050   MeasuresProxy();
00051   virtual ~MeasuresProxy();
00052   Record measure(const Record& rec, const String& str, const Record& form);
00053   Bool doframe(const Record& rec);
00054   String dirshow(const Record& rec);
00055   Record doptorv(const Record& rec, const String& str);
00056   Record doptofreq(const Record& rec, const String& str,
00057                    const Quantity& form);
00058   Record todop(const Record& rec, const Quantity& form);
00059   Record torest(const Record& rec, const Record& form);
00060   Vector<String> obslist();
00061   Vector<String> srclist();
00062   Vector<String> linelist();
00063   Record observatory(const String& str);
00064   Record source(const String& str);
00065   Record line(const String& str);
00066   Record alltyp(const Record& rec);
00067   Quantum<Vector<Double> > posangle(const Record& lrec, const Record& rrec);
00068   Quantum<Vector<Double> > separation(const Record& lrec, const Record& rrec);
00069   Record uvw(const Record& mhrec);
00070   Record expand(const Record& mhrec);
00071 
00072 private:
00073   String vec2str(const Vector<String>& lst);
00074   Bool doFrame(const MeasureHolder &in);
00075   Bool doFrame(const String &in);
00076   Bool makeMeasure(String &error, MeasureHolder &out,
00077                    const MeasureHolder &in, const String &outref,
00078                    const Record &off);
00079   Bool toUvw(String &error, MeasureHolder &out,
00080                        Vector<Double> &xyz, Vector<Double> &dot,
00081                        const MeasureHolder &in);
00082   Bool expandIt(String &error, MeasureHolder &out,
00083                         Vector<Double> &xyz,
00084                         const MeasureHolder &in);
00085   MeasureHolder rec2mh(const Record& rec);
00086   Record mh2rec(const MeasureHolder& mh);
00087 
00088   static String getMeasureType(const Record &in);
00089 
00090   //# Data
00091   // The globally used MeasFrame for this DO
00092   MeasFrame frame_p;
00093   // The current comet class
00094   MeasComet *pcomet_p;
00095   
00096 };
00097 
00098 } //# NAMESPACE CASACORE - END
00099 
00100 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1