Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
ift
IMAGINE
Commits
4d143aa3
Commit
4d143aa3
authored
Feb 23, 2017
by
Theo Steininger
Browse files
Fixed a bug in create_ring_profile
parent
ea8d0693
Changes
2
Hide whitespace changes
Inline
Side-by-side
imagine/create_ring_profile.py
View file @
4d143aa3
...
...
@@ -9,10 +9,10 @@ def create_ring_profile(input_map):
npix
=
input_map
.
shape
[
0
]
nside
=
hp
.
npix2nside
(
npix
)
rings
=
hp
.
pix2ring
(
nside
,
np
.
arange
(
npix
))
rings
=
hp
.
pix2ring
(
nside
,
np
.
arange
(
npix
))
-
1
rho
=
np
.
bincount
(
rings
)
[
1
:]
averages
=
np
.
bincount
(
rings
,
weights
=
input_map
)
[
1
:]
/
rho
rho
=
np
.
bincount
(
rings
)
averages
=
np
.
bincount
(
rings
,
weights
=
input_map
)
/
rho
result
=
averages
[
rings
]
...
...
imagine/likelihoods/ensemble_likelihood/ensemble_likelihood.py
View file @
4d143aa3
...
...
@@ -8,12 +8,14 @@ from imagine.create_ring_profile import create_ring_profile
class
EnsembleLikelihood
(
Likelihood
):
def
__init__
(
self
,
observable_name
,
measured_data
,
data_covariance_operator
):
data_covariance_operator
,
profile
=
None
):
self
.
observable_name
=
observable_name
self
.
measured_data
=
measured_data
self
.
data_covariance_operator
=
data_covariance_operator
self
.
profile
=
create_ring_profile
(
if
profile
is
None
:
profile
=
create_ring_profile
(
self
.
measured_data
.
val
.
get_full_data
())
self
.
profile
=
profile
def
__call__
(
self
,
observable
):
field
=
observable
[
self
.
observable_name
]
...
...
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