Source
casacore::Int getIndex1010(casacore::Int ch,casacore::Int irel) { return (irel/nperbsln_(ch))*nperchan_(ch) + irel%nperchan_(ch);};
//# PlotMSIndexer.h: Cache indexer for plotms.
//# Copyright (C) 2009
//# 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: $
namespace casa {
//# Forward declarations.
class PlotMSApp;
class PlotMSIndexer; // needed for method pointer typedefs
typedef casacore::Double(PlotMSCacheBase::*CacheMemPtr)(casacore::Int,casacore::Int);
typedef casacore::Int(PlotMSIndexer::*IndexerMethPtr)(casacore::Int,casacore::Int);
typedef void(PlotMSIndexer::*CollapseMethPtr)(casacore::Int,casacore::Array<casacore::Bool>&);
class PlotMSIndexer : public PlotMaskedPointData, public PlotBinnedData {
public:
// Convenient access to class name.
static const casacore::String CLASS_NAME;
// A ctor that makes an empty Indexer (for plot initialization)
PlotMSIndexer();
// Constructor which takes parent PlotMSCache, x and y axes (non-iteration)
PlotMSIndexer(PlotMSCacheBase* plotmscache, PMS::Axis xAxis,
PMS::DataColumn xData, PMS::Axis yAxis, PMS::DataColumn yData,
casacore::String xconnect, bool timeconnect, int index);
// Constructor which supports iteration
PlotMSIndexer(PlotMSCacheBase* plotmscache, PMS::Axis xAxis,
PMS::DataColumn xData, PMS::Axis yAxis, PMS::DataColumn yData,
PMS::Axis iterAxis, casacore::Int iterValue,
casacore::String xconnect, bool timeconnect, int index);
// Destructor
~PlotMSIndexer();
// Implemented PlotData methods.
// <group>
bool willDeleteData() const { return true; }
void setDeleteData(bool del = true) { (void)del; }
bool isValid() const { return true;};
// </group>
// Implemented PlotPointData methods.
// <group>
unsigned int size() const;
double xAt(unsigned int i) const;
double yAt(unsigned int i) const;
void xAndYAt(unsigned int index, double& x, double& y) const;
bool minsMaxes(double& xMin, double& xMax, double& yMin, double& yMax);
// </group>
// Implemented PlotMaskedPointData methods.
// <group>
bool maskedAt(unsigned int index) const;