From 9949fff0865bd0f03a5ffe9606b9fcc781e47f2e Mon Sep 17 00:00:00 2001 From: Philipp Arras <parras@mpa-garching.mpg.de> Date: Tue, 10 Jul 2018 10:40:08 +0200 Subject: [PATCH] Cosmetics --- demos/getting_started_1.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/demos/getting_started_1.py b/demos/getting_started_1.py index 56fdcb33d..8b6d59dcf 100644 --- a/demos/getting_started_1.py +++ b/demos/getting_started_1.py @@ -22,18 +22,19 @@ if __name__ == '__main__': # FIXME description of the tutorial # Choose problem geometry and masking - - # One dimensional regular grid - position_space = ift.RGSpace([1024]) - mask = np.ones(position_space.shape) - - # # Two dimensional regular grid with chess mask - # position_space = ift.RGSpace([128, 128]) - # mask = make_chess_mask(position_space) - - # # Sphere with half of its locations randomly masked - # position_space = ift.HPSpace(128) - # mask = make_random_mask() + mode = 0 + if mode == 0: + # One dimensional regular grid + position_space = ift.RGSpace([1024]) + mask = np.ones(position_space.shape) + elif mode == 1: + # Two dimensional regular grid with chess mask + position_space = ift.RGSpace([128, 128]) + mask = make_chess_mask(position_space) + else: + # Sphere with half of its locations randomly masked + position_space = ift.HPSpace(128) + mask = make_random_mask() harmonic_space = position_space.get_default_codomain() HT = ift.HarmonicTransformOperator(harmonic_space, target=position_space) -- GitLab