From 256579f1f7c32057478b0136823cf4fc3705f0cb Mon Sep 17 00:00:00 2001 From: caron <j.caron@fz-juelich.de> Date: Wed, 8 Nov 2017 10:19:16 +0100 Subject: [PATCH] New TODOs and small changes to environment.yml... again... --- environment.yml | 6 ++-- pyramid/colors.py | 34 +++++++++---------- .../utils/reconstruction_2d_from_phasemap.py | 2 +- setup.py | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/environment.yml b/environment.yml index 6cc8d98..f328762 100644 --- a/environment.yml +++ b/environment.yml @@ -5,7 +5,7 @@ # To see if compatible upgrades are available for the current packages, use "conda upgrade --all"! # When packages are deprecated/deleted, it may be best to recreate the environment from scratch! -name: pyramid +name: pyramid-legacy channels: - defaults # Default conda channels, on top to keep highest priority! @@ -16,7 +16,7 @@ dependencies: # Basic: - python=3.5 # TODO: upgrade to 3.6! - numpy=1.11 - - scipy=0.19 + - scipy=0.19 # TODO: upgrade to 1.0 (if channels exist...)! - tqdm=4.14 - scikit-image=0.13 # Fast computation: @@ -27,7 +27,7 @@ dependencies: # - hyperspy-gui-traitsui=1.0 # TODO: Optional! Delete when mayavi is gone! - h5py=2.7 # Plotting and colors: # TODO: Shift to plotting package? - - matplotlib=2.0 # Only conda-forge channel has working version for qt4! + - matplotlib=1.5 # Only conda-forge channel has working version for qt4! - Pillow=4.1 - cmocean=1.1 - qt=4.8 # Necessary because of traits in mayavi... On server, pyqt=5.6 is needed! diff --git a/pyramid/colors.py b/pyramid/colors.py index 35a6ad7..4051ef1 100644 --- a/pyramid/colors.py +++ b/pyramid/colors.py @@ -436,23 +436,23 @@ class ColormapClassic(colors.LinearSegmentedColormap, Colormap3D): _log = logging.getLogger(__name__ + '.ColormapClassic') - CDICT = {'red': [(0.00, 1.0, 1.0), - (0.25, 0.0, 0.0), - (0.50, 0.0, 0.0), - (0.75, 1.0, 1.0), - (1.00, 1.0, 1.0)], - - 'green': [(0.00, 0.0, 0.0), - (0.25, 0.0, 0.0), - (0.50, 1.0, 1.0), - (0.75, 1.0, 1.0), - (1.00, 0.0, 0.0)], - - 'blue': [(0.00, 0.0, 0.0), - (0.25, 1.0, 1.0), - (0.50, 0.0, 0.0), - (0.75, 0.0, 0.0), - (1.00, 0.0, 0.0)]} + CDICT = {'red': [(0/4, 1.0, 1.0), + (1/4, 0.0, 0.0), + (2/4, 0.0, 0.0), + (3/4, 1.0, 1.0), + (4/4, 1.0, 1.0)], + + 'green': [(0/4, 0.0, 0.0), + (1/4, 0.0, 0.0), + (2/4, 1.0, 1.0), + (3/4, 1.0, 1.0), + (4/4, 0.0, 0.0)], + + 'blue': [(0/4, 0.0, 0.0), + (1/4, 1.0, 1.0), + (2/4, 0.0, 0.0), + (3/4, 0.0, 0.0), + (4/4, 0.0, 0.0)]} def __init__(self): self._log.debug('Calling __init__') diff --git a/pyramid/utils/reconstruction_2d_from_phasemap.py b/pyramid/utils/reconstruction_2d_from_phasemap.py index f99f589..e519e36 100644 --- a/pyramid/utils/reconstruction_2d_from_phasemap.py +++ b/pyramid/utils/reconstruction_2d_from_phasemap.py @@ -21,7 +21,7 @@ from .pm import pm __all__ = ['reconstruction_2d_from_phasemap'] _log = logging.getLogger(__name__) - +# TODO: lam should NOT have a default!!! def reconstruction_2d_from_phasemap(phasemap, b_0=1, lam=1E-3, max_iter=100, ramp_order=1, plot_results=False, ar_dens=None, verbose=True): """Convenience function for reconstructing a projected distribution from a single phasemap. diff --git a/setup.py b/setup.py index 9215f64..0009dca 100644 --- a/setup.py +++ b/setup.py @@ -147,7 +147,7 @@ extras_require = { } extras_require["all"] = list(itertools.chain(*list(extras_require.values()))) - +# TODO: What about the demo? print('\n-------------------------------------------------------------------------------') # print('checking requirements') # TODO: Get rid of! -- GitLab