Skip to content
GitLab
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
df8dce00
Commit
df8dce00
authored
May 30, 2017
by
Martin Reinecke
Browse files
use faster module availability tests
parent
1e6df83d
Pipeline
#13148
passed with stage
in 5 minutes and 24 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/operators/fft_operator/transformations/gllmtransformation.py
View file @
df8dce00
...
...
@@ -37,7 +37,7 @@ class GLLMTransformation(SlicingTransformation):
if
module
!=
'pyHealpix'
:
raise
ValueError
(
"Unsupported SHT module."
)
if
'
pyHealpix
'
not
in
gdi
:
if
pyHealpix
is
None
:
raise
ImportError
(
"The module pyHealpix is needed but not available."
)
...
...
nifty/operators/fft_operator/transformations/hplmtransformation.py
View file @
df8dce00
...
...
@@ -38,7 +38,7 @@ class HPLMTransformation(SlicingTransformation):
if
module
!=
'pyHealpix'
:
raise
ValueError
(
"Unsupported SHT module."
)
if
'
pyHealpix
'
not
in
gdi
:
if
pyHealpix
is
None
:
raise
ImportError
(
"The module pyHealpix is needed but not available"
)
...
...
nifty/operators/fft_operator/transformations/lmgltransformation.py
View file @
df8dce00
...
...
@@ -37,7 +37,7 @@ class LMGLTransformation(SlicingTransformation):
if
module
!=
'pyHealpix'
:
raise
ValueError
(
"Unsupported SHT module."
)
if
'
pyHealpix
'
not
in
gdi
:
if
pyHealpix
is
None
:
raise
ImportError
(
"The module pyHealpix is needed but not available."
)
...
...
nifty/operators/fft_operator/transformations/lmhptransformation.py
View file @
df8dce00
...
...
@@ -36,7 +36,7 @@ class LMHPTransformation(SlicingTransformation):
if
module
!=
'pyHealpix'
:
raise
ValueError
(
"Unsupported SHT module."
)
if
gdi
.
get
(
'
pyHealpix
'
)
is
None
:
if
pyHealpix
is
None
:
raise
ImportError
(
"The module pyHealpix is needed but not available."
)
...
...
nifty/plotting/plots/heatmaps/glmollweide.py
View file @
df8dce00
...
...
@@ -13,7 +13,7 @@ class GLMollweide(Heatmap):
def
__init__
(
self
,
data
,
xsize
=
800
,
color_map
=
None
,
webgl
=
False
,
smoothing
=
False
):
# smoothing 'best', 'fast', False
if
'
pyHealpix
'
not
in
gdi
:
if
pyHealpix
is
None
:
raise
ImportError
(
"The module pyHealpix is needed but not available."
)
self
.
xsize
=
xsize
...
...
nifty/plotting/plots/heatmaps/hpmollweide.py
View file @
df8dce00
...
...
@@ -12,7 +12,7 @@ pyHealpix = gdi.get('pyHealpix')
class
HPMollweide
(
Heatmap
):
def
__init__
(
self
,
data
,
xsize
=
800
,
color_map
=
None
,
webgl
=
False
,
smoothing
=
False
):
# smoothing 'best', 'fast', False
if
'
pyHealpix
'
not
in
gdi
:
if
pyHealpix
is
None
:
raise
ImportError
(
"The module pyHealpix is needed but not available."
)
self
.
xsize
=
xsize
...
...
nifty/plotting/plotter/plotter_base.py
View file @
df8dce00
...
...
@@ -31,7 +31,7 @@ class PlotterBase(Loggable, object):
__metaclass__
=
abc
.
ABCMeta
def
__init__
(
self
,
interactive
=
False
,
path
=
'.'
,
title
=
""
):
if
'
plotly
'
not
in
gdi
:
if
plotly
is
None
:
raise
ImportError
(
"The module plotly is needed but not available."
)
self
.
interactive
=
interactive
self
.
path
=
path
...
...
nifty/spaces/gl_space/gl_space.py
View file @
df8dce00
...
...
@@ -45,7 +45,7 @@ class GLSpace(Space):
Number of latitudinal bins (or rings) that are used for this
pixelization.
nlon : int, *optional*
Number of long
d
itudinal bins that are used for this pixelization.
Number of longitudinal bins that are used for this pixelization.
Attributes
----------
...
...
@@ -57,7 +57,7 @@ class GLSpace(Space):
Number of latitudinal bins (or rings) that are used for this
pixelization.
nlon : int
Number of long
d
itudinal bins that are used for this pixelization.
Number of longitudinal bins that are used for this pixelization.
total_volume : np.float
The total volume of the space.
shape : tuple of np.ints
...
...
@@ -89,7 +89,7 @@ class GLSpace(Space):
# ---Overwritten properties and methods---
def
__init__
(
self
,
nlat
,
nlon
=
None
):
if
'
pyHealpix
'
not
in
gdi
:
if
pyHealpix
is
None
:
raise
ImportError
(
"The module pyHealpix is needed but not available."
)
...
...
@@ -163,7 +163,7 @@ class GLSpace(Space):
@
property
def
nlon
(
self
):
""" Number of long
d
itudinal bins that are used for this pixelization.
""" Number of longitudinal bins that are used for this pixelization.
"""
return
self
.
_nlon
...
...
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