#include <ocsOptSpectrumAnalyzer.hh>
Public Member Functions | |
OptSpectrumAnalyzer (string InFileName, string Job2, int AppendFlag2, OptSignal *oOptSignal2) | |
OptSpectrumAnalyzer (OptSignal *oOptSignal2, double ResolutionBandwidthHz2, int ModeOSA2, double SuperGaussExponent2) | |
OptSpectrumAnalyzer (OptSignal *oOptSignal2, double ResolutionBandwidthHz2, int ModeOSA2, double SuperGaussExponent2, int TypeAmplifierNoise2) | |
~OptSpectrumAnalyzer () | |
void | AllocateMemory (void) |
void | Update (double PropagatedLength2) |
void | Output (int NumExpts) |
double | GetPeakPowerdBm (int ChannelArrayIndex, int ExptNum) |
double | GetValleyPowerdBm (int ChannelArrayIndex, int ExptNum) |
void | Clear () |
void | UpdateSNR_OSA (double PropagatedLength2) |
double | ComputeAveragePowerFreqWindow (double LeftFreq, double RightFreq) |
void | OutputSignalNoiseAverages (int NumExpts) |
void | OutputSNR_OSA (int NumExpts) |
void | OutputSNR_OSA (int NumExpts, string Str) |
void | WriteFileOutputOSA (string OutFileName, int ExptNum) |
void | UpdateOSA (double PropagatedLength2) |
void | UpdateOSA_OLD (double PropagatedLength2) |
void | ComputeAveragePowerFreqWindowOSA (double LeftFreq, double RightFreq, double *Average_Watts) |
double | ComputeMaxPowerLinFreqWindowOSA (double LeftFreq, double RightFreq) |
double | GetNoiseEquivalentBandwidth (void) |
void | OutputOSA (int ExptNum) |
void | OutputOSA (int ExptNum, string Str) |
double | GetSNR_OSA (int ChannelArrayIndex) |
double | GetSNRdB_OSA (int ChannelArrayIndex) |
double | GetSignalOSA (int ChannelArrayIndex) |
double | GetNoiseOSA (int ChannelArrayIndex) |
double | GetNoiseSpectralDensityOSA (int ChannelArrayIndex) |
double | GetSpectralNoiseDensityOSA (int ChannelArrayIndex) |
double | GetResolutionBandwidthHz (void) |
void | SwitchOptSignalData (OptSignal *oOptSignal2) |
void | RunPowerMeter (double PropagatedLength2) |
void | ClearPowerMeter (void) |
void | OutputPowerMeter (void) |
double | AmpPowerMeterInputLinear (void) |
double | PowerMeterComputeAverageSignalPowerLin (void) |
void | SetJob (string Job2) |
void | SetResolutionBandwidthHz (double ResolutionBandwidthHz2) |
void | SetSuperGaussExponent (double SuperGaussExponent2) |
void | SetModeOSA (int ModeOSA2) |
void | SetTypeAmplifierNoise (int TypeAmplifierNoise2) |
void | SetPowerMeterFlag (int PowerMeterFlag2) |
int | GetNumChanns (void) |
double | GetOSAOutputLinear (int ExptNum, double RelFreq) |
Private Attributes | |
OptSignal * | oOptSignal |
cfftw * | fft |
cplx * | fPowerSignal |
cplx * | fOSA |
cplx * | tPowerSignal |
cplx * | tOSA |
int | ModeOSA |
int | TypeAmplifierNoise |
int | PowerMeterFlag |
string | Job |
double | PropagatedLength |
double | AppendFlag |
double | ResolutionBandwidthHz |
double * | SignalPeakLin |
double * | NoiseAverageLin |
int | NumChannels |
int | qtPoints |
double | DeltaFreq |
double | SuperGaussExponent |
OptSpectrumAnalyzer::OptSpectrumAnalyzer | ( | string | InFileName, | |
string | Job2, | |||
int | AppendFlag2, | |||
OptSignal * | oOptSignal2 | |||
) |
References AllocateMemory(), AppendFlag, DeltaFreq, OptSignal::fft, fft, OptSignal::GetDeltaFreq(), OptSignal::GetNumChannels(), OptSignal::GetQtPoints(), Job, LogFile, LogFileSeparator(), LOWER_AND_UPPER, LOWER_ONLY, ModeOSA, NumChannels, oOptSignal, OPTIONAL_NO_WARNING, OPTIONAL_WARNING, PowerMeterFlag, qtPoints, ReadDouble(), ReadInt(), ResolutionBandwidthHz, SuperGaussExponent, and TypeAmplifierNoise.
OptSpectrumAnalyzer::OptSpectrumAnalyzer | ( | OptSignal * | oOptSignal2, | |
double | ResolutionBandwidthHz2, | |||
int | ModeOSA2, | |||
double | SuperGaussExponent2 | |||
) |
OptSpectrumAnalyzer::OptSpectrumAnalyzer | ( | OptSignal * | oOptSignal2, | |
double | ResolutionBandwidthHz2, | |||
int | ModeOSA2, | |||
double | SuperGaussExponent2, | |||
int | TypeAmplifierNoise2 | |||
) |
OptSpectrumAnalyzer::~OptSpectrumAnalyzer | ( | ) |
References fOSA, fPowerSignal, NoiseAverageLin, SignalPeakLin, tOSA, and tPowerSignal.
void OptSpectrumAnalyzer::AllocateMemory | ( | void | ) |
References fOSA, fPowerSignal, NoiseAverageLin, NumChannels, qtPoints, SignalPeakLin, tOSA, and tPowerSignal.
Referenced by OptSpectrumAnalyzer().
double OptSpectrumAnalyzer::AmpPowerMeterInputLinear | ( | void | ) |
void OptSpectrumAnalyzer::Clear | ( | ) |
References fOSA, qtPoints, and tOSA.
Referenced by UpdateOSA(), and UpdateOSA_OLD().
void OptSpectrumAnalyzer::ClearPowerMeter | ( | void | ) |
References fOSA, qtPoints, and tOSA.
Referenced by AmpPowerMeterInputLinear(), and RunPowerMeter().
double OptSpectrumAnalyzer::ComputeAveragePowerFreqWindow | ( | double | LeftFreq, | |
double | RightFreq | |||
) |
void OptSpectrumAnalyzer::ComputeAveragePowerFreqWindowOSA | ( | double | LeftFreq, | |
double | RightFreq, | |||
double * | Average_Watts | |||
) |
double OptSpectrumAnalyzer::ComputeMaxPowerLinFreqWindowOSA | ( | double | LeftFreq, | |
double | RightFreq | |||
) |
References DeltaFreq, fOSA, OptSignal::GetCenterFreq(), OptSignal::GetQtPoints(), oOptSignal, and qtPoints.
Referenced by UpdateSNR_OSA().
double OptSpectrumAnalyzer::GetNoiseEquivalentBandwidth | ( | void | ) |
References DeltaFreq, log(), ModeOSA, ResolutionBandwidthHz, and SuperGaussExponent.
double OptSpectrumAnalyzer::GetNoiseOSA | ( | int | ChannelArrayIndex | ) | [inline] |
References NoiseAverageLin.
Referenced by GetSNR_OSA().
double OptSpectrumAnalyzer::GetNoiseSpectralDensityOSA | ( | int | ChannelArrayIndex | ) | [inline] |
References NoiseAverageLin, and ResolutionBandwidthHz.
Referenced by GetSpectralNoiseDensityOSA().
int OptSpectrumAnalyzer::GetNumChanns | ( | void | ) | [inline] |
References NumChannels.
double OptSpectrumAnalyzer::GetOSAOutputLinear | ( | int | ExptNum, | |
double | RelFreq | |||
) |
References DeltaFreq, fft, cfftw::fftshift(), fOSA, OptSignal::GetFreqWindow(), cfftw::ifftshift(), and oOptSignal.
double OptSpectrumAnalyzer::GetPeakPowerdBm | ( | int | ChannelArrayIndex, | |
int | ExptNum | |||
) |
References DeltaFreq, fft, cfftw::fftshift(), fOSA, OptSignal::GetCenterFreq(), OptSignal::GetFrequency(), cfftw::ifftshift(), Linear2dBm(), oOptSignal, and qtPoints.
double OptSpectrumAnalyzer::GetResolutionBandwidthHz | ( | void | ) | [inline] |
References ResolutionBandwidthHz.
double OptSpectrumAnalyzer::GetSignalOSA | ( | int | ChannelArrayIndex | ) | [inline] |
References NoiseAverageLin, and SignalPeakLin.
Referenced by GetSNR_OSA().
double OptSpectrumAnalyzer::GetSNR_OSA | ( | int | ChannelArrayIndex | ) | [inline] |
References GetNoiseOSA(), and GetSignalOSA().
Referenced by GetSNRdB_OSA().
double OptSpectrumAnalyzer::GetSNRdB_OSA | ( | int | ChannelArrayIndex | ) | [inline] |
References GetSNR_OSA().
double OptSpectrumAnalyzer::GetSpectralNoiseDensityOSA | ( | int | ChannelArrayIndex | ) | [inline] |
References GetNoiseSpectralDensityOSA().
double OptSpectrumAnalyzer::GetValleyPowerdBm | ( | int | ChannelArrayIndex, | |
int | ExptNum | |||
) |
References DeltaFreq, fft, cfftw::fftshift(), fOSA, OptSignal::GetCenterFreq(), OptSignal::GetFrequency(), cfftw::ifftshift(), Linear2dBm(), oOptSignal, and qtPoints.
void OptSpectrumAnalyzer::Output | ( | int | NumExpts | ) |
References OutputOSA(), and OutputSNR_OSA().
void OptSpectrumAnalyzer::OutputOSA | ( | int | ExptNum | ) |
References DeltaFreq, fft, cfftw::fftshift(), fOSA, Frequency2Wavelength(), OptSignal::GetCenterFreq(), OptSignal::GetFreqWindow(), cfftw::ifftshift(), Job, Linear2dBm(), oOptSignal, PropagatedLength, and qtPoints.
Referenced by Output().
void OptSpectrumAnalyzer::OutputOSA | ( | int | ExptNum, | |
string | Str | |||
) |
void OptSpectrumAnalyzer::OutputPowerMeter | ( | void | ) |
References Job, Linear2dBm(), NumChannels, PropagatedLength, and SignalPeakLin.
Referenced by RunPowerMeter().
void OptSpectrumAnalyzer::OutputSignalNoiseAverages | ( | int | NumExpts | ) |
void OptSpectrumAnalyzer::OutputSNR_OSA | ( | int | NumExpts, | |
string | Str | |||
) |
References AppendFlag, Job, Linear2dB(), Linear2dBm(), NoiseAverageLin, NumChannels, PropagatedLength, and SignalPeakLin.
void OptSpectrumAnalyzer::OutputSNR_OSA | ( | int | NumExpts | ) |
References AppendFlag, Job, Linear2dB(), Linear2dBm(), NoiseAverageLin, NumChannels, PropagatedLength, and SignalPeakLin.
Referenced by Output().
double OptSpectrumAnalyzer::PowerMeterComputeAverageSignalPowerLin | ( | void | ) |
References NumChannels, and SignalPeakLin.
Referenced by AmpPowerMeterInputLinear().
void OptSpectrumAnalyzer::RunPowerMeter | ( | double | PropagatedLength2 | ) |
References ClearPowerMeter(), ModeOSA, OutputPowerMeter(), PowerMeterFlag, SuperGaussExponent, UpdateOSA(), UpdateOSA_OLD(), and UpdateSNR_OSA().
Referenced by PostDispCompSubSystem::ApplyPostDispCompUMBCCienaLoopApr2001(), OptDataWriter::WriteEndMap(), OptDataWriter::WriteInitialData(), and OptDataWriter::WriteWithinMap().
void OptSpectrumAnalyzer::SetJob | ( | string | Job2 | ) | [inline] |
References Job.
Referenced by OptDataWriter::OptDataWriter().
void OptSpectrumAnalyzer::SetModeOSA | ( | int | ModeOSA2 | ) | [inline] |
References ModeOSA.
Referenced by OptAmplifier::OptAmplifier().
void OptSpectrumAnalyzer::SetPowerMeterFlag | ( | int | PowerMeterFlag2 | ) | [inline] |
References PowerMeterFlag.
Referenced by OptAmplifier::OptAmplifier().
void OptSpectrumAnalyzer::SetResolutionBandwidthHz | ( | double | ResolutionBandwidthHz2 | ) | [inline] |
References ResolutionBandwidthHz.
Referenced by OptAmplifier::OptAmplifier().
void OptSpectrumAnalyzer::SetSuperGaussExponent | ( | double | SuperGaussExponent2 | ) | [inline] |
References SuperGaussExponent.
Referenced by OptAmplifier::OptAmplifier().
void OptSpectrumAnalyzer::SetTypeAmplifierNoise | ( | int | TypeAmplifierNoise2 | ) | [inline] |
References TypeAmplifierNoise.
Referenced by OptAmplifier::OptAmplifier(), and OptAmplifier::SetTypeAmplifierNoise().
void OptSpectrumAnalyzer::SwitchOptSignalData | ( | OptSignal * | oOptSignal2 | ) |
References OptSignal::fft, fft, OptSignal::GetQtPoints(), oOptSignal, and qtPoints.
void OptSpectrumAnalyzer::Update | ( | double | PropagatedLength2 | ) |
References ModeOSA, SuperGaussExponent, UpdateOSA(), UpdateOSA_OLD(), and UpdateSNR_OSA().
void OptSpectrumAnalyzer::UpdateOSA | ( | double | PropagatedLength2 | ) |
References Clear(), DeltaFreq, cfftw::FFT(), fft, fftMatrices::fOptSignalX, fftMatrices::fOptSignalY, fOSA, fPowerSignal, OptSignal::GetAccumulatedTotalNoiseSpectralDensityGaussianStatistics(), OptSignal::GetDeltaTime(), OptSignal::GetTimeWindow(), OptSignal::GetTypeSimulation(), cfftw::IFFT(), log(), ModeOSA, oOptSignal, pi, PropagatedLength, qtPoints, ResolutionBandwidthHz, OptSignal::sfftM, sq(), sqrt(), SuperGaussExponent, tOSA, tPowerSignal, and TypeAmplifierNoise.
Referenced by AmpPowerMeterInputLinear(), RunPowerMeter(), and Update().
void OptSpectrumAnalyzer::UpdateOSA_OLD | ( | double | PropagatedLength2 | ) |
References Clear(), DeltaFreq, fft, cfftw::fftshift(), fftMatrices::fOptSignalX, fftMatrices::fOptSignalY, fOSA, fPowerSignal, OptSignal::GetAccumulatedTotalNoiseSpectralDensityGaussianStatistics(), OptSignal::GetFreqWindow(), OptSignal::GetTypeSimulation(), cfftw::ifftshift(), log(), oOptSignal, PropagatedLength, qtPoints, ResolutionBandwidthHz, OptSignal::sfftM, sq(), SuperGaussExponent, and TypeAmplifierNoise.
Referenced by AmpPowerMeterInputLinear(), RunPowerMeter(), and Update().
void OptSpectrumAnalyzer::UpdateSNR_OSA | ( | double | PropagatedLength2 | ) |
References ComputeMaxPowerLinFreqWindowOSA(), OptSignal::GetCenterFreq(), OptSignal::GetChannSpacing(), OptSignal::GetFrequency(), NoiseAverageLin, NumChannels, oOptSignal, PropagatedLength, ResolutionBandwidthHz, and SignalPeakLin.
Referenced by AmpPowerMeterInputLinear(), RunPowerMeter(), and Update().
void OptSpectrumAnalyzer::WriteFileOutputOSA | ( | string | OutFileName, | |
int | ExptNum | |||
) |
References DeltaFreq, fft, cfftw::fftshift(), fOSA, OptSignal::GetFreqWindow(), cfftw::ifftshift(), oOptSignal, and qtPoints.
double OptSpectrumAnalyzer::AppendFlag [private] |
Referenced by OptSpectrumAnalyzer(), and OutputSNR_OSA().
double OptSpectrumAnalyzer::DeltaFreq [private] |
cfftw* OptSpectrumAnalyzer::fft [private] |
cplx* OptSpectrumAnalyzer::fOSA [private] |
cplx* OptSpectrumAnalyzer::fPowerSignal [private] |
Referenced by AllocateMemory(), UpdateOSA(), UpdateOSA_OLD(), and ~OptSpectrumAnalyzer().
string OptSpectrumAnalyzer::Job [private] |
Referenced by OptSpectrumAnalyzer(), OutputOSA(), OutputPowerMeter(), OutputSNR_OSA(), and SetJob().
int OptSpectrumAnalyzer::ModeOSA [private] |
Referenced by AmpPowerMeterInputLinear(), GetNoiseEquivalentBandwidth(), OptSpectrumAnalyzer(), RunPowerMeter(), SetModeOSA(), Update(), and UpdateOSA().
double* OptSpectrumAnalyzer::NoiseAverageLin [private] |
Referenced by AllocateMemory(), GetNoiseOSA(), GetNoiseSpectralDensityOSA(), GetSignalOSA(), OutputSNR_OSA(), UpdateSNR_OSA(), and ~OptSpectrumAnalyzer().
int OptSpectrumAnalyzer::NumChannels [private] |
OptSignal* OptSpectrumAnalyzer::oOptSignal [private] |
int OptSpectrumAnalyzer::PowerMeterFlag [private] |
Referenced by AmpPowerMeterInputLinear(), OptSpectrumAnalyzer(), RunPowerMeter(), and SetPowerMeterFlag().
double OptSpectrumAnalyzer::PropagatedLength [private] |
Referenced by OutputOSA(), OutputPowerMeter(), OutputSNR_OSA(), UpdateOSA(), UpdateOSA_OLD(), and UpdateSNR_OSA().
int OptSpectrumAnalyzer::qtPoints [private] |
double OptSpectrumAnalyzer::ResolutionBandwidthHz [private] |
double* OptSpectrumAnalyzer::SignalPeakLin [private] |
double OptSpectrumAnalyzer::SuperGaussExponent [private] |
cplx* OptSpectrumAnalyzer::tOSA [private] |
Referenced by AllocateMemory(), Clear(), ClearPowerMeter(), UpdateOSA(), and ~OptSpectrumAnalyzer().
cplx* OptSpectrumAnalyzer::tPowerSignal [private] |
Referenced by AllocateMemory(), UpdateOSA(), and ~OptSpectrumAnalyzer().
int OptSpectrumAnalyzer::TypeAmplifierNoise [private] |
Referenced by OptSpectrumAnalyzer(), SetTypeAmplifierNoise(), UpdateOSA(), and UpdateOSA_OLD().