ArrayCore/FK.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of ArrayCore.
00004 **
00005 **  This file may be distributed and/or modified under the terms of the
00006 **  GNU General Public License version 2 or 3 as published by the Free
00007 **  Software Foundation and appearing in the file LICENSE.GPL included
00008 **  in the packaging of this file.
00009 **
00010 **  This file 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
00016 **  along with this program. If not, see <http://www.gnu.org/licenses/>.
00017 **
00018 **  See http://www.geopsy.org for more information.
00019 **
00020 **  Created : 2007-11-12
00021 **  Authors:
00022 **    Marc Wathelet
00023 **    Marc Wathelet (LGIT, Grenoble, France)
00024 **
00025 ***************************************************************************/
00026 
00027 #ifndef FK_H
00028 #define FK_H
00029 
00030 #include <QGpCoreTools.h>
00031 #include "FrequencyBand.h"
00032 #include "ArrayCoreDLLExport.h"
00033 
00034 namespace ArrayCore {
00035 
00036 class FKStationSignals;
00037 
00038 class ARRAYCORE_EXPORT FK : public AbstractFunction2
00039 {
00040 public:
00041   FK(QList<FKStationSignals *> array);
00042   ~FK() {delete [] _gaussian;}
00043 
00044   void setMaximumSlowness(double slow) {_squaredSlowMax=slow*slow;}
00045   double maximumSlowness() const {return sqrt(_squaredSlowMax);}
00046 
00047   void setMaximumWavenumber(double k) {_squaredKmaxGrid=k*k;}
00048   void setFrequencyBand(const FrequencyBand& f, double windowLength);
00049 
00050   virtual void initGrid(int n);
00051   virtual void initGrid(double kx, double ky, int index);
00052   virtual double value(double kx, double ky) const;
00053   virtual double value(double kx, double ky, int index) const;
00054   double absolutePower(int iComp) const;
00055 protected:
00056   double maximumK2() const {return _squaredKmaxTotal;}
00057 
00058   QList<FKStationSignals *> _array;
00059   // Index range for frequencies
00060   int _iFreqMin, _iFreqMax;
00061   // Stored only for warning messages
00062   double _frequency;
00063   double * _gaussian, * _gaussianPtr;
00064 private:
00065   // Maximum K^2 from grid limits
00066   double _squaredKmaxGrid;
00067   // Maximum slowness^2
00068   double _squaredSlowMax;
00069   // Maximum K^2 from grid limits and maximum slowness
00070   double _squaredKmaxTotal;
00071 };
00072 
00073 } // namespace ArrayCore
00074 
00075 #endif // FK_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines