SpectralListFactory.h

Go to the documentation of this file.
00001 //# Copyright (C) 1995,1996,1999-2001
00002 //# Associated Universities, Inc. Washington DC, USA.
00003 //#
00004 //# This library is free software; you can redistribute it and/or modify it
00005 //# under the terms of the GNU Library General Public License as published by
00006 //# the Free Software Foundation; either version 2 of the License, or (at your
00007 //# option) any later version.
00008 //#
00009 //# This library is distributed in the hope that it will be useful, but WITHOUT
00010 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00012 //# License for more details.
00013 //#
00014 //# You should have received a copy of the GNU Library General Public License
00015 //# along with this library; if not, write to the Free Software Foundation,
00016 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00017 //#
00018 //# Correspondence concerning AIPS++ should be addressed as follows:
00019 //#        Internet email: aips2-request@nrao.edu.
00020 //#        Postal address: AIPS++ Project Office
00021 //#                        National Radio Astronomy Observatory
00022 //#                        520 Edgemont Road
00023 //#                        Charlottesville, VA 22903-2475 USA
00024 
00025 
00026 #ifndef SPECTRALLISTFACTORY_H_
00027 #define SPECTRALLISTFACTORY_H_
00028 
00029 #include <casa/aips.h>
00030 #include <stdcasa/variant.h>
00031 
00032 #include <components/SpectralComponents/SpectralList.h>
00033 
00034 namespace casa {
00035 
00036 // create a SpectralList
00037 
00038 class SpectralListFactory {
00039 public:
00040         // Create a SpectralList object
00041         // <src>log</src> logger
00042         // <src>pampest</src> initial amplitude estimates for pfc functions
00043         // <src>pcenterest</src> initial center estimates for pfc functions
00044         // <src>pfwhmest</src> initial FWHM estimates for pfc functions
00045         // <src>pfix</src> fixed parameters for pfc functions. Any combination of "p", "f", and "c"
00046         // <src>plpest</src> initial estimates for power log polynomial coefficients
00047         // <src>plpfix</src> fixed parameters for power log polynomial coefficients (True means fix the
00048         // coefficient during fitting).
00049 
00050         static SpectralList create(
00051                 LogIO& log, const casac::variant& pampest,
00052                 const casac::variant& pcenterest, const casac::variant& pfwhmest,
00053                 const casac::variant& pfix=casac::initialize_variant(""),
00054                 const casac::variant& gmncomps=casac::initialize_variant(""),
00055                 const casac::variant& gmampcon=casac::initialize_variant(""),
00056                 const casac::variant& gmcentercon=casac::initialize_variant(""),
00057                 const casac::variant& gmfwhmcon=casac::initialize_variant(""),
00058                 const vector<double>& gmampest=vector<double>(0),
00059                 const vector<double>& gmcenterest=vector<double>(0),
00060                 const vector<double>& gmfwhmest=vector<double>(0),
00061                 const casac::variant& gmfix=casac::initialize_variant(""),
00062                 const casac::variant& pfunc=casac::initialize_variant(""),
00063                 const casac::variant& plpest=casac::initialize_variant(""),
00064                 const casac::variant& plpfix=casac::initialize_variant(""),
00065                 const casac::variant& ltpest=casac::initialize_variant(""),
00066                 const casac::variant& ltpfix=casac::initialize_variant("")
00067 
00068         );
00069 
00070 private:
00071         static void _addGaussianMultiplets(
00072                 SpectralList& spectralList,
00073                 LogIO& log,
00074                 const vector<int>& mygmncomps,
00075                 vector<double>& mygmampcon,
00076                 vector<double>& mygmcentercon,
00077                 vector<double>& mygmfwhmcon,
00078                 const vector<double>& gmampest,
00079                 const vector<double>& gmcenterest, const vector<double>& gmfwhmest,
00080                 const vector<string>& mygmfix
00081         );
00082 
00083         static void _addPowerLogPolynomial(
00084                 SpectralList& spectralList,
00085                 LogIO& log,     vector<double>& myplpest,
00086                 vector<bool>& myplpfix
00087         );
00088 
00089         static void _addLogTransformedPolynomial(
00090                 SpectralList& spectralList,
00091                 vector<double>& myltpest,
00092                 vector<bool>& myltpfix
00093         );
00094 
00095 };
00096 
00097 } // end namespace casa
00098 #endif /* SPECTRALLISTFACTORY_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1