29 #ifndef SYNTHESIS_FTMACHINE_H
30 #define SYNTHESIS_FTMACHINE_H
69 class ROVisibilityIterator;
307 static void locateuvw(
const casacore::Double*& uvw,
const casacore::Double*&dphase,
const casacore::Double*& freq,
const casacore::Int&
nchan,
const casacore::Double*& scale,
const casacore::Double*& offset,
const casacore::Int& sampling,
casacore::Int*& loc,
casacore::Int*& off,
casacore::Complex*& phasor,
const casacore::Int& row,
const casacore::Bool& doW=
false);
555 #include <synthesis/TransformMachines/FTMachine.tcc>
virtual casacore::Bool interpolateFrequencyFromgrid(VisBuffer &vb, casacore::Cube< casacore::Complex > &data, FTMachine::Type type=FTMachine::MODEL)
degridded data interpolated back onto visibilities
virtual casacore::ImageInterface< casacore::Complex > & getImage(casacore::Matrix< casacore::Float > &, casacore::Bool normalize=true)=0
Get the final image.
A Measure: astronomical direction.
virtual void findConvFunction(const casacore::ImageInterface< casacore::Complex > &, const VisBuffer &)
virtual const casacore::CountedPtr< ConvolutionFunction > & getAWConvFunc()
virtual void setNoPadding(casacore::Bool nopad)
To make sure no padding is used in certain gridders.
static void locateuvw(const casacore::Double *&uvw, const casacore::Double *&dphase, const casacore::Double *&freq, const casacore::Int &nchan, const casacore::Double *&scale, const casacore::Double *&offset, const casacore::Int &sampling, casacore::Int *&loc, casacore::Int *&off, casacore::Complex *&phasor, const casacore::Int &row, const casacore::Bool &doW=false)
helper function for openmp to call...no private dependency
A 1-D Specialization of the Array class.
virtual void stokesToCorrelation(casacore::ImageInterface< casacore::Float > &modelImage, casacore::ImageInterface< casacore::Complex > &compImage)
A Measure: position on Earth.
casacore::CountedPtr< ConvolutionFunction > convFuncCtor_p
virtual casacore::Bool isSkyJonesChanged(VisBuffer &vb, casacore::Int row)
virtual void makeImage(FTMachine::Type type, VisSet &vs, casacore::ImageInterface< casacore::Complex > &image, casacore::Matrix< casacore::Float > &weight)
Make the entire image.
casacore::Vector< casacore::Int > polMap
void convUVW(casacore::Double &dphase, casacore::Vector< casacore::Double > &thisrow)
casacore::CountedPtr< CFCache > cfCache_p
virtual void gridOk(casacore::Int gridsupport)
check if image is big enough for gridding
casacore::UVWMachine * uvwMachine_p
casacore::LogIO & logIO()
casacore::Matrix< casacore::Double > sumCFWeight
virtual void initializeToVisNew(const VisBuffer &vb, casacore::CountedPtr< SIImageStore > imstore)
casacore::Bool saveMeasure(casacore::RecordInterface &rec, const casacore::String &name, casacore::String &error, const casacore::Measure &ms)
helper to save Measures in a record
std::complex< Float > Complex
void rotateUVW(casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Double > &dphase, const VisBuffer &vb)
virtual void finalizeToSky(casacore::ImageInterface< casacore::Complex > &iimage)
Object to provide MODEL_DATA visibilities on demand.
casacore::Bool freqFrameValid_p
casacore::Matrix< casacore::Double > spwFreqSel_p
casacore::Bool matchChannel(const casacore::Int &spw, const VisBuffer &vb)
casacore::Vector< casacore::Int > chanMap
Maps of channels and polarization.
casacore::uInt nAntenna_p
virtual casacore::Float getPBLimit()
casacore::Matrix< casacore::Double > expandedSpwConjFreqSel_p
virtual Type type()
Return the type enum.
casacore::Cube< casacore::Int > spwChanSelFlag_p
virtual void setFreqInterpolation(const casacore::String &method)
set frequency interpolation type
virtual casacore::Bool interpolateFrequencyTogrid(const VisBuffer &vb, const casacore::Matrix< casacore::Float > &wt, casacore::Cube< casacore::Complex > &data, casacore::Cube< casacore::Int > &flag, casacore::Matrix< casacore::Float > &weight, FTMachine::Type type=FTMachine::OBSERVED)
interpolate visibility data of vb to grid frequency definition flag will be set the one as described ...
casacore::Double distance_p
casacore::Block< casacore::Vector< casacore::Int > > multiChanMap_p
setup multiple spectral window for cubes
casacore::Vector< casacore::Int > nVisChan_p
virtual void getFluxImage(casacore::ImageInterface< casacore::Float > &image)
Get a flux (divide by this to get a flux density correct image) image if there is one...
ABSTRACT TOOL CLASSES A PlotTool is a higher level event handler for a PlotCanvas The idea is to take common tasks which may require multiple events and put them in one place PlotTools also provide additional functionality in that they can be active and blocking non blocking The PlotCanvas will only send events to active and will not send events to later tools or event handlers if the latest tool was blocking In this way a single tool can be used to handle ALL user interaction via the GUI at one time
Container for Measure frame.
void setSpectralFlag(const VisBuffer &vb, casacore::Cube< casacore::Bool > &modflagcube)
Physical quantities within reference frame.
casacore::Vector< casacore::CountedPtr< SkyJones > > sj_p
casacore::Vector<SkyJones *> sj_p;
virtual casacore::Bool toRecord(casacore::String &error, casacore::RecordInterface &outRecord, casacore::Bool withImage=false, const casacore::String diskimagename="")
Save and restore the FTMachine to and from a record.
ostream-like interface to creating log messages.
virtual void initializeToSky(casacore::ImageInterface< casacore::Complex > &image, casacore::Matrix< casacore::Float > &weight, const VisBuffer &vb)=0
Note : No vectorized form of finalizeToVis yet....
casacore::Vector< casacore::Double > imageFreq_p
virtual void put(const VisBuffer &vb, casacore::Int row=-1, casacore::Bool dopsf=false, FTMachine::Type type=FTMachine::OBSERVED)=0
Put coherence to grid.
casacore::ImageInterface< casacore::Complex > * image
casacore::Double getPhaseCenterTime()
virtual casacore::Bool changed(const VisBuffer &vb)
Has this operator changed since the last application?
casacore::Vector< casacore::Bool > doConversion_p
virtual void setCanComputeResiduals(casacore::Bool &b)
virtual void ComputeResiduals(VisBuffer &vb, casacore::Bool useCorrected)=0
Make the VB and VBStore interefaces for the interim re-factoring work.
virtual FTMachine * cloneFTM()
clone copy the default cloner clones via a Record copy
virtual casacore::String name() const =0
Return the name of the machine.
casacore::MDirection movingDir_p
moving source stuff
virtual void setDryRun(casacore::Bool val)
virtual casacore::Bool isUsingCFCache()
virtual void put(VisBuffer &vb, casacore::Int row=-1, casacore::Bool dopsf=false, FTMachine::Type type=FTMachine::OBSERVED)
Non const vb version - so that weights can be modified in-place Currently, used only by MultiTermFT...
virtual void getWeightImage(casacore::ImageInterface< casacore::Float > &weightImage, casacore::Matrix< casacore::Float > &weights)=0
Get the final weights image.
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
casacore::Int lastFieldId_p
virtual casacore::Bool useWeightImage()
All FTMachines that fill weightimage, need to set this.
casacore::CountedPtr< casacore::UVWMachine > phaseShifter_p
casacore::Bool setSpw(casacore::Vector< casacore::Int > &spw, casacore::Bool validFrame)
set spw for cube that will be used;
InterpolationMethod
Interpolation methods.
casacore::Bool matchAllSpwChans(const VisBuffer &vb)
redo all spw chan match especially if ms has changed underneath
casacore::MeasFrame mFrame_p
virtual void getInterpolateArrays(const VisBuffer &vb, casacore::Cube< casacore::Complex > &data, casacore::Cube< casacore::Int > &flag)
Interpolate visibilities to be degridded upon.
virtual casacore::Bool canComputeResiduals()
virtual void initializeToVis(casacore::ImageInterface< casacore::Complex > &image, const VisBuffer &vb)=0
Initialize transform to Visibility plane.
virtual void finalizeToVis()=0
Finalize transform to Visibility plane This is mostly a no-op, and is not-even called from CubeSkyEq...
casacore::Double phaseCenterTime_p
void setBasePrivates(const FTMachine &other)
virtual void setMovingSource(const casacore::String &sourcename)
set a moving source aka planets or comets => adjust phase center on the fly for gridding ...
FTMachine & operator=(const FTMachine &other)
Referenced counted pointer for constant data.
casacore::MDirection firstMovingDir_p
void swapyz(casacore::Cube< casacore::Complex > &out, const casacore::Cube< casacore::Complex > &in)
Some temporary wasteful function for swapping axes because we don't Interpolation along the second ax...
void setLocation(const casacore::MPosition &loc)
set and get the location used for frame
virtual void setMiscInfo(const casacore::Int qualifier)=0
set the order of the Taylor term for MFS this is to tell A-casacore::Projection to qualify the accumu...
virtual void correlationToStokes(casacore::ImageInterface< casacore::Complex > &compImage, casacore::ImageInterface< casacore::Float > &resImage, const casacore::Bool dopsf)
casacore::Float pbLimit_p
virtual void setSpwChanSelection(const casacore::Cube< casacore::Int > &spwchansels)
casacore::CountedPtr< casacore::ImageInterface< casacore::Complex > > cmplxImage_p
A holder for the complex image if nobody else is keeping it.
void setnumthreads(casacore::Int n)
virtual void ComputeResiduals(VBStore& vb)=0; get and set numthreads
Type
Types of known Images that may be made using the makeImage method.
Converts UVW coordinates between coordinate systems.
virtual casacore::Matrix< casacore::Double > getSpwFreqSelection()
virtual casacore::Bool isSkyJonesSet()
casacore::Bool isIOnly
Is casacore::Stokes I only? iso XX,XY,YX,YY or LL,LR,RL,RR.
bool Bool
Define the standard types used by Casacore.
virtual void setCFCache(casacore::CountedPtr< CFCache > &cfc, const casacore::Bool resetCFC=true)
casacore::Bool useDoubleGrid_p
Use douple precision grid in gridding process.
casacore::CountedPtr< PolOuterProduct > pop_p
casacore::Matrix< casacore::Double > expandedSpwFreqSel_p
virtual void normalizeImage(casacore::Lattice< casacore::Complex > &, const casacore::Matrix< casacore::Double > &, casacore::Lattice< casacore::Float > &, casacore::Bool)
virtual casacore::Bool fromRecord(casacore::String &error, const casacore::RecordInterface &inRecord)
casacore::String getCacheDir()
void setPhaseCenterTime(const casacore::Double time)
set and get Time to calculate phasecenter -1.0 means using the time available at each iteration...
virtual void reset()
reset stuff in an FTMachine
A (masked) subset of an ImageInterface object.
casacore::Matrix< casacore::Double > sumWeight
Sum of weights per polarization and per chan.
A drop-in replacement for Block<T*>.
template <class T, class U> class vector;
casacore::CountedPtr< CFStore2 > cfs2_p
virtual void setSkyJones(casacore::Vector< casacore::CountedPtr< SkyJones > > &sj)
Set SkyJones if image domain corrections /applycation are needed To reset the the FTMachine for stopp...
Interconvert pixel and frequency values.
casacore::Bool doUVWRotation_p
Set if uvwrotation is necessary.
virtual void finalizeToSky()=0
Finalize transform to Sky plane
casacore::Int getnumthreads()
virtual void initPolInfo(const VisBuffer &vb)
casacore::MPosition & getLocation()
casacore::Int numthreads_p
casacore::Bool fixMovingSource_p
casacore::Vector< casacore::Int > cfStokes_p
virtual casacore::Cube< casacore::Int > getSpwChanSelection()
casacore::Vector< casacore::Int > selectedSpw_p
void girarUVW(casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Double > &dphase, const VisBuffer &vb)
casacore::InterpolateArray1D< casacore::Double, casacore::Complex >::InterpolationMethod freqInterpMethod_p
casacore::Bool tangentSpecified_p
Direction of desired tangent plane.
String: the storage and methods of handling collections of characters.
VisBuffers encapsulate one chunk of visibility data for processing.
casacore::Array< casacore::Complex > griddedData
casacore::Array for non-tiled gridding These are common to most FTmachines
virtual casacore::Bool doublePrecGrid()
return whether the ftmachine is using a double precision grid
casacore::MDirection mImage_p
casacore::CountedPtr< CFStore2 > cfwts2_p
virtual casacore::String getPointingDirColumnInUse()
void getGrid(casacore::Array< T > &thegrid)
virtual void setPointingDirColumn(const casacore::String &column="DIRECTION")
tell ftmachine which Pointing table column to use for Direction Mosaic or Single dish ft use this for...
casacore::Bool changedSkyJonesLogic(const VisBuffer &vb, casacore::Bool &firstRow, casacore::Bool &internalRow)
casacore::SpectralCoordinate spectralCoord_p
Private variables needed for spectral frame conversion.
Abstract base class for Record classes.
ROVisibilityIterator iterates through one or more readonly MeasurementSets.
casacore::CountedPtr< CFCache > getCFCache()
void refocus(casacore::Matrix< casacore::Double > &uvw, const casacore::Vector< casacore::Int > &ant1, const casacore::Vector< casacore::Int > &ant2, casacore::Vector< casacore::Double > &dphase, const VisBuffer &vb)
Refocus on a finite distance.
casacore::Array< casacore::DComplex > griddedData2
virtual casacore::Bool dryRun()
casacore::String pointingDirCol_p
casacore::MPosition mLocation_p
Default Position used for phase rotations.
casacore::MDirection mTangent_p
virtual void initializeToSkyNew(const casacore::Bool dopsf, const VisBuffer &vb, casacore::CountedPtr< SIImageStore > imstore)
casacore::Vector< casacore::Double > interpVisFreq_p
casacore::Bool canComputeResiduals_p
virtual void initMaps(const VisBuffer &vb)
defines interface for the Fourier Transform Machine
virtual void setSpwFreqSelection(const casacore::Matrix< casacore::Double > &spwfreqs)
casacore::Vector< casacore::Double > lsrFreq_p
casacore::Vector of float lsrfreq needed for regridding
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
virtual casacore::Bool isFourier()
Can this FTMachine be represented by Fourier convolutions?
virtual void finalizeToSkyNew(casacore::Bool dopsf, const VisBuffer &vb, casacore::CountedPtr< SIImageStore > imstore)