From 00390d877ee411bf3b4aaa466e66e8552296688d Mon Sep 17 00:00:00 2001 From: Martin Reinecke <martin@mpa-garching.mpg.de> Date: Tue, 3 Jul 2018 14:09:46 +0200 Subject: [PATCH] fixes --- .gitlab-ci.yml | 2 ++ demos/getting_started_3.py | 8 ++++---- nifty5/__init__.py | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1581304c6..6cea51006 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -82,12 +82,14 @@ run_getting_started_1: script: - python demos/getting_started_1.py - python3 demos/getting_started_1.py + - mpiexec -n 2 --bind-to none python3 demos/getting_started_1.py 2> /dev/null run_getting_started_2: stage: demo_runs script: - python demos/getting_started_2.py - python3 demos/getting_started_2.py + - mpiexec -n 2 --bind-to none python3 demos/getting_started_2.py 2> /dev/null run_getting_started_3: stage: demo_runs diff --git a/demos/getting_started_3.py b/demos/getting_started_3.py index 56e94b2d1..52873edac 100644 --- a/demos/getting_started_3.py +++ b/demos/getting_started_3.py @@ -15,7 +15,7 @@ if __name__ == '__main__': position_space = ift.RGSpace([128, 128]) # Setting up an amplitude model - A, amplitude_internals = ift.library.make_amplitude_model( + A, amplitude_internals = ift.make_amplitude_model( position_space, 16, 1, 10, -4., 1, 0., 1.) # Building the model for a correlated signal @@ -32,14 +32,14 @@ if __name__ == '__main__': correlated_field_h = Amp * xi correlated_field = ht(correlated_field_h) # alternatively to the block above one can do: - # correlated_field,_ = ift.library.make_correlated_field(position_space, A) + # correlated_field,_ = ift.make_correlated_field(position_space, A) # apply some nonlinearity signal = ift.PointwisePositiveTanh(correlated_field) # Building the Line of Sight response LOS_starts, LOS_ends = get_random_LOS(100) - R = ift.library.LOSResponse(position_space, starts=LOS_starts, - ends=LOS_ends) + R = ift.LOSResponse(position_space, starts=LOS_starts, + ends=LOS_ends) # build signal response model and model likelihood signal_response = R(signal) # specify noise diff --git a/nifty5/__init__.py b/nifty5/__init__.py index c8ebede34..a32e88f4f 100644 --- a/nifty5/__init__.py +++ b/nifty5/__init__.py @@ -74,7 +74,6 @@ from .minimization.energy_sum import EnergySum from .sugar import * from .plotting.plot import plot -from .library import * from .library.amplitude_model import make_amplitude_model from .library.apply_data import ApplyData from .library.gaussian_energy import GaussianEnergy -- GitLab