SDMSManager.h

Go to the documentation of this file.
00001 //# SDMSManager.h: this defines single dish MS transform manager 
00002 //#                inheriting MSTransformManager.
00003 //#
00004 //# Copyright (C) 2015
00005 //# National Astronomical Observatory of Japan
00006 //#
00007 //# This library is free software; you can redistribute it and/or modify it
00008 //# under the terms of the GNU Library General Public License as published by
00009 //# the Free Software Foundation; either version 2 of the License, or (at your
00010 //# option) any later version.
00011 //#
00012 //# This library is distributed in the hope that it will be useful, but WITHOUT
00013 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00015 //# License for more details.
00016 //#
00017 //# You should have received a copy of the GNU Library General Public License
00018 //# along with this library; if not, write to the Free Software Foundation,
00019 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00020 //#
00021 //# Correspondence concerning AIPS++ should be addressed as follows:
00022 //#        Internet email: aips2-request@nrao.edu.
00023 //#        Postal address: AIPS++ Project Office
00024 //#                        National Radio Astronomy Observatory
00025 //#                        520 Edgemont Road
00026 //#                        Charlottesville, VA 22903-2475 USA
00027 //#
00028 //# $Id$
00029 #ifndef _CASA_SDMSMANAGER_H_
00030 #define _CASA_SDMSMANAGER_H_
00031 
00032 #include <iostream>
00033 #include <string>
00034 #include <map>
00035 
00036 #include <libsakura/sakura.h>
00037 
00038 #include <casa/aipstype.h>
00039 #include <casa/Containers/Record.h>
00040 #include <casa_sakura/SakuraAlignedArray.h>
00041 #include <ms/MeasurementSets/MeasurementSet.h>
00042 #include <msvis/MSVis/VisBuffer2.h>
00043 #include <mstransform/MSTransform/MSTransformManager.h>
00044 #include <scimath/Mathematics/Convolver.h>
00045 #include <scimath/Mathematics/VectorKernel.h>
00046 
00047 namespace casa { //# NAMESPACE CASA - BEGIN
00048 
00049 class SDMSManager : public MSTransformManager {
00050 public:
00051   // Default constructor
00052   SDMSManager();
00053   // Construct from MS name string
00054   explicit SDMSManager(string const& ms_name);
00055 
00056   // Set user defined Sort columns
00057   void setSortColumns(Block<Int> sortColumns,
00058                       bool addDefaultSortCols=false,
00059                       Double timebin=0.0);
00060 
00061   // Set/unset smoothing parameter
00062   void setSmoothing(string const &kernelType, float const &kernelWidth);
00063   void unsetSmoothing();
00064 
00065   // Initialize smoothing operation
00066   void initializeSmoothing();
00067 
00068   Record getSelRec(string const &spw);
00069   //MeasurementSet getMS();
00070 
00071   //SDMSManager &operator=(SDMSManager const &other);
00072   // Destructor
00073   ~SDMSManager();
00074 
00075   void fillCubeToOutputMs(vi::VisBuffer2 *vb,
00076                           Cube<Float> const &data_cube);
00077 
00078   void fillCubeToOutputMs(vi::VisBuffer2 *vb,
00079                           Cube<Float> const &data_cube,
00080                           Cube<Bool> const *flag_cube);
00081 
00082 protected:
00083 
00084   void fillCubeToDataCols(vi::VisBuffer2 *vb,RefRows &rowRef,
00085                           Cube<Float> const &data_cube,
00086                           Cube<Bool> const *flag_cube);
00087 
00088   void setIterationApproach();
00089 
00090   int getBlockId(Block<Int> const &data, Int const value);
00091 
00092   // Inspection for smoothing operation
00093   Vector<Int> inspectNumChan();
00094 
00095 private:
00096   Block<Int> userSortCols_;
00097 
00098   // for Gaussian smoothing
00099   Bool doSmoothing_;
00100   VectorKernel::KernelTypes kernelType_;
00101   // FWHM of Gaussian
00102   float kernelWidth_;
00103 
00104 }; // class SDMSManager -END
00105 
00106 
00107 } //# NAMESPACE CASA - END
00108   
00109 #endif /* _CASA_SDMSMANAGER_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1