Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef FKStationSignals_H
00029 #define FKStationSignals_H
00030
00031 #include <GeopsyCore.h>
00032
00033 #include "ArrayCoreDLLExport.h"
00034
00035 namespace ArrayCore {
00036
00037 class ARRAYCORE_EXPORT FKStationSignals : public StationProcessSignals
00038 {
00039 public:
00040 FKStationSignals(const StationSignals * originalSignals);
00041 ~FKStationSignals();
00042
00043 virtual void setProcessed(const TimeRange& tw, AbstractParameters * param);
00044
00045 void setRelativeCoordinates(const Point2D& p) {_relativeCoordinates=p;}
00046 void initPhaseShifts(int n);
00047 void setPhaseShift(int index, double kx, double ky);
00048
00049 double absolutePower(int iComp, int iFreqMin, int iFreqMax, double * taperingFunction);
00050 inline void setCurrentShift(double kx, double ky);
00051
00052 inline Complex getShiftedSignal(int component, int iFreq, int offset);
00053 inline Complex getShiftedSignal(int component, int iFreq);
00054 inline Complex getSignalSpectrum(int component, int iFreq);
00055 inline Complex& getShift(int offset) {return _shift[ offset ];}
00056 inline Complex& getShift() {return _currentShift;}
00057
00058 bool isSelected() const {return _selected;}
00059 void select(bool s) {_selected=s;}
00060 protected:
00061 Complex * _shift;
00062 Complex _currentShift;
00063 Point2D _relativeCoordinates;
00064 bool _selected;
00065 };
00066
00067 inline Complex FKStationSignals::getShiftedSignal(int component, int iFreq, int offset)
00068 {
00069 Complex spec(processed(component)->complex(processedSamples(component), iFreq) );
00070 spec *= _shift[ offset ];
00071 return spec;
00072 }
00073
00074 inline Complex FKStationSignals::getShiftedSignal(int component, int iFreq)
00075 {
00076 Complex spec(processed(component)->complex(processedSamples(component), iFreq) );
00077 spec *= _currentShift;
00078 return spec;
00079 }
00080
00081 inline Complex FKStationSignals::getSignalSpectrum(int component, int iFreq)
00082 {
00083 return Complex(processed(component)->complex(processedSamples(component), iFreq) );
00084 }
00085
00086 inline void FKStationSignals::setCurrentShift(double kx, double ky)
00087 {
00088 _currentShift.setUnitExp(kx * _relativeCoordinates.x() + ky * _relativeCoordinates.y());
00089 }
00090
00091 }
00092
00093 #endif // FKSTATIONSIGNALS_H