casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
casa::VisImagingWeight Class Reference

Object to hold type of imaging weight scheme to be used on the fly and to provide facilities to do that. More...

#include <VisImagingWeight.h>

Public Member Functions

 VisImagingWeight ()
 empty constructor More...
 
 VisImagingWeight (const casacore::String &type)
 Constructor to calculate natural and radial weights. More...
 
 VisImagingWeight (ROVisibilityIterator &vi, const casacore::String &rmode, const casacore::Quantity &noise, const casacore::Double robust, const casacore::Int nx, const casacore::Int ny, const casacore::Quantity &cellx, const casacore::Quantity &celly, const casacore::Int uBox, const casacore::Int vBox, const casacore::Bool multiField=false)
 Constructor to calculate uniform weight schemes; include Brigg's and super/uniform If multiField=true, the weight density calcution is done on a per field basis, else it is all fields combined. More...
 
 VisImagingWeight (ROVisibilityIterator &vi, casacore::Block< casacore::CountedPtr< casacore::TempLattice< casacore::Float > > > &grids, const casacore::String &rmode, const casacore::Quantity &noise, const casacore::Double robust, const casacore::Quantity &cellx, const casacore::Quantity &celly, const casacore::Bool multiField=false)
 Constructor for uniform style weighting when the weight density is calculated elsewhere. More...
 
 VisImagingWeight (vi::VisibilityIterator2 &vi, const casacore::String &rmode, const casacore::Quantity &noise, const casacore::Double robust, const casacore::Int nx, const casacore::Int ny, const casacore::Quantity &cellx, const casacore::Quantity &celly, const casacore::Int uBox, const casacore::Int vBox, const casacore::Bool multiField=false)
 VisibilityIterator2 version of the above.... More...
 
 VisImagingWeight (casacore::ImageInterface< casacore::Float > &densityImages)
 Construct uniform weight density from save grid on an image. More...
 
virtual ~VisImagingWeight ()
 
VisImagingWeightoperator= (const VisImagingWeight &imwgt)
 reference semantically = operator More...
 
virtual void toImageInterface (casacore::ImageInterface< casacore::Float > &im)
 you have to make sure the imageinterface passed has the shape of gwt on the first 2 axex and last axis More...
 
virtual void weightUniform (casacore::Matrix< casacore::Float > &imagingWeight, const casacore::Matrix< casacore::Bool > &flag, const casacore::Matrix< casacore::Double > &uvw, const casacore::Vector< casacore::Double > &frequency, const casacore::Matrix< casacore::Float > &weight, const casacore::Int msid, const casacore::Int fieldid) const
 casacore::Function to calculate the uniform style weights, include Brigg's for example imagingWeight should be sized by (nchan, row) already The fieldid and msid parameters must correspond to what VisBuffer or VisIter fieldId() and msId() returns More...
 
virtual void weightNatural (casacore::Matrix< casacore::Float > &imagingWeight, const casacore::Matrix< casacore::Bool > &flag, const casacore::Matrix< casacore::Float > &weight) const
 Natural weighting scheme imagingWeight should be sized by (nchan, row) already. More...
 
virtual void weightNatural (casacore::Matrix< casacore::Float > &imagingWeight, const casacore::Matrix< casacore::Bool > &flag, const casacore::Matrix< casacore::Float > &weight) const
 
*virtual void weightRadial (casacore::Matrix< casacore::Float > &imagingWeight, const casacore::Matrix< casacore::Bool > &flag, const casacore::Matrix< casacore::Double > &uvw, const casacore::Vector< casacore::Double > &frequency, const casacore::Matrix< casacore::Float > &weight) const
 Radial weighting imagingWeight should be sized by (nchan, row) already. More...
 
virtual casacore::String getType () const
 Get the type of weighting this object is on..will return one of "natural", "uniform", "radial". More...
 
virtual void setFilter (const casacore::String &type, const casacore::Quantity &bmaj, const casacore::Quantity &bmin, const casacore::Quantity &bpa)
 setting uv filtering More...
 
virtual casacore::Bool doFilter () const
 returns if uv filtering is set More...
 
virtual void filter (casacore::Matrix< casacore::Float > &imWeight, const casacore::Matrix< casacore::Bool > &flag, const casacore::Matrix< casacore::Double > &uvw, const casacore::Vector< casacore::Double > &frequency, const casacore::Matrix< casacore::Float > &weight) const
 do uvfiltering...to be called after imaging weight is calculated More...
 
virtual casacore::Bool getWeightDensity (casacore::Block< casacore::Matrix< casacore::Float > > &density)
 This is to get/set uniform style weight density...e.g if the caller wants to add densities from different pieces of data distributed via different VisibilityIterators. More...
 
virtual void setWeightDensity (const casacore::Block< casacore::Matrix< casacore::Float > > &density)
 
casacore::Vector< casacore::IntshapeOfdensityGrid ()
 

Static Public Member Functions

static void unPolChanWeight (casacore::Matrix< casacore::Float > &chanRowWt, const casacore::Cube< casacore::Float > &corrChanRowWt)
 Form corr-indep weight by averaging parallel-hand weights. More...
 

