Source
size_t nout2 = LineFinderUtils::binDataAndMask<float>(num_data, data, mask, bin_size, num_data, out_data2, out_mask2, offset, keepsize);
//# tLineFinder.cc: this defines tests of SingleDishMS
//#
//# Copyright (C) 2014,2015
//# National Astronomical Observatory of Japan
//#
//# 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$
using namespace casacore;
using namespace casa;
using namespace std;
template <typename DataType>
string print_array(size_t const num_data, DataType const* data) {
cout << "got " << num_data << " elements" << endl;
ostringstream oss;
oss << "[";
if (num_data > 0)
oss << data[0] ;
for (size_t i=1; i<num_data; ++i)
oss << ", " << data[i];
oss << "]";
return oss.str();
}
void print_line(list<pair<size_t,size_t>> &line_list) {
cout << "Number of Lines: " << line_list.size() << endl;
for (list<pair<size_t,size_t>>::iterator iter = line_list.begin();
iter!=line_list.end(); ++iter) {