#include "ocsReducedModelTools.hh"
#include "ocsConst.hh"
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <math.h>
Defines | |
#define | NR_END 1 |
#define | FREE_ARG char* |
#define | ITMAX 100 |
#define | EPS 3.0e-7 |
#define | FPMIN 1.0e-30 |
#define | ITMAX 100 |
#define | EPS 3.0e-7 |
Functions | |
void | TransRzRyV3to_Xhat (double *Vector, double *thetaZthetaY) |
void | TransRyV3to_YZ (double *Vector, double *thetaY) |
void | TransRzRxV3to_Xhat (double *Vector, double *thetaZthetaX) |
void | Multiply (double Left[][3], double Right[][3]) |
void | Multiply (double Left[][3], double Right[3]) |
void | CrossProduct (double *Left, double *Right, int FirstCoord) |
void | RotatesAboutZ (double angle, double *Vector) |
void | RotatesAboutX (double angle, double *Vector) |
void | RotatesAboutY (double angle, double *Vector) |
double | ScalarProduct (double *VectorA, double *VectorB) |
double | GetVectorLength (double *Vector, int Dimension) |
double | dB2Linear (double dBvalue) |
double | dBm2Linear (double dBmPower) |
double | Linear2dB (double LinearValue) |
double | Linear2dBm (double LinearPower) |
double | GetDegreeOfPolarization (double *StokesVector) |
double | GetPhase (const cplx Phasor) |
void | Stokes2Jones (const double *Stokes, cplx *Jones) |
void | Stokes2JonesKeepPower (const double *Stokes, cplx *Jones) |
void | Jones2Stokes (const cplx *Jones, double *Stokes) |
void | Jones2StokesKeepPower (const cplx *Jones, double *Stokes) |
double | Frequency2Wavelength (double Frequency) |
double | Wavelength2Frequency (double Wavelength) |
int | lock_or_unlock_mosix (int what) |
int | cpujob_mosix (void) |
int | slow_mosix (void) |
void | nrerror (char error_text[]) |
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) |
Variables | |
ofstream * | LogFile |
#define EPS 3.0e-7 |
#define FPMIN 1.0e-30 |
Referenced by gcf().
#define FREE_ARG char* |
#define ITMAX 100 |
#define ITMAX 100 |
#define NR_END 1 |
int cpujob_mosix | ( | void | ) |
void CrossProduct | ( | double * | Left, | |
double * | Right, | |||
int | FirstCoord | |||
) |
Referenced by GetRadiusCircle().
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 dBm2Linear | ( | double | dBmPower | ) |
float erffc | ( | float | x | ) |
Referenced by ReduOptSignal::GetOutageProbGaussian().
double Frequency2Wavelength | ( | double | Frequency | ) |
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().
float gammp | ( | float | a, | |
float | x | |||
) |
Referenced by erffc().
float gammq | ( | float | a, | |
float | x | |||
) |
Referenced by erffc().
double GetDegreeOfPolarization | ( | double * | StokesVector | ) |
Referenced by ReduOptAmplifier::AddPolDepGainEffect(), and OptAmplifier::SetPolDepGainPolarization().
double GetPhase | ( | const cplx | Phasor | ) |
double GetVectorLength | ( | double * | Vector, | |
int | Dimension | |||
) |
void Jones2Stokes | ( | const cplx * | Jones, | |
double * | Stokes | |||
) |
Referenced by OptFiber::GetNumOutPD_Vector(), Jones2StokesKeepPower(), and OptSignal::TestGetRandomJones().
void Jones2StokesKeepPower | ( | const cplx * | Jones, | |
double * | Stokes | |||
) |
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 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 Multiply | ( | double | Left[][3], | |
double | Right[3] | |||
) |
void Multiply | ( | double | Left[][3], | |
double | Right[][3] | |||
) |
Referenced by MGeneralRotation().
void nrerror | ( | char | error_text[] | ) |
Referenced by brent(), brentd(), ElecSignalStat::brentHu(), cmatrix(), convert_matrix(), cvector(), dmatrix(), dvector(), f3tensor(), frprmn(), frprmnd(), gammp(), gammq(), gaussj(), gaussj_complex(), gcf(), ElecSignalStat::GetBER_GaussianStatistics(), ElecSignalStat::GetQ_FactorGaussianStatisticsFromBER(), gser(), imatrix(), ivector(), lvector(), matrix(), nrvector(), powell(), splint(), ElecFilter::splint(), submatrix(), and zbrent().
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().
double ScalarProduct | ( | double * | VectorA, | |
double * | VectorB | |||
) |
int slow_mosix | ( | void | ) |
void Stokes2Jones | ( | const double * | Stokes, | |
cplx * | Jones | |||
) |
void Stokes2JonesKeepPower | ( | const double * | Stokes, | |
cplx * | Jones | |||
) |
void TransRyV3to_YZ | ( | double * | Vector, | |
double * | thetaY | |||
) |
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 | |||
) |
Referenced by TransRzRxV3to_Xhat(), and TransRzRxV3toXhat().
void TransRzRyV3to_Xhat | ( | double * | Vector, | |
double * | thetaZthetaY | |||
) |
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().
double Wavelength2Frequency | ( | double | Wavelength | ) |
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().
ofstream* LogFile |