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>
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()
Default constructor (object not viable)
MFrequency::Convert itsMachine
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.
SpectralCoordinate alignedSpectralCoordinate(Bool doLinear=True) const
Get new aligned SpectralCoordinate.
Vector< Double > itsRefFreqX
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.
void copyOther(const FrequencyAligner< T > &other)
Internal copy.
void setTolerance(Double tol)
Set a tolerance (in pixels) to trigger regridding (function align).
FrequencyAligner & operator=(const FrequencyAligner< T > &other)
Assignment (copy semantics)
SpectralCoordinate itsSpecCoord
Vector< Double > itsFreqX
MFrequency::Ref itsRefOut
MFrequency::Types itsFreqSystem
the conversion machines epoch otherwise
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...
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...
void makeMachine(const MEpoch &refEpoch, const MDirection &dir, const MPosition &pos, MFrequency::Types freqSystem, const Unit &unit)
Create the Conversion machine.
~FrequencyAligner()
Destructor.
FrequencyAligner(const FrequencyAligner< T > &other)
Copy constructor (copy semantics)
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.
void getReferenceAbcissa(Vector< Double > &xOut) const
Get the reference abcissa (as a frequency in the axis units set in the SpectralCoordinate) at the ref...
Double makeAbcissa(Vector< Double > &f, Bool doMaxDiff)
Generate an abcissa with the machine.
InterpolationMethod
Interpolation methods.
Types
Types of known MFrequencies Warning: The order defines the order in the translation matrix FromTo in...
this file contains all the compiler specific defines
LatticeExprNode abs(const LatticeExprNode &expr)
Numerical 1-argument functions which result in a real number regardless of input expression type.
bool Bool
Define the standard types used by Casacore.