Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sec23
korte
CORBASS
Commits
c0200f70
Commit
c0200f70
authored
May 26, 2020
by
Maximilian Schanner
Browse files
Some annotations
parent
b496dd5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
corbass/evaluation.py
View file @
c0200f70
...
...
@@ -158,8 +158,13 @@ def location(posterior, mu_dips, cov_dips, n_points=10000,
n
=
len
(
posterior
)
# calculate the density
# This should be similar to eq. (6) in Khokhlov 2006 and can be straight-
# forwardly calculated by integrating out the amplitude of the dipole
# vector in spherical coordinates (don't forget the transformation matrix!)
for
it
in
range
(
n
**
3
):
prc
=
np
.
linalg
.
inv
(
cov_dips
[
it
])
# the spherical coordinates are unusual, since the dipole coordinates
# are [z, x, y]
zv
=
np
.
array
([
np
.
sin
(
theta
),
np
.
cos
(
theta
)
*
np
.
cos
(
phi
),
np
.
cos
(
theta
)
*
np
.
sin
(
phi
)])
...
...
@@ -179,6 +184,7 @@ def location(posterior, mu_dips, cov_dips, n_points=10000,
*
np
.
cos
(
theta
)
*
zk
/
np
.
sqrt
(
zalpha
**
3
)
*
dummy
lat
=
np
.
rad2deg
(
theta
)
lon
=
np
.
rad2deg
(
phi
)
# have the longitude consistent with others
lon
[
np
.
where
(
180
<
lon
)]
-=
360
return
lat
,
lon
,
dens
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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