casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SpectralListFactory.h
Go to the documentation of this file.
1 //# Copyright (C) 1995,1996,1999-2001
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 
25 
26 #ifndef SPECTRALLISTFACTORY_H_
27 #define SPECTRALLISTFACTORY_H_
28 
29 #include <casa/aips.h>
30 #include <stdcasa/variant.h>
31 
33 
34 namespace casa {
35 
36 // create a SpectralList
37 
39 public:
40  // Create a SpectralList object
41  // <src>log</src> logger
42  // <src>pampest</src> initial amplitude estimates for pfc functions
43  // <src>pcenterest</src> initial center estimates for pfc functions
44  // <src>pfwhmest</src> initial FWHM estimates for pfc functions
45  // <src>pfix</src> fixed parameters for pfc functions. Any combination of "p", "f", and "c"
46  // <src>plpest</src> initial estimates for power log polynomial coefficients
47  // <src>plpfix</src> fixed parameters for power log polynomial coefficients (true means fix the
48  // coefficient during fitting).
49 
50  static SpectralList create(
51  casacore::LogIO& log, const casac::variant& pampest,
52  const casac::variant& pcenterest, const casac::variant& pfwhmest,
54  const casac::variant& gmncomps=casac::initialize_variant(""),
55  const casac::variant& gmampcon=casac::initialize_variant(""),
56  const casac::variant& gmcentercon=casac::initialize_variant(""),
57  const casac::variant& gmfwhmcon=casac::initialize_variant(""),
58  const std::vector<double>& gmampest=std::vector<double>(0),
59  const std::vector<double>& gmcenterest=std::vector<double>(0),
60  const std::vector<double>& gmfwhmest=std::vector<double>(0),
63  const casac::variant& plpest=casac::initialize_variant(""),
64  const casac::variant& plpfix=casac::initialize_variant(""),
65  const casac::variant& ltpest=casac::initialize_variant(""),
67 
68  );
69 
70 private:
71  static void _addGaussianMultiplets(
72  SpectralList& spectralList,
73  casacore::LogIO& log,
74  const std::vector<int>& mygmncomps,
75  std::vector<double>& mygmampcon,
76  std::vector<double>& mygmcentercon,
77  std::vector<double>& mygmfwhmcon,
78  const std::vector<double>& gmampest,
79  const std::vector<double>& gmcenterest, const std::vector<double>& gmfwhmest,
80  const std::vector<string>& mygmfix
81  );
82 
83  static void _addPowerLogPolynomial(
84  SpectralList& spectralList,
85  casacore::LogIO& log, std::vector<double>& myplpest,
86  std::vector<bool>& myplpfix
87  );
88 
89  static void _addLogTransformedPolynomial(
90  SpectralList& spectralList,
91  std::vector<double>& myltpest,
92  std::vector<bool>& myltpfix
93  );
94 
95 };
96 
97 } // end namespace casa
98 #endif /* SPECTRALLISTFACTORY_H_ */
static void _addLogTransformedPolynomial(SpectralList &spectralList, std::vector< double > &myltpest, std::vector< bool > &myltpfix)
LatticeExprNode log(const LatticeExprNode &expr)
static void _addGaussianMultiplets(SpectralList &spectralList, casacore::LogIO &log, const std::vector< int > &mygmncomps, std::vector< double > &mygmampcon, std::vector< double > &mygmcentercon, std::vector< double > &mygmfwhmcon, const std::vector< double > &gmampest, const std::vector< double > &gmcenterest, const std::vector< double > &gmfwhmest, const std::vector< string > &mygmfix)
create a SpectralList
ostream-like interface to creating log messages.
Definition: LogIO.h:167
static SpectralList create(casacore::LogIO &log, const casac::variant &pampest, const casac::variant &pcenterest, const casac::variant &pfwhmest, const casac::variant &pfix=casac::initialize_variant(""), const casac::variant &gmncomps=casac::initialize_variant(""), const casac::variant &gmampcon=casac::initialize_variant(""), const casac::variant &gmcentercon=casac::initialize_variant(""), const casac::variant &gmfwhmcon=casac::initialize_variant(""), const std::vector< double > &gmampest=std::vector< double >(0), const std::vector< double > &gmcenterest=std::vector< double >(0), const std::vector< double > &gmfwhmest=std::vector< double >(0), const casac::variant &gmfix=casac::initialize_variant(""), const casac::variant &pfunc=casac::initialize_variant(""), const casac::variant &plpest=casac::initialize_variant(""), const casac::variant &plpfix=casac::initialize_variant(""), const casac::variant &ltpest=casac::initialize_variant(""), const casac::variant &ltpfix=casac::initialize_variant(""))
Create a SpectralList object log logger pampest initial amplitude estimates for pfc functions pcenter...
variant initialize_variant(const std::string &)
A set of SpectralElements.
Definition: SpectralList.h:85
static void _addPowerLogPolynomial(SpectralList &spectralList, casacore::LogIO &log, std::vector< double > &myplpest, std::vector< bool > &myplpfix)