Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
astro
astrotools
Commits
138eee67
Commit
138eee67
authored
Jun 30, 2020
by
teresa.bister
Browse files
[simulations] small bug fix in probability normalization in case of explicitely set spurces
parent
680bba25
Pipeline
#301512
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
astrotools/simulations.py
View file @
138eee67
...
...
@@ -368,7 +368,7 @@ class ObservedBound(BaseSimulation):
elif
(
self
.
cr_map
is
None
):
self
.
_fix_point_source
()
if
self
.
cr_map
.
size
==
self
.
npix
:
pixel
[:,
signal_label
]
=
np
.
random
.
choice
(
self
.
npix
,
(
self
.
nsets
,
n_sig
),
p
=
np
.
hstack
(
self
.
cr_map
))
pixel
[:,
signal_label
]
=
np
.
random
.
choice
(
self
.
npix
,
(
self
.
nsets
,
n_sig
),
p
=
np
.
hstack
(
self
.
cr_map
)
/
np
.
sum
(
np
.
hstack
(
self
.
cr_map
))
)
else
:
for
i
,
rig
in
enumerate
(
self
.
rig_bins
):
mask_rig
=
(
rig
==
self
.
rigidities
)
*
signal_label
# type: np.ndarray
...
...
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