Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
508800eb
Commit
508800eb
authored
Aug 22, 2017
by
Martin Reinecke
Browse files
merge master
parents
8acbab72
1297585d
Pipeline
#17041
passed with stage
in 18 minutes and 40 seconds
Changes
124
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/plotting/plots/heatmaps/glmollweide.py
View file @
508800eb
# -*- coding: utf-8 -*-
from
nifty
import
dependency_injector
as
gdi
from
heatmap
import
Heatmap
from
.
heatmap
import
Heatmap
import
numpy
as
np
from
nifty.plotting.descriptors
import
Axis
...
...
nifty/plotting/plots/heatmaps/hpmollweide.py
View file @
508800eb
# -*- coding: utf-8 -*-
from
__future__
import
division
from
nifty
import
dependency_injector
as
gdi
from
heatmap
import
Heatmap
from
.
heatmap
import
Heatmap
import
numpy
as
np
from
nifty.plotting.descriptors
import
Axis
...
...
@@ -41,7 +42,7 @@ class HPMollweide(Heatmap):
ptg
=
np
.
empty
((
phi
.
size
,
2
),
dtype
=
np
.
float64
)
ptg
[:,
0
]
=
theta
ptg
[:,
1
]
=
phi
base
=
pyHealpix
.
Healpix_Base
(
int
(
np
.
sqrt
(
x
.
size
/
12
)),
"RING"
)
base
=
pyHealpix
.
Healpix_Base
(
int
(
np
.
sqrt
(
x
.
size
/
/
12
)),
"RING"
)
res
[
mask
]
=
x
[
base
.
ang2pix
(
ptg
)]
return
res
...
...
nifty/plotting/plots/heatmaps/mollweide_helper.py
View file @
508800eb
# -*- coding: utf-8 -*-
from
__future__
import
division
import
numpy
as
np
def
mollweide_helper
(
xsize
):
xsize
=
int
(
xsize
)
ysize
=
int
(
xsize
/
2
)
ysize
=
xsize
/
/
2
res
=
np
.
full
(
shape
=
(
ysize
,
xsize
),
fill_value
=
np
.
nan
,
dtype
=
np
.
float64
)
xc
=
(
xsize
-
1
)
*
0.5
...
...
nifty/plotting/plots/scatter_plots/__init__.py
View file @
508800eb
# -*- coding: utf-8 -*-
from
cartesian_2D
import
Cartesian2D
from
cartesian_3D
import
Cartesian3D
from
geo
import
Geo
from
.
cartesian_2D
import
Cartesian2D
from
.
cartesian_3D
import
Cartesian3D
from
.
geo
import
Geo
nifty/plotting/plots/scatter_plots/cartesian.py
View file @
508800eb
# -*- coding: utf-8 -*-
from
abc
import
abstractmethod
from
scatter_plot
import
ScatterPlot
from
.
scatter_plot
import
ScatterPlot
class
Cartesian
(
ScatterPlot
):
...
...
nifty/plotting/plots/scatter_plots/cartesian_2D.py
View file @
508800eb
# -*- coding: utf-8 -*-
from
nifty.plotting
.descriptors
import
Axis
from
cartesian
import
Cartesian
from
..
.descriptors
import
Axis
from
.
cartesian
import
Cartesian
class
Cartesian2D
(
Cartesian
):
...
...
nifty/plotting/plots/scatter_plots/cartesian_3D.py
View file @
508800eb
# -*- coding: utf-8 -*-
from
nifty.plotting
.descriptors
import
Axis
from
cartesian
import
Cartesian
from
..
.descriptors
import
Axis
from
.
cartesian
import
Cartesian
class
Cartesian3D
(
Cartesian
):
...
...
nifty/plotting/plots/scatter_plots/geo.py
View file @
508800eb
from
nifty.plotting.descriptors
import
Axis
from
scatter_plot
import
ScatterPlot
from
...descriptors
import
Axis
from
.scatter_plot
import
ScatterPlot
class
Geo
(
ScatterPlot
):
...
...
nifty/plotting/plotter/__init__.py
View file @
508800eb
from
healpix_plotter
import
HealpixPlotter
from
gl_plotter
import
GLPlotter
from
power_plotter
import
PowerPlotter
from
rg1d_plotter
import
RG1DPlotter
from
rg2d_plotter
import
RG2DPlotter
from
.healpix_plotter
import
HealpixPlotter
from
.gl_plotter
import
GLPlotter
from
.power_plotter
import
PowerPlotter
from
.rg1d_plotter
import
RG1DPlotter
from
.rg2d_plotter
import
RG2DPlotter
nifty/plotting/plotter/plotter_base.py
View file @
508800eb
# -*- coding: utf-8 -*-
from
builtins
import
str
from
builtins
import
zip
from
builtins
import
range
import
abc
import
os
import
sys
...
...
@@ -17,6 +20,7 @@ from nifty.field import Field
import
nifty.nifty_utilities
as
utilities
from
nifty.plotting.figures
import
MultiFigure
from
future.utils
import
with_metaclass
plotly
=
gdi
.
get
(
'plotly'
)
...
...
@@ -27,10 +31,8 @@ rank = d2o.config.dependency_injector[
d2o
.
configuration
[
'mpi_module'
]].
COMM_WORLD
.
rank
class
PlotterBase
(
Loggable
,
object
):
__metaclass__
=
abc
.
ABCMeta
def
__init__
(
self
,
interactive
=
False
,
path
=
'plot.html'
):
class
PlotterBase
(
with_metaclass
(
abc
.
ABCMeta
,
type
(
'NewBase'
,
(
Loggable
,
object
),
{}))):
def
__init__
(
self
,
interactive
=
False
,
path
=
'plot.html'
,
title
=
""
):
if
plotly
is
None
:
raise
ImportError
(
"The module plotly is needed but not available."
)
self
.
interactive
=
interactive
...
...
nifty/plotting/plotter/rg1d_plotter.py
View file @
508800eb
# -*- coding: utf-8 -*-
from
__future__
import
division
import
numpy
as
np
from
nifty.spaces
import
RGSpace
...
...
nifty/probing/__init__.py
View file @
508800eb
...
...
@@ -16,5 +16,5 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
prober
import
Prober
from
mixin_classes
import
*
from
.
prober
import
Prober
from
.
mixin_classes
import
*
nifty/probing/mixin_classes/__init__.py
View file @
508800eb
...
...
@@ -16,5 +16,5 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
diagonal_prober_mixin
import
DiagonalProberMixin
from
trace_prober_mixin
import
TraceProberMixin
from
.
diagonal_prober_mixin
import
DiagonalProberMixin
from
.
trace_prober_mixin
import
TraceProberMixin
nifty/probing/mixin_classes/diagonal_prober_mixin.py
View file @
508800eb
...
...
@@ -16,7 +16,9 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
nifty.sugar
import
create_composed_fft_operator
from
__future__
import
division
from
builtins
import
object
from
...sugar
import
create_composed_fft_operator
class
DiagonalProberMixin
(
object
):
...
...
nifty/probing/mixin_classes/trace_prober_mixin.py
View file @
508800eb
...
...
@@ -16,7 +16,9 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
nifty.sugar
import
create_composed_fft_operator
from
__future__
import
division
from
builtins
import
object
from
...sugar
import
create_composed_fft_operator
class
TraceProberMixin
(
object
):
...
...
@@ -61,5 +63,5 @@ class TraceProberMixin(object):
mean
=
self
.
trace
sum_sq
=
self
.
__sum_of_squares
self
.
__trace_variance
=
(
(
sum_sq
-
sum_pr
*
mean
)
/
(
n
-
1
)
)
self
.
__trace_variance
=
(
sum_sq
-
sum_pr
*
mean
)
/
(
n
-
1
)
return
self
.
__trace_variance
nifty/probing/prober/__init__.py
View file @
508800eb
...
...
@@ -16,4 +16,4 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
prober
import
Prober
from
.
prober
import
Prober
nifty/probing/prober/prober.py
View file @
508800eb
...
...
@@ -16,6 +16,9 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
builtins
import
str
from
builtins
import
range
from
builtins
import
object
import
numpy
as
np
from
nifty.field
import
Field
...
...
@@ -91,7 +94,7 @@ class Prober(object):
def
probing_run
(
self
,
callee
):
""" controls the generation, evaluation and finalization of probes """
self
.
reset
()
for
index
in
x
range
(
self
.
probe_count
):
for
index
in
range
(
self
.
probe_count
):
current_probe
=
self
.
get_probe
(
index
)
pre_result
=
self
.
process_probe
(
callee
,
current_probe
,
index
)
self
.
finish_probe
(
current_probe
,
pre_result
)
...
...
nifty/random.py
View file @
508800eb
...
...
@@ -16,7 +16,9 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
builtins
import
object
import
numpy
as
np
from
functools
import
reduce
class
Random
(
object
):
...
...
nifty/spaces/__init__.py
View file @
508800eb
...
...
@@ -16,9 +16,9 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
gl_space
import
GLSpace
from
hp_space
import
HPSpace
from
lm_space
import
LMSpace
from
power_space
import
PowerSpace
from
rg_space
import
RGSpace
from
space
import
Space
\ No newline at end of file
from
.gl_space
import
GLSpace
from
.hp_space
import
HPSpace
from
.lm_space
import
LMSpace
from
.power_space
import
PowerSpace
from
.rg_space
import
RGSpace
from
.space
import
Space
nifty/spaces/gl_space/__init__.py
View file @
508800eb
...
...
@@ -16,4 +16,4 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
gl_space
import
GLSpace
from
.
gl_space
import
GLSpace
Prev
1
2
3
4
5
6
7
Next
Write
Preview
Supports
Markdown
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