__init__.py 2.96 KB
Newer Older
Marco Selig's avatar
Marco Selig committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
## NIFTY (Numerical Information Field Theory) has been developed at the
## Max-Planck-Institute for Astrophysics.
##
## Copyright (C) 2013 Max-Planck-Society
##
## Author: Marco Selig
## Project homepage: <http://www.mpa-garching.mpg.de/ift/nifty/>
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
## See the GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.

from __future__ import division
Ultimanet's avatar
Ultimanet committed
23
24

import matplotlib as mpl
25
26
mpl.use('Agg')

27
28
from .version import __version__

29
30
import dummys

31
32
33
34
35
36
# it is important to import config before d2o such that NIFTy is able to
# pre-create d2o's configuration object with the corrected path
from config import about,\
                   dependency_injector,\
                   nifty_configuration,\
                   d2o_configuration
37

38
from d2o import distributed_data_object, d2o_librarian
Ultimanet's avatar
Ultimanet committed
39

Ultimanet's avatar
Ultimanet committed
40
from nifty_cmaps import ncmap
41
42
43
44
45
46
from field import Field
from space import Space

# this line exists for compatibility reasons
# TODO: Remove this once the transition to field types is done.
from space import Space as point_space
47

Ultimanet's avatar
Ultimanet committed
48
49
from nifty_random import random
from nifty_simple_math import *
Ultima's avatar
Ultima committed
50
from nifty_utilities import *
51

theos's avatar
theos committed
52
53
from field_types import FieldType,\
                        FieldArray
54

Ultimanet's avatar
Ultimanet committed
55
from operators import *
Marco Selig's avatar
Marco Selig committed
56

theos's avatar
theos committed
57
from power import PowerSpace,\
58
                  PowerIndexFactory
theos's avatar
theos committed
59

Marco Selig's avatar
Marco Selig committed
60
61
## optional submodule `rg`
try:
62
    from rg import RGSpace,\
Ultimanet's avatar
Ultimanet committed
63
64
                    power_backward_conversion_rg,\
                    power_forward_conversion_rg
65
    from nifty_paradict import rg_space_paradict
Marco Selig's avatar
Marco Selig committed
66
67
68
except(ImportError):
    pass

Marco Selig's avatar
Marco Selig committed
69
70
## optional submodule `lm`
try:
71
    from lm import LMSpace,\
Ultimanet's avatar
Ultimanet committed
72
73
74
75
76
                    power_backward_conversion_lm,\
                    power_forward_conversion_lm
    from nifty_paradict import lm_space_paradict

    try:
77
        from lm import GLSpace
Ultimanet's avatar
Ultimanet committed
78
79
80
        from nifty_paradict import gl_space_paradict
    except(ImportError):
        pass
81

Ultimanet's avatar
Ultimanet committed
82
    try:
83
        from lm import HPSpace
Ultimanet's avatar
Ultimanet committed
84
85
86
        from nifty_paradict import hp_space_paradict
    except(ImportError):
        pass
87

Marco Selig's avatar
Marco Selig committed
88
89
90
except(ImportError):
    pass

Ultimanet's avatar
Ultimanet committed
91
92
93
94
from demos import get_demo_dir
from pickling import _pickle_method, _unpickle_method

#import pyximport; pyximport.install(pyimport = True)
95
96
97
98
99
100
101
from transformations import TransformationFactory,\
                            GLLMTransformation,\
                            HPLMTransformation,\
                            LMGLTransformation,\
                            LMHPTransformation,\
                            RGRGTransformation