Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bilby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lscsoft
bilby
Commits
80ca2c5f
Commit
80ca2c5f
authored
9 months ago
by
Isaac McMahon
Committed by
Colm Talbot
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
HealPixMapPriorDist Redundancy Fix
parent
80158c74
No related branches found
No related tags found
1 merge request
!1323
HealPixMapPriorDist Redundancy Fix
Pipeline
#633940
failed
9 months ago
Stage: initial
Stage: test
Stage: docs
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
AUTHORS.md
+1
-0
1 addition, 0 deletions
AUTHORS.md
bilby/gw/prior.py
+2
-3
2 additions, 3 deletions
bilby/gw/prior.py
test/check_author_list.py
+1
-1
1 addition, 1 deletion
test/check_author_list.py
with
4 additions
and
4 deletions
AUTHORS.md
+
1
−
0
View file @
80ca2c5f
...
...
@@ -29,6 +29,7 @@ Gregory Ashton
Hank Hua
Hector Estelles
Ignacio Magaña Hernandez
Isaac McMahon
Isobel Marguarethe Romero-Shaw
Jack Heinzel
Jacob Golomb
...
...
This diff is collapsed.
Click to expand it.
bilby/gw/prior.py
+
2
−
3
View file @
80ca2c5f
...
...
@@ -1362,6 +1362,7 @@ class HealPixMapPriorDist(BaseJointPriorDist):
else
:
self
.
distance
=
False
self
.
prob
=
self
.
hp
.
read_map
(
hp_file
)
self
.
prob
=
self
.
_check_norm
(
self
.
prob
)
super
(
HealPixMapPriorDist
,
self
).
__init__
(
names
=
names
,
bounds
=
bounds
)
self
.
distname
=
"
hpmap
"
...
...
@@ -1501,9 +1502,7 @@ class HealPixMapPriorDist(BaseJointPriorDist):
sample : array_like
sample of ra, and dec (and distance if 3D=True)
"""
pixel_choices
=
np
.
arange
(
self
.
npix
)
pixel_probs
=
self
.
_check_norm
(
self
.
prob
)
sample_pix
=
random
.
rng
.
choice
(
pixel_choices
,
size
=
size
,
p
=
pixel_probs
,
replace
=
True
)
sample_pix
=
random
.
rng
.
choice
(
self
.
npix
,
size
=
size
,
p
=
self
.
prob
,
replace
=
True
)
sample
=
np
.
empty
((
size
,
self
.
num_vars
))
for
samp
in
range
(
size
):
theta
,
ra
=
self
.
hp
.
pix2ang
(
self
.
nside
,
sample_pix
[
samp
])
...
...
This diff is collapsed.
Click to expand it.
test/check_author_list.py
+
1
−
1
View file @
80ca2c5f
...
...
@@ -3,7 +3,7 @@
import
re
import
subprocess
special_cases
=
[
"
plasky
"
,
"
thomas
"
,
"
mj-will
"
,
"
richard
"
,
"
douglas
"
]
special_cases
=
[
"
plasky
"
,
"
thomas
"
,
"
mj-will
"
,
"
richard
"
,
"
douglas
"
,
"
nixnyxnyx
"
]
AUTHORS_list
=
[]
with
open
(
"
AUTHORS.md
"
,
"
r
"
)
as
f
:
AUTHORS_list
=
"
"
.
join
([
line
for
line
in
f
]).
lower
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment