Commit e7d7922b authored by Ultimanet's avatar Ultimanet
Browse files

Updated lm

parent 915f8bc7
......@@ -20,32 +20,39 @@
## along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import division
from nifty import about
from nifty.nifty_about 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!"))
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.")
about.infos.cprint(
"INFO: neither libsharp_wrapper_gl nor healpy available.")
pass ## import nothing
else:
from nifty_lm import lm_space,hp_space ## import lm & hp
from nifty_lm import lm_space, hp_space ## import lm & hp
## TODO: change about
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!"))
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
from nifty_lm import lm_space, gl_space ## import lm & gl
else:
from nifty_lm import lm_space,gl_space,hp_space ## import all 3
from nifty_power_conversion_lm import *
from nifty_lm import lm_space, gl_space, hp_space ##import all
from nifty.lm.nifty_power_conversion_lm import power_backward_conversion_lm,\
power_forward_conversion_lm
......@@ -38,15 +38,15 @@ import numpy as np
import pylab as pl
from matplotlib.colors import LogNorm as ln
from matplotlib.ticker import LogFormatter as lf
from nifty.nifty_about import about
from nifty.nifty_core import pi, \
about, \
random, \
space, \
point_space, \
field
from nifty_paradict import lm_space_paradict,\
from nifty.nifty_paradict import lm_space_paradict,\
gl_space_paradict,\
hp_space_paradict
from nifty.nifty_random import random
#import libsharp_wrapper_gl as gl
try:
......
......@@ -21,10 +21,9 @@
#from nifty import *
import numpy as np
from nifty import pi, \
about, \
field, \
sqrt,exp,log
from nifty.nifty_about import about
from nifty.nifty_core import pi, field
from nifty.nifty_simple_math import sqrt, exp, log
def power_backward_conversion_lm(k_space,p,mean=None):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment