Commit 205855ac authored by Oliver Bock's avatar Oliver Bock

Correcting for beam intensity peak offset in texture (to match profile)

parent f0c1773c
......@@ -679,9 +679,16 @@ void PulsarAnimationWidget::setPulsarMagneticAxisInclination(const int degrees)
void PulsarAnimationWidget::setPulsarBeamAngle(const int degrees)
{
m_pulsarBeamAngle = degrees;
double beamTexturePeakCorrectionFactor = 0.83;
double correctedOuterRadius;
// compute visual radius
m_pulsarBeamOuterRadius = tan(deg2rad * degrees * 0.5f) * m_pulsarBeamLength;
// compute corrected angle for pulse profile
correctedOuterRadius = m_pulsarBeamOuterRadius * beamTexturePeakCorrectionFactor;
m_pulsarBeamAngle = 2 * atan(correctedOuterRadius / m_pulsarBeamLength) * 180.0/PI;
updatePulseProfile();
updateGL();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment