29 #ifndef SYNTHESIS_TRANSFORM2_FTMACHINE_H
30 #define SYNTHESIS_TRANSFORM2_FTMACHINE_H
69 namespace vi{
class VisBuffer2;
70 class VisibilityIterator2;
73 class BriggsCubeWeightor;
290 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);
326 virtual void reset();
538 virtual void findGridSector(
const casacore::Int& nxp,
const casacore::Int& nyp,
const casacore::Int& ixsub,
const casacore::Int& iysub,
const casacore::Int& minx,
const casacore::Int& miny,
const casacore::Int& icounter,
casacore::Int& x0,
casacore::Int& y0,
casacore::Int& nxsub,
casacore::Int& nysub,
const casacore::Bool linear);
561 #include <synthesis/TransformMachines/FTMachine.tcc>
virtual void finalizeToSky()=0
Finalize transform to Sky plane.
virtual void initBriggsWeightor(vi::VisibilityIterator2 &vi)
This function has to be called after initMaps to initialize Briggs Cube weighting scheme ...
A Measure: astronomical direction.
virtual void findGridSector(const casacore::Int &nxp, const casacore::Int &nyp, const casacore::Int &ixsub, const casacore::Int &iysub, const casacore::Int &minx, const casacore::Int &miny, const casacore::Int &icounter, casacore::Int &x0, casacore::Int &y0, casacore::Int &nxsub, casacore::Int &nysub, const casacore::Bool linear)
virtual casacore::Bool interpolateFrequencyTogrid(const vi::VisBuffer2 &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)
casacore::Bool matchAllSpwChans(const vi::VisBuffer2& vb); interpolate visibility data of vb to grid ...
void girarUVW(casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Double > &dphase, const vi::VisBuffer2 &vb)
rotate with facetting style rephasing..for multifield mosaic
A 1-D Specialization of the Array class.
casacore::Vector< casacore::Int > nxsect_p
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 vi::VisBuffer2 &vb)
Refocus on a finite distance.
A Measure: position on Earth.
casacore::Bool recoverMovingSourceState(casacore::String &error, const casacore::RecordInterface &inRecord)
casacore::MRadialVelocity::Convert obsvelconv_p
moving source spectral frame stuff
void setPseudoIStokes(casacore::Bool pseudoI)
casacore::Vector< casacore::Int > xsect_p
casacore::Bool storeMovingSourceState(casacore::String &error, casacore::RecordInterface &outRecord)
Save/Recover some elements of state of ftmachine in/from record.
virtual casacore::Bool useWeightImage()
All FTMachines that fill weightimage, need to set this.
casacore::CountedPtr< CFStore2 > cfs2_p
casacore::LogIO & logIO()
virtual void initializeToVis(casacore::ImageInterface< casacore::Complex > &image, const vi::VisBuffer2 &vb)=0
Initialize transform to Visibility plane.
virtual casacore::ImageInterface< casacore::Complex > & getImage(casacore::Matrix< casacore::Float > &, casacore::Bool normalize=true)=0
Get the final image.
defines interface for the Fourier Transform Machine
casacore::CountedPtr< casacore::ImageInterface< casacore::Complex > > cmplxImage_p
A holder for the complex image if nobody else is keeping it.
std::complex< Float > Complex
casacore::uInt nAntenna_p
casacore::Matrix< casacore::Double > sumCFWeight
casacore::MeasFrame mFrame_p
virtual void normalizeImage(casacore::Lattice< casacore::Complex > &, const casacore::Matrix< casacore::Double > &, casacore::Lattice< casacore::Float > &, casacore::Bool)
VisibilityIterator2 iterates through one or more readonly MeasurementSets.
casacore::MDirection mImage_p
void setBasePrivates(const FTMachine &other)
casacore::MDirection mTangent_p
virtual void finalizeToVis()=0
Finalize transform to Visibility plane This is mostly a no-op, and is not-even called from CubeSkyEq...
virtual void finalizeToSky(casacore::ImageInterface< casacore::Complex > &iimage)
virtual Type type()
Return the type enum.
casacore::CountedPtr< refim::BriggsCubeWeightor > briggsWeightor_p
virtual void put(vi::VisBuffer2 &vb, casacore::Int row=-1, casacore::Bool dopsf=false, refim::FTMachine::Type type=refim::FTMachine::OBSERVED)
Non const vb version - so that weights can be modified in-place Currently, used only by MultiTermFT...
virtual void setCFCache(casacore::CountedPtr< CFCache > &cfc, const casacore::Bool resetCFC=true)
casacore::Bool matchAllSpwChans(const VisBuffer &vb)
redo all spw chan match especially if ms has changed underneath
casacore::Matrix< casacore::Double > expandedSpwFreqSel_p
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.
casacore::CountedPtr< CFCache > getCFCache()
virtual casacore::Float getPBLimit()
virtual casacore::Bool fromRecord(casacore::String &error, const casacore::RecordInterface &inRecord)
casacore::Bool setFrameValidity(casacore::Bool validFrame)
set otf spectral frame transform is on or off;
virtual casacore::Bool doublePrecGrid()
return whether the ftmachine is using a double precision grid
Physical quantities within reference frame.
ostream-like interface to creating log messages.
casacore::String ephemTableName_p
casacore::MeasTable::Types mtype_p
casacore::Bool matchChannel(const casacore::Int &spw, const VisBuffer &vb)
virtual void initializeToSky(casacore::ImageInterface< casacore::Complex > &image, casacore::Matrix< casacore::Float > &weight, const vi::VisBuffer2 &vb)=0
Note : No vectorized form of finalizeToVis yet....
casacore::String getCacheDir()
virtual void correlationToStokes(casacore::ImageInterface< casacore::Complex > &compImage, casacore::ImageInterface< casacore::Float > &resImage, const casacore::Bool dopsf)
casacore::Bool canComputeResiduals_p
casacore::Float pbLimit_p
casacore::Double distance_p
casacore::CountedPtr< VisBufferUtil > vbutil_p
virtual void finalizeToSkyNew(casacore::Bool dopsf, const vi::VisBuffer2 &vb, casacore::CountedPtr< SIImageStore > imstore)
casacore::MVDirection movingDirShift_p
This will hold the angular difference between movingDir and firstMovingDir with the frame conversion ...
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
casacore::CountedPtr< PolOuterProduct > pop_p
casacore::MDirection movingDir_p
moving source stuff
void setSpectralFlag(const vi::VisBuffer2 &vb, casacore::Cube< casacore::Bool > &modflagcube)
virtual void initPolInfo(const vi::VisBuffer2 &vb)
void getGrid(casacore::Array< T > &thegrid)
Types
Types to be used in different calls.
casacore::InterpolateArray1D< casacore::Double, casacore::Complex >::InterpolationMethod freqInterpMethod_p
InterpolationMethod
Interpolation methods.
virtual void tweakGridSector(const casacore::Int &nx, const casacore::Int &ny, const casacore::Int &ixsub, const casacore::Int &iysub)
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.
casacore::UVWMachine * uvwMachine_p
virtual void getWeightImage(casacore::ImageInterface< casacore::Float > &weightImage, casacore::Matrix< casacore::Float > &weights)=0
Get the final weights image.
virtual void setNoPadding(casacore::Bool nopad)
To make sure no padding is used in certain gridders.
virtual void put(const vi::VisBuffer2 &vb, casacore::Int row=-1, casacore::Bool dopsf=false, refim::FTMachine::Type type=refim::FTMachine::OBSERVED)=0
Put coherence to grid.
virtual void setSpwFreqSelection(const casacore::Matrix< casacore::Double > &spwfreqs)
casacore::Matrix< casacore::Double > expandedSpwConjFreqSel_p
void convUVW(casacore::Double &dphase, casacore::Vector< casacore::Double > &thisrow)
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...
Referenced counted pointer for constant data.
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...
casacore::Bool isPseudoI_p
Stokes pseudo I only? single parallel flagged will be allowed.
void initSourceFreqConv()
casacore::Int lastFieldId_p
casacore::Bool useDoubleGrid_p
Use douple precision grid in gridding process.
virtual void findConvFunction(const casacore::ImageInterface< casacore::Complex > &, const vi::VisBuffer2 &)
virtual casacore::Bool canComputeResiduals()
virtual void ComputeResiduals(vi::VisBuffer2 &vb, casacore::Bool useCorrected)=0
Make the VB and VBStore interefaces for the interim re-factoring work.
virtual casacore::Bool changed(const vi::VisBuffer2 &vb)
Has this operator changed since the last application?
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...
casacore::Int getnumthreads()
casacore::Vector< casacore::Double > imageFreq_p
casacore::Double phaseCenterTime_p
casacore::SpectralCoordinate spectralCoord_p
Private variables needed for spectral frame conversion.
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
virtual casacore::Bool isUsingCFCache()
void setnumthreads(casacore::Int n)
virtual void ComputeResiduals(VBStore& vb)=0; get and set numthreads
casacore::Array< casacore::Complex > griddedData
casacore::Array for non-tiled gridding These are common to most FTmachines
casacore::Bool freqFrameValid_p
casacore::Vector<casacore::Bool> doConversion_p;
virtual void initializeToSkyNew(const casacore::Bool dopsf, const vi::VisBuffer2 &vb, casacore::CountedPtr< SIImageStore > imstore)
Object to provide MODEL_DATA visibilities on demand.
casacore::Double getPhaseCenterTime()
casacore::Int numthreads_p
Type
Types of known Images that may be made using the makeImage method.
virtual void setMovingSource(const casacore::String &sourcename, const casacore::String &ephemtable="")
set a moving source aka planets or comets => adjust phase center on the fly for gridding ...
virtual void getInterpolateArrays(const vi::VisBuffer2 &vb, casacore::Cube< casacore::Complex > &data, casacore::Cube< casacore::Int > &flag)
Interpolate visibilities to be degridded upon.
virtual casacore::Bool isSkyJonesSet()
Converts UVW coordinates between coordinate systems.
virtual casacore::Bool isFourier()
Can this FTMachine be represented by Fourier convolutions?
virtual void initMaps(const vi::VisBuffer2 &vb)
virtual void gridOk(casacore::Int gridsupport)
check if image is big enough for gridding
bool Bool
Define the standard types used by Casacore.
casacore::Bool fixMovingSource_p
casacore::Array< casacore::DComplex > griddedData2
casacore::Vector< casacore::Int > cfStokes_p
casacore::Vector< casacore::Int > chanMap
Maps of channels and polarization.
casacore::Bool doUVWRotation_p
Set if uvwrotation is necessary.
casacore::CountedPtr< casacore::ROMSColumns > romscol_p
template <class T, class U> class vector;
casacore::Vector< casacore::Int > nVisChan_p
setup multiple spectral window for cubes casacore::Block <casacore::Vector <casacore::Int> > multiCh...
casacore::CountedPtr< CFCache > cfCache_p
virtual void setDryRun(casacore::Bool val)
Interconvert pixel and frequency values.
virtual void setFreqInterpolation(const casacore::String &method)
set frequency interpolation type
casacore::Bool tangentSpecified_p
Direction of desired tangent plane.
void rotateUVW(casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Double > &dphase, const vi::VisBuffer2 &vb)
void shiftFreqToSource(casacore::Vector< casacore::Double > &freqs)
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 makeImage(FTMachine::Type type, vi::VisibilityIterator2 &vi, casacore::ImageInterface< casacore::Complex > &image, casacore::Matrix< casacore::Float > &weight)
Make the entire image Make the entire image using a ROVisIter.
casacore::Bool changedSkyJonesLogic(const vi::VisBuffer2 &vb, casacore::Bool &firstRow, casacore::Bool &internalRow)
virtual casacore::Long estimateRAM(const casacore::CountedPtr< SIImageStore > &imstore)
utility function that returns a rough estimate of memory needed.
casacore::Bool saveMeasure(casacore::RecordInterface &rec, const casacore::String &name, casacore::String &error, const casacore::Measure &ms)
helper to save Measures in a record
casacore::String pointingDirCol_p
VisBuffer2s encapsulate one chunk of visibility data for processing.
virtual casacore::String name() const =0
Return the name of the machine.
Base class for all Casacore library errors.
casacore::Vector< casacore::CountedPtr< SkyJones > > sj_p
casacore::Vector<SkyJones *> sj_p;
casacore::Int doneThreadPartition_p
Some parameters and helpers for multithreaded gridders.
virtual void stokesToCorrelation(casacore::ImageInterface< casacore::Float > &modelImage, casacore::ImageInterface< casacore::Complex > &compImage)
casacore::Vector< casacore::Double > interpVisFreq_p
casacore::Vector< casacore::Int > channelMap(const vi::VisBuffer2 &vb)
void setBriggsCubeWeight(casacore::CountedPtr< refim::BriggsCubeWeightor > bwght)
Functions associated with Briggs weighting for cubes.
virtual casacore::Bool isSkyJonesChanged(vi::VisBuffer2 &vb, casacore::Int row)
virtual void reset()
reset stuff in an FTMachine
casacore::Vector< casacore::Int > polMap
String: the storage and methods of handling collections of characters.
virtual void initializeToVisNew(const vi::VisBuffer2 &vb, casacore::CountedPtr< SIImageStore > imstore)
VisBuffers encapsulate one chunk of visibility data for processing.
Vector of three direction cosines.
virtual void setCanComputeResiduals(casacore::Bool &b)
casacore::Matrix< casacore::Double > getSumWeights()
virtual FTMachine * cloneFTM()
clone copy should make it pure virtual forcing every ftm to have a cloner
casacore::MPosition mLocation_p
Default Position used for phase rotations.
casacore::CountedPtr< casacore::UVWMachine > phaseShifter_p
Abstract base class for Record classes.
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...
casacore::CountedPtr< ConvolutionFunction > convFuncCtor_p
virtual casacore::Bool dryRun()
FTMachine & operator=(const FTMachine &other)
casacore::Cube< casacore::Int > spwChanSelFlag_p
virtual void setSpwChanSelection(const casacore::Cube< casacore::Int > &spwchansels)
casacore::ImageInterface< casacore::Complex > * image
virtual void setLocation(const casacore::MPosition &loc)
set and get the location used for frame
virtual const casacore::CountedPtr< refim::FTMachine > & getFTM2(const casacore::Bool)
void getImagingWeight(casacore::Matrix< casacore::Float > &imwght, const vi::VisBuffer2 &vb)
casacore::Vector< casacore::Int > ysect_p
virtual casacore::MPosition & getLocation()
virtual const casacore::CountedPtr< refim::ConvolutionFunction > & getAWConvFunc()
casacore::MDirection firstMovingDir_p
casacore::Matrix< casacore::Double > spwFreqSel_p
casacore::Vector< casacore::Double > lsrFreq_p
casacore::Vector of float lsrfreq needed for regridding
virtual casacore::Bool interpolateFrequencyFromgrid(vi::VisBuffer2 &vb, casacore::Cube< casacore::Complex > &data, FTMachine::Type type=FTMachine::MODEL)
degridded data interpolated back onto visibilities
casacore::Vector< casacore::Int > nysect_p
virtual casacore::String getPointingDirColumnInUse()
casacore::CountedPtr< CFStore2 > cfwts2_p
casacore::Matrix< casacore::Double > negateUV(const vi::VisBuffer2 &vb)
casacore::Matrix< casacore::Double > sumWeight
Sum of weights per polarization and per chan.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
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...