Private Member Functions

void cube2Matrix (const casacore::Cube< casacore::Bool > &fcube, casacore::Matrix< casacore::Bool > &fMat)
 

Private Attributes

std::map< casacore::String,
casacore::Int
multiFieldMap_p
 
casacore::Block
< casacore::CountedPtr
< casacore::TempLattice
< casacore::Float > > > 
gwt_p
 
casacore::Matrix< casacore::Floata_gwt_p
 
casacore::String wgtType_p
 
casacore::Float uscale_p
 
casacore::Float vscale_p
 
casacore::Vector< casacore::Floatf2_p
 
casacore::Vector< casacore::Floatd2_p
 
casacore::Int uorigin_p
 
casacore::Int vorigin_p
 
casacore::Int nx_p
 
casacore::Int ny_p
 
casacore::Bool doFilter_p
 
casacore::Double cospa_p
 
casacore::Double sinpa_p
 
casacore::Double rbmaj_p
 
casacore::Double rbmin_p
 
casacore::Double robust_p
 
casacore::String rmode_p
 
casacore::Quantity noise_p
 
casacore::Int activeFieldIndex_p
 

Detailed Description

Object to hold type of imaging weight scheme to be used on the fly and to provide facilities to do that.

Etymology

Synopsis

Example

Motivation

Definition at line 76 of file VisImagingWeight.h.

Constructor & Destructor Documentation

casa::VisImagingWeight::VisImagingWeight ( )

empty constructor

casa::VisImagingWeight::VisImagingWeight ( const casacore::String type)

Constructor to calculate natural and radial weights.

casa::VisImagingWeight::VisImagingWeight ( ROVisibilityIterator vi,
const casacore::String rmode,
const casacore::Quantity noise,
const casacore::Double  robust,
const casacore::Int  nx,
const casacore::Int  ny,
const casacore::Quantity cellx,
const casacore::Quantity celly,
const casacore::Int  uBox,
const casacore::Int  vBox,
const casacore::Bool  multiField = false 
)

Constructor to calculate uniform weight schemes; include Brigg's and super/uniform If multiField=true, the weight density calcution is done on a per field basis, else it is all fields combined.

casa::VisImagingWeight::VisImagingWeight ( ROVisibilityIterator vi,
casacore::Block< casacore::CountedPtr< casacore::TempLattice< casacore::Float > > > &  grids,
const casacore::String rmode,
const casacore::Quantity noise,
const casacore::Double  robust,
const casacore::Quantity cellx,
const casacore::Quantity celly,
const casacore::Bool  multiField = false 
)

Constructor for uniform style weighting when the weight density is calculated elsewhere.

casa::VisImagingWeight::VisImagingWeight ( vi::VisibilityIterator2 vi,
const casacore::String rmode,
const casacore::Quantity noise,
const casacore::Double  robust,
const casacore::Int  nx,
const casacore::Int  ny,
const casacore::Quantity cellx,
const casacore::Quantity celly,
const casacore::Int  uBox,
const casacore::Int  vBox,
const casacore::Bool  multiField = false 
)

VisibilityIterator2 version of the above....

Note the VisibilityIterator can be readonly...thus recommended if you can as that will prevent unnecessary locks

casa::VisImagingWeight::VisImagingWeight ( casacore::ImageInterface< casacore::Float > &  densityImages)

Construct uniform weight density from save grid on an image.

virtual casa::VisImagingWeight::~VisImagingWeight ( )
virtual

Member Function Documentation

void casa::VisImagingWeight::cube2Matrix ( const casacore::Cube< casacore::Bool > &  fcube,
casacore::Matrix< casacore::Bool > &  fMat 
)
private
virtual casacore::Bool casa::VisImagingWeight::doFilter ( ) const
virtual

returns if uv filtering is set

virtual void casa::VisImagingWeight::filter ( casacore::Matrix< casacore::Float > &  imWeight,
const casacore::Matrix< casacore::Bool > &  flag,
const casacore::Matrix< casacore::Double > &  uvw,
const casacore::Vector< casacore::Double > &  frequency,
const casacore::Matrix< casacore::Float > &  weight 
) const
virtual

do uvfiltering...to be called after imaging weight is calculated

virtual casacore::String casa::VisImagingWeight::getType ( ) const
virtual

Get the type of weighting this object is on..will return one of "natural", "uniform", "radial".

virtual casacore::Bool casa::VisImagingWeight::getWeightDensity ( casacore::Block< casacore::Matrix< casacore::Float > > &  density)
virtual

This is to get/set uniform style weight density...e.g if the caller wants to add densities from different pieces of data distributed via different VisibilityIterators.

VisImagingWeight& casa::VisImagingWeight::operator= ( const VisImagingWeight imwgt)

reference semantically = operator

virtual void casa::VisImagingWeight::setFilter ( const casacore::String type,
const casacore::Quantity bmaj,
const casacore::Quantity bmin,
const casacore::Quantity bpa 
)
virtual

setting uv filtering

