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

ocsOptSignal.hh

Go to the documentation of this file.
00001 
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_SIGNAL_HH_
00015 #define _OCS_OPT_SIGNAL_HH_
00016 
00017 #ifndef _OCS_SYSTEM_HDRS_
00018 #define _OCS_SYSTEM_HDRS_
00019 
00020 #include <iostream.h>
00021 #include <string.h>
00022 #include <math.h> 
00023 #include <fstream.h>
00024 #include <complex.h>
00025 #include <stdlib.h>
00026 #include <stdio.h>
00027 #include <strstream>
00028 
00029 #include <string>
00030   using namespace std;
00031 
00032 
00033 #endif /* _OCS_SYSTEM_HDRS_ */
00034 
00035 #include "ocsConst.hh"
00036 #include "ocsTools.hh"
00037 #include "ocsReadWriteTools.hh"
00038 #include "ocsRanNumGen.hh"
00039 
00040 #include "ModulationFormats.hh"
00041 #include "ocsReduOptSignal.hh"
00042 
00043 
00044 #ifndef _OCS_TYPE_SOLVER_
00045 #define _OCS_TYPE_SOLVER_
00046 
00062 enum typeSolver { SCALAR_NLS = 1, VECTOR_MANAKOV_PMD = 2, 
00063                   VECTOR_MANAKOV_NO_PMD = 3 };
00064 
00065 #endif /* _OCS_TYPE_SOLVER_ */
00066 
00067 #ifndef _OCS_FFT_MATRICES_
00068 #define _OCS_FFT_MATRICES_
00069 
00072 
00073 struct fftMatrices 
00074 {
00075       cplx* tOptSignalX;    
00076       cplx* fOptSignalX;
00077       cplx* tOptSignalY;    
00078       cplx* fOptSignalY;      
00079 };
00080 
00083 
00085 
00086 struct OptFiberLocalErrorWorkSpace
00087 {
00088  fftMatrices sfftM_Start;
00089  fftMatrices sfftM_Coarse;
00090  cplx * LaserWorkX;
00091  cplx * LaserWorkY;
00092  cplx * FreqDomainOperatorX;
00093  cplx * FreqDomainOperatorY;
00094  cplx * SqFreqDomainOperatorX;
00095  cplx * SqFreqDomainOperatorY;
00096  
00097 };
00098 
00099 
00100 #endif /* _OCS_FFT_MATRICES_ */
00101 
00102 #ifndef _PHOSSIL_FFT_POWER_MATRICES_
00103 #define _PHOSSIL_FFT_POWER_MATRICES_
00104 
00105 struct fftPowerMatrices
00106 {
00107       cplx* tPowerSignal;
00108       cplx* fPowerSignal;
00109 };
00110 
00111 #endif /*  _PHOSSIL_FFT_POWER_MATRICES_ */
00112 
00113 
00114 enum typeEOMElecData {EOM_BINARY_DATA_PERFECT_RECT = 1,
00115                       EOM_BINARY_DATA_ARCTANH_SMOOTHING = 2,
00116                       EOM_BINARY_DATA_SUPERGAUSS_SMOOTHING =3,
00117                       EOM_BINARY_DATA_RCOS=4};
00118 
00119 enum typeEOMElecFilter {EOM_NO_ELEC_FILTER = 0,EOM_GAUSSIAN = 1,EOM_BESSEL = 2};
00120 
00121 
00122 #include "ocsBitString.hh"
00123 
00124 // ##### Class OptSignal ############
00125 
00127 
00230 class OptSignal
00231 {
00232 
00233   // ####### Public Methods ########
00234 
00235    public:
00236 
00237       // #### Constructors ####
00238 
00239       // OptSignal();
00240 
00241       // Use these constructors:
00242 
00244 
00269       OptSignal(string InFileName, RanNumGen *RNG2);
00270  
00271 
00273  
00307       OptSignal(string InFileName, RanNumGen *RNG2, string DataFileName);
00308 
00309 
00313       
00341       void ConstructOptSignal(string InFileName, RanNumGen *RNG2);
00342 
00343 
00345  
00346       OptSignal(OptSignal & OrigOptSignal); 
00347 
00349 
00356       OptSignal & operator=(OptSignal & RHS_Signal);
00357                   
00358 
00360 
00365      OptSignal & operator-(OptSignal & Signal2); 
00366 
00369 
00370      void SubtractFreqDomain(OptSignal *oOptSignal2);
00371 
00374 
00375      void AddFreqDomain(OptSignal *oOptSignal2);
00376   
00378 
00384      OptSignal(OptSignal & Signal1,OptSignal & Signal2,RanNumGen *RNG3);
00385         
00386 
00388 
00398      friend void AddSignals(OptSignal * Signal1,OptSignal * Signal2,
00399                             OptSignal * Signal3);
00400 
00401 
00405 
00406   void AddReducedNoiseToNoiseFreeSignal(ReduOptSignal *ReduOptSignal1);
00407 
00409 
00413       ~OptSignal();
00414 
00416  
00417       void RegenerateSignalString(void); 
00418  
00420 
00421       void GetNewRandomSignalString(void);  
00422 
00425 
00426      void ConstantPhaseShift(double PhaseShiftAmount);
00427    
00430 
00431   void GenerateImpulseSignal(void);  
00432 
00434 
00435   void ChangeAveragePowerChannCurrentSignal(double AveragePowerChann2);
00436 
00438 
00439   void RegenerateSignalWithGivenAveragePowerChann(double AveragePowerChann2);
00440 
00442 
00444    void GenerateSignalStringGaussianOrSechWithPhaseShift(
00445                                  double PhaseShiftAmount);
00446 
00448 
00450   void GenerateSignalStringRaisedCosinesWithPhaseShift(
00451                                  double PhaseShiftAmount);
00452 
00453 
00455 
00456   void InputTimeDataFromFile(void);
00457 
00460 
00477    void InitializeFirstOrderPMDSignal(double PowerSplit, double DGD);
00478 
00479    void ChangeAbsoluteCenterFreq(double CenterFreq2);
00480 
00483 
00487    double GetRelativeCenterFrequency(int ChannelArrayIndex);
00488 
00489   double GetAccumulatedFirstOrderDispersion(void) 
00490                { return AccumulatedFirstOrderDispersion;};
00491 
00492   double GetAccumulatedSecondOrderDispersion(void) 
00493                { return AccumulatedSecondOrderDispersion;};
00494 
00495   void ResetAccumulatedFirstOrderDispersionToZero(void) 
00496                {  AccumulatedFirstOrderDispersion = 0.0;};
00497 
00498   void ResetAccumulatedSecondOrderDispersionToZero(void) 
00499                {  AccumulatedSecondOrderDispersion = 0.0;};
00500   
00501   void SetAccumulatedFirstOrderDispersion(double Value) 
00502                {  AccumulatedFirstOrderDispersion = Value;};
00503 
00504   void SetAccumulatedSecondOrderDispersion(double Value) 
00505                {  AccumulatedSecondOrderDispersion = Value;};
00506 
00507   void SetWriteAccumulatedFirstOrderDispersionFlag(int Value)
00508           { WriteAccumulatedFirstOrderDispersionFlag = Value; }
00509 
00511 
00512   void OpenAccumulatedFirstOrderDispersionFile(string FileName);
00513 
00515 
00516   void CloseAccumulatedFirstOrderDispersionFile(void);
00517 
00519   
00528   void WriteAccumulatedFirstOrderDispersion(double PropagatedLength);
00529 
00530 
00533 
00534   double GetAccumulatedTotalNoiseSpectralDensityGaussianStatistics(void)
00535     {return AccumulatedTotalNoiseSpectralDensityGaussianStatistics;};
00536 
00537   void SetAccumulatedTotalNoiseSpectralDensityGaussianStatistics(double Value)
00538          {AccumulatedTotalNoiseSpectralDensityGaussianStatistics=Value;};
00539 
00540   void AddToAccumulatedTotalNoiseSpectralDensityGaussianStatistics
00541          (double Increment)
00542        {AccumulatedTotalNoiseSpectralDensityGaussianStatistics += Increment;};
00543 
00544   void GainOfAccumulatedTotalNoiseSpectralDensityGaussianStatistics
00545        (double LinearPowerGainFactor)
00546             {AccumulatedTotalNoiseSpectralDensityGaussianStatistics 
00547                *= LinearPowerGainFactor;};
00548 
00549   double GetNoiseBandwidthGaussianStatistics(void)
00550     {return NoiseBandwidthGaussianStatistics;};
00551 
00552   void SetNoiseBandwidthGaussianStatistics(double Value)
00553          {NoiseBandwidthGaussianStatistics=Value;};
00554 
00555   // GET METHODS
00556 
00557 
00558       typeSimulation GetTypeSimulation(void) { return TypeSimulation;};
00559       typePulse GetTypePulse(void) {return TypePulse;};
00560 
00561       int GetChannelArrayIndex(int ChannelPhysicalIndex);
00562       int GetChannelPhysicalIndex(int ChannelArrayIndex);
00563       double GetFrequency(int ChannelArrayIndex);
00564       double GetWavelength(int ChannelArrayIndex);
00565 
00566       double GetCenterFreq(void) {return CenterFreq;}; 
00567       double GetCenterWavelength(void) {return CenterWavelength;};  
00568 
00569       int GetNumChannels(void) {return NumChannels;};
00570       double GetBitLength(void) {return BitLength;};
00571 
00572       int GetQtPoints(void) {return qtPoints;};
00573       double GetDeltaTime(void) {return DeltaTime;};
00574       double GetFWHM_Pulse(void) {return FWHM_Pulse;};
00575       double GetBitRateChann(void)  {return BitRateChann;};
00576       int GetStringLength(void) {return oBitString->GetStringLength();}
00577       double GetChannSpacing(void) {return ChannSpacing;}; 
00578       double GetOptPowerChann(void) {return OptPowerChann;};
00579       double GetDeltaFreq(void) {return DeltaFreq;};
00580       double GetTimeWindow(void) {return TimeWindow;};
00581       double GetFreqWindow(void) {return FreqWindow;};
00582       int GetDebugLevel(void) {return DebugLevel;};
00583       bool GetRandomPolarizationsFlag() { return RandomPolarizationsFlag;};
00584 
00585       bool GetUsingOptFiberLocalError(void) {return UsingOptFiberLocalError;};
00586 
00587       double GetChirpParameter(void) {return ChirpParameter;};
00588       double GetInStokes(const int ChannelArrayIndex, 
00589                                const int StokesIndex);
00590       cplx GetInJones(const int ChannelArrayIndex, int JonesIndex);
00591 
00592       double * GetInStokes(const int ChannelArrayIndex);
00593       cplx * GetInJones(const int ChannelArrayIndex);
00594 
00595       double GetFreqForPDVectorOFLE(void) {return FreqForPDVectorOFLE;};
00596 
00600 
00601    void GetRandomJones(cplx * Jones);
00602    void TestGetRandomJones(string OutFileName, int NumberPoints);
00603 
00606 
00607    void ResetPDVectorOFLE(void);
00608 
00610 
00611    void SetNumberChannelsForDemuxer(int NumChannels2); // ## JZ
00612 
00614 
00615    void SetNumChannels(const int NumChannels2); //## (IL)
00616 
00618 
00619    void ReduceToSingleChannel(int ChannelArrayIndex); //## (IL)
00620 
00621    // SET METHODS
00622 
00623       void SetFWHM_Pulse(double Value)
00624            { FWHM_Pulse =  Value;};
00625 
00626       void SetRiseTime(double Value)
00627             { RiseTime = Value;};
00628 
00629       void SetExtinctionRatio(double Value)
00630             { LinearExtinctionRatio = dB2Linear(Value);};
00631 
00632 
00633       void SetOptPowerChannel(const double Power2)
00634                         { OptPowerChann = Power2; } ; 
00635 
00636       void SetCenterFreq(const double CenterFreq2)
00637                         { CenterFreq = CenterFreq2; };
00638 
00639       void SetChannSpacing(const double ChannSpacing2)
00640                         { ChannSpacing = ChannSpacing2; };
00641 
00642       void SetFrequency(int ChannelArrayIndex, double Freq);
00643 
00644       void SetInStokes(const int ChannelArrayIndex, const int StokesIndex,
00645                        double StokesValue);
00646       void SetInJones(const int ChannelArrayIndex, const int JonesIndex,
00647                        cplx JonesValue);
00648 
00649       void SetInStokes(const int ChannelArrayIndex,double * StokesVector);
00650       void SetInJones(const int ChannelArrayIndex, cplx * JonesVector);
00651 
00652       void SetRandomJonesVectors(void);
00653 
00654       void SetEOM_RiseTime(double Value)
00655            {EOM_RiseTime = Value;
00656             EOM_SlopeFactor = (2.0/EOM_RiseTime)*atanh(0.8);};
00657 
00658       void SetEOM_ElecFilter_FreqFWHM(double Value)
00659            {EOM_ElecFilter_FreqFWHM = Value;};
00660 
00661       //######## Methods to read in InStokes ########
00662       // Written by John Zweck
00663 
00664       void InitializeInStokes(ifstream * InFile);
00665       int ReadInStokes(string InStokesName, int ch, ifstream * InFile);
00666 
00667       // #### Methods written by Ivan Lima ####
00668 
00670 
00671       void EliminateSignal(void) {
00672               EliminateX_Polarization();
00673               EliminateY_Polarization();
00674       };       
00675 
00677 
00678       void ClearSignal(void) {EliminateSignal();};      
00679 
00681 
00682       void EliminateX_Polarization(void);
00683 
00685 
00686       void EliminateY_Polarization(void);      
00687 
00688       void ScaleSignal(double ScaleFactor);
00689 
00690       void SwitchXandYPolarizations(void);
00691 
00693 
00696       double GetAveragePower(void);
00697 
00699 
00700       double GetAveragePowerFreqDomain(void);
00701 
00705 
00706 
00707       double GetAveragePowerFreqDomainInsideChannels(void);
00708 
00712 
00715       double GetAveragePowerFreqDomainInsideChannel(int ChannelArrayIndex); 
00716 
00718 
00719       cplx GetAutocorrelationFunctionOptSignalX(double TimeOffset);
00720 
00721       double GetDegreeOfPolarization(void);
00722 
00724 
00725       double GetDegreeOfPolarization(double BandWidth);
00726 
00727       double GetDegreeOfPolarization(double RelMinFreq, double RelMaxFreq);
00728 
00729       const char * WriteTypePulse(void);
00730 
00733 
00734       void WriteDegreeOfPolarization(double PropLength,
00735                                      double RelMinFreq, double RelMaxFreq);
00736  
00737       void OpenDegreeOfPolarizationFile(string InFileName,bool WriteDOPFlag);
00738       void CloseDegreeOfPolarizationFile(bool WriteDOPFlag);
00739 
00741 
00742       void GetTotalStokesParameters(double *Stokes);
00743 
00745 
00746       void GetTotalStokesParametersInBandwidth(double *Stokes,
00747                             double RelMinFreq, double RelMaxFreq);
00748 
00749 
00751 
00752        void GetTotalStokesParametersInTime(double *Stokes,
00753                                            int RelMinTimeIndex,
00754                                            int RelMaxTimeIndex);
00755 
00758 
00765       double GetDegreeOfPolarizationAndTotalStokesFreqDomain(double * Stokes);
00766 
00770 
00771       double GetSigmaSqOptSignal(void);  
00772 
00776 
00777       double ComputeFWHMPulsePower(void);
00778 
00781 
00782       void ImportOptSignal(OptSignal *oOptSignalOrig);
00783 
00785 
00786       void DampBounds(double DampTime); 
00787 
00789       void Time2Freq(void);
00790   
00793 
00794       void Time2FreqScalar(void);
00795 
00797  
00798       void Freq2Time(void);  
00799 
00802 
00803       void Freq2TimeScalar(void);
00804   
00806 
00807       void fftshift(void);
00808 
00810 
00811       void ifftshift(void);
00812   
00815 
00816       void TimeShiftSignal(double dTime);
00817 
00818       void FreqShiftSignal(double dFreq);
00819 
00821       
00822       void WriteFileTimePower(string outFile);
00823 
00826 
00827       void WriteFileFreqPower(string outFile);    
00828 
00831 
00832       void WriteFileWavelengthPower(string outFile);    
00833 
00836   
00837       void WriteFileFreqPower(string outFile,int TypeOutputFlag);
00838         
00839       // ### The following public methods were added by John Zweck #####
00840 
00841      void WriteFileFreqPowerdBm(string outFile);
00842      
00844 
00851      void WriteFileComplexFieldsTimeAndFreq(string OutFileName);
00852 
00854 
00861      void ReadFileComplexFieldsTimeAndFreq(string InFileName);
00862 
00865 
00866      void WriteComplexFields(string OutFileName, int ForRestartFlag);
00867 
00868 
00869  
00871     void ReadComplexFields(string InFileName);
00872  
00873     void ReadComplexFieldsX(string InFileName);
00874 
00876 
00877      void WriteComplexFieldsX(string OutFileName, int ForRestartFlag);
00878 
00879 
00882 
00883      void WriteComplexFieldsFreq(string OutFileName);
00884 
00887 
00888      void WriteFreqPhaseX(string OutFileName);
00889 
00890 
00893 
00903       void WriteDistTimePowerPhase(string outFile,  int timeIndexIncrement,
00904                                    double distance, 
00905                                    int appendFlag);
00906 
00908 
00909 
00910       void WriteDistTimePower(string outFile,  int timeIndexIncrement,
00911                                    double distance, 
00912                                    int appendFlag);
00913 
00916 
00921       void WriteDistTimeCplxWave(string outFile, double distance, 
00922                                  int appendFlag);
00923 
00924 
00926 
00927      void WriteAveragePowerdBm(string OutFileName,double distance,
00928                             int appendFlag); 
00929 
00931 
00932      void WritePowerdBmChannel(string OutFileName,double distance,
00933                                    int appendFlag,int ChannelArrayIndex);
00934   
00936 
00937      void WritePowerdBmFreqWindow(string OutFileName,double distance,
00938                                   int appendFlag,
00939                                   double LeftFreq,double RightFreq);
00940 
00943 
00944       void WriteFileTimeAmpPhase(string outFile);
00945 
00948 
00965       double GetLocalFrequency(int timeIndex);
00966 
00969 
00993       double GetChirp(int timeIndex);
00994 
00998 
01002       double ComputeAverageChirpOfMarks(double TimeWithinBitSlot);
01003 
01007 
01008       void WriteLocalFrequencyAndChirp(string outFile);
01009 
01011 
01012       void WriteChirp(string outFile);
01013 
01014 
01024      template<class T>  T WrapPeriodically(T periodicVariable, 
01025                                       T leftEndPoint, T rightEndPoint);
01026 
01027 
01035    int GetFloorIndex(double Time);
01036 
01045    int GetCeilIndex(double Time);
01046 
01054    double GetRealX(double Time);
01055 
01061    double GetImagX(double Time);
01062 
01069    double GetRealY(double Time);
01070 
01077    double GetImagY(double Time);
01078 
01079 
01080   //###### Methods to compute Energy, Written by JZ
01081 
01084 
01085   double GetEnergyInBitSlot(int BitSlotNumber);
01086 
01088 
01089   double GetTotalEnergy(void);
01090 
01092 
01093   double GetEnergyInTimeRange(double LeftTime, double RightTime);
01094 
01097 
01098   double ComputeMeanTimePulse(void);
01099  
01100   double ComputeMeanTimePulse(double StartTime, double EndTime);
01101 
01102   double ComputeMeanFreqSignal(void);
01103 
01104   double ComputeMeanPhasePulse(void);
01105 
01106   double ComputeMeanPhasePulse(double StartTime, double EndTime);
01107 
01109   
01110   double ComputeRMSPulseWidth(void);
01111 
01114 
01115   double ComputeSigmaSqTimeWindow(double StartTime, double EndTime);
01116 
01118 
01121   double ComputeAverageSigmaMarks(void); 
01122 
01124 
01125   double ComputeRMSSpectralWidth(void); 
01126 
01127   double ComputeMaxPower(void);
01128 
01129   double ComputeMaxPower(int & ArgMaxIndex);
01130 
01131   void OpenAveragePulseWidthFile(string FileName,int WriteFlag);
01132   void CloseAveragePulseWidthFile(int WriteFlag);
01133 
01135 
01136   void WriteAveragePulseWidth(double PropagatedLength,int WriteFlag);
01137 
01138   void ResetJonesMatrix(void);
01139 
01140 
01142 
01144   void GenerateSignalStringGaussianOrSech(void);
01145 
01147 
01149   void GenerateSignalStringRZGaussianPattern(void);
01150 
01152    
01153   void GenerateSignalStringRaisedCosines(void);
01154 
01156 
01158   void GenerateSignalStringUsingInputSequence(void);
01159  
01161 
01163   void GenerateSignalStringQPSK_Gaussian(void);
01164   void GenerateSignalStringQPSK_CW(void);
01165 
01166   void GenerateSignalStringNRZ_RCOS_MachZehnderModulator(void);
01167 
01168   void GenerateSignalStringBPSKPhaseModulator(void);
01169   void GenerateSignalStringBPSKMachZehnderModulator(void);
01170 
01171   void GenerateSignalStringCSRZMachZehnderModulator(void);
01172   void GenerateSignalStringRZ33MachZehnderModulator(void);
01173   void GenerateSignalStringRZ50MachZehnderModulator(void);
01174 
01175   void GenerateSignalStringQPSK_SEQ_PM_NRZ(void);
01176   void GenerateSignalStringQPSK_DPMZ_PM_NRZ(void);
01177 
01178   void GenerateSignalStringQPSK_SEQ_PM_AM_RZ33(void);
01179   void GenerateSignalStringQPSK_SEQ_PM_AM_RZ50(void);
01180   void GenerateSignalStringQPSK_DPMZ_PM_AM_RZ33(void);
01181   void GenerateSignalStringQPSK_DPMZ_PM_AM_RZ50(void);
01182 
01183   void EOM_MachZehnderModulatorOptData(double V_pi1, double V_pi2,
01184                                 double Phi_10, double Phi_20,
01185                                 double SinusoidalRate, 
01186                                 double SinusoidalThetaShift);
01187 
01188   void EOM_MachZehnderModulatorOptNRZOLD(double V_pi1, double V_pi2,
01189                                 double Phi_10, double Phi_20,
01190                                 double SinusoidalRate,
01191                                 double SinusoidalThetaShift);
01192 
01193   void GenerateSignalStringCSRZMachZehnderModulatorOLD(void);
01194   void GenerateSignalStringRZ33MachZehnderModulatorOLD(void);
01195   void GenerateSignalStringRZ50MachZehnderModulatorOLD(void);
01196 
01197   void EOM_MachZehnderModulatorElecNRZ(double V_pi1, double V_pi2,
01198                                 double Phi_10, double Phi_20,
01199                                 double SinusoidalRate,
01200                                 double SinusoidalTimeShift,
01201                                 double SinusoidalVertShift);
01202 
01203   void SetEOM_V_pi_RelError(double EOM_V_pi_RelError2);
01204 
01205   void SetEOM_Phi_10_RelError(double EOM_Phi_10_RelError2);
01206 
01207   void SetEOM_Phi_20_RelError(double EOM_Phi_20_RelError2);
01208 
01209   void SetEOM_SinusoidalVertShift_RelError(
01210         double EOM_SinusoidalVertShift_RelError2);
01211 
01212   void EOM_WriteFileElecData(string OutFileName);
01213 
01214   void EOM_SinusoidallyModulateElecData(double SinusoidalRate, 
01215                                         double SinusoidalTimeShift,
01216                                         double SinusoidalVertShift);
01217 
01218   void EOM_PhaseModulator(void);
01219  
01220   string EOM_GetTypeElecData(void);
01221   string EOM_GetTypeElecFilter(void);
01222 
01223   void EOM_GenerateRaisedCosineBinaryElecData(int ChannelArrayIndex,
01224                                               bool ZeroOneNotMinusPlusFlag);
01225   double RaisedCosineForNRZ_RCOS_MZ(double Time);
01226 
01227   void EOM_GeneratePerfectRectBinaryElecData(int ChannelArrayIndex);
01228   void EOM_GenerateSmoothedRectBinaryElecDataArctanh(int ChannelArrayIndex);
01229   void EOM_GenerateSmoothedRectBinaryElecDataSuperGauss(int ChannelArrayIndex);
01230 
01231   double EOM_SuperGauss(double Time);
01232   void EOM_FilterElecData(void);
01233 
01234   void EOM_ElectricalFilterBessel4(cplx *my_power_time,double fwhm_norm);
01235   void EOM_ElectricalFilterGaussian(cplx *my_power_time,
01236                                              double fwhm_norm);
01237 
01238   cplx EOM_Bessel4(double omega,double FWHM);
01239   double EOM_Gaussian(double omega,double FWHM);
01240 
01243  
01244   void ComputeRelevantNumModesOFLE(void);
01245 
01246   int GetRelevantNumModesOFLE(void) {return RelevantNumModesOFLE;};
01247 
01248   void SetBandwidthForRelevantNumModesOFLE(double BandwidthGHz);
01249 
01251 
01252    void SetBitLengthJZ(double Value) {BitLength = Value;}; 
01253             
01255 
01256    void SetBitRateChannJZ(double Value)  {BitRateChann = Value;};
01257 
01258   
01260 
01261   void SetBitRateChannBM(double Value);
01262 
01264 
01265   void AddSignalBM(OptSignal * oOptSignal2);
01266 
01268 
01269   void AddCWSignal(double PowerCWChann, double FreqCWChann);
01270    
01271   // ####### Public Data ######
01272 
01273   public:
01274 
01275     cfftw *fft;           
01276     fftMatrices sfftM; 
01277 
01279 
01280     BitString *oBitString; 
01281 
01282     RanNumGen * RNG;
01283 
01289 
01290     ReduOptSignal * oReduOptSignal;
01291 
01292     cplx *JonesMatrixChannel;  
01293    
01294 
01296     OptFiberLocalErrorWorkSpace OFLEWork; 
01297 
01300 
01301     double * QuadratureWorkSpace;
01302 
01303 
01306 
01313     double * OutputPDVectorOFLE;
01314 
01317 
01318     double * InputPDVectorOFLE;
01319 
01322 
01344   double ** StokesTransferMatrixTransposeOFLE;
01345 
01346   // ########## Private Methods
01347 
01348   private:
01349 
01350      void AllocateOptFiberLocalErrorWorkSpace(void);
01351      void DeallocateOptFiberLocalErrorWorkSpace(void);
01352 
01353 
01354   // ##### Private Data #######
01355 
01356   private:
01357 
01358       typeSimulation TypeSimulation;
01359 
01360       int NumChannels;
01361       
01362       double CenterFreq;
01363       double CenterWavelength;
01364       double ChannSpacing; 
01365 
01368 
01369       double * Frequency; 
01370 
01372 
01373       double BitLength; 
01374       double BitRateChann;
01375 
01377 
01378       typePulse TypePulse; 
01379 
01381 
01382       int StringLength;
01383       double FWHM_Pulse;
01384       double ChirpParameter;
01385       double LinearExtinctionRatio;
01386       double RiseTime;
01387       double OptPowerChann;
01388 
01390 
01391       string InputTimeDataFileName;
01392 
01394     
01395       string InputSequenceFileName;
01396 
01405       double *InStokes; 
01406 
01414       cplx *InJones;  
01415 
01418 
01419       bool RandomPolarizationsFlag;
01420 
01421       int qtPoints;
01422       double TimeWindow,DeltaTime;
01423       double FreqWindow,DeltaFreq;  
01424 
01441       double AccumulatedFirstOrderDispersion;
01442       double AccumulatedSecondOrderDispersion;
01443 
01444       ofstream AccumulatedFirstOrderDispersionFile;
01445       int WriteAccumulatedFirstOrderDispersionFlag;
01446 
01447       ofstream AveragePulseWidthFile;
01448 
01449       ofstream DegreeOfPolarizationFile;
01450 
01462       double FreqForPDVectorOFLE;     
01463      
01467 
01468   bool ComputeInputPDVectorFlagOFLE;
01469 
01471 
01474 
01475      int RelevantNumModesOFLE;
01476 
01479 
01480      bool ComputeRelevantNumModesOFLEFlag;
01481 
01483 
01488       int DebugLevel;
01489    
01490       int MemAllocated; 
01491       bool UsingOptFiberLocalError;
01492 
01493   
01496 
01519       double AccumulatedTotalNoiseSpectralDensityGaussianStatistics;
01520 
01523 
01524   double NoiseBandwidthGaussianStatistics;
01525 
01526   typeEOMElecData TypeEOMElecData;
01527   typeEOMElecFilter TypeEOMElecFilter;
01528       
01529   fftPowerMatrices EOM_sfftPM;
01530   fftPowerMatrices EOM_sfftPM1;
01531   fftPowerMatrices EOM_sfftPM2;
01532 
01533   double EOM_RiseTime;
01534   double EOM_SlopeFactor;
01535   double EOM_ShiftAmt;
01536   int EOM_SuperGaussExponent;
01537   double EOM_ElecFilter_FreqFWHM;
01538 
01539   double EOM_V_pi_RelError;
01540   double EOM_Phi_10_RelError;
01541   double EOM_Phi_20_RelError;
01542   double EOM_SinusoidalVertShift_RelError;
01543 
01544 };
01545 
01546 #endif /* _OCS_OPT_SIGNAL_HH_ */
01547 
01548 
01549 

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