41 #ifndef SYNTHESIS_UTILS_H
42 #define SYNTHESIS_UTILS_H
63 namespace SynthesisUtils
96 T
getenv(
const char *
name,
const T defaultVal);
111 {
return sqrt(2*refFreq*refFreq - freq*freq);};
129 template<
class Iterator>
135 void rotate2(
const double& actualPA,
CFCell& baseCFC,
CFCell& cfc,
const double& rotAngleIncr);
162 virtual void reset() = 0;
197 virtual void reset();
A Vector of integers, for indexing into Array<T> objects.
A Measure: astronomical direction.
void rotateComplexArray(casacore::LogIO &logIO, casacore::Array< casacore::Complex > &inArray, casacore::CoordinateSystem &inCS, casacore::Array< casacore::Complex > &outArray, casacore::Double dAngleRad, casacore::String interpMathod=casacore::String("CUBIC"), casacore::Bool modifyInCS=true)
casacore::Double getCurrentTimeStamp(const VisBuffer &vb)
casacore::Bool findMaxAbsLattice(const casacore::ImageInterface< casacore::Float > &lattice, casacore::Float &maxAbs, casacore::IPosition &posMaxAbs)
void SETVEC(casacore::Vector< T > &lhs, const casacore::Vector< T > &rhs)
casacore::Double last_pa_p
the angle is considered to be changed.
virtual void update(const VisBuffer &vb, casacore::Int row)
start looking for a change from the given row of the VisBuffer
virtual casacore::Bool changed(const VisBuffer &vb, casacore::Int row) const
implementation of the base class' virtual functions
casacore::Double getRefFreq(const VisBuffer &vb)
casacore::CoordinateSystem makeUVCoords(casacore::CoordinateSystem &imageCoordSys, casacore::IPosition &shape)
casacore::Bool near(const casacore::Double &d1, const casacore::Double &d2, const casacore::Double EPS=1E-6)
casacore::Double conjFreq(const casacore::Double &freq, const casacore::Double &refFreq)
const casacore::Array< casacore::Complex > getCFPixels(const casacore::String &Dir, const casacore::String &fileName)
ostream-like interface to creating log messages.
TableExprNode mjd(const TableExprNode &node)
virtual void reset()=0
reset to the state which exists just after construction
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
ParAngleChangeDetector()
The default constructor.
LatticeExprNode floor(const LatticeExprNode &expr)
casacore::Double nearestValue(const casacore::Vector< casacore::Double > &list, const casacore::Double &val, casacore::Int &index)
void makeFTCoordSys(const casacore::CoordinateSystem &coords, const casacore::Int &convSize, const casacore::Vector< casacore::Double > &ftRef, casacore::CoordinateSystem &ftCoords)
virtual void resize()
Make this array a different shape.
casacore::Vector< casacore::Int > mapSpwIDToDDID(const VisBuffer &vb, const casacore::Int &spwID)
void expandFreqSelection(const casacore::Matrix< casacore::Double > &freqSelection, casacore::Matrix< casacore::Double > &expandedFreqList, casacore::Matrix< casacore::Double > &expandedConjFreqList)
virtual ~IChangeDetector()
a virtual destructor to make the compiler happy
casacore::TableRecord getCFParams(const casacore::String &dirName, const casacore::String &fileName, casacore::Array< casacore::Complex > &pixelBuffer, casacore::CoordinateSystem &coordSys, casacore::Double &sampling, casacore::Double &paVal, casacore::Int &xSupport, casacore::Int &ySupport, casacore::Double &fVal, casacore::Double &wVal, casacore::Int &mVal, casacore::Double &conjFreq, casacore::Int &conjPoln, casacore::Bool loadPixels, casacore::Bool loadMiscInfo=true)
casacore::String mjdToString(casacore::Time &mjd)
void getHADec(casacore::MeasurementSet &ms, const VisBuffer &vb, casacore::Double &HA, casacore::Double &RA, casacore::Double &Dec)
casacore::Bool changedBuffer(const VisBuffer &vb, casacore::Int row1, casacore::Int &row2) const
return true if a change occurs somewhere in the buffer starting from row1 up to row2 (row2=-1 means u...
virtual void reset()
reset to the state which exists just after construction
const IPosition & shape() const
The length of the Vector.
casacore::Int nint(const casacore::Double &v)
casacore::Double pa_tolerance_p
LatticeExprNode sqrt(const LatticeExprNode &expr)
date and time enquiry functions, with some operations.
casacore::Double getPA(const VisBuffer &vb)
bool Bool
Define the standard types used by Casacore.
void storeArrayAsImage(casacore::String fileName, const casacore::CoordinateSystem &coords, const casacore::Array< casacore::Complex > &cf)
void libreConvolver(casacore::Array< T > &c1, const casacore::Array< T > &c2)
casacore::Int getPhaseCenter(casacore::MeasurementSet &ms, casacore::MDirection &dir0, casacore::Int whichField=-1)
casacore::Quantity getParAngleTolerance() const
return parallactic angle tolerance
//////////////////////////////////////////////////////////////////////////
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
A hierarchical collection of named fields of various types.
casacore::Bool isVBNaN(const VisBuffer &vb, casacore::String &mesg)
void storeImg(casacore::String fileName, casacore::ImageInterface< casacore::Complex > &theImg, casacore::Bool writeReIm=false)
A Table intended to hold astronomical data (a set of Measurements).
void showCS(const casacore::CoordinateSystem &cs, std::ostream &os, const casacore::String &msg=casacore::String())
casacore::Vector< casacore::Int > mapSpwIDToPolID(const VisBuffer &vb, const casacore::Int &spwID)
T stdNearestValue(const std::vector< T > &list, const T &val, casacore::Int &index)
virtual void setTolerance(const casacore::Quantity &pa_tolerance)
virtual casacore::Bool changed(const VisBuffer &vb, casacore::Int row) const =0
return true if a change occurs in the given row since the last call of update
void makeStokesAxis(casacore::Int npol_p, casacore::Vector< casacore::String > &polType, casacore::Vector< casacore::Int > &whichStokes)
casacore::Bool checkIntersection(const casacore::Int blc1[2], const casacore::Int trc1[2], const casacore::Float blc2[2], const casacore::Float trc2[2])
template <class t>="">
String: the storage and methods of handling collections of characters.
VisBuffers encapsulate one chunk of visibility data for processing.
void findLatticeMax(const casacore::Array< casacore::Complex > &lattice, casacore::Vector< casacore::Float > &maxAbs, casacore::Vector< casacore::IPosition > &posMaxAbs)
void resize(size_t len, Bool copyValues=False)
Iterator Unique(Iterator first, Iterator last)
virtual void update(const VisBuffer &vb, casacore::Int row)=0
start looking for a change from the given row of the VisBuffer
void calcIntersection(const casacore::Int blc1[2], const casacore::Int trc1[2], const casacore::Float blc2[2], const casacore::Float trc2[2], casacore::Float blc[2], casacore::Float trc[2])
void rotate2(const double &actualPA, CFCell &baseCFC, CFCell &cfc, const double &rotAngleIncr)
Interconvert pixel and world coordinates.
T getenv(const char *name, const T defaultVal)
casacore::Float libreSpheroidal(casacore::Float nu)
const IPosition & shape() const
The length of each axis.