Commit 8c34584a authored by Philipp Arras's avatar Philipp Arras
Browse files

Merge branch 'cosmestics' into 'NIFTy_5'

Reorder imports and delete unused imports

See merge request ift/nifty-dev!46
parents 871ec47a cc7e38cd
# 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/>.
#
# Copyright(C) 2013-2018 Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
import nifty5 as ift
import numpy as np
......
# 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/>.
#
# Copyright(C) 2013-2018 Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
import nifty5 as ift
import numpy as np
......@@ -18,7 +36,7 @@ def make_random_mask():
if __name__ == '__main__':
# # description of the tutorial ###
# FIXME description of the tutorial
# Choose problem geometry and masking
......
# 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/>.
#
# Copyright(C) 2013-2018 Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
import nifty5 as ift
import numpy as np
......@@ -18,7 +36,7 @@ def get_2D_exposure():
if __name__ == '__main__':
# ABOUT THIS CODE
# FIXME description of the tutorial
np.random.seed(41)
# Set up the position space of the signal
......
# 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/>.
#
# Copyright(C) 2013-2018 Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
import nifty5 as ift
import numpy as np
......@@ -9,7 +27,7 @@ def get_random_LOS(n_los):
if __name__ == '__main__':
# ## ABOUT THIS TUTORIAL
# FIXME description of the tutorial
np.random.seed(42)
position_space = ift.RGSpace([128, 128])
......
......@@ -17,11 +17,14 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import sys
import numpy as np
from .random import Random
from mpi4py import MPI
import sys
from ..compat import *
from .random import Random
_comm = MPI.COMM_WORLD
ntask = _comm.Get_size()
......
......@@ -19,9 +19,10 @@
# Data object module for NIFTy that uses simple numpy ndarrays.
import numpy as np
from numpy import empty, empty_like, exp, full, log
from numpy import ndarray as data_object
from numpy import full, empty, empty_like, sqrt, ones, zeros, vdot, \
exp, log, tanh
from numpy import ones, sqrt, tanh, vdot, zeros
from .random import Random
ntask = 1
......
......@@ -17,9 +17,11 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from ..compat import *
class Random(object):
@staticmethod
......
......@@ -17,8 +17,8 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from .compat import *
from .compat import *
try:
from mpi4py import MPI
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from .compat import *
from .domains.domain import Domain
......
......@@ -17,8 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from ..compat import *
from .structured_domain import StructuredDomain
......
......@@ -17,8 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import abc
from ..compat import *
from ..utilities import NiftyMetaBase
......
......@@ -17,8 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from ..compat import *
from .structured_domain import StructuredDomain
......
......@@ -17,8 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from ..compat import *
from .structured_domain import StructuredDomain
......
......@@ -17,10 +17,12 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from .structured_domain import StructuredDomain
from ..compat import *
from ..field import Field
from .structured_domain import StructuredDomain
class LMSpace(StructuredDomain):
......
......@@ -17,11 +17,13 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from ..sugar import exp
import numpy as np
from .. import dobj
from ..compat import *
from ..field import Field
from ..sugar import exp
from .structured_domain import StructuredDomain
......
......@@ -17,10 +17,12 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from .structured_domain import StructuredDomain
from .. import dobj
from ..compat import *
from .structured_domain import StructuredDomain
class PowerSpace(StructuredDomain):
......
......@@ -17,11 +17,13 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from .structured_domain import StructuredDomain
from ..field import Field
from .. import dobj
from ..compat import *
from ..field import Field
from .structured_domain import StructuredDomain
class RGSpace(StructuredDomain):
......
......@@ -17,11 +17,14 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import abc
from .domain import Domain
import numpy as np
from ..compat import *
from .domain import Domain
class StructuredDomain(Domain):
"""The abstract base class for all structured NIFTy domains.
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from .domain import Domain
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from ..library.gaussian_energy import GaussianEnergy
from ..minimization.energy import Energy
......
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