The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



Interface of SDL_Fourier

const
{$IFDEF PAIDVERS}
  SDLVersionInfo = 'fourier_r1050_full';
  IsLightEd = false;
{$ELSE}
  SDLVersionInfo = 'fourier_r1050_lighted';
  IsLightEd = true;
{$ENDIF}
  release = 1050;

type
  ESDLFourierError = class(ESDLError);     { exception type to indicate errors }
  TFastFourierWgtWin = (fwRectangle, fwTriangle, fwCos2, fwGauss, fwHamming,
                        fwBlackman, fwBlkmHarris, fwBlkmNuttall, fwUserDef);
  TFastFourier = class (TComponent)
    private
      FNumData       : longint;              { size of data array, must be 2^n }
      FWgtWin        : TFastFourierWgtWin;
      MaxValuesValid : boolean;
      FMaxReal       : double;
      FMaxImag       : double;
      FMinReal       : double;
      FMinImag       : double;
      FMaxPower      : double;
      FMaxMagni      : double;
      FUserWgt       : array of double;
      function  GetRealVal(ix: integer): double;
      procedure SetRealVal (ix: integer; v: double);
      function  GetImagVal(ix: integer): double;
      procedure SetImagVal (ix: integer; v: double);
      function  GetWgtVal (ix: integer): double;
      procedure SetWgtVal (ix: integer; v: double);
      procedure SetNumData (ndata: longint);
      procedure SetWgtWin (ww: TFastFourierWgtWin);
      function  GetPowerSpec (ix: integer): double;
      function  GetMagnitude (ix: integer): double;
      function  GetFSerSin (n: integer): double;
      function  GetFSerCos (n: integer): double;
      function  GetPhase (ix: integer): double;
      function  GetMaxPower: double;
      function  GetMaxMagni: double;
      function  GetMaxReal: double;
      function  GetMaxImag: double;
      function  GetMinReal: double;
      function  GetMinImag: double;
      procedure DoFFT (isign: integer);
      procedure CalcMaxValues;
    public
      FData : array of double;
      constructor Create(AOwner: TComponent); override;
      destructor Destroy; override;
      property  RealSpec[ix: integer]: double read GetRealVal write SetRealVal;
      property  ImagSpec[ix: integer]: double read GetImagVal write SetImagVal;
      property  WgtFunction[ix: integer]: double read GetWgtVal write SetWgtVal;
      procedure Clear;
      procedure ClearImag;
      procedure ClearReal;
      procedure Transform;
      function  FreqOfLine (ix: integer; SampleTime: double): double;
      function  LineOfFreq (f: double; SampleTime: double): integer;
      procedure InverseTransform;
      property  PowerSpec[ix: integer]: double read GetPowerSpec;
      function  RMS (FirstIx, LastIx: integer): double;
      property  Magnitude[ix: integer]: double read GetMagnitude;
      property  FourSerSinCoeff[n: integer]: double read GetFSerSin;
      property  FourSerCosCoeff[n: integer]: double read GetFSerCos;
      property  Phase[ix: integer]: double read GetPhase;
      property  PowerMax: double read GetMaxPower;
      property  MagniMax: double read GetMaxMagni;
      property  RealMax: double read GetMaxReal;
      property  ImagMax: double read GetMaxImag;
      property  RealMin: double read GetMinReal;
      property  ImagMin: double read GetMinImag;
    published
      property  SpectrumSize: longint read FNumData write SetNumData;
      property  WeightingWindow: TFastFourierWgtWin read FWgtWin write SetWgtWin;
    end;






Last Update: 2012-Oct-20