Brief description of class still missing. More...
#include <FKHorizontal.h>
Public Member Functions | |
FKHorizontal (double angle, QList< FKStationSignals * > array) | |
virtual void | initGrid (int n) |
virtual void | initGrid (double kx, double ky, int index) |
virtual Point2D | rotationFactors (double kx, double ky) const |
virtual double | value (double kx, double ky) const |
virtual double | value (double kx, double ky, int index) const |
~FKHorizontal () | |
Protected Member Functions | |
FKHorizontal (QList< FKStationSignals * > array) | |
Protected Attributes | |
int | _eastIndex |
int | _northIndex |
Point2D * | _rotation |
Brief description of class still missing.
Full description of class still missing
ArrayCore::FKHorizontal::FKHorizontal | ( | QList< FKStationSignals * > | array | ) | [protected] |
Set array, indentify component index. Component must be either horizontal or vertical and horizontal. Called by FKRadial and FKTransverse
References _rotation.
ArrayCore::FKHorizontal::FKHorizontal | ( | double | angle, |
QList< FKStationSignals * > | array | ||
) |
Set array, indentify component index. Component must be either horizontal or vertical and horizontal. angle is in degrees from North clockwize.
References _rotation, QGpCoreTools::Angle::setDegreeAzimuth(), QGpCoreTools::Point2D::setX(), and QGpCoreTools::Point2D::setY().
void ArrayCore::FKHorizontal::initGrid | ( | int | n | ) | [virtual] |
Automatically called by GridSearch upon initialization
Reimplemented from ArrayCore::FK.
References _rotation, and TRACE.
Referenced by initGrid().
{ TRACE; // Init shift table FK::initGrid(n); // Init rotation table _rotation=new Point2D[n]; }
void ArrayCore::FKHorizontal::initGrid | ( | double | kx, |
double | ky, | ||
int | index | ||
) | [virtual] |
Init shift table and rotation table. kx and ky defines the propagation vector.
Reimplemented from ArrayCore::FK.
References _rotation, initGrid(), rotationFactors(), and TRACE.
{ TRACE; FK::initGrid(kx, ky, index); _rotation[index]=rotationFactors(kx, ky); }
virtual Point2D ArrayCore::FKHorizontal::rotationFactors | ( | double | kx, |
double | ky | ||
) | const [inline, virtual] |
Reimplemented in ArrayCore::FKRadial, and ArrayCore::FKTransverse.
Referenced by initGrid(), and value().
{Q_UNUSED(kx); Q_UNUSED(ky); return _fixedRotation;}
double ArrayCore::FKHorizontal::value | ( | double | x, |
double | y | ||
) | const [virtual] |
Implemement this function to calculate the 2D function at x and y.
Reimplemented from ArrayCore::FK.
References ArrayCore::FK::_array, _eastIndex, ArrayCore::FK::_gaussianPtr, ArrayCore::FK::_iFreqMax, ArrayCore::FK::_iFreqMin, _northIndex, QGpCoreTools::Complex::abs2(), ArrayCore::FKStationSignals::getShiftedSignal(), ArrayCore::FKStationSignals::isSelected(), ArrayCore::FK::maximumK2(), rotationFactors(), ArrayCore::FKStationSignals::setCurrentShift(), TRACE, QGpCoreTools::Point2D::x(), and QGpCoreTools::Point2D::y().
{ TRACE; double k2=kx * kx + ky * ky; if(k2 > maximumK2()) return -1; QList<FKStationSignals *>::const_iterator it; for(it=_array.begin(); it!=_array.end(); ++it) { FKStationSignals * s=static_cast<FKStationSignals *>( *it); if(s->isSelected()) s->setCurrentShift(kx, ky); } Point2D rotation=rotationFactors(kx, ky); double val=0; Complex c; for(int i=_iFreqMin;i <= _iFreqMax;i++ ) { Complex sum; for(it=_array.begin(); it!=_array.end(); ++it) { FKStationSignals * s=static_cast<FKStationSignals *>( *it); if(s->isSelected()) { c=s->getShiftedSignal(_eastIndex, i); c *= rotation.x(); sum += c; c=s->getShiftedSignal(_northIndex, i); c *= rotation.y(); sum += c; } } val += sum.abs2() * _gaussianPtr[i]; } return val; }
double ArrayCore::FKHorizontal::value | ( | double | x, |
double | y, | ||
int | index | ||
) | const [virtual] |
Re-mplemement this function to calculate the 2D function for x and y aligned to a grid. x and y correspond to index in the grid: index=iy * nx + ix
If nothing is cached re-implementation of this function is useless.
Reimplemented from ArrayCore::FK.
References ArrayCore::FK::_array, _eastIndex, ArrayCore::FK::_gaussianPtr, ArrayCore::FK::_iFreqMax, ArrayCore::FK::_iFreqMin, _northIndex, _rotation, QGpCoreTools::Complex::abs2(), ArrayCore::FKStationSignals::getShiftedSignal(), ArrayCore::FKStationSignals::isSelected(), ArrayCore::FK::maximumK2(), TRACE, QGpCoreTools::Point2D::x(), and QGpCoreTools::Point2D::y().
{ TRACE; double k2=kx * kx + ky * ky; if(k2 > maximumK2()) return -1; QList<FKStationSignals *>::const_iterator it; double val=0; Complex c; for(int i=_iFreqMin;i <= _iFreqMax;i++ ) { Complex sum; for(it=_array.begin(); it!=_array.end(); ++it) { FKStationSignals * s=static_cast<FKStationSignals *>( *it); if(s->isSelected()) { c=s->getShiftedSignal(_eastIndex, i, index); c *= _rotation[index].x(); sum += c; c=s->getShiftedSignal(_northIndex, i, index); c *= _rotation[index].y(); sum += c; } } val += sum.abs2() * _gaussianPtr[i]; } //printf("%lg\n",val); return val; }
int ArrayCore::FKHorizontal::_eastIndex [protected] |
Referenced by value().
int ArrayCore::FKHorizontal::_northIndex [protected] |
Referenced by value().
Point2D* ArrayCore::FKHorizontal::_rotation [protected] |
Referenced by FKHorizontal(), initGrid(), value(), and ~FKHorizontal().