#include <unistd.h>
#include "cfftw.hh"
#include "ocsConst.hh"
#include <iostream.h>
#include <string.h>
#include <math.h>
#include <fstream.h>
#include <complex.h>
#include <stdlib.h>
#include <stdio.h>
#include <strstream>
#include <string>
Go to the source code of this file.
Defines | |
#define | _OCS_SYSTEM_HDRS_ |
#define | NEAR_ZERO 2.2e-13 |
Typedefs | |
typedef complex< double > | cplx |
Enumerations | |
enum | { MOSIX_UNLOCK, MOSIX_LOCK } |
Functions | |
template<class T > | |
T | sq (T) |
template<class T > | |
T | cube (T) |
int | sgn (double x) |
double | min (double a, double b) |
void | MinAndArgMin (double *Vec, int Length, double &MinValue, int &ArgMin) |
void | MaxAndArgMax (double *Vec, int Length, double &MaxValue, int &ArgMax) |
double | GetRadiusCircle (double *PointA, double *PointB, double *PointC) |
double | GetDistance2Points (double *PointA, double *PointB, int FirstCoord) |
int | Periodicity (int ii, int Periodicity) |
void | TransRzRyV3toXhat (double *Vector, double *thetaZthetaY) |
void | TransRzRxV3toXhat (double *Vector, double *thetaZthetaY) |
void | TransRzRyV3to_Xhat (double *Vector, double *thetaZthetaY) |
void | TransRyV3to_YZ (double *Vector, double *thetaY) |
void | TransRzRxV3to_Xhat (double *Vector, double *thetaZthetaX) |
void | TransRzRxV3to_Xhat (double *Vector, double *thetaZ, double *thetaX) |
void | Multiply (cplx Left[][2], cplx Right[][2]) |
void | URotatesAboutZ (double angle, cplx UMatrix[][2]) |
void | URotatesAboutY (double angle, cplx UMatrix[][2]) |
void | URotatesAboutX (double angle, cplx UMatrix[][2]) |
void | MRotatesAboutZ (double angle, double MMatrix[][3]) |
void | MRotatesAboutY (double angle, double MMatrix[][3]) |
void | MRotatesAboutX (double angle, double MMatrix[][3]) |
void | MGeneralRotation (double angle, double *r_vec, double MMatrix[][3]) |
void | RotatesAboutZ (double angle, double *Vector) |
void | RotatesAboutX (double angle, double *Vector) |
void | RotatesAboutY (double angle, double *Vector) |
void | RotatesAboutX (double angle, cplx *JonesVector) |
void | RotatesAboutY (double angle, cplx *JonesVector) |
void | RotatesAboutZ (double angle, cplx *JonesVector) |
void | Multiply (double Left[][3], double Right[][3]) |
void | Multiply (double Left[][3], double Right[3]) |
double | ScalarProduct (double *VectorA, double *VectorB) |
void | CrossProduct (double Left[4], double Right[4], int FirstCoord) |
void | CrossProduct (double *Left, double *Right, double *Product) |
double | GetVectorLength (double *Vector, int Dimension) |
double | dB2Linear (double dBvalue) |
double | dBm2Linear (double dBmPower) |
double | Linear2dB (double LinearValue) |
double | Linear2dBm (double LinearPower) |
double | Linear2dB_Limited (double LinearValue, double MaxValue_dB) |
double | GetDegreeOfPolarization (double *StokesVector) |
double | GetPhase (const cplx Phasor) |
void | Stokes2Jones (const double *Stokes, cplx *Jones) |
void | Jones2Stokes (const cplx *Jones, double *Stokes) |
void | Stokes2JonesKeepPower (const double *Stokes, cplx *Jones) |
void | Jones2StokesKeepPower (const cplx *Jones, double *Stokes) |
void | JonesPair2MixedStokes (const cplx *Jones1, const cplx *Jones2, cplx *MixedStokes) |
double | Frequency2Wavelength (double Frequency) |
double | Wavelength2Frequency (double Wavelength) |
double | MaxOfArray (double *Array, int Length) |
Returns the maximum element of the array Array. | |
double | MinOfArray (double *Array, int Length) |
Returns the minimum element of the array Array. | |
double | Quadrature (double *Data, int NumPts, double LeftEndPt, double RightEndPt) |
cplx | exp_jc_real (double __x) |
double | lin_map (double x, double a1, double diff_a, double b1, double diff_b) |
int | lin_map (double x, double a1, double diff_a, int b1, int num_b) |
double | lin_map (int x, int a1, int num_a, double b1, double diff_b) |
double | lin_map (int x, int a1, int num_a, int b1, int num_b) |
double | lin_interpolate (double x, double a1, double diff_a, int b1, int num_b, double *data) |
cplx | lin_interpolate (double x, double a1, double diff_a, int b1, int num_b, cplx *data) |
int | lock_or_unlock_mosix (int what) |
int | cpujob_mosix (void) |
int | slow_mosix (void) |
double | dB_to_factor (double G_dB) |
double | factor_to_dB (double factor) |
double | gaussian (double t, double t0, double FWHM_norm) |
void | gaussian_pdf (int N, double stan_dev, double *vec) |
double | soliton (double t, double t0, double eta) |
cplx | bessel5 (double omega, double omega_0, double FWHM) |
void | electrical_filter (cplx *my_power_time, cfftw *fft, double fwhm) |
void | optical_filter (cplx *my_field_time, cplx *my_field_freq, cfftw *fft, double fwhm) |
void | my_error (char *spruch) |
double | peak_power (cplx *in, int N) |
double | pulse_energy (cplx *in, int N, double width) |
void | fftshift (cplx *v, int datlen_l) |
void | ifftshift (cplx *v, int datlen_l) |
float | ranG (long *) |
float | Gaussian_pdf (long *idum) |
void | frprmn (float p[], int n, float ftol, int *iter, float *fret, float(*func)(float[]), void(*dfunc)(float[], float[])) |
void | frprmnd (double p[], int n, double ftol, int *iter, double *fret, double(*func)(double[]), void(*dfunc)(double[], double[])) |
void | powell (float p[], float xi[][4], int n, float ftol, int *iter, float *fret, float(*func)(float[])) |
double ** | dmatrix (long nrl, long nrh, long ncl, long nch) |
cplx ** | cmatrix (long nrl, long nrh, long ncl, long nch) |
void | free_dmatrix (double **m, long nrl, long nrh, long ncl, long nch) |
void | free_cmatrix (cplx **m, long nrl, long nrh, long ncl, long nch) |
void | gaussj (double **a, int n, double **b, int m) |
void | gaussj_complex (cplx **a, int n, cplx **b, int m) |
float | erffc (float x) |
float | gammp (float a, float x) |
void | gcf (float *gammcf, float a, float x, float *gln) |
void | gser (float *gamser, float a, float x, float *gln) |
float | gammln (float xx) |
float | gammq (float a, float x) |
double | erfccExtendedRange (double x) |
float | erfcc (float x) |
float | zbrent (float(*func)(float), float x1, float x2, float tol) |
float | brent (float ax, float bx, float cx, float(*f)(float), float tol, float *xmin) |
double | brentd (double ax, double bx, double cx, double(*f)(double), double tol, double *xmin) |
double | splint (double *xa, double *ya, double *y2a, int n, double x) |
void | spline (double *x, double *y, int n, double yp1, double ypn, double *y2) |
#define _OCS_SYSTEM_HDRS_ |
#define NEAR_ZERO 2.2e-13 |
typedef complex<double> cplx |
cplx bessel5 | ( | double | omega, | |
double | omega_0, | |||
double | FWHM | |||
) |
Referenced by electrical_filter().
float brent | ( | float | ax, | |
float | bx, | |||
float | cx, | |||
float(*)(float) | f, | |||
float | tol, | |||
float * | xmin | |||
) |
double brentd | ( | double | ax, | |
double | bx, | |||
double | cx, | |||
double(*)(double) | f, | |||
double | tol, | |||
double * | xmin | |||
) |
cplx** cmatrix | ( | long | nrl, | |
long | nrh, | |||
long | ncl, | |||
long | nch | |||
) |
References nrerror().
Referenced by ElecEqualizer::AllocateMemory().
int cpujob_mosix | ( | void | ) |
void CrossProduct | ( | double * | Left, | |
double * | Right, | |||
double * | Product | |||
) |
void CrossProduct | ( | double | Left[4], | |
double | Right[4], | |||
int | FirstCoord | |||
) |
T cube | ( | T | in | ) | [inline] |
double dB2Linear | ( | double | dBvalue | ) |
Referenced by OptAmplifier::AddRippleToGain(), ReduOptAmplifier::AmplifyOptSignal(), OptAmplifier::ChannelAddDrop(), OptAmplifier::ComputeNoiseAmplitudeFactor(), OptAmplifier::ComputeNoiseAmplitudeFactorGainProfile(), OptSignal::ConstructOptSignal(), OptFilter::DemuxLoopTunableOpticalFilter(), LumpedLoss::InitLumpedLoss(), ReduLumpedLoss::InitReduLumpedLoss(), Linear2dB_Limited(), OptAmplifier::Loss(), OptAmplifier::OptAmplifier(), ReduOptAmplifier::ReduOptAmplifier(), OptFilter::SantecTunableOpticalFilter(), NoiseCovariance::SetCovarianceMatrixAWGN(), OptSignal::SetExtinctionRatio(), ReduOptAmplifier::SetGain(), OptAmplifier::SetGain(), ReduOptAmplifier::SetGainCompressionSaturatedAmplifier(), OptAmplifier::SetGainCompressionSaturatedAmplifier(), ReduLumpedLoss::SetLossdB(), LumpedLoss::SetLossdB(), ReduPolDepAttenuator::SetPolDepAttenuationX(), PolDepAttenuator::SetPolDepAttenuationX(), ReduPolDepAttenuator::SetPolDepAttenuationY(), PolDepAttenuator::SetPolDepAttenuationY(), OptFilter::WriteFreqPowerDemuxLoopFilter(), and OptFilter::WriteFreqPowerSantecFilter().
double dB_to_factor | ( | double | G_dB | ) | [inline] |
double dBm2Linear | ( | double | dBmPower | ) |
double** dmatrix | ( | long | nrl, | |
long | nrh, | |||
long | ncl, | |||
long | nch | |||
) |
References nrerror().
Referenced by ElecEqualizer::AllocateMemory(), and GetRadiusCircle().
References bessel5(), cfftw::FFT(), cfftw::freq(), cfftw::give_N(), cfftw::IFFT(), and cfftw::work.
float erfcc | ( | float | x | ) |
Referenced by erfccExtendedRange().
double erfccExtendedRange | ( | double | x | ) |
References erfcc(), pi, sq(), and sqrt().
Referenced by ElecSignalStat::GetBER_GaussianStatisticsFromDecisionThreshold(), ElecSignalStat::GetQ_FactorGaussianStatisticsFromBER(), and ElecSignalStat::MinimizeSqQ_FactorVersusBER().
float erffc | ( | float | x | ) |
References gammp(), and gammq().
Referenced by ReduOptSignal::GetOutageProbGaussian().
cplx exp_jc_real | ( | double | __x | ) | [inline] |
(RON) Computes exp(i * x), where x is real This routine is OK for values in the range [1e-302, 1e18] This is substantailly fast than using exp(jc*x)
Referenced by OptFiberLocalError::ApplyKerrNonlinearityOperator(), NoiseCovariance::ComputeArtificialDispersionCompensationOperator(), OptFiberLocalError::ComputeDispersionOperator(), OptFiberLocalError::ComputeFreqDomainOperator(), ChiSquareReceiver::ComputeKLModes(), and OptFiberLocalError::UpdateJonesMatrixAfterBiregringence().
double factor_to_dB | ( | double | factor | ) | [inline] |
void fftshift | ( | cplx * | v, | |
int | datlen_l | |||
) |
void free_cmatrix | ( | cplx ** | m, | |
long | nrl, | |||
long | nrh, | |||
long | ncl, | |||
long | nch | |||
) |
References FREE_ARG, and NR_END.
Referenced by ElecEqualizer::~ElecEqualizer().
void free_dmatrix | ( | double ** | m, | |
long | nrl, | |||
long | nrh, | |||
long | ncl, | |||
long | nch | |||
) |
References FREE_ARG, and NR_END.
Referenced by ElecEqualizer::~ElecEqualizer().
double Frequency2Wavelength | ( | double | Frequency | ) |
References LightSpeed.
Referenced by OptAmplifier::AmplifyHomogeneous(), OptAmplifier::ApplyPolynomial(), OptFiberLocalError::ComputeWalkOffStepSize(), OptSignal::ConstructOptSignal(), OptFiberLocalError::GetDispersion(), OptSignal::GetWavelength(), OptFiber::OptFiber(), OptFiberLocalError::OptFiberLocalError(), OptSpectrumAnalyzer::OutputOSA(), RamanAmp::PrepareSignalLastRound(), RamanAmp::PrepareSignalStart(), ReduOptSignal::ReduOptSignal(), OptFiberLocalError::SetDispersion(), OptSignal::WriteFileWavelengthPower(), and RamanAmp::WriteSignalNoise().
void frprmn | ( | float | p[], | |
int | n, | |||
float | ftol, | |||
int * | iter, | |||
float * | fret, | |||
float(*)(float[]) | func, | |||
void(*)(float[], float[]) | dfunc | |||
) |
References EPS, FREEALL, linmin(), nrerror(), and nrvector().
void frprmnd | ( | double | p[], | |
int | n, | |||
double | ftol, | |||
int * | iter, | |||
double * | fret, | |||
double(*)(double[]) | func, | |||
void(*)(double[], double[]) | dfunc | |||
) |
double gaussian | ( | double | t, | |
double | t0, | |||
double | FWHM_norm | |||
) |
void gaussj | ( | double ** | a, | |
int | n, | |||
double ** | b, | |||
int | m | |||
) |
References free_ivector(), ivector(), nrerror(), and SWAP.
Referenced by ElecEqualizer::EqualizeBitIntensityWiener(), ElecEqualizer::EqualizeBitIntensityWienerReal(), and GetRadiusCircle().
References free_ivector(), ivector(), nrerror(), and SWAP.
Referenced by ElecEqualizer::EqualizeBitIntensityWienerCplx().
void gcf | ( | float * | gammcf, | |
float | a, | |||
float | x, | |||
float * | gln | |||
) |
double GetDegreeOfPolarization | ( | double * | StokesVector | ) |
References NEAR_ZERO, sq(), and sqrt().
Referenced by ReduOptAmplifier::AddPolDepGainEffect(), and OptAmplifier::SetPolDepGainPolarization().
double GetDistance2Points | ( | double * | PointA, | |
double * | PointB, | |||
int | FirstCoord | |||
) |
Referenced by GetRadiusCircle().
double GetPhase | ( | const cplx | Phasor | ) |
double GetRadiusCircle | ( | double * | PointA, | |
double * | PointB, | |||
double * | PointC | |||
) |
References CrossProduct(), dmatrix(), gaussj(), GetDistance2Points(), pi, sq(), and sqrt().
void gser | ( | float * | gamser, | |
float | a, | |||
float | x, | |||
float * | gln | |||
) |
void ifftshift | ( | cplx * | v, | |
int | datlen_l | |||
) |
void Jones2Stokes | ( | const cplx * | Jones, | |
double * | Stokes | |||
) |
Referenced by OptFiber::GetNumOutPD_Vector(), Jones2StokesKeepPower(), and OptSignal::TestGetRandomJones().
void Jones2StokesKeepPower | ( | const cplx * | Jones, | |
double * | Stokes | |||
) |
References Jones2Stokes(), and sq().
Converts a pair of Jones vectors v_1, v_2 into the mixed Stokes vector S_12 = ConjugateTranspose(v_1)*Sigma*v_2 where Sigma is the Pauli Spin 4-vector
Converts a pair of Jones vectors v_1, v_2 into the mixed Stokes vector S_12 = ConjugateTranspose(v_1)*Sigma*v_2 where Sigma is the Pauli Spin 4-vector
Converts a pair of Jones vectors v_1, v_2 into the mixed Stokes vector S_12 = ConjugateTranspose(v_1)*Sigma*v_2 where Sigma is the Pauli Spin 4-vector.
Here the Jones vectors are complex 2x1 column vectors and S_12 is a complex 4-vector.
If v_1 = v_2, then the Mixed Stokes vector is just the standard Stokes vector of v_1, and is in particular real.
In general, the complex conjugate of S_12 is S_21.
If v_1 and v_2 form an orthonormal basis, then the zero-th entry of S_12 is zero
We do not normalize by the zero-th entry of S_12, as it may be 0!
Written by JZ, Dec 2005
References jc.
Referenced by GaussianReceiver::ComputeFirstOrderPMDParameters(), and GaussianReceiver::ReceiveSignalDGD_NoisePartiallyPolarized().
cplx lin_interpolate | ( | double | x, | |
double | a1, | |||
double | diff_a, | |||
int | b1, | |||
int | num_b, | |||
cplx * | data | |||
) | [inline] |
double lin_interpolate | ( | double | x, | |
double | a1, | |||
double | diff_a, | |||
int | b1, | |||
int | num_b, | |||
double * | data | |||
) | [inline] |
double lin_map | ( | double | x, | |
double | a1, | |||
double | diff_a, | |||
double | b1, | |||
double | diff_b | |||
) | [inline] |
int lin_map | ( | double | x, | |
double | a1, | |||
double | diff_a, | |||
int | b1, | |||
int | num_b | |||
) | [inline] |
double lin_map | ( | int | x, | |
int | a1, | |||
int | num_a, | |||
double | b1, | |||
double | diff_b | |||
) | [inline] |
double lin_map | ( | int | x, | |
int | a1, | |||
int | num_a, | |||
int | b1, | |||
int | num_b | |||
) | [inline] |
double Linear2dB | ( | double | LinearValue | ) |
Referenced by OptAmplifier::AddRippleToGain(), Histogram::ConditionalMultipleSelectiveImport(), Histogram2D::GetLevelCurvesMultipleHeuristicBalanceImport(), Histogram2D::GetLevelCurvesMultipleHeuristicBalanceImportVarianceWeighted(), Histogram2D::GetLevelCurvesMultipleSelectMaxRelNumHitsImport(), ReceiverSemiAnalytical::GetLimaParameters(), ChiSquareReceiver::GetOSNR_dB(), ReduPolDepAttenuator::GetPolDepAttenuationPowerX(), ReduPolDepAttenuator::GetPolDepAttenuationPowerY(), Linear2dB_Limited(), Histogram2D::MergeMultipleConditionalHeuristicBalance(), Histogram::MergeMultipleConditionalHeuristicBalance(), Histogram2D::MultipleHeuristicBalanceImport(), Histogram::MultipleHeuristicBalanceImport(), Histogram::MultipleImport(), Histogram2D::MultipleSelectMaxRelNumHitsImport(), Histogram::MultipleSelectMaxRelNumHitsImport(), OptSpectrumAnalyzer::OutputSNR_OSA(), ReceiverSubsystem::ReceiveSignalBackToBack(), ReceiverSemiAnalytical::ReceiveSignalBackToBackMonteCarlo(), OptAmplifier::WriteGainProfile(), ReceiverSubsystem::WriteStats(), and ReceiverSemiAnalytical::WriteStats().
double Linear2dB_Limited | ( | double | LinearValue, | |
double | MaxValue_dB | |||
) |
double Linear2dBm | ( | double | LinearPower | ) |
Referenced by ReduOptAmplifier::AmplifyOptSignal(), OptAmplifier::AmplifyOptSignal(), OptAmplifier::AmplifyWithUserDefinedGain(), OptAmplifier::ComputeGainForFixedOutputPower(), OptSpectrumAnalyzer::GetPeakPowerdBm(), OptSpectrumAnalyzer::GetValleyPowerdBm(), OptSignal::OptSignal(), OptSpectrumAnalyzer::OutputOSA(), OptSpectrumAnalyzer::OutputPowerMeter(), OptSpectrumAnalyzer::OutputSNR_OSA(), RamanAmp::PrepareNextStep(), RamanAmp::WriteAveragePowerdBm(), OptSignal::WriteAveragePowerdBm(), OptSignal::WriteFileFreqPowerdBm(), and OptSignal::WritePowerdBmFreqWindow().
int lock_or_unlock_mosix | ( | int | what | ) |
void MaxAndArgMax | ( | double * | Vec, | |
int | Length, | |||
double & | MaxValue, | |||
int & | ArgMax | |||
) |
double MaxOfArray | ( | double * | Array, | |
int | Length | |||
) |
Returns the maximum element of the array Array.
Referenced by ChiSquareReceiver::ComputePDFAtTimeValue().
void MGeneralRotation | ( | double | angle, | |
double * | r_vec, | |||
double | MMatrix[][3] | |||
) |
References Multiply(), sq(), and sqrt().
double min | ( | double | a, | |
double | b | |||
) | [inline] |
void MinAndArgMin | ( | double * | Vec, | |
int | Length, | |||
double & | MinValue, | |||
int & | ArgMin | |||
) |
double MinOfArray | ( | double * | Array, | |
int | Length | |||
) |
Returns the minimum element of the array Array.
Referenced by ChiSquareReceiver::ComputePDFAtTimeValue().
void MRotatesAboutX | ( | double | angle, | |
double | MMatrix[][3] | |||
) |
void MRotatesAboutY | ( | double | angle, | |
double | MMatrix[][3] | |||
) |
void MRotatesAboutZ | ( | double | angle, | |
double | MMatrix[][3] | |||
) |
void Multiply | ( | double | Left[][3], | |
double | Right[][3] | |||
) |
Referenced by MGeneralRotation().
void Multiply | ( | double | Left[][3], | |
double | Right[3] | |||
) |
void my_error | ( | char * | spruch | ) |
References cfftw::freq(), cfftw::give_N(), cfftw::IFFT(), and sq().
Referenced by OptFilter::FilterOptSignal_OLD(), OptSignal::GenerateSignalStringGaussianOrSech(), OptSignal::GenerateSignalStringGaussianOrSechWithPhaseShift(), OptSignal::GenerateSignalStringRZGaussianPattern(), OptSignal::GenerateSignalStringUsingInputSequence(), and OptSignal::InitializeFirstOrderPMDSignal().
double peak_power | ( | cplx * | in, | |
int | N | |||
) |
int Periodicity | ( | int | ii, | |
int | Periodicity | |||
) |
Referenced by OptSignal::ChangeAbsoluteCenterFreq(), Photodetector::ComputeWorkSumDelayedHalfBitPeriodThenSquare(), ElecEqualizer::EqualizeBitIntensityWiener(), ElecEqualizer::EqualizeBitIntensityWienerCplx(), ElecEqualizer::EqualizeBitIntensityWienerReal(), ElecSignalStat::GetClockTimeForMonteCarloEye(), ElecSignalStat::GetIntegralForSignalNoiseVariance(), ElecSignalStat::GetMeanCurrentIsolatedBit0(), ElecSignalStat::GetMeanCurrentIsolatedBit1(), ElecSignalStat::GetStdDevSignal_ASE_BitSlot(), ElecSignalStat::GetStdDevSignal_ASE_TimeIndex(), ElecSignalStat::GetTargetIndexTimeBestMinEyeOpening(), ElecSignalStat::GetTargetIndexTimeBestQ_Factor(), ElecSignalStat::UpdateEqualizedPerformanceStatistics(), ElecSignalStat::UpdateMoments(), ElecSignalStat::UpdatePerformanceStatistics(), ElecSignalStat::WriteFileEyeDiagram(), ElecEqualizer::WriteFileEyeDiagram(), and ElecSignalStat::WriteFileEyeDiagramFixedCLK().
void powell | ( | float | p[], | |
float | xi[][4], | |||
int | n, | |||
float | ftol, | |||
int * | iter, | |||
float * | fret, | |||
float(*)(float[]) | func | |||
) |
References free_nrvector(), ITMAX, linmin(), nrerror(), nrvector(), and SQR.
double pulse_energy | ( | cplx * | in, | |
int | N, | |||
double | width | |||
) |
double Quadrature | ( | double * | Data, | |
int | NumPts, | |||
double | LeftEndPt, | |||
double | RightEndPt | |||
) |
Computes $^RightEndPt f(x) dx, where function is given by Data[k] = f(LeftEndPt + k*Delta) with Delta = (RightEndPt - LeftEndPt)/(NumPts-1)
So Data[0] = f(LeftEndPt) and Data[NumPts-1] = RightEndPt The method uses Simpson's rule, which estimates the integral as
Integral = Delta/3( f(x_0) + 4[f(x_1) + f(x_3) +... f(x_{n-3}) + f(x_{n-1})] + 2[f(x_2) + f(x_4) +... f(x_{n-2})] + f(x_n) )
where n is even.
For us if NumPts is odd then n=NumPts-1, and if NumPts is even then n=NumPts-2, and we use Simpson on the subarray of the first NumPts-1 points, with the final part of the integral being done using trapezoid rule with 2 points.
If NumPts < 5 then Simpson's rule doesn't really apply and so we just use Trapezoid rule.
Integral=0.0;
for(int ii=0;ii < NumPts;ii++) Integral+=Data[ii];
Integral *= Delta;
Referenced by ElecSignalStat::ComputeAveragePDFs(), GaussianReceiver::ComputeAveragePDFs(), ChiSquareReceiver::ComputeGaussianPDFsAndBER(), Histogram2D::ComputeIntegralPDF(), OptSignal::ComputeMeanFreqSignal(), OptSignal::ComputeMeanPhasePulse(), OptSignal::ComputeMeanTimePulse(), Histogram2D::ComputeMeanX_PDF(), Histogram2D::ComputeMeanY_PDF(), ElecSignalStat::ComputeMinimumBERAndDecisionThreshold(), GaussianReceiver::ComputeMinimumBERAndDecisionThreshold(), ChiSquareReceiver::ComputeMinimumBERAndDecisionThreshold(), ChiSquareReceiver::ComputeMomentsInEachBit(), ChiSquareReceiver::ComputePDFAtTimeValue(), OptSignal::ComputeRMSPulseWidth(), Histogram2D::ComputeXMarginalPDF(), Histogram2D::ComputeYMarginalPDF(), and OptSignal::GetEnergyInTimeRange().
float ranG | ( | long * | ) |
void RotatesAboutX | ( | double | angle, | |
double * | Vector | |||
) |
Referenced by OptFiber::GetFiberSampleImportSamplingCosRx(), OptFiber::GetFiberSampleImportSamplingExp(), OptFiber::GetFiberSampleImportSamplingFstSndOrderPDV_Exp(), OptFiber::GetFiberSampleImportSamplingFstSndOrderPDV_VariableAngleExp(), OptFiber::GetFiberSampleImportSamplingSndOrderPDV_Exp(), OptFiber::GetFiberSampleImportSamplingSndOrderPDV_VariableAngleExp(), OptFiber::GetHeuristicBalanceForSndOrderPDV_VariableAngleExp(), ReduOptFiber::GetInPD_Vector(), OptFiber::GetInPD_Vector(), ReduOptFiber::GetOutPD_Vector(), OptFiber::GetOutPD_Vector(), OptFiber::GetSndOrderOutPD_Vector(), OptFiber::GetThirdOrderOutPD_Vector(), ReduOptFiber::PropagateFiberCoupledNLS(), OptFiberLocalError::PropagateOutputPDVector(), OptFiber::RotateThroughFiber(), ReduPolarizTransformer::TransformPolarization(), PolarizTransformer::TransformPolarization(), TransRzRxV3to_Xhat(), ReduPolarizTransformer::UndoLastPolarizTransformation(), and PolarizTransformer::UndoLastPolarizTransformation().
void RotatesAboutY | ( | double | angle, | |
double * | Vector | |||
) |
Referenced by ReduOptAmplifier::AddPolDepGainEffect(), OptFiber::GetFiberSampleImportSamplingCosRx(), OptFiber::GetFiberSampleImportSamplingExp(), OptFiber::GetFiberSampleImportSamplingFstSndOrderPDV_Exp(), OptFiber::GetFiberSampleImportSamplingFstSndOrderPDV_VariableAngleExp(), OptFiber::GetFiberSampleImportSamplingSndOrderPDV_Exp(), OptFiber::GetFiberSampleImportSamplingSndOrderPDV_VariableAngleExp(), OptFiber::GetHeuristicBalanceForSndOrderPDV_VariableAngleExp(), ReduOptFiber::GetInPD_Vector(), OptFiber::GetInPD_Vector(), ReduOptFiber::GetOutPD_Vector(), OptFiber::GetOutPD_Vector(), OptFiber::GetSndOrderOutPD_Vector(), OptFiber::GetThirdOrderOutPD_Vector(), OptAmplifier::PolDepAmplification(), ReduOptFiber::PropagateFiberCoupledNLS(), OptFiberLocalError::PropagateOutputPDVector(), OptFiber::RotateThroughFiber(), ReduPolarizTransformer::TransformPolarization(), PolarizTransformer::TransformPolarization(), TransRyV3to_YZ(), TransRzRyV3to_Xhat(), ReduPolarizTransformer::UndoLastPolarizTransformation(), and PolarizTransformer::UndoLastPolarizTransformation().
void RotatesAboutZ | ( | double | angle, | |
double * | Vector | |||
) |
Referenced by ReduOptAmplifier::AddPolDepGainEffect(), OptFiber::GetFiberSampleImportSamplingCosRx(), OptFiber::GetFiberSampleImportSamplingExp(), OptFiber::GetFiberSampleImportSamplingFstSndOrderPDV_Exp(), OptFiber::GetFiberSampleImportSamplingFstSndOrderPDV_VariableAngleExp(), OptFiber::GetFiberSampleImportSamplingSndOrderPDV_Exp(), OptFiber::GetFiberSampleImportSamplingSndOrderPDV_VariableAngleExp(), OptFiber::GetHeuristicBalanceForSndOrderPDV_VariableAngleExp(), ReduOptFiber::GetInPD_Vector(), OptFiber::GetInPD_Vector(), ReduOptFiber::GetOutPD_Vector(), OptFiber::GetOutPD_Vector(), OptFiber::GetSndOrderOutPD_Vector(), OptFiber::GetThirdOrderOutPD_Vector(), OptAmplifier::PolDepAmplification(), ReduOptFiber::PropagateFiberCoupledNLS(), OptFiber::RotateThroughFiber(), ReduPolarizTransformer::TransformPolarization(), PolarizTransformer::TransformPolarization(), TransRzRxV3to_Xhat(), TransRzRyV3to_Xhat(), ReduPolarizTransformer::UndoLastPolarizTransformation(), and PolarizTransformer::UndoLastPolarizTransformation().
void RotatesAboutZ | ( | double | angle, | |
cplx * | JonesVector | |||
) |
double ScalarProduct | ( | double * | VectorA, | |
double * | VectorB | |||
) |
int sgn | ( | double | x | ) | [inline] |
int slow_mosix | ( | void | ) |
double soliton | ( | double | t, | |
double | t0, | |||
double | eta | |||
) | [inline] |
void spline | ( | double * | x, | |
double * | y, | |||
int | n, | |||
double | yp1, | |||
double | ypn, | |||
double * | y2 | |||
) |
Referenced by OptSignal::GenerateSignalStringUsingInputSequence().
double splint | ( | double * | xa, | |
double * | ya, | |||
double * | y2a, | |||
int | n, | |||
double | x | |||
) |
References nrerror().
Referenced by OptSignal::GenerateSignalStringUsingInputSequence().
T sq | ( | T | in | ) | [inline] |
void Stokes2Jones | ( | const double * | Stokes, | |
cplx * | Jones | |||
) |
void Stokes2JonesKeepPower | ( | const double * | Stokes, | |
cplx * | Jones | |||
) |
References sq(), sqrt(), and Stokes2Jones().
void TransRyV3to_YZ | ( | double * | Vector, | |
double * | thetaY | |||
) |
References pi, RotatesAboutY(), sgn(), and sq().
Referenced by OptFiber::GetFiberSampleImportSamplingFstSndOrderPDV_Exp(), OptFiber::GetFiberSampleImportSamplingFstSndOrderPDV_VariableAngleExp(), OptFiber::GetFiberSampleImportSamplingSndOrderPDV_Exp(), OptFiber::GetFiberSampleImportSamplingSndOrderPDV_VariableAngleExp(), and OptFiber::GetHeuristicBalanceForSndOrderPDV_VariableAngleExp().
void TransRzRxV3to_Xhat | ( | double * | Vector, | |
double * | thetaZthetaX | |||
) |
References pi, RotatesAboutX(), RotatesAboutZ(), and TransRzRxV3to_Xhat().
Referenced by TransRzRxV3to_Xhat(), and TransRzRxV3toXhat().
void TransRzRxV3to_Xhat | ( | double * | Vector, | |
double * | thetaZ, | |||
double * | thetaX | |||
) |
References pi, RotatesAboutX(), RotatesAboutZ(), and sq().
void TransRzRxV3toXhat | ( | double * | Vector, | |
double * | thetaZthetaY | |||
) |
References pi, and TransRzRxV3to_Xhat().
void TransRzRyV3to_Xhat | ( | double * | Vector, | |
double * | thetaZthetaY | |||
) |
References pi, RotatesAboutY(), RotatesAboutZ(), and sq().
Referenced by ReduOptAmplifier::AddPolDepGainEffect(), OptFiber::GetFiberSampleImportSamplingCosRx(), OptFiber::GetFiberSampleImportSamplingExp(), OptFiber::GetFiberSampleImportSamplingFstSndOrderPDV_Exp(), OptFiber::GetFiberSampleImportSamplingFstSndOrderPDV_VariableAngleExp(), OptFiber::GetFiberSampleImportSamplingSndOrderPDV_Exp(), OptFiber::GetFiberSampleImportSamplingSndOrderPDV_VariableAngleExp(), OptFiber::GetHeuristicBalanceForSndOrderPDV_VariableAngleExp(), ReduPolarizTransformer::GetImportSampPolarizTransformation(), OptAmplifier::SetPolDepGainPolarization(), and TransRzRyV3toXhat().
void TransRzRyV3toXhat | ( | double * | Vector, | |
double * | thetaZthetaY | |||
) |
References pi, and TransRzRyV3to_Xhat().
void URotatesAboutZ | ( | double | angle, | |
cplx | UMatrix[][2] | |||
) |
double Wavelength2Frequency | ( | double | Wavelength | ) |
References LightSpeed.
Referenced by OptAmplifier::BackwardStep(), OptAmplifier::CalculateUpperN(), OptSignal::ConstructOptSignal(), OptAmplifier::FirstGuessForward(), RamanAmp::ForwardLastRound(), RamanAmp::GetRamanGain(), RamanAmp::GetRamanGainFreqGrid(), RamanAmp::GetRamanPowerFreqIndex(), RamanAmp::GetTempDepFactor(), OptAmplifier::GetTempDepFactor(), OptFiber::OptFiber(), OptFiberLocalError::OptFiberLocalError(), OptAmplifier::OptimizeForward(), RamanAmp::OptimizeForwardIntegrationLastRound(), ReduOptSignal::ProcessReduOptSignalParameters(), and ReduOptSignal::ReduOptSignal().