casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
LFDisplayFlags.h
Go to the documentation of this file.
00001 //# LFDisplayFlags: A lighter flagger - for autoflag
00002 //# Copyright (C) 2000,2001
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Jan 28 2011 rurvashi Id$
00027 #ifndef FLAGGING_LFDISPLAYFLAGS_H
00028 #define FLAGGING_LFDISPLAYFLAGS_H
00029 
00030 #include <flagging/Flagging/LFExamineFlags.h>
00031 
00032 #include <casadbus/viewer/ViewerProxy.h>
00033 #include <casadbus/plotserver/PlotServerProxy.h>
00034 #include <casadbus/utilities/BusAccess.h>
00035 #include <casadbus/session/DBusSession.h>
00036 
00037 #include <synthesis/MSVis/VisibilityIterator.h>
00038 #include <synthesis/MSVis/VisBuffer.h>
00039 #include <ms/MeasurementSets/MSColumns.h>
00040 
00041 #include <flagging/Flagging/LFPlotServerProxy.h>
00042 
00043 
00044 namespace casa { //# NAMESPACE CASA - BEGIN
00045   
00046   class LFDisplayFlags : public LFExamineFlags
00047   {
00048   public:  
00049     // default constructor 
00050     LFDisplayFlags  ();
00051 
00052     // default destructor
00053     virtual ~LFDisplayFlags ();
00054 
00055     // Return method name
00056     virtual String methodName(){return String("displayflags");};
00057 
00058     // Set autoflag params
00059     virtual Bool setParameters(Record &parameters);
00060     
00061     // Get default autoflag params
00062     virtual Record getParameters();
00063 
00064     // Run the algorithm
00065     virtual Bool runMethod(const VisBuffer &/*inVb*/, Cube<Float> &/*inVisc*/, Cube<Bool> &/*inFlagc*/,
00066                            Cube<Bool> &/*inPreFlagc*/, uInt /*numT*/, uInt /*numAnt*/, uInt /*numB*/,
00067                            uInt /*numC*/, uInt /*numP*/)
00068     {throw(AipsError("DisplayFlags::runMethod requires more inputs than supplied"));};    
00069 
00070     // Requires list of other flagmethods
00071     virtual Bool runMethod(const VisBuffer &inVb, 
00072                    Cube<Float> &inVisc, Cube<Bool> &inFlagc, Cube<Bool> &inPreFlagc,
00073                            uInt numT, uInt numAnt, uInt numB, uInt numC, uInt numP,
00074                            Vector<CountedPtr<LFBase> > &flagmethods);
00075 
00076     
00077   protected:
00078 
00079     virtual Bool BuildPlotWindow();
00080     //    virtual Bool ShowFlagPlots();
00081 
00082      virtual Char GetUserInput();
00083      char *dock_xml_p;
00084 
00085      void DisplayRaster(Int xdim, Int ydim, Vector<Float> &data, uInt frame);
00086     void DisplayLine(Int xdim, Vector<Double> &xdata, Vector<Float> &ydata, String label, String color, Bool hold,  uInt frame);
00087     void DisplayScatter(Int xdim, Vector<Double> &xdata, Vector<Float> &ydata, String label, String color, Bool hold,  uInt frame);
00088 
00089         // Plotter members
00090     FlagPlotServerProxy *plotter_p;
00091     Vector<dbus::variant> panels_p;
00092 
00093     Bool ShowPlots, StopAndExit;
00094 
00095     // Additional private members
00096     uInt a1,a2;
00097 
00098   };
00099   
00100   
00101 } //# NAMESPACE CASA - END
00102 
00103 #endif
00104