[468] | 1 | //#---------------------------------------------------------------------------
|
---|
| 2 | //# SDFitTable.h: A wrapper for fit parameters
|
---|
| 3 | //#---------------------------------------------------------------------------
|
---|
| 4 | //# Copyright (C) 2004
|
---|
| 5 | //# ATNF
|
---|
| 6 | //#
|
---|
| 7 | //# This program is free software; you can redistribute it and/or modify it
|
---|
| 8 | //# under the terms of the GNU General Public License as published by the Free
|
---|
| 9 | //# Software Foundation; either version 2 of the License, or (at your option)
|
---|
| 10 | //# any later version.
|
---|
| 11 | //#
|
---|
| 12 | //# This program is distributed in the hope that it will be useful, but
|
---|
| 13 | //# WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 14 | //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
---|
| 15 | //# Public License for more details.
|
---|
| 16 | //#
|
---|
| 17 | //# You should have received a copy of the GNU General Public License along
|
---|
| 18 | //# with this program; if not, write to the Free Software Foundation, Inc.,
|
---|
| 19 | //# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
|
---|
| 20 | //#
|
---|
| 21 | //# Correspondence concerning this software should be addressed as follows:
|
---|
| 22 | //# Internet email: Malte.Marquarding@csiro.au
|
---|
| 23 | //# Postal address: Malte Marquarding,
|
---|
| 24 | //# Australia Telescope National Facility,
|
---|
| 25 | //# P.O. Box 76,
|
---|
| 26 | //# Epping, NSW, 2121,
|
---|
| 27 | //# AUSTRALIA
|
---|
| 28 | //#
|
---|
| 29 | //# $Id:
|
---|
| 30 | //#---------------------------------------------------------------------------
|
---|
| 31 | #ifndef SDFITTABLE_H
|
---|
| 32 | #define SDFITTABLE_H
|
---|
| 33 |
|
---|
| 34 | #include <casa/aips.h>
|
---|
| 35 | #include <casa/Arrays/Vector.h>
|
---|
| 36 | #include <casa/BasicSL/String.h>
|
---|
| 37 | #include <vector>
|
---|
| 38 | #include <string>
|
---|
| 39 |
|
---|
| 40 | namespace asap {
|
---|
| 41 |
|
---|
| 42 | class SDFitTable {
|
---|
| 43 | public:
|
---|
| 44 | SDFitTable() : nfits_(0) {;};
|
---|
| 45 | ~SDFitTable() {;};
|
---|
| 46 | SDFitTable(const SDFitTable& other);
|
---|
| 47 |
|
---|
| 48 | void addFit(const casa::Vector<casa::Double>& p,
|
---|
| 49 | const casa::Vector<casa::Bool>& m,
|
---|
| 50 | const casa::Vector<casa::String>& f,
|
---|
| 51 | const casa::Vector<casa::Int>& c,
|
---|
| 52 | const casa::Vector<casa::String>& fi);
|
---|
| 53 |
|
---|
| 54 | void addSTLFit(const std::vector<double>& p,
|
---|
| 55 | const std::vector<bool>& m,
|
---|
| 56 | const std::vector<std::string>& f,
|
---|
| 57 | const std::vector<int>& c,
|
---|
| 58 | const std::vector<std::string>& fi);
|
---|
| 59 |
|
---|
| 60 | int STLlength() const { return nfits_; };
|
---|
| 61 |
|
---|
| 62 | casa::uInt length() const { return casa::uInt(nfits_); };
|
---|
| 63 |
|
---|
| 64 | std::vector<double> getSTLParameters(int which) const;
|
---|
| 65 | std::vector<bool> getSTLParameterMask(int which) const;
|
---|
| 66 | std::vector<std::string> getSTLFunctions(int which) const;
|
---|
| 67 | std::vector<int> getSTLComponents(int which) const;
|
---|
| 68 | std::vector<std::string> getSTLFrameInfo(int which) const;
|
---|
| 69 |
|
---|
| 70 | casa::Vector<casa::Double> getParameters(casa::uInt which) const;
|
---|
| 71 | casa::Vector<casa::Bool> getParameterMask(casa::uInt which) const;
|
---|
| 72 | casa::Vector<casa::String> getFunctions(casa::uInt which) const;
|
---|
| 73 | casa::Vector<casa::Int> getComponents(casa::uInt which) const;
|
---|
| 74 | casa::Vector<casa::String> getFrameInfo(casa::uInt which) const;
|
---|
| 75 |
|
---|
| 76 |
|
---|
| 77 | private:
|
---|
| 78 | int nfits_;
|
---|
| 79 | std::vector<std::vector<double> > pars_;
|
---|
| 80 | std::vector<std::vector<bool> > mask_;
|
---|
| 81 | std::vector<std::vector<std::string> > funcs_;
|
---|
| 82 | std::vector<std::vector<int> > comps_;
|
---|
| 83 | std::vector<std::vector<std::string> > frameinfo_;
|
---|
| 84 | };
|
---|
| 85 |
|
---|
| 86 | }//
|
---|
| 87 |
|
---|
| 88 | #endif
|
---|