casa
$Rev:20696$
|
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: MeasuresProxy.h 20821 2009-11-18 11:30:57Z Malte.Marquarding $ 00027 00028 #ifndef MEASURES_MEASURESPROXY_H 00029 #define MEASURES_MEASURESPROXY_H 00030 00031 //# Includes 00032 00033 #include <casa/aips.h> 00034 #include <casa/Containers/Record.h> 00035 #include <casa/Arrays/Vector.h> 00036 #include <casa/Quanta/Quantum.h> 00037 #include <measures/Measures/Measure.h> 00038 #include <measures/Measures/MeasFrame.h> 00039 #include <casa/BasicSL/String.h> 00040 00041 #include <casa/namespace.h> 00042 //# Forward declarations 00043 namespace casa { //# NAMESPACE CASA - BEGIN 00044 class String; 00045 class MeasureHolder; 00046 class MeasComet; 00047 } //# NAMESPACE CASA - END 00048 00049 class MeasuresProxy 00050 { 00051 public: 00052 MeasuresProxy(); 00053 virtual ~MeasuresProxy(); 00054 Record measure(const Record& rec, const String& str, const Record& form); 00055 Bool doframe(const Record& rec); 00056 String dirshow(const Record& rec); 00057 Record doptorv(const Record& rec, const String& str); 00058 Record doptofreq(const Record& rec, const String& str, 00059 const Quantity& form); 00060 Record todop(const Record& rec, const Quantity& form); 00061 Record torest(const Record& rec, const Record& form); 00062 Vector<String> obslist(); 00063 Vector<String> srclist(); 00064 Vector<String> linelist(); 00065 Record observatory(const String& str); 00066 Record source(const String& str); 00067 Record line(const String& str); 00068 Record alltyp(const Record& rec); 00069 Quantum<Vector<Double> > posangle(const Record& lrec, const Record& rrec); 00070 Quantum<Vector<Double> > separation(const Record& lrec, const Record& rrec); 00071 Record uvw(const Record& mhrec); 00072 Record expand(const Record& mhrec); 00073 00074 private: 00075 String vec2str(const Vector<String>& lst); 00076 Bool doFrame(const MeasureHolder &in); 00077 Bool doFrame(const String &in); 00078 Bool makeMeasure(String &error, MeasureHolder &out, 00079 const MeasureHolder &in, const String &outref, 00080 const Record &off); 00081 Bool toUvw(String &error, MeasureHolder &out, 00082 Vector<Double> &xyz, Vector<Double> &dot, 00083 const MeasureHolder &in); 00084 Bool expandIt(String &error, MeasureHolder &out, 00085 Vector<Double> &xyz, 00086 const MeasureHolder &in); 00087 MeasureHolder rec2mh(const Record& rec); 00088 Record mh2rec(const MeasureHolder& mh); 00089 00090 static String getMeasureType(const Record &in); 00091 00092 //# Data 00093 // The globally used MeasFrame for this DO 00094 MeasFrame frame_p; 00095 // The current comet class 00096 MeasComet *pcomet_p; 00097 00098 }; 00099 00100 #endif