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
807e5c6d
Commit
807e5c6d
authored
Jan 06, 2020
by
Niklas Uwe Langner
Browse files
[simulations] Assign crs['signal_label'] outside of shuffle_events()
parent
28288e61
Changes
1
Hide whitespace changes
Inline
Side-by-side
astrotools/simulations.py
View file @
807e5c6d
...
...
@@ -112,7 +112,6 @@ class BaseSimulation:
sets_ids_3d
=
np
.
repeat
(
np
.
arange
(
3
),
np
.
prod
(
self
.
shape
)).
reshape
((
3
,)
+
self
.
shape
)
self
.
crs
[
'vecs'
]
=
self
.
crs
[
'vecs'
][
sets_ids_3d
,
sets_ids
,
np
.
stack
([
shuffle_ids
]
*
3
)]
self
.
signal_label
=
self
.
signal_label
[
sets_ids
,
shuffle_ids
]
self
.
crs
[
'signal_label'
]
=
self
.
signal_label
class
ObservedBound
(
BaseSimulation
):
...
...
@@ -415,6 +414,7 @@ class ObservedBound(BaseSimulation):
self
.
convert_pixel
(
convert_all
=
True
)
if
shuffle
:
self
.
shuffle_events
()
self
.
crs
[
'signal_label'
]
=
self
.
signal_label
return
self
.
crs
def
convert_pixel
(
self
,
keyword
=
'vecs'
,
convert_all
=
False
):
...
...
@@ -578,6 +578,7 @@ class SourceBound(BaseSimulation):
"""
if
shuffle
:
self
.
shuffle_events
()
self
.
crs
[
'signal_label'
]
=
self
.
signal_label
return
self
.
crs
def
_prepare_arrival_matrix
(
self
,
library_path
):
...
...
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