Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
einsteinathome
pulsatingscience
Commits
2427061a
Commit
2427061a
authored
Jul 23, 2010
by
Oliver Bock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finally fixed pulse profile computation
parent
9bb3716b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
src/pulsaranimationwidget.cpp
src/pulsaranimationwidget.cpp
+3
-6
No files found.
src/pulsaranimationwidget.cpp
View file @
2427061a
...
...
@@ -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.5
f
)
*
m_pulsarBeamLength
+
m_pulsarBeamRimSize
*
0.5
f
+
radiusOffset
;
m_pulsarBeamOuterRadius
=
tan
(
deg2rad
*
degrees
*
0.5
f
)
*
m_pulsarBeamLength
+
m_pulsarBeamRimSize
*
0.5
f
;
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment