Source
//cerr << "blc" << blc << " trc " << trc << " min max " << min(griddedData) << " max " << max(griddedData) << endl;
// -*- C++ -*-
//# AWProjectWBFTHPG.cc: Implementation of AWProjectWBFTHPG class
//# Copyright (C) 2021
//# 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$
using namespace casacore;
namespace casa { //# NAMESPACE CASA - BEGIN
namespace refim {
//---------------------------------------------------------------
//
ImageInterface<Complex> &AWProjectWBFTHPG::getImage(Matrix<Float> &weights,
Bool normalize) {
LogIO log_l(LogOrigin("AWProjectWBFTHPG", "getImage[R&D]"));
//
AlwaysAssert(image, AipsError);
weights.resize(sumWeight.shape());
convertArray(weights, sumWeight);
//
// If the weights are all zero then we cannot normalize otherwise
// we don't care.
//
if (max(weights) == 0.0)
log_l << "No useful data in " << name() << ". Weights all zero"
<< LogIO::POST;
else {
/*log_l << "Sum of weights: " << weights << " ";
if (griddedData2.nelements() > 0) {
log_l << max(griddedData2) << " " << min(griddedData2);
};
log_l << LogIO::POST;*/
cerr << "Sum of weights: " << setprecision(20) << weights << endl;
}
//
// x and y transforms (lattice has the gridded vis. Make the
// dirty images)
//
if (useDoubleGrid_p) {
// ArrayLattice<DComplex> darrayLattice(griddedData2);
// {
// griddedData.resize(griddedData2.shape());
// convertArray(griddedData, griddedData2);
// storeArrayAsImage(String("cgrid_"+visResampler_p->name()+".im"),
// image->coordinates(), griddedData);
// }
// LatticeFFT::cfft2d(darrayLattice,false);
griddedData.resize(griddedData2.shape());
convertArray(griddedData, griddedData2);