Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NIFTy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ift
NIFTy
Commits
34923e69
Commit
34923e69
authored
Feb 23, 2018
by
Martin Reinecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweaks
parent
25376437
Pipeline
#25362
passed with stages
in 9 minutes and 51 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
nifty4/plotting/plot.py
nifty4/plotting/plot.py
+6
-6
No files found.
nifty4/plotting/plot.py
View file @
34923e69
...
...
@@ -215,7 +215,7 @@ def plot(f, **kwargs):
dist
=
dom
.
distances
[
0
]
xcoord
=
np
.
arange
(
npoints
,
dtype
=
np
.
float64
)
*
dist
for
i
,
fld
in
enumerate
(
f
):
ycoord
=
dobj
.
to_global_data
(
fld
.
val
)
ycoord
=
fld
.
to_global_data
(
)
plt
.
plot
(
xcoord
,
ycoord
,
label
=
label
[
i
])
_limit_xy
(
**
kwargs
)
if
label
!=
([
None
]
*
len
(
f
)):
...
...
@@ -230,7 +230,7 @@ def plot(f, **kwargs):
dy
=
dom
.
distances
[
1
]
xc
=
np
.
arange
(
nx
,
dtype
=
np
.
float64
)
*
dx
yc
=
np
.
arange
(
ny
,
dtype
=
np
.
float64
)
*
dy
im
=
ax
.
imshow
(
dobj
.
to_global_data
(
f
.
val
),
im
=
ax
.
imshow
(
fld
.
to_global_data
(
),
extent
=
[
xc
[
0
],
xc
[
-
1
],
yc
[
0
],
yc
[
-
1
]],
vmin
=
kwargs
.
get
(
"zmin"
),
vmax
=
kwargs
.
get
(
"zmax"
),
cmap
=
cmap
,
origin
=
"lower"
)
...
...
@@ -248,7 +248,7 @@ def plot(f, **kwargs):
plt
.
title
(
'power'
)
xcoord
=
dom
.
k_lengths
for
i
,
fld
in
enumerate
(
f
):
ycoord
=
dobj
.
to_global_data
(
fld
.
val
)
ycoord
=
fld
.
to_global_data
(
)
plt
.
plot
(
xcoord
,
ycoord
,
label
=
label
[
i
])
_limit_xy
(
**
kwargs
)
if
label
!=
([
None
]
*
len
(
f
)):
...
...
@@ -264,8 +264,8 @@ def plot(f, **kwargs):
ptg
=
np
.
empty
((
phi
.
size
,
2
),
dtype
=
np
.
float64
)
ptg
[:,
0
]
=
theta
ptg
[:,
1
]
=
phi
base
=
pyHealpix
.
Healpix_Base
(
int
(
np
.
sqrt
(
f
.
val
.
size
//
12
)),
"RING"
)
res
[
mask
]
=
dobj
.
to_global_data
(
f
.
val
)[
base
.
ang2pix
(
ptg
)]
base
=
pyHealpix
.
Healpix_Base
(
int
(
np
.
sqrt
(
f
.
size
//
12
)),
"RING"
)
res
[
mask
]
=
f
.
to_global_data
(
)[
base
.
ang2pix
(
ptg
)]
plt
.
axis
(
'off'
)
plt
.
imshow
(
res
,
vmin
=
kwargs
.
get
(
"zmin"
),
vmax
=
kwargs
.
get
(
"zmax"
),
cmap
=
cmap
,
origin
=
"lower"
)
...
...
@@ -282,7 +282,7 @@ def plot(f, **kwargs):
ilat
=
_find_closest
(
dec
,
theta
)
ilon
=
_find_closest
(
ra
,
phi
)
ilon
=
np
.
where
(
ilon
==
dom
.
nlon
,
0
,
ilon
)
res
[
mask
]
=
dobj
.
to_global_data
(
f
.
val
)[
ilat
*
dom
.
nlon
+
ilon
]
res
[
mask
]
=
f
.
to_global_data
(
)[
ilat
*
dom
.
nlon
+
ilon
]
plt
.
axis
(
'off'
)
plt
.
imshow
(
res
,
vmin
=
kwargs
.
get
(
"zmin"
),
vmax
=
kwargs
.
get
(
"zmax"
),
...
...
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