Commit 2427061a authored by Oliver Bock's avatar Oliver Bock

Finally fixed pulse profile computation

parent 9bb3716b
......@@ -657,12 +657,9 @@ void PulsarAnimationWidget::setPulsarMagneticAxisInclination(const int degrees)
void PulsarAnimationWidget::setPulsarBeamAngle(const int degrees)
{
// FIXME: get rid of this "Einstein constant!"
double radiusOffset = -0.27;
m_pulsarBeamAngle = degrees;
m_pulsarBeamOuterRadius = tan(deg2rad * degrees * 0.5f) * m_pulsarBeamLength + m_pulsarBeamRimSize * 0.5f + radiusOffset;
m_pulsarBeamOuterRadius = tan(deg2rad * degrees * 0.5f) * m_pulsarBeamLength + m_pulsarBeamRimSize * 0.5f;
m_pulsarBeamInnerRadius = m_pulsarBeamOuterRadius - m_pulsarBeamRimSize;
if(m_pulsarBeamInnerRadius < 0.0) m_pulsarBeamInnerRadius = 0.0;
updatePulseProfile();
......@@ -684,7 +681,7 @@ void PulsarAnimationWidget::updatePulseProfile()
const double deltaPhiRot = deg2rad * 1.0;
const double gamma = deg2rad * m_pulsarSpinAxisInclination;
const double alpha = deg2rad * m_pulsarMagneticAxisInclination;
const double beta = alpha - gamma;
const double beta = -alpha + gamma;
const double rho = deg2rad * m_pulsarBeamAngle * 0.5;
const double gaussProfile = 0.04;
......@@ -700,7 +697,7 @@ void PulsarAnimationWidget::updatePulseProfile()
// determine and store pulse amplitude
if(!isnan(W)){
m_pulseProfile[x] = exp(-2.0 * pow(phiRot -W, 2) / gaussProfile) + exp(-2.0 * pow(phiRot + W - 2.0 * PI, 2) / gaussProfile);
m_pulseProfile[x] = exp(-2.0 * pow(phiRot - W, 2) / gaussProfile) + exp(-2.0 * pow(phiRot + W - 2.0 * PI, 2) / gaussProfile);
}
else {
m_pulseProfile[x] = 0.0;
......
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