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
d70e521c
Commit
d70e521c
authored
Jan 27, 2020
by
Marcus Wirtz
Browse files
[simulations / skymap] Massive style improvement!
parent
976aeb85
Pipeline
#233439
passed with stages
in 6 minutes and 20 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
astrotools/simulations.py
View file @
d70e521c
...
...
@@ -1040,7 +1040,7 @@ class SourceScenario:
141.6
,
135.7
,
157.8
,
172.1
,
238
,
141.9
,
36.6
,
20.7
,
121.6
])
lat
=
np
.
array
([
-
88
,
40.6
,
13.3
,
32
,
10.6
,
11.7
,
44.5
,
74.3
,
64.8
,
64.4
,
84.2
,
68.6
,
-
17.4
,
56.3
,
-
47.4
,
24.9
,
48.4
,
-
51.9
,
-
54.6
,
55.4
,
53
,
27.3
,
60.2
])
vecs
=
coord
.
ang2vec
(
np
.
radians
(
lon
),
np
.
radians
(
lat
))
vecs
=
coord
.
ang2vec
(
np
.
deg2rad
(
lon
),
np
.
deg2rad
(
lat
))
distance
=
np
.
array
([
2.7
,
3.6
,
4
,
4
,
4
,
5.9
,
6.6
,
7.8
,
8.1
,
8.1
,
8.7
,
10.3
,
11
,
11.4
,
15
,
16.3
,
17.4
,
17.9
,
22.3
,
46
,
80
,
105
,
183
])
...
...
@@ -1061,7 +1061,7 @@ class SourceScenario:
lon
=
np
.
array
([
309.6
,
283.7
,
150.6
,
150.2
,
235.8
,
127.9
,
179.8
,
280.2
,
63.6
,
112.9
,
131.9
,
98
,
340.7
,
135.8
,
160
,
243.4
,
77.1
])
lat
=
np
.
array
([
19.4
,
74.5
,
-
13.3
,
-
13.7
,
73
,
9
,
65
,
-
54.6
,
38.9
,
-
9.9
,
45.6
,
17.7
,
27.6
,
-
9
,
14.6
,
-
20
,
33.5
])
vecs
=
coord
.
ang2vec
(
np
.
radians
(
lon
),
np
.
radians
(
lat
))
vecs
=
coord
.
ang2vec
(
np
.
deg2rad
(
lon
),
np
.
deg2rad
(
lat
))
distance
=
np
.
array
([
3.7
,
18.5
,
76
,
83
,
95
,
96
,
136
,
140
,
148
,
195
,
199
,
209
,
213
,
218
,
232
,
245
,
247
])
flux
=
np
.
array
([
0.8
,
1
,
2.2
,
1
,
0.5
,
0.5
,
54
,
0.5
,
20.8
,
3.3
,
1.9
,
6.8
,
1.7
,
0.9
,
0.4
,
1.3
,
2.3
])
...
...
astrotools/skymap.py
View file @
d70e521c
...
...
@@ -132,8 +132,8 @@ def heatmap(m, opath=None, label='entries', mask=None, maskcolor='white', **kwar
yresolution
=
xresolution
//
2
theta
=
np
.
linspace
(
np
.
pi
,
0
,
yresolution
)
phi
=
np
.
linspace
(
-
np
.
pi
,
np
.
pi
,
xresolution
)
longitude
=
np
.
radians
(
np
.
linspace
(
-
180
,
180
,
xresolution
))
latitude
=
np
.
radians
(
np
.
linspace
(
-
90
,
90
,
yresolution
))
longitude
=
np
.
deg2rad
(
np
.
linspace
(
-
180
,
180
,
xresolution
))
latitude
=
np
.
deg2rad
(
np
.
linspace
(
-
90
,
90
,
yresolution
))
phi_grid
,
theta_grid
=
np
.
meshgrid
(
phi
,
theta
)
grid_pix
=
hp
.
ang2pix
(
hp
.
get_nside
(
m
),
theta_grid
,
phi_grid
)
...
...
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