//# SpectralEstimate.cc: Get an initial estimate for spectral lines //# Copyright (C) 2001,2002,2003,2004 //# Associated Universities, Inc. Washington DC, USA. //# //# This library is free software; you can redistribute it and/or modify it //# under the terms of the GNU Library General Public License as published by //# the Free Software Foundation; either version 2 of the License, or (at your //# option) any later version. //# //# This library is distributed in the hope that it will be useful, but WITHOUT //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public //# License for more details. //# //# You should have received a copy of the GNU Library General Public License //# along with this library; if not, write to the Free Software Foundation, //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# //# Correspondence concerning AIPS++ should be addressed as follows: //# Internet email: aips2-request@nrao.edu. //# Postal address: AIPS++ Project Office //# National Radio Astronomy Observatory //# 520 Edgemont Road //# Charlottesville, VA 22903-2475 USA //# //# $Id: SpectralEstimate.cc 19933 2007-02-27 05:04:51Z Malte.Marquarding $ //# Includes #include #include #include namespace casa { //# NAMESPACE CASA - BEGIN //# Constructors SpectralEstimate::SpectralEstimate(const uInt maxpar) : useWindow_p(False), rms_p(0), cutoff_p(0), windowLow_p(0), windowEnd_p(0), regionLow_p(0), regionEnd_p(0), q_p(2), sigmin_p(0), deriv_p(0), slist_p(maxpar), lprof_p(0) { setQ(); } SpectralEstimate::SpectralEstimate(const Double rms, const Double cutoff, const Double minsigma, const uInt maxpar) : useWindow_p(False), rms_p(rms), cutoff_p(cutoff), windowLow_p(0), windowEnd_p(0), regionLow_p(0), regionEnd_p(0), q_p(2), sigmin_p(minsigma), deriv_p(0), slist_p(maxpar), lprof_p(0) { setQ(); } SpectralEstimate::SpectralEstimate(const SpectralEstimate &other) : useWindow_p(other.useWindow_p), rms_p(other.rms_p), cutoff_p(other.cutoff_p), windowLow_p(other.windowLow_p), windowEnd_p(other.windowEnd_p), regionLow_p(other.regionLow_p), regionEnd_p(other.regionEnd_p), q_p(other.q_p), sigmin_p(other.sigmin_p), deriv_p(0), slist_p(other.slist_p), lprof_p(other.lprof_p) { setQ(q_p); deriv_p = new Double[lprof_p]; for (uInt i=0; i lo) { regionLow_p = lo; regionEnd_p = hi; }; } void SpectralEstimate::setWindowing(const Bool win) { useWindow_p = win; } void SpectralEstimate::setMaxN(const uInt maxpar) { slist_p.set(maxpar); } } //# NAMESPACE CASA - END //# Cater for Double and Float #ifdef AIPS_NO_TEMPLATE_SRC #include namespace casa { //# NAMESPACE CASA - BEGIN template SpectralList const & SpectralEstimate::estimate(Vector const &, Vector *); template SpectralList const & SpectralEstimate::estimate(Vector const &, Vector const &); template SpectralElement SpectralEstimate::convertElement(Vector const &, SpectralElement const &) const; template void SpectralEstimate::findga(Vector const &); template uInt SpectralEstimate::window(Vector const &); template void SpectralEstimate::findc2(Vector const &); template SpectralList const & SpectralEstimate::estimate(Vector const &, Vector *); template SpectralList const & SpectralEstimate::estimate(Vector const &, Vector const &); template SpectralElement SpectralEstimate::convertElement(Vector const &, SpectralElement const &) const; template void SpectralEstimate::findga(Vector const &); template uInt SpectralEstimate::window(Vector const &); template void SpectralEstimate::findc2(Vector const &); } //# NAMESPACE CASA - END #endif