ProteoWizard
TruncatedLorentzianTest.cpp
Go to the documentation of this file.
1//
2// $Id$
3//
4//
5// Original author: Darren Kessner <darren@proteowizard.org>
6//
7// Copyright 2006 Louis Warschaw Prostate Cancer Center
8// Cedars Sinai Medical Center, Los Angeles, California 90048
9//
10// Licensed under the Apache License, Version 2.0 (the "License");
11// you may not use this file except in compliance with the License.
12// You may obtain a copy of the License at
13//
14// http://www.apache.org/licenses/LICENSE-2.0
15//
16// Unless required by applicable law or agreed to in writing, software
17// distributed under the License is distributed on an "AS IS" BASIS,
18// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19// See the License for the specific language governing permissions and
20// limitations under the License.
21//
22
23
25#include "DerivativeTest.hpp"
26
27
28#include <boost/numeric/ublas/vector.hpp>
29#include <boost/numeric/ublas/matrix.hpp>
30#include <boost/numeric/ublas/io.hpp>
31namespace ublas = boost::numeric::ublas;
32
34#include <cstring>
35
36
37using namespace pwiz::util;
38using namespace pwiz::frequency;
39
40
41ostream* os_ = 0;
42
43
44int main(int argc, char* argv[])
45{
46 if (argc>1 && !strcmp(argv[1],"-v")) os_ = &cout;
47 if (os_) *os_ << "TruncatedLorentzianTest\n";
48
49 if (os_) *os_ << setprecision(8);
50
51 ublas::vector<double> p(4);
52
53 p(TruncatedLorentzian::AlphaR) = 1;
54 p(TruncatedLorentzian::AlphaI) = 5;
55 p(TruncatedLorentzian::Tau) = 2;
56 p(TruncatedLorentzian::F0) = 0;
57 double T = 1;
58
59/*
60 p(TruncatedLorentzian::AlphaR) = 5e6;
61 p(TruncatedLorentzian::AlphaI) = 0;
62 p(TruncatedLorentzian::Tau) = 1;
63 p(TruncatedLorentzian::F0) = 159455;
64 double T = .384;
65*/
66
68
69// L.outputSamples(cout, p);
70
71/*
72 for (int i=0; i<10; i++)
73 DerivativeTest::testDerivatives(L, i, p, 1e-5, 1e-3);
74*/
75
76 if (os_) *os_ << "L(0): " << L(0,p) << endl;
77
78 return 0;
79}
int main(int argc, char *argv[])
ostream * os_