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
ef61b024
Commit
ef61b024
authored
Mar 23, 2015
by
ultimanet
Browse files
lm __init__.py Added check for healpy version
parent
d66cbd72
Changes
1
Hide whitespace changes
Inline
Side-by-side
lm/__init__.py
View file @
ef61b024
...
...
@@ -21,12 +21,17 @@
from
__future__
import
division
from
nifty
import
about
from
distutils.version
import
LooseVersion
as
lv
#from nifty_lm import *
try
:
import
libsharp_wrapper_gl
as
gl
except
(
ImportError
):
try
:
import
healpy
as
hp
if
lv
(
hp
.
__version__
)
<=
lv
(
'1.8.1'
):
raise
ImportError
(
about
.
_errors
.
cprint
(
"ERROR: installed healpy version is older than 1.8.1!"
))
except
(
ImportError
):
about
.
infos
.
cprint
(
"INFO: neither libsharp_wrapper_gl nor healpy available."
)
pass
## import nothing
...
...
@@ -36,9 +41,11 @@ except(ImportError):
else
:
try
:
import
healpy
as
hp
if
lv
(
hp
.
__version__
)
<=
lv
(
'1.8.1'
):
raise
ImportError
(
about
.
_errors
.
cprint
(
"ERROR: installed healpy version is older than 1.8.1!"
))
except
(
ImportError
):
from
nifty_lm
import
lm_space
,
gl_space
## import lm & gl
else
:
else
:
from
nifty_lm
import
lm_space
,
gl_space
,
hp_space
## import all 3
from
nifty_power_conversion_lm
import
*
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