00001 /*************************************************************************** 00002 ** 00003 ** This file is part of geopsydamping. 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 : 2004-04-15 00021 ** Authors: 00022 ** Marc Wathelet 00023 ** Marc Wathelet (ULg, Liège, Belgium) 00024 ** Marc Wathelet (LGIT, Grenoble, France) 00025 ** 00026 ***************************************************************************/ 00027 00028 #ifndef DampingResults_H 00029 #define DampingResults_H 00030 00031 #include <GeopsyCore.h> 00032 #include <SciFigs.h> 00033 00034 class Parameters; 00035 00036 class DampingResults: public GraphicSheetMenu 00037 { 00038 Q_OBJECT 00039 public: 00040 DampingResults(QWidget* parent=0); 00041 ~DampingResults(); 00042 00043 bool compute(int ig, const Signal * sig, const Parameters& param); 00044 void createObjects(SubSignalPool * subPool); 00045 void setWindowTitle(QString title) {GraphicSheetMenu::setWindowTitle(title);} 00046 00047 QMenu * menuTools; 00048 public slots: 00049 void save(QString fileName=QString::null); 00050 protected: 00051 TextEdit ** _comments; 00052 LineLayer ** _averageCurveLayers; 00053 LineLayer ** _stddevCurveLayers; 00054 LineLayer ** _fitCurveLayers; 00055 // Used for curve fitting 00056 static double misfitFunk(double x[] ); 00057 static Curve<Point2D> _aveCurve; 00058 static int _nSampFit; 00059 static double _fitW; 00060 QString _log; 00061 struct Result { 00062 QString name; 00063 double frequency; 00064 double damping; 00065 int nWindows; 00066 }; 00067 QVector<Result> _results; 00068 }; 00069 00070 #endif