virtual void casa::VisImagingWeight::setWeightDensity ( const casacore::Block< casacore::Matrix< casacore::Float > > &  density)
virtual
casacore::Vector<casacore::Int> casa::VisImagingWeight::shapeOfdensityGrid ( )
virtual void casa::VisImagingWeight::toImageInterface ( casacore::ImageInterface< casacore::Float > &  im)
virtual

you have to make sure the imageinterface passed has the shape of gwt on the first 2 axex and last axis

static void casa::VisImagingWeight::unPolChanWeight ( casacore::Matrix< casacore::Float > &  chanRowWt,
const casacore::Cube< casacore::Float > &  corrChanRowWt 
)
static

Form corr-indep weight by averaging parallel-hand weights.

virtual void casa::VisImagingWeight::weightNatural ( casacore::Matrix< casacore::Float > &  imagingWeight,
const casacore::Matrix< casacore::Bool > &  flag,
const casacore::Matrix< casacore::Float > &  weight 
) const
virtual

Natural weighting scheme imagingWeight should be sized by (nchan, row) already.

virtual void casa::VisImagingWeight::weightNatural ( casacore::Matrix< casacore::Float > &  imagingWeight,
const casacore::Matrix< casacore::Bool > &  flag,
const casacore::Matrix< casacore::Float > &  weight 
) const
virtual
* virtual void casa::VisImagingWeight::weightRadial ( casacore::Matrix< casacore::Float > &  imagingWeight,
const casacore::Matrix< casacore::Bool > &  flag,
const casacore::Matrix< casacore::Double > &  uvw,
const casacore::Vector< casacore::Double > &  frequency,
const casacore::Matrix< casacore::Float > &  weight 
) const
virtual

Radial weighting imagingWeight should be sized by (nchan, row) already.

virtual void casa::VisImagingWeight::weightUniform ( casacore::Matrix< casacore::Float > &  imagingWeight,
const casacore::Matrix< casacore::Bool > &  flag,
const casacore::Matrix< casacore::Double > &  uvw,
const casacore::Vector< casacore::Double > &  frequency,
const casacore::Matrix< casacore::Float > &  weight,
const casacore::Int  msid,
const casacore::Int  fieldid 
) const
virtual

casacore::Function to calculate the uniform style weights, include Brigg's for example imagingWeight should be sized by (nchan, row) already The fieldid and msid parameters must correspond to what VisBuffer or VisIter fieldId() and msId() returns

Member Data Documentation

casacore::Matrix<casacore::Float> casa::VisImagingWeight::a_gwt_p
mutableprivate

Definition at line 166 of file VisImagingWeight.h.

casacore::Int casa::VisImagingWeight::activeFieldIndex_p
mutableprivate

Definition at line 180 of file VisImagingWeight.h.

casacore::Double casa::VisImagingWeight::cospa_p
private

Definition at line 173 of file VisImagingWeight.h.

casacore::Vector<casacore::Float> casa::VisImagingWeight::d2_p
private

Definition at line 169 of file VisImagingWeight.h.

casacore::Bool casa::VisImagingWeight::doFilter_p
private

Definition at line 172 of file VisImagingWeight.h.

casacore::Vector<casacore::Float> casa::VisImagingWeight::f2_p
private

Definition at line 169 of file VisImagingWeight.h.

casacore::Block<casacore::CountedPtr<casacore::TempLattice<casacore::Float> > > casa::VisImagingWeight::gwt_p
private

Definition at line 165 of file VisImagingWeight.h.

std::map<casacore::String, casacore::Int> casa::VisImagingWeight::multiFieldMap_p
private

Definition at line 164 of file VisImagingWeight.h.

casacore::Quantity casa::VisImagingWeight::noise_p
private

Definition at line 179 of file VisImagingWeight.h.

casacore::Int casa::VisImagingWeight::nx_p
private

Definition at line 171 of file VisImagingWeight.h.

casacore::Int casa::VisImagingWeight::ny_p
private

Definition at line 171 of file VisImagingWeight.h.

casacore::Double casa::VisImagingWeight::rbmaj_p
private

Definition at line 175 of file VisImagingWeight.h.

casacore::Double casa::VisImagingWeight::rbmin_p
private

Definition at line 176 of file VisImagingWeight.h.

casacore::String casa::VisImagingWeight::rmode_p
private

Definition at line 178 of file VisImagingWeight.h.

casacore::Double casa::VisImagingWeight::robust_p
private

Definition at line 177 of file VisImagingWeight.h.

casacore::Double casa::VisImagingWeight::sinpa_p
private

Definition at line 174 of file VisImagingWeight.h.

casacore::Int casa::VisImagingWeight::uorigin_p
private

Definition at line 170 of file VisImagingWeight.h.

casacore::Float casa::VisImagingWeight::uscale_p
private

Definition at line 168 of file VisImagingWeight.h.

casacore::Int casa::VisImagingWeight::vorigin_p
private

Definition at line 170 of file VisImagingWeight.h.

casacore::Float casa::VisImagingWeight::vscale_p
private

Definition at line 168 of file VisImagingWeight.h.

casacore::String casa::VisImagingWeight::wgtType_p
private

Definition at line 167 of file VisImagingWeight.h.


The documentation for this class was generated from the following file: