• Main Page
  • Related Pages
  • Classes
  • Files
  • File List
  • File Members

ocsOptFilter.hh

Go to the documentation of this file.
00001 // $Id: ocsOptFilter.hh,v 1.2 2005/07/06 16:28:18 zweck Exp $
00002 
00003 //###################################################################
00004 //
00005 //           Optical Communication Systems Simulator
00006 //
00007 //       Copyright (2000):
00008 //       Optical Fiber Communications Laboratory (OFCL)
00009 //       Computer Science & Electrical Engineering Department (CSEE)
00010 //       University of Maryland Baltimore County (UMBC)
00011 //
00012 //###################################################################
00013 
00014 #ifndef _OCS_OPT_FILTER_HH_
00015 #define _OCS_OPT_FILTER_HH_
00016 
00017 #include "ocsOptSignal.hh"
00018 
00019 
00020 enum typeOptFilter { NOFILTER = 0, SUPERGAUSS = 1, 
00021                      SANTEC = 2, BOTH_SANTEC = 3 ,
00022                      BANDPASS = 4,FABRY_PEROT = 5, 
00023                      CIENA_DEMUX = 6 };
00024 
00025 
00026 // ##### Input parameter to initialize Optical Filters
00027 struct OptFilterParam
00028 {
00029    typeOptFilter TypeOptFilter;
00030    int OrderOptFilter;
00031    double FreqFWHM_OptFilter;
00032    double CenterFreqOptFilter;
00033 };
00034 
00035 // ##### Class OptFilter
00036 class OptFilter
00037 {
00038    public:
00039 
00040     //#### Methods by Ivan Lima:
00041 
00042       OptFilter();
00043       void InitOptFilter(cfftw *fft2, fftMatrices sfftM2
00044                           ,OptFilterParam soOptFilter);
00045 
00046       //######################################
00047       //## Copy constructor 
00048       OptFilter(OptFilter *oOrigOptFilter, OptSignal *oOptSignal2);
00049       
00050       void FilterOptSignal(); 
00051 
00052 
00053       void FilterOptSignal_OLD();
00054       void SwitchOptSignalData(OptSignal *oOptSignal2);
00055 
00056      typeOptFilter GetTypeOptFilter(void)
00057            {return TypeOptFilter;};
00058      int GetOrderOptFilter(void)
00059            {return OrderOptFilter;};
00060      double GetRelativeCenterFreqOptFilter()
00061            {return RelativeCenterFreqOptFilter;};
00062      double GetFreqFWHM_OptFilter(void)
00063            { return FreqFWHM_OptFilter;};
00064      void SetFreqFWHM_OptFilter(double FreqFWHM_OptFilter2);          
00065 
00066      //###### Methods by John Zweck:
00067 
00068      // Use this constructor:
00069 
00070      OptFilter(string InFileName, OptSignal *oOptSignal2);
00071 
00072      // Two Constructors for tunable optical filter designed to be used in 
00073      // conjunction with OptDemuxer (Added by JZ):
00074 
00075      OptFilter(string InFileName,typeSimulation TypeSimulation2); 
00076 
00077   
00078      OptFilter(int TypeOptFilter2,int OrderOptFilter2,
00079                double FreqFWHM_OptFilter2,typeSimulation TypeSimulation2);
00080   
00081  
00082      double GetPowerEquivalentSpectralWidth(void);
00083      void WriteFilterImpulseResponse(string FileNameImpulseResponseTime,
00084                                      string FileNameImpulseResponseFreq);
00085                
00086      void SetRelativeCenterFreq(double RelativeCenterFreqOptFilter2); 
00087                                                          
00088  
00089      void SetOpticalData(cfftw * fft2, fftMatrices sfftM2); 
00090 
00091      void GaussianTunableOpticalFilter(cplx * TimeSignal, cplx * FreqSignal);
00092 
00104      void SuperGaussianTunableOpticalFilter(cplx * TimeSignal, 
00105                                             cplx * FreqSignal);
00106 
00107 
00113      void OpticalBandpassFilter(cplx * TimeSignal, cplx * FreqSignal);
00114           
00123      void FabryPerotFilter(cplx * TimeSignal, cplx * FreqSignal);
00124 
00125      void SantecTunableOpticalFilter(cplx * TimeSignal, cplx * FreqSignal);
00126    
00128 
00129      void DemuxLoopTunableOpticalFilter(cplx * TimeSignal, cplx * FreqSignal);
00130 
00131      void TunableFilterOptSignal();
00132 
00133      void WriteFreqPowerGaussianFilter(string OutFileName);
00134 
00137 
00138      void WriteFreqPowerSuperGaussianFilter(string OutFileName);
00139      
00141      void WriteFreqPowerBandpassFilter(string OutFileName);
00142 
00144      void WriteFreqPowerFabryPerotFilter(string OutFileName);
00145 
00146      void WriteFreqPowerSantecFilter(string OutFileName);
00147      double SantecPoly(double x);
00148 
00150 
00151      void WriteFreqPowerDemuxLoopFilter(string OutFileName);
00152 
00154 
00155      double DemuxLoopPoly(double x);
00156      
00157      bool GetDoAdditionalFiltering(void) {return DoAdditionalFilteringFlag;};
00158 
00159 
00160    private:
00161       OptSignal *oOptSignal;
00162       cfftw *fft;
00163       fftMatrices sfftM;
00164       int ObjectInitialized;                          
00165       typeOptFilter TypeOptFilter;
00166       int OrderOptFilter;
00167       typeSimulation TypeSimulation;
00168       double FreqFWHM_OptFilter;
00169       double RelativeCenterFreqOptFilter;
00170 
00171      // For Ciena work:   
00172     bool DoAdditionalFilteringFlag; 
00173    
00174   int DebugLevel;
00175 
00176 };
00177 
00178 #endif /* _OCS_OPT_FILTER_HH_ */

Generated on Fri Jul 2 2010 12:57:47 for OCS by  doxygen 1.7.1