Go to the documentation of this file.
28 #ifndef COORDINATES_FREQUENCYALIGNER_H
29 #define COORDINATES_FREQUENCYALIGNER_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/coordinates/Coordinates/SpectralCoordinate.h>
35 #include <casacore/measures/Measures/MFrequency.h>
36 #include <casacore/measures/Measures/MeasRef.h>
37 #include <casacore/measures/Measures/MeasConvert.h>
38 #include <casacore/scimath/Mathematics/InterpolateArray1D.h>
206 #ifndef CASACORE_NO_AUTO_TEMPLATES
207 #include <casacore/coordinates/Coordinates/FrequencyAligner.tcc>
208 #endif //# CASACORE_NO_AUTO_TEMPLATES
~FrequencyAligner()
Destructor.
FrequencyAligner(const FrequencyAligner< T > &other)
Copy constructor (copy semantics)
void makeMachine(const MEpoch &refEpoch, const MDirection &dir, const MPosition &pos, MFrequency::Types freqSystem, const Unit &unit)
Create the Conversion machine.
A Measure: instant in time.
A Measure: position on Earth.
InterpolationMethod
Interpolation methods.
LatticeExprNode abs(const LatticeExprNode &expr)
Numerical 1-argument functions which result in a real number regardless of input expression type.
void getAbcissa(Vector< Double > &xOut) const
Get the abcissa (as a frequency in the axis units set in the SpectralCoordinate) last cached by funct...
FrequencyAligner & operator=(const FrequencyAligner< T > &other)
Assignment (copy semantics)
void copyOther(const FrequencyAligner< T > &other)
Internal copy.
FrequencyAligner()
Default constructor (object not viable)
Double makeAbcissa(Vector< Double > &f, Bool doMaxDiff)
Generate an abcissa with the machine.
void setTolerance(Double tol)
Set a tolerance (in pixels) to trigger regridding (function align).
A Measure: astronomical direction.
this file contains all the compiler specific defines
Types
Types of known MFrequencies Warning: The order defines the order in the translation matrix FromTo in...
void getReferenceAbcissa(Vector< Double > &xOut) const
Get the reference abcissa (as a frequency in the axis units set in the SpectralCoordinate) at the ref...
Bool align(Vector< T > &yOut, Vector< Bool > &maskOut, const Vector< Double > &xIn, const Vector< T > &yIn, const Vector< Bool > &maskIn, const MEpoch &epoch, Bool useCachedAbcissa, typename InterpolateArray1D< Double, T >::InterpolationMethod method, Bool extrapolate=False)
This function is the same as the previous except that you can specify the input abcissa as well as th...
Interconvert pixel and frequency values.
FrequencyAligner(const SpectralCoordinate &specCoord, uInt nPixels, const MEpoch &refEpoch, const MDirection &dir, const MPosition &pos, MFrequency::Types freqSystem)
Constructor specifies a SpectralCoordinate (any extra reference conversion frame set in it will be ig...
Vector< Double > itsRefFreqX
Bool regrid(Vector< T > &yOut, Vector< Bool > &maskOut, const Vector< Double > &xOut, const Vector< Double > &xIn, const Vector< T > &yIn, const Vector< Bool > &maskIn, typename InterpolateArray1D< Double, T >::InterpolationMethod method, Bool extrapolate, Double maxDiff) const
Regrid one spectrum.
template <class T, class U> class vector;
Bool alignMany(Array< T > &yOut, Array< Bool > &maskOut, const Array< T > &yIn, const Array< Bool > &maskIn, uInt axis, const MEpoch &epoch, typename InterpolateArray1D< Double, T >::InterpolationMethod method, Bool extrapolate=False)
Align many spectra stored in an Array along the specified axis.
Aligns spectra in frequency space.
bool Bool
Define the standard types used by Casacore.
Vector< Double > itsFreqX
A 1-D Specialization of the Array class.
SpectralCoordinate itsSpecCoord
Bool align(Vector< T > &yOut, Vector< Bool > &maskOut, const Vector< T > &yIn, const Vector< Bool > &maskIn, const MEpoch &epoch, Bool useCachedAbcissa, typename InterpolateArray1D< Double, T >::InterpolationMethod method, Bool extrapolate=False)
Align (via regridding) one spectrum taken at the specified epoch to the reference epoch.
MFrequency::Types itsFreqSystem
the conversion machines epoch otherwise
SpectralCoordinate alignedSpectralCoordinate(Bool doLinear=True) const
Get new aligned SpectralCoordinate.
MFrequency::Convert itsMachine
MFrequency::Ref itsRefOut