casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
VLAFrequencyFilter.h
Go to the documentation of this file.
00001 //# VLAFrequencyFilter.h: 
00002 //# Copyright (C) 1999,2000
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library 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 Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 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 //#
00027 //# $Id$
00028 
00029 #ifndef NRAO_VLAFREQUENCYFILTER_H
00030 #define NRAO_VLAFREQUENCYFILTER_H
00031 
00032 #include <casa/aips.h>
00033 #include <nrao/VLA/VLAFilter.h>
00034 
00035 #include <casa/namespace.h>
00036 namespace casa { //# NAMESPACE CASA - BEGIN
00037 class MVFrequency;
00038 } //# NAMESPACE CASA - END
00039 
00040 class VLALogicalRecord;
00041 
00042 // <summary>
00043 // </summary>
00044 
00045 // <use visibility=export>
00046 
00047 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
00048 // </reviewed>
00049 
00050 // <prerequisite>
00051 //   <li> SomeClass
00052 //   <li> SomeOtherClass
00053 //   <li> some concept
00054 // </prerequisite>
00055 //
00056 // <etymology>
00057 // </etymology>
00058 //
00059 // <synopsis>
00060 // Note the start and stop frequencys are the values at the center if the
00061 // integration. 
00062 // </synopsis>
00063 //
00064 // <example>
00065 // </example>
00066 //
00067 // <motivation>
00068 // </motivation>
00069 //
00070 // <templating arg=T>
00071 //    <li>
00072 //    <li>
00073 // </templating>
00074 //
00075 // <thrown>
00076 //    <li>
00077 //    <li>
00078 // </thrown>
00079 //
00080 // <todo asof="yyyy/mm/dd">
00081 //   <li> add this feature
00082 //   <li> fix this bug
00083 //   <li> start discussion of this possible extension
00084 // </todo>
00085 
00086 class VLAFrequencyFilter: public VLAFilter
00087 {
00088 public:
00089   // The default constructor creates a filter that does not filter
00090   // anything. ie., the passThru() function always returns True;
00091   VLAFrequencyFilter();
00092 
00093   // Creates a filter that filters all records except those where any of the
00094   // observed data are within the specified band. The frequency frame is
00095   // assumed to be topocentric.
00096   VLAFrequencyFilter(const MVFrequency& centreFrequency, 
00097                      const MVFrequency& bandwidth);
00098   
00099   // The copy constructor uses copy semantics.
00100   VLAFrequencyFilter(const VLAFrequencyFilter& other);
00101 
00102   // The destructor is trivial
00103   virtual ~VLAFrequencyFilter();
00104 
00105   // The assignment operator uses copy semantics.
00106   VLAFrequencyFilter& operator=(const VLAFrequencyFilter& other);
00107 
00108   // set the reference frequency.
00109   void refFrequency(const MVFrequency& refFrequency);
00110 
00111   // set the bandwidth.
00112   void bandwidth(const MVFrequency& bandwidth);
00113 
00114   // returns True if the supplied record contains any data that is between the
00115   // specified start and end frequencies.
00116   virtual Bool passThru(const VLALogicalRecord& record) const;
00117 
00118   // Return a pointer to a copy of the VLAFrequencyFilter object upcast to a
00119   // VLAFilter object. The class that uses this function is responsible for
00120   // deleting the pointer. This is used to implement a virtual copy
00121   // constructor.
00122   virtual VLAFilter* clone() const;
00123 
00124   // Function which checks the internal data of this class for correct
00125   // dimensionality and consistant values. Returns True if everything is fine
00126   // otherwise returns False.
00127   virtual Bool ok() const;
00128 
00129 private:
00130   Double itsTopEdge;
00131   Double itsBottomEdge;
00132 };
00133 #endif
00134 // Local Variables: 
00135 // compile-command: "gmake OPTLIB=1 VLAFrequencyFilter"
00136 // End: