<html><body>
<p>1 new commit in yt:</p>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/b608c33bfeae/">https://bitbucket.org/yt_analysis/yt/commits/b608c33bfeae/</a> Changeset:   b608c33bfeae Branch:      yt User:        ngoldbaum Date:        2016-03-28 16:52:24+00:00 Summary:     Merged in MatthewTurk/yt (pull request #2067)</p>
<p>Add colormaps and change default to ‘arbre’ Affected #:  18 files</p>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 doc/source/visualizing/colormaps/index.rst --- a/doc/source/visualizing/colormaps/index.rst +++ b/doc/source/visualizing/colormaps/index.rst @@ -97,7 +97,8 @@</p>
<pre>.. code-block:: python

    import yt</pre>
<ul><li><p>yt.show_colormaps(subset=['algae', ‘kamae’, 'spectral'],</p></li></ul>
<p>+    yt.show_colormaps(subset=['algae', ‘kamae’, ‘spectral’, +                              ‘arbre’, ‘dusk’, ‘octarine’, 'kelp'],</p>
<pre>                      filename="yt_native.png")

Applying a Colormap to your Rendering</pre>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 yt/analysis_modules/cosmological_observation/light_cone/light_cone.py --- a/yt/analysis_modules/cosmological_observation/light_cone/light_cone.py +++ b/yt/analysis_modules/cosmological_observation/light_cone/light_cone.py @@ -17,6 +17,8 @@</p>
<pre>import numpy as np
import os
</pre>
<p>+from yt.config import \ +    ytcfg</p>
<pre>from yt.funcs import \
    mylog, \
    only_on_root</pre>
<p>@@ -233,7 +235,7 @@</p>
<pre>weight_field=None, photon_field=False,
save_stack=True, save_final_image=True,
save_slice_images=False,</pre>
<ul><li><p>cmap_name="algae",</p></li></ul>
<p>+                           cmap_name=None,</p>
<pre>                           njobs=1, dynamic=False):
        r"""Create projections for light cone, then add them together.
</pre>
<p>@@ -266,7 +268,7 @@</p>
<pre>Default: False.
         cmap_name : string
color map for images.</pre>
<ul><li><p>Default: “algae”.</p></li></ul>
<p>+            Default: your default colormap.</p>
<pre>         njobs : int
The number of parallel jobs over which the light cone projection
will be split.  Choose -1 for one processor per individual</pre>
<p>@@ -279,6 +281,9 @@</p>
<pre>        """
</pre>
<p>+        if cmap_name is None: +            cmap_name = ytcfg.get("yt", “default_colormap”) +</p>
<pre>         if isinstance(field_of_view, tuple) and len(field_of_view) == 2:
field_of_view = self.simulation.quan(field_of_view[0],
                                     field_of_view[1])</pre>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 yt/analysis_modules/sunyaev_zeldovich/projection.py --- a/yt/analysis_modules/sunyaev_zeldovich/projection.py +++ b/yt/analysis_modules/sunyaev_zeldovich/projection.py @@ -18,6 +18,8 @@</p>
<pre># The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
</pre>
<p>+from yt.config import \ +    ytcfg</p>
<pre>from yt.utilities.physical_constants import sigma_thompson, clight, hcgs, kboltz, mh, Tcmb
from yt.funcs import fix_axis, get_pbar
from yt.visualization.volume_rendering.off_axis_projection import \</pre>
<p>@@ -391,7 +393,7 @@</p>
<pre>        fib.writeto(filename, clobber=clobber)

    @parallel_root_only</pre>
<ul><li><p>def write_png(self, filename_prefix, cmap_name="algae",</p></li></ul>
<p>+    def write_png(self, filename_prefix, cmap_name=None,</p>
<pre>axes_units="kpc", log_fields=None):
         r""" Export images to PNG files. Writes the SZ distortion in all
         specified frequencies as well as the mass-weighted temperature and the</pre>
<p>@@ -406,6 +408,9 @@</p>
<pre>--------
>>> szprj.write_png("SZsloshing")
"""</pre>
<p>+        if cmap_name is None: +            cmap_name = ytcfg.get("yt", “default_colormap”) +</p>
<pre>import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt</pre>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 yt/config.py --- a/yt/config.py +++ b/yt/config.py @@ -61,6 +61,7 @@</p>
<pre>ignore_invalid_unit_operation_errors = 'False',
chunk_size = '1000',
xray_data_dir = '/does/not/exist',</pre>
<p>+    default_colormap = ‘arbre’,</p>
<pre>    )
# Here is the upgrade.  We're actually going to parse the file in its entirety
# here.  Then, if it has any of the Forbidden Sections, it will be rewritten</pre>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 yt/data_objects/construction_data_containers.py --- a/yt/data_objects/construction_data_containers.py +++ b/yt/data_objects/construction_data_containers.py @@ -1225,7 +1225,7 @@</p>
<pre>        return vv

    def export_obj(self, filename, transparency = 1.0, dist_fac = None,</pre>
<ul><li><p>color_field = None, emit_field = None, color_map = “algae”,</p></li></ul>
<p>+                   color_field = None, emit_field = None, color_map = None,</p>
<pre>color_log = True, emit_log = True, plot_index = None,
color_field_max = None, color_field_min = None,
emit_field_max = None, emit_field_min = None):</pre>
<p>@@ -1305,6 +1305,8 @@</p>
<pre>        ...                      dist_fac = distf, plot_index = i)

        """</pre>
<p>+        if color_map is None: +            color_map = ytcfg.get("yt", “default_colormap”)</p>
<pre>         if self.vertices is None:
if color_field is not None:
    self.get_data(color_field,"face")</pre>
<p>@@ -1379,10 +1381,12 @@</p>
<pre>@parallel_root_only
def _export_obj(self, filename, transparency, dist_fac = None,</pre>
<ul><li><p>color_field = None, emit_field = None, color_map = “algae”,</p></li></ul>
<p>+                    color_field = None, emit_field = None, color_map = None,</p>
<pre>color_log = True, emit_log = True, plot_index = None,
color_field_max = None, color_field_min = None,
emit_field_max = None, emit_field_min = None):</pre>
<p>+        if color_map is None: +            color_map = ytcfg.get("yt", “default_colormap”)</p>
<pre>         if plot_index is None:
plot_index = 0
         if isinstance(filename, io.IOBase):</pre>
<p>@@ -1473,7 +1477,7 @@</p>
<pre>def export_blender(self,  transparency = 1.0, dist_fac = None,</pre>
<ul><li><p>color_field = None, emit_field = None, color_map = “algae”,</p></li></ul>
<p>+                   color_field = None, emit_field = None, color_map = None,</p>
<pre>color_log = True, emit_log = True, plot_index = None,
color_field_max = None, color_field_min = None,
emit_field_max = None, emit_field_min = None):</pre>
<p>@@ -1553,6 +1557,8 @@</p>
<pre>        ...                      dist_fac = distf, plot_index = i)

        """</pre>
<p>+        if color_map is None: +            color_map = ytcfg.get("yt", “default_colormap”)</p>
<pre>         if self.vertices is None:
if color_field is not None:
    self.get_data(color_field,"face")</pre>
<p>@@ -1572,10 +1578,12 @@</p>
<pre>        return fullverts, colors, alpha, emisses, colorindex

    def _export_blender(self, transparency, dist_fac = None,</pre>
<ul><li><p>color_field = None, emit_field = None, color_map = “algae”,</p></li></ul>
<p>+                    color_field = None, emit_field = None, color_map = None,</p>
<pre>color_log = True, emit_log = True, plot_index = None,
color_field_max = None, color_field_min = None,
emit_field_max = None, emit_field_min = None):</pre>
<p>+        if color_map is None: +            color_map = ytcfg.get("yt", “default_colormap”)</p>
<pre>         if plot_index is None:
plot_index = 0
         ftype = [("cind", "uint8"), ("emit", "float")]</pre>
<p>@@ -1620,7 +1628,7 @@</p>
<pre>def export_ply(self, filename, bounds = None, color_field = None,</pre>
<ul><li><p>color_map = “algae”, color_log = True, sample_type = “face”,</p></li></ul>
<p>+                   color_map = None, color_log = True, sample_type = “face”,</p>
<pre>no_ghost=False):
         r"""This exports the surface to the PLY format, suitable for visualization
         in many different programs (e.g., MeshLab).</pre>
<p>@@ -1652,6 +1660,8 @@</p>
<pre>...            sp.center[i] + 5.0*kpc) for i in range(3)]
>>> surf.export_ply("my_galaxy.ply", bounds = bounds)
"""</pre>
<p>+        if color_map is None: +            color_map = ytcfg.get("yt", “default_colormap”)</p>
<pre>         if self.vertices is None:
self.get_data(color_field, sample_type, no_ghost=no_ghost)
         elif color_field is not None:</pre>
<p>@@ -1676,7 +1686,9 @@</p>
<pre>@parallel_root_only
def _export_ply(self, filename, bounds = None, color_field = None,</pre>
<ul><li><p>color_map = “algae”, color_log = True, sample_type = "face"):</p></li></ul>
<p>+                   color_map = None, color_log = True, sample_type = “face"): +        if color_map is None: +            color_map = ytcfg.get("yt”, “default_colormap”)</p>
<pre>         if hasattr(filename, 'read'):
f = filename
         else:</pre>
<p>@@ -1740,7 +1752,7 @@</p>
<pre>            f.close()

    def export_sketchfab(self, title, description, api_key = None,</pre>
<ul><li><p>color_field = None, color_map = “algae”,</p></li></ul>
<p>+                            color_field = None, color_map = None,</p>
<pre>color_log = True, bounds = None, no_ghost = False):
         r"""This exports Surfaces to SketchFab.com, where they can be viewed
         interactively in a web browser.</pre>
<p>@@ -1797,6 +1809,8 @@</p>
<pre>...     bounds = bounds)
...
"""</pre>
<p>+        if color_map is None: +            color_map = ytcfg.get("yt", “default_colormap”)</p>
<pre>         api_key = api_key or ytcfg.get("yt","sketchfab_api_key")
         if api_key in (None, "None"):
raise YTNoAPIKey("SketchFab.com", "sketchfab_api_key")</pre>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 yt/data_objects/image_array.py --- a/yt/data_objects/image_array.py +++ b/yt/data_objects/image_array.py @@ -13,6 +13,8 @@</p>
<pre>import warnings
import numpy as np</pre>
<p>+from yt.config import \ +    ytcfg</p>
<pre>from yt.visualization.image_writer import write_bitmap, write_image
from yt.units.yt_array import YTArray
</pre>
<p>@@ -307,7 +309,7 @@</p>
<pre>            return write_bitmap(out.swapaxes(0, 1), filename)

    def write_image(self, filename, color_bounds=None, channel=None,</pre>
<ul><li><p>cmap_name="algae", func=lambda x: x):</p></li></ul>
<p>+                    cmap_name=None, func=lambda x: x):</p>
<pre>        r"""Writes a single channel of the ImageArray to a png file.

        Parameters</pre>
<p>@@ -348,6 +350,8 @@</p>
<pre>        >>> im_arr.write_image('test_ImageArray.png')

        """</pre>
<p>+        if cmap_name is None: +            cmap_name = ytcfg.get("yt", “default_colormap”)</p>
<pre>        if filename[-4:] != '.png':
            filename += '.png'
</pre>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 yt/utilities/command_line.py --- a/yt/utilities/command_line.py +++ b/yt/utilities/command_line.py @@ -50,6 +50,8 @@</p>
<pre>if ytcfg.getboolean("yt","loadfieldplugins"):
    enable_plugins()
</pre>
<p>+_default_colormap = ytcfg.get("yt", “default_colormap”) +</p>
<pre>def _fix_ds(arg):
    if os.path.isdir("%s" % arg) and \
        os.path.exists("%s/%s" % (arg,arg)):</pre>
<p>@@ -160,7 +162,7 @@</p>
<pre>help="Field to weight projections with"),
     cmap    = dict(longname="--colormap",
action="store", type=str,</pre>
<ul><li><p>dest="cmap", default="algae",</p></li></ul>
<p>+                   dest="cmap", default=_default_colormap,</p>
<pre>help="Colormap name"),
     zlim    = dict(short="-z", longname="--zlim",
action="store", type=float,</pre>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 yt/visualization/_colormap_data.py --- a/yt/visualization/_colormap_data.py +++ b/yt/visualization/_colormap_data.py @@ -7816,6 +7816,566 @@</p>
<pre>np.ones(256),
)
</pre>
<p>+_parameters = {'xp': [-6.0027356902356814, -42.46106902356901, +                      41.393097643097661, 69.344486531986547, 6.15004208754209, +                      17.695180976430976], +               ‘yp’: [-19.704861111111086, 56.857638888888886, +                       -8.1597222222222001, 58.680555555555543, -23.958333333333314, +                      -16.059027777777771], +               ‘min_Jp’: 17.1875, +               ‘max_Jp’: 82.1875} +color_map_luts["octarine"] = (array( +  [ 0.01845663, 0.01940818, 0.02066025, 0.02218966, 0.02395409, 0.02595033, +    0.02817596, 0.03060653, 0.03322304, 0.03602798, 0.03900455, 0.04208415, +    0.04516324, 0.04823603, 0.05128648, 0.05431253, 0.05730541, 0.06025524, +    0.0631607 , 0.06601581, 0.0688137 , 0.07155484, 0.07423302, 0.07684491, +    0.07939306, 0.08186684, 0.08427203, 0.08660745, 0.08886448, 0.09105658, +    0.09316971, 0.09521672, 0.09719719, 0.09910774, 0.10096841, 0.10275846, +    0.10451309, 0.10621217, 0.10788683, 0.10952759, 0.1111585 , 0.11277895, +    0.11440998, 0.11605498, 0.11773643, 0.11945691, 0.12124361, 0.1230952, +    0.12504265, 0.12708539, 0.12924907, 0.13154308, 0.13398218, 0.13657917, +    0.13934934, 0.14230244, 0.14544595, 0.14880137, 0.15236868, 0.15615269, +    0.16016659, 0.16442043, 0.16890677, 0.1736277 , 0.17858407, 0.18378678, +    0.18922358, 0.19488582, 0.20076673, 0.2068576 , 0.21314778, 0.21962487, +    0.22627485, 0.23308241, 0.24003134, 0.2471049 , 0.25428629, 0.26155934, +    0.26890755, 0.27631616, 0.28377157, 0.29126147, 0.29877494, 0.30630245, +    0.31383585, 0.3213683 , 0.32889415, 0.33640883, 0.34390875, 0.35139113, +    0.35885392, 0.36629566, 0.37371536, 0.38111248, 0.38848676, 0.39583821, +    0.40316703, 0.41047357, 0.41775516, 0.42501568, 0.4322558 , 0.43947622, +    0.44667761, 0.4538607 , 0.46102616, 0.4681747 , 0.4753059 , 0.48242091, +    0.48952159, 0.49660864, 0.50368272, 0.5107445 , 0.51779465, 0.52483372, +    0.53186264, 0.53888257, 0.54589416, 0.55289811, 0.55989507, 0.56688575, +    0.57387113, 0.58085317, 0.58783159, 0.59480708, 0.60178032, 0.60875202, +    0.61572288, 0.62269359, 0.6296661 , 0.63664175, 0.64361962, 0.65060034, +    0.65758453, 0.66457277, 0.67156565, 0.67856369, 0.68556743, 0.69257733, +    0.69959381, 0.70661727, 0.71364828, 0.72068785, 0.7277347 , 0.73478882, +    0.74185008, 0.74891821, 0.7559928 , 0.76307522, 0.77016399, 0.77725777, +    0.78435528, 0.79145495, 0.7985548 , 0.8056524 , 0.81274479, 0.8198318, +    0.82691566, 0.83398271, 0.84102675, 0.84805028, 0.85504479, 0.8619907, +    0.86889642, 0.87572945, 0.88249039, 0.88914374, 0.89568162, 0.90206422, +    0.90825663, 0.91421853, 0.91990203, 0.92525379, 0.93021961, 0.93475119, +    0.93881359, 0.94239114, 0.94548927, 0.94813199, 0.950356  , 0.95220389, +    0.95371848, 0.95494533, 0.955918  , 0.95666379, 0.95722053, 0.95760023, +    0.95783176, 0.95791958, 0.95789564, 0.9577547 , 0.95751076, 0.95718454, +    0.95677095, 0.95627776, 0.95571186, 0.95508526, 0.95439943, 0.95365604, +    0.95285946, 0.9520137 , 0.9511224 , 0.95018892, 0.94921639, 0.94820771, +    0.94716564, 0.94609279, 0.94499169, 0.94386477, 0.9427144 , 0.94154291, +    0.94035262, 0.9391458 , 0.93792477, 0.93669181, 0.93544924, 0.9341994, +    0.93294465, 0.93168737, 0.93042998, 0.92917492, 0.92792467, 0.9266817, +    0.92544809, 0.92422626, 0.92301878, 0.9218282 , 0.92065707, 0.91950796, +    0.91838341, 0.91728597, 0.91621816, 0.91518248, 0.91418144, 0.9132175, +    0.91229316, 0.91141094, 0.91057341, 0.90978329, 0.90904349, 0.90835722, +    0.90772821, 0.90716087, 0.9066524 , 0.90620748, 0.90584124, 0.90556585, +    0.90536904, 0.90529003, 0.90533583, 0.90556318, 0.90603649, 0.90695623, +    0.90913313, 0.91657895, 0.92518702, 0.93347579]), array( +  [ 0.14549808, 0.14959758, 0.15353745, 0.15733732, 0.1610376 , 0.16463933, +    0.16813881, 0.17155785, 0.17491483, 0.17819541, 0.18141182, 0.18458839, +    0.18770724, 0.19077643, 0.19381948, 0.19681897, 0.19978209, 0.20272758, +    0.20564068, 0.20852987, 0.21140659, 0.21425995, 0.21710135, 0.21993298, +    0.22274859, 0.22556395, 0.22836995, 0.23116975, 0.23397288, 0.23676848, +    0.23957041, 0.24237069, 0.2451726 , 0.24798083, 0.25078633, 0.2536041, +    0.25641791, 0.25924206, 0.26206407, 0.2648926 , 0.2677197 , 0.27054988, +    0.27337716, 0.27620452, 0.27902542, 0.28184388, 0.28465047, 0.28745244, +    0.29023681, 0.29301229, 0.2957673 , 0.2985035 , 0.30121847, 0.30390569, +    0.30656793, 0.30919798, 0.31179276, 0.31435225, 0.3168706 , 0.31934487, +    0.32177243, 0.32414968, 0.32647317, 0.32873992, 0.3309469 , 0.33309004, +    0.33516695, 0.33717534, 0.33911292, 0.34097773, 0.34276826, 0.34448346, +    0.34612285, 0.34768649, 0.34917502, 0.35058959, 0.35193184, 0.35320373, +    0.35440776, 0.3555465 , 0.35662265, 0.35763896, 0.35859819, 0.35950301, +    0.36035598, 0.36115947, 0.36191571, 0.36262669, 0.36329423, 0.36391995, +    0.36450527, 0.36505146, 0.36555959, 0.36603063, 0.36646538, 0.36686454, +    0.36722872, 0.36755843, 0.36785545, 0.36811875, 0.36834862, 0.36854528, +    0.3687089 , 0.36883963, 0.36893758, 0.36900282, 0.36903596, 0.36903681, +    0.36900473, 0.36893965, 0.36884148, 0.36871009, 0.36854532, 0.36834702, +    0.36811484, 0.3678482 , 0.36754678, 0.36721023, 0.36683815, 0.36643008, +    0.36598535, 0.36550255, 0.36498174, 0.36442226, 0.36382344, 0.36318451, +    0.3625047 , 0.36178315, 0.36101802, 0.36020779, 0.35935264, 0.35845149, +    0.35750326, 0.35650677, 0.35546082, 0.35436416, 0.35321545, 0.35201335, +    0.35075644, 0.34944329, 0.34807215, 0.3466408 , 0.34514904, 0.34359543, +    0.34197858, 0.34029709, 0.33854968, 0.33673306, 0.33484673, 0.33289005, +    0.33086222, 0.3287627 , 0.32659138, 0.3243486 , 0.32203538, 0.31964923, +    0.31718431, 0.31465481, 0.31206608, 0.3094119 , 0.3067005 , 0.30395628, +    0.30116449, 0.29836962, 0.29556856, 0.29281389, 0.29011662, 0.28754017, +    0.28514306, 0.28299549, 0.28118369, 0.27980714, 0.27897084, 0.27877267, +    0.27928815, 0.28055737, 0.28257918, 0.28531437, 0.2886962 , 0.29264343, +    0.29707203, 0.30189644, 0.30704703, 0.31246579, 0.318088  , 0.32388104, +    0.32979805, 0.33582149, 0.34190762, 0.34805406, 0.35424005, 0.36044006, +    0.36665573, 0.37287672, 0.37909448, 0.38529658, 0.39148116, 0.39764648, +    0.40378866, 0.40990456, 0.41599162, 0.42204777, 0.42807135, 0.43406103, +    0.44001575, 0.44593465, 0.45181705, 0.45766241, 0.46347028, 0.46924029, +    0.47497214, 0.48066556, 0.4863203 , 0.49193612, 0.49751281, 0.50305013, +    0.50854783, 0.51400566, 0.51942335, 0.52480059, 0.53013708, 0.53543248, +    0.54068668, 0.54589935, 0.55107004, 0.55619831, 0.56128369, 0.56632567, +    0.57132372, 0.5762773 , 0.58118582, 0.58604867, 0.5908652 , 0.59563471, +    0.60035645, 0.60502957, 0.60965313, 0.61422605, 0.61874705, 0.62321462, +    0.62762687, 0.63198146, 0.63627878, 0.64051559, 0.64468414, 0.64877752, +    0.6527965 , 0.65672131, 0.66054037, 0.66421949, 0.66770704, 0.67086745, +    0.67317041, 0.67282641, 0.67266658, 0.67286793]), array( +  [ 0.31784919, 0.31399639, 0.31040105, 0.30704607, 0.30380333, 0.30070875, +    0.29782465, 0.29508233, 0.29241622, 0.28993656, 0.28760832, 0.28531346, +    0.28318494, 0.28120084, 0.27922989, 0.27740774, 0.27570877, 0.27402022, +    0.27246419, 0.27099788, 0.26955239, 0.26822345, 0.26693985, 0.26569724, +    0.2645547 , 0.26340288, 0.26231968, 0.26128857, 0.26024441, 0.2592725, +    0.25827349, 0.25730732, 0.25634957, 0.25536473, 0.25441368, 0.25338488, +    0.25238608, 0.25130798, 0.25022886, 0.24907581, 0.2478929 , 0.24663333, +    0.24532558, 0.24393036, 0.24247998, 0.24092303, 0.23931621, 0.23757501, +    0.23579155, 0.23385836, 0.23186082, 0.22975416, 0.22753042, 0.22523787, +    0.22279557, 0.22026374, 0.21765214, 0.2148911 , 0.21203983, 0.20910422, +    0.20605986, 0.20289957, 0.19965924, 0.19633992, 0.19294399, 0.18945376, +    0.18589623, 0.18228559, 0.17863001, 0.17493902, 0.17122338, 0.16749485, +    0.16376586, 0.16004918, 0.15635755, 0.15270334, 0.14909821, 0.1455525, +    0.14207653, 0.13867843, 0.13536508, 0.13214209, 0.12901386, 0.12598366, +    0.12305378, 0.12022564, 0.11749993, 0.11487682, 0.11235599, 0.10993683, +    0.10761855, 0.10540021, 0.10328085, 0.10125952, 0.09933535, 0.09750756, +    0.09577548, 0.09413856, 0.09259879, 0.09115321, 0.08980156, 0.08854366, +    0.08737943, 0.0863088 , 0.08533173, 0.08444816, 0.08365874, 0.08296295, +    0.08235974, 0.08184879, 0.08142963, 0.0811017 , 0.08086426, 0.08071652, +    0.08065732, 0.08068528, 0.08079915, 0.08099759, 0.08127912, 0.08164221, +    0.08208509, 0.08260558, 0.08320245, 0.08387405, 0.08461872, 0.08543485, +    0.08632086, 0.08727529, 0.08829637, 0.08938269, 0.09053368, 0.09174839, +    0.09302606, 0.09436609, 0.09576809, 0.0972319 , 0.09875759, 0.10034547, +    0.10199611, 0.10371036, 0.10548936, 0.10733453, 0.10924784, 0.11123145, +    0.1132879 , 0.11542014, 0.11763156, 0.1199261 , 0.12230825, 0.12478303, +    0.12735611, 0.13003383, 0.13282332, 0.1357325 , 0.13877022, 0.14194733, +    0.14527745, 0.14877095, 0.15244171, 0.15631008, 0.16039526, 0.16471264, +    0.16929903, 0.17416921, 0.17936813, 0.18491671, 0.19087146, 0.19726367, +    0.20413699, 0.21153645, 0.2195002 , 0.22805202, 0.23719324, 0.24689635, +    0.25710328, 0.26773032, 0.27867898, 0.2898494 , 0.30115214, 0.31251542, +    0.3238872 , 0.33520885, 0.34646952, 0.35766645, 0.36875439, 0.37976247, +    0.39066078, 0.40148085, 0.41217762, 0.42279543, 0.4333259 , 0.44374506, +    0.45408352, 0.46434054, 0.47451587, 0.48459837, 0.49459666, 0.50451736, +    0.51436098, 0.5241281 , 0.53381937, 0.54343549, 0.55297718, 0.56244513, +    0.57184006, 0.58116264, 0.59041354, 0.59959339, 0.60870282, 0.61774243, +    0.62671284, 0.63561464, 0.64444846, 0.65321495, 0.6619148 , 0.67054874, +    0.67911758, 0.68762222, 0.69606366, 0.70444301, 0.71276152, 0.72102061, +    0.7292224 , 0.73736877, 0.74546167, 0.75350327, 0.76149601, 0.76944257, +    0.7773459 , 0.78520926, 0.79303621, 0.80083062, 0.80859672, 0.81633909, +    0.82406267, 0.83177277, 0.83947509, 0.84717571, 0.85488105, 0.86259792, +    0.87033341, 0.87809481, 0.88590073, 0.89376265, 0.90168051, 0.90966175, +    0.9177585 , 0.92595735, 0.93431661, 0.94285311, 0.95166927, 0.96090167, +    0.97095595, 0.97849108, 0.98057884, 0.98147471]), np.ones(256)) + +parameters = {'xp': [25.813729633909759, 31.169191027506741, +                    -75.940036844432967, -15.794085808651431, +                    -6.7309972964103792], +              ‘yp’: [14.230225988700568, -99.470338983050823, +                      9.2867231638418275, 41.007532956685509, +                      31.532485875706215], +              ‘min_Jp’: 27.2243940579, +              ‘max_Jp’: 94.7771696638} + +color_map_luts["arbre"] = (array( +  [ 0.44131774, 0.44370177, 0.44605933, 0.44839054, 0.45067478, 0.45293504, +    0.45516891, 0.45735977, 0.45952958, 0.46167133, 0.46377662, 0.4658642, +    0.4679203 , 0.46994924, 0.4719642 , 0.47394237, 0.47590549, 0.47785176, +    0.47976766, 0.48167637, 0.48355944, 0.48542865, 0.48728952, 0.48912419, +    0.49095845, 0.49277134, 0.49457845, 0.49637777, 0.49816203, 0.49995019, +    0.50171533, 0.50348733, 0.50524307, 0.50700027, 0.50874826, 0.51049227, +    0.51223193, 0.5139633 , 0.51569293, 0.51741103, 0.51912775, 0.52083067, +    0.52253029, 0.52421475, 0.52589174, 0.52755306, 0.52920041, 0.53083242, +    0.53244156, 0.5340366 , 0.53559728, 0.53714122, 0.53864625, 0.54012236, +    0.54156358, 0.5429568 , 0.54431299, 0.54561357, 0.5468594 , 0.54805251, +    0.54917186, 0.55022123, 0.55119891, 0.55208818, 0.55288205, 0.55358155, +    0.55417814, 0.55465144, 0.55499875, 0.55521509, 0.55529007, 0.55521283, +    0.55496547, 0.55453915, 0.55392731, 0.55311827, 0.55210037, 0.55086221, +    0.54939281, 0.54768186, 0.54571994, 0.5434988 , 0.54101159, 0.53825315, +    0.53522015, 0.53191138, 0.52832782, 0.52447273, 0.52035171, 0.51597263, +    0.51134556, 0.50648253, 0.5013963 , 0.49610438, 0.49062382, 0.48497218, +    0.47916766, 0.47322878, 0.46717417, 0.46102228, 0.45479123, 0.44850028, +    0.44216678, 0.43580508, 0.42943042, 0.42305718, 0.41669888, 0.41036814, +    0.4040767 , 0.39783545, 0.39165443, 0.38554287, 0.37950919, 0.37356107, +    0.36770548, 0.36194865, 0.35629619, 0.35075301, 0.34532345, 0.34001119, +    0.33481937, 0.32975052, 0.32480662, 0.31998909, 0.3152988 , 0.31073609, +    0.30630076, 0.30199208, 0.29780879, 0.29374913, 0.28981083, 0.28599112, +    0.2822876 , 0.2786961 , 0.27521186, 0.27183029, 0.2685464 , 0.26535482, +    0.26224983, 0.2592254 , 0.25627525, 0.25339285, 0.25057146, 0.24780425, +    0.24508425, 0.24240456, 0.23975784, 0.23713717, 0.23453574, 0.23194694, +    0.2293644 , 0.22678204, 0.22419418, 0.22159558, 0.21898153, 0.21634792, +    0.21369107, 0.21100766, 0.2082966 , 0.20555708, 0.20278935, 0.19999489, +    0.19717647, 0.19433834, 0.19148635, 0.18862811, 0.18577317, 0.18293319, +    0.1801221 , 0.17735631, 0.17465482, 0.17203943, 0.16953482, 0.16716741, +    0.16496905, 0.16297318, 0.16121584, 0.15973528, 0.15857143, 0.15776521, +    0.15735758, 0.15738856, 0.15789607, 0.15891475, 0.16047487, 0.16260134, +    0.16531299, 0.16862212, 0.17253417, 0.17704869, 0.18215934, 0.1878543, +    0.19411741, 0.20092909, 0.20826721, 0.21610797, 0.22442667, 0.23319827, +    0.24239792, 0.25200153, 0.26199056, 0.27233871, 0.28302468, 0.29402831, +    0.30533058, 0.31691362, 0.3287703 , 0.34087697, 0.353218  , 0.36577922, +    0.37855287, 0.39153018, 0.40469046, 0.41802196, 0.43152574, 0.4451854, +    0.45898439, 0.47292271, 0.48699148, 0.50116973, 0.51546387, 0.52985625, +    0.54433284, 0.55890334, 0.57353506, 0.58824263, 0.60299664, 0.61780476, +    0.63264342, 0.64751846, 0.66240265, 0.67730956, 0.69220565, 0.70709988, +    0.72197277, 0.73680781, 0.75161342, 0.76636275, 0.78104266, 0.7956434, +    0.81016108, 0.82456869, 0.83884997, 0.85298622, 0.8669555 , 0.88073158, +    0.89428251, 0.90756872, 0.92054055, 0.933148  , 0.94530521, 0.95690622, +    0.96783447, 0.97790967, 0.986926  , 0.99464852]), array( +  [ 0.05626182, 0.06063603, 0.06486246, 0.06895821, 0.07296132, 0.0768539, +    0.08064911, 0.08437114, 0.08800482, 0.09156317, 0.09505774, 0.09847813, +    0.10183875, 0.10513951, 0.1083756 , 0.11156296, 0.11469159, 0.11776515, +    0.12079126, 0.12376178, 0.12668524, 0.1295584 , 0.13238112, 0.13515848, +    0.13788542, 0.14056641, 0.14319933, 0.14578505, 0.14832396, 0.15081614, +    0.15326083, 0.15565984, 0.15801096, 0.16031668, 0.16257524, 0.16478787, +    0.16695485, 0.1690751 , 0.17115162, 0.17318085, 0.17516841, 0.1771089, +    0.17900954, 0.18086473, 0.18268134, 0.18445603, 0.18619262, 0.18789332, +    0.18955541, 0.19119063, 0.19278568, 0.19436176, 0.19590425, 0.19742907, +    0.19893786, 0.20042606, 0.20191306, 0.20339073, 0.2048706 , 0.20636577, +    0.20786968, 0.20939933, 0.21096715, 0.21257494, 0.21423423, 0.21596274, +    0.21777215, 0.21966954, 0.22167374, 0.22380222, 0.22607063, 0.22849545, +    0.23109288, 0.23388218, 0.23688208, 0.24011005, 0.24358302, 0.24731693, +    0.2513262 , 0.25562329, 0.26021807, 0.26511744, 0.2703248 , 0.27583977, +    0.28165796, 0.28777089, 0.29416603, 0.30082712, 0.30773447, 0.3148655, +    0.3221953 , 0.32969733, 0.33734475, 0.34510833, 0.35296022, 0.36087366, +    0.3688232 , 0.37678504, 0.38473729, 0.39266014, 0.40053592, 0.40834821, +    0.41608347, 0.42373148, 0.43128293, 0.43873028, 0.44606759, 0.45329038, +    0.46039546, 0.46738076, 0.47424525, 0.48098872, 0.48761174, 0.49411548, +    0.50050166, 0.50677243, 0.51293031, 0.51897811, 0.52491887, 0.53075583, +    0.53649234, 0.54213187, 0.54767795, 0.55313418, 0.55850412, 0.56379138, +    0.56899954, 0.57413213, 0.57919266, 0.58418458, 0.58911129, 0.59397611, +    0.59878205, 0.60353246, 0.60823062, 0.61287956, 0.61748225, 0.62204154, +    0.62656023, 0.63104102, 0.63548651, 0.63989924, 0.64428164, 0.64863606, +    0.65296474, 0.65726983, 0.66155346, 0.66581762, 0.67006415, 0.67429484, +    0.67851134, 0.68271522, 0.68690793, 0.69109084, 0.69526517, 0.69943206, +    0.70359259, 0.70774778, 0.7118983 , 0.71604481, 0.72018788, 0.72432796, +    0.72846539, 0.73260037, 0.73673302, 0.74086331, 0.74499111, 0.7491162, +    0.75323821, 0.7573567 , 0.76147109, 0.76558071, 0.7696848 , 0.77378264, +    0.7778731 , 0.7819551 , 0.78602749, 0.79008902, 0.79413838, 0.79817417, +    0.80219489, 0.80619902, 0.81018492, 0.81415092, 0.81809528, 0.82201619, +    0.8259118 , 0.82978021, 0.83361959, 0.83742793, 0.84120311, 0.84494307, +    0.84864571, 0.85230891, 0.85593052, 0.85950837, 0.86304028, 0.86652408, +    0.86995756, 0.87333854, 0.87666491, 0.87993431, 0.88314454, 0.88629345, +    0.88937891, 0.89239883, 0.89535078, 0.89823289, 0.9010432 , 0.9037798, +    0.90644047, 0.90902303, 0.91152628, 0.91394863, 0.91628739, 0.91854149, +    0.92071018, 0.92279108, 0.92478281, 0.92668571, 0.92849682, 0.93021638, +    0.93184454, 0.9333779 , 0.93481986, 0.93616638, 0.93742098, 0.9385809, +    0.93964931, 0.94062391, 0.94150928, 0.94230167, 0.94300773, 0.9436249, +    0.9441573 , 0.94460885, 0.94497728, 0.9452696 , 0.94548972, 0.94564084, +    0.94572458, 0.94574964, 0.94572195, 0.94564856, 0.94553784, 0.94539999, +    0.94524753, 0.94509613, 0.94496566, 0.94487644, 0.94486297, 0.94496862, +    0.9452415 , 0.94575723, 0.94660423, 0.94788672]), array( +  [ 0.04951266, 0.06083219, 0.07165053, 0.08210915, 0.09247329, 0.10260581, +    0.11257765, 0.12255122, 0.13238498, 0.14215586, 0.15194141, 0.16162489, +    0.17131665, 0.18099838, 0.19059467, 0.20026607, 0.20988044, 0.21946015, +    0.22909981, 0.23866289, 0.24827349, 0.25786718, 0.2674192 , 0.27704703, +    0.28660208, 0.2962198 , 0.30581382, 0.31540414, 0.3250423 , 0.33462062, +    0.34430922, 0.35393291, 0.36363845, 0.37332276, 0.38305586, 0.39280948, +    0.40258886, 0.41242099, 0.42226577, 0.43218573, 0.44211511, 0.45213185, +    0.46216464, 0.47228627, 0.48244044, 0.49267364, 0.50296577, 0.51331525, +    0.52375993, 0.53422779, 0.54483694, 0.55545388, 0.56620423, 0.57700138, +    0.5878611 , 0.59884035, 0.60984329, 0.62095468, 0.63213636, 0.6433441, +    0.6546616 , 0.6660279 , 0.67741372, 0.68886382, 0.70036612, 0.71186928, +    0.72336666, 0.73489587, 0.74641297, 0.75788429, 0.76929516, 0.7806286, +    0.79188503, 0.80303085, 0.81402588, 0.82484364, 0.83545535, 0.84583016, +    0.85593546, 0.86573722, 0.87520057, 0.88429036, 0.89297186, 0.90121149, +    0.90897763, 0.91624135, 0.92297716, 0.92916362, 0.93478393, 0.93982627, +    0.944284  , 0.9481558 , 0.95144555, 0.95416177, 0.95631799, 0.95793177, +    0.95902407, 0.95961865, 0.95974148, 0.95942014, 0.95868324, 0.95756071, +    0.95608217, 0.9542758 , 0.95216987, 0.94979177, 0.94716782, 0.94432316, +    0.94128162, 0.93806566, 0.93469637, 0.93119344, 0.92757518, 0.92385855, +    0.92005924, 0.91619167, 0.91226907, 0.90830358, 0.90430622, 0.90028706, +    0.8962552 , 0.89221888, 0.88818549, 0.88416167, 0.88015334, 0.87616574, +    0.87220349, 0.86827062, 0.86437059, 0.86050638, 0.85668045, 0.85289483, +    0.84915193, 0.84545249, 0.84179674, 0.83818509, 0.83461764, 0.83109413, +    0.82761399, 0.82417636, 0.82078008, 0.81742372, 0.81410558, 0.81082372, +    0.80757594, 0.80435989, 0.80117258, 0.79801115, 0.79487252, 0.79175341, +    0.78865036, 0.78555973, 0.78247771, 0.77940035, 0.77632353, 0.77324301, +    0.77015423, 0.76705215, 0.76393282, 0.76079161, 0.75762382, 0.75442468, +    0.7511894 , 0.74791315, 0.74459109, 0.74121838, 0.73779019, 0.73430173, +    0.73074825, 0.72712503, 0.72342746, 0.71965096, 0.71579107, 0.71184237, +    0.70780168, 0.70366489, 0.69942802, 0.69508722, 0.69063878, 0.68607916, +    0.68140497, 0.67661297, 0.67170012, 0.66666354, 0.66150054, 0.65620859, +    0.65078539, 0.64522878, 0.63953554, 0.63370386, 0.62773308, 0.62162183, +    0.61536895, 0.60897349, 0.60243471, 0.59575208, 0.5889253 , 0.58195428, +    0.57483914, 0.56757997, 0.56016891, 0.55261464, 0.54491821, 0.53708088, +    0.52910417, 0.52098984, 0.51272693, 0.50432884, 0.49579898, 0.48714013, +    0.47834844, 0.46942272, 0.46037716, 0.45121575, 0.4419283 , 0.43252618, +    0.42302131, 0.41340722, 0.40368844, 0.3938839 , 0.38398203, 0.37399931, +    0.36394886, 0.35381793, 0.34364247, 0.33340639, 0.32314442, 0.31285132, +    0.30255889, 0.2922684 , 0.28202116, 0.27181653, 0.26171116, 0.25171982, +    0.24189603, 0.23229831, 0.22296839, 0.21399898, 0.20548226, 0.19752366, +    0.19024226, 0.18379968, 0.17836522, 0.17412601, 0.17128095, 0.17003118, +    0.17056788, 0.17305931, 0.17763999, 0.18441057, 0.19343386, 0.2047358, +    0.21833687, 0.2341978 , 0.25223614, 0.2722682]), np.ones(256)) + +# Used to reconstruct the colormap in viscm +parameters = {'xp': [-2.3569023569023386, 29.24031986531989, 21.948653198653204, -25.44718013468011, -4.78745791245791], +              ‘yp’: [-27.604166666666657, -30.642361111111086, 24.652777777777771, -13.6284722222222, 23.4375], +              ‘min_Jp’: 15, +              ‘max_Jp’: 95} + +color_map_luts["kelp"] = (array( +  [ 0.07873808, 0.08503098, 0.09119215, 0.09725944, 0.10324966, 0.10914691, +    0.1149903 , 0.12076614, 0.12647234, 0.13214487, 0.13775951, 0.14331952, +    0.14885405, 0.15434127, 0.15978387, 0.16520148, 0.17058327, 0.17592717, +    0.1812416 , 0.18653223, 0.19178949, 0.19701509, 0.20221806, 0.20739605, +    0.21254477, 0.21766522, 0.22276163, 0.22783646, 0.232884  , 0.23790477, +    0.24289917, 0.24786997, 0.25281796, 0.25773939, 0.26263436, 0.26750288, +    0.27234491, 0.27716076, 0.28195253, 0.28671682, 0.29145343, 0.29616211, +    0.30084257, 0.30549451, 0.31011758, 0.31471143, 0.31927567, 0.32380992, +    0.32831456, 0.3327882 , 0.33723043, 0.34164086, 0.34601907, 0.35036466, +    0.35467722, 0.35895634, 0.36320162, 0.36741265, 0.37158905, 0.37573041, +    0.37983636, 0.38390652, 0.38794052, 0.391938  , 0.3958986 , 0.39982199, +    0.40370783, 0.40755579, 0.41136559, 0.41513702, 0.41886962, 0.42256312, +    0.42621724, 0.42983171, 0.43340628, 0.43694071, 0.44043477, 0.44388826, +    0.44730096, 0.4506727 , 0.4540033 , 0.45729265, 0.46054056, 0.46374691, +    0.4669116 , 0.47003456, 0.47311572, 0.47615505, 0.47915255, 0.48210822, +    0.48502208, 0.4878942 , 0.49072469, 0.49351365, 0.49626124, 0.49896763, +    0.50163303, 0.50425765, 0.50684177, 0.50938571, 0.51188977, 0.51435433, +    0.51677977, 0.5191665 , 0.52151498, 0.52382573, 0.52609922, 0.52833601, +    0.53053664, 0.53270171, 0.53483184, 0.53692768, 0.53898991, 0.54101933, +    0.54301655, 0.5449823 , 0.54691736, 0.54882248, 0.55069849, 0.55254618, +    0.55436641, 0.55616019, 0.55792828, 0.55967151, 0.56139081, 0.56308707, +    0.56476124, 0.56641427, 0.56804712, 0.56966078, 0.57125625, 0.57283474, +    0.5743971 , 0.57594437, 0.57747763, 0.578998  , 0.58050659, 0.58200457, +    0.58349311, 0.58497344, 0.58644679, 0.58791447, 0.58937777, 0.59083808, +    0.59229669, 0.59375499, 0.59521431, 0.59667599, 0.5981412 , 0.59961095, +    0.60108588, 0.60256604, 0.60405059, 0.60553731, 0.60702199, 0.60849757, +    0.60995371, 0.61137672, 0.61275043, 0.61405949, 0.61529472, 0.61645863, +    0.61756755, 0.6186476 , 0.61972621, 0.62082374, 0.62195065, 0.62310898, +    0.62429421, 0.62549895, 0.62671518, 0.62793547, 0.62915284, 0.63036156, +    0.63155892, 0.63274216, 0.63390941, 0.63505915, 0.6361885 , 0.63730024, +    0.63839517, 0.63947435, 0.64053552, 0.64158527, 0.64262677, 0.64365947, +    0.64469056, 0.6457271 , 0.6467694 , 0.6478306 , 0.64891699, 0.65003829, +    0.65120839, 0.65243764, 0.6537444 , 0.65514254, 0.65665209, 0.65829045, +    0.66007696, 0.66202922, 0.66416348, 0.66649284, 0.66902763, 0.67177387, +    0.67473363, 0.6779068 , 0.68128823, 0.68487229, 0.68865042, 0.69261428, +    0.69675486, 0.70106274, 0.7055261 , 0.71013753, 0.71488908, 0.71977295, +    0.72478197, 0.72990967, 0.73515031, 0.74049508, 0.74593782, 0.75147747, +    0.75711082, 0.76283528, 0.76864883, 0.77453293, 0.78049489, 0.78653899, +    0.79266478, 0.7988389 , 0.80509156, 0.81142348, 0.81779745, 0.82424433, +    0.83076477, 0.83731914, 0.84395228, 0.85063328, 0.8573683 , 0.86417388, +    0.87100664, 0.87792232, 0.88485711, 0.89186942, 0.898911  , 0.90601831, +    0.91316089, 0.92036241, 0.92760063, 0.93489628, 0.94222522, 0.94961559, +    0.95703072, 0.96451696, 0.97201416, 0.97959794]), array( +  [ 0.02380049, 0.02762946, 0.0314955 , 0.03538367, 0.03929263, 0.04314916, +    0.04681625, 0.05034685, 0.05376738, 0.05706764, 0.06028584, 0.06343363, +    0.06649987, 0.06951333, 0.0724811 , 0.07539619, 0.07827446, 0.0811238, +    0.08394364, 0.08673511, 0.08950972, 0.0922702 , 0.09501404, 0.0977463, +    0.10047279, 0.10319545, 0.10591402, 0.10862929, 0.11134673, 0.11406773, +    0.11679361, 0.11952425, 0.12226063, 0.12500588, 0.12776095, 0.13052669, +    0.13330389, 0.13609311, 0.13889411, 0.1417089 , 0.14453802, 0.14738192, +    0.15024103, 0.15311572, 0.15600633, 0.15891314, 0.1618364 , 0.16477634, +    0.16773294, 0.17070662, 0.17369747, 0.17670558, 0.17973101, 0.18277379, +    0.18583395, 0.18891149, 0.19200641, 0.19511868, 0.19824828, 0.20139517, +    0.20455931, 0.20774066, 0.21093915, 0.21415474, 0.21738737, 0.22063697, +    0.22390351, 0.22718691, 0.23048713, 0.23380417, 0.23713792, 0.24048832, +    0.2438553 , 0.24723882, 0.25063881, 0.25405521, 0.25748797, 0.26093702, +    0.26440229, 0.26788372, 0.27138123, 0.27489488, 0.27842445, 0.28196986, +    0.28553099, 0.28910775, 0.29270002, 0.29630767, 0.29993058, 0.30356863, +    0.30722174, 0.31088964, 0.31457215, 0.3182691 , 0.32198029, 0.32570551, +    0.32944456, 0.33319721, 0.33696322, 0.34074232, 0.34453424, 0.34833872, +    0.35215547, 0.35598423, 0.35982468, 0.36367647, 0.36753933, 0.37141294, +    0.37529698, 0.37919113, 0.38309506, 0.38700843, 0.39093088, 0.394862, +    0.39880154, 0.40274917, 0.40670453, 0.41066731, 0.41463715, 0.41861372, +    0.42259669, 0.4265856 , 0.43058022, 0.43458024, 0.43858535, 0.44259523, +    0.44660955, 0.45062802, 0.45465032, 0.45867614, 0.46270517, 0.466737, +    0.47077145, 0.47480823, 0.47884705, 0.48288761, 0.48692962, 0.4909728, +    0.49501685, 0.49906149, 0.50310643, 0.5071514 , 0.51119613, 0.51524033, +    0.51928381, 0.52332635, 0.52736778, 0.531408  , 0.53544701, 0.53948493, +    0.54352212, 0.54755923, 0.55159738, 0.55563825, 0.55968439, 0.56373935, +    0.56780781, 0.57189523, 0.57600725, 0.58014816, 0.58431885, 0.58851523, +    0.59272844, 0.59694739, 0.6011624 , 0.6053679 , 0.60956269, 0.61374861, +    0.61792946, 0.62210956, 0.62629294, 0.63048304, 0.63468291, 0.63889495, +    0.64312026, 0.64735999, 0.65161492, 0.65588577, 0.66017389, 0.66447826, +    0.66879882, 0.67313546, 0.67748957, 0.68185887, 0.68624266, 0.69064192, +    0.69505448, 0.69947837, 0.70391466, 0.70835911, 0.71281063, 0.71726683, +    0.72172374, 0.72617917, 0.73062754, 0.73506547, 0.73948684, 0.74388673, +    0.74825915, 0.7525986 , 0.75689972, 0.76115802, 0.76536957, 0.76953177, +    0.77364343, 0.77770289, 0.78171225, 0.78567138, 0.78958223, 0.79344761, +    0.79726965, 0.80105066, 0.8047929 , 0.80849913, 0.81217164, 0.81581257, +    0.81942391, 0.82300747, 0.82656492, 0.83009816, 0.83360887, 0.83709793, +    0.84056637, 0.844015  , 0.84744449, 0.85085836, 0.85425577, 0.85763616, +    0.8609997 , 0.8643531 , 0.86769067, 0.87101222, 0.87432566, 0.87762463, +    0.88090892, 0.88418748, 0.88745026, 0.89070437, 0.89394846, 0.89717856, +    0.90040525, 0.90361483, 0.90682325, 0.91001579, 0.9132048 , 0.91638083, +    0.9195519 , 0.92271171, 0.92586627, 0.92900992, 0.93214934, 0.93527665, +    0.93840226, 0.94151285, 0.9446259 , 0.94771918]), array( +  [ 0.45890713, 0.46137905, 0.46384563, 0.46630529, 0.46875421, 0.4711862, +    0.47360008, 0.47599069, 0.47835461, 0.48068977, 0.48299219, 0.4852595, +    0.48748847, 0.48967699, 0.49182306, 0.49392292, 0.4959753 , 0.49797881, +    0.4999306 , 0.50182767, 0.50367037, 0.5054572 , 0.50718436, 0.50885097, +    0.51045736, 0.51200237, 0.51348338, 0.51489809, 0.51624834, 0.51753338, +    0.51875253, 0.51990356, 0.52098523, 0.52199968, 0.52294672, 0.52382624, +    0.52463824, 0.52538248, 0.52605675, 0.52666444, 0.52720607, 0.52768224, +    0.5280937 , 0.5284413 , 0.52872599, 0.52894886, 0.52911108, 0.5292139, +    0.52925736, 0.52924451, 0.5291769 , 0.52905617, 0.52888406, 0.52866235, +    0.5283929 , 0.52807762, 0.52771851, 0.52731757, 0.52687689, 0.52639856, +    0.52588473, 0.52533756, 0.52475925, 0.524152  , 0.52351804, 0.5228596, +    0.52217891, 0.5214782 , 0.52075951, 0.52002465, 0.51927646, 0.51851715, +    0.51774891, 0.51697393, 0.51619438, 0.5154124 , 0.5146301 , 0.51384958, +    0.51307291, 0.51230212, 0.51153923, 0.51078544, 0.51004343, 0.50931521, +    0.50860267, 0.50790763, 0.50723191, 0.50657725, 0.50594539, 0.50533791, +    0.50475611, 0.50420208, 0.50367737, 0.50318346, 0.50272179, 0.50229376, +    0.50190069, 0.5015438 , 0.50122435, 0.50094363, 0.50070274, 0.50050273, +    0.50034459, 0.50022925, 0.50015758, 0.50013055, 0.50014881, 0.50021302, +    0.50032381, 0.50048172, 0.50068726, 0.50094086, 0.50124298, 0.50159412, +    0.50199429, 0.50244368, 0.50294243, 0.50349062, 0.5040883 , 0.50473544, +    0.50543197, 0.50617805, 0.5069733 , 0.50781742, 0.50871016, 0.5096512, +    0.51064021, 0.51167679, 0.51276051, 0.5138909 , 0.51506743, 0.51628978, +    0.51755709, 0.51886873, 0.52022401, 0.52162216, 0.52306241, 0.52454388, +    0.52606564, 0.52762668, 0.5292259 , 0.53086207, 0.53253385, 0.53423975, +    0.53597803, 0.53774675, 0.53954371, 0.54136636, 0.54321177, 0.54507652, +    0.54695667, 0.54884775, 0.55074476, 0.55264242, 0.55453558, 0.55642011, +    0.55829453, 0.56016223, 0.56203375, 0.56392814, 0.56587122, 0.56788936, +    0.57000019, 0.57220545, 0.57449055, 0.57683063, 0.57919892, 0.58157275, +    0.58393538, 0.58627588, 0.58858776, 0.59086745, 0.59311274, 0.59532221, +    0.59749564, 0.59963222, 0.60173091, 0.60379008, 0.60580649, 0.60777924, +    0.6097056 , 0.61158212, 0.61340237, 0.6151645 , 0.61686366, 0.61849128, +    0.62004292, 0.62151305, 0.62288934, 0.62416816, 0.62533879, 0.62639158, +    0.62731938, 0.6281096 , 0.62875725, 0.62925097, 0.62958736, 0.62976024, +    0.62976899, 0.62961438, 0.62930119, 0.62883586, 0.62822926, 0.62749232, +    0.62663432, 0.62567778, 0.62461908, 0.62348256, 0.62227864, 0.621005, +    0.6196701 , 0.61828149, 0.61685751, 0.61539115, 0.61388335, 0.61233673, +    0.61075292, 0.60913269, 0.607476  , 0.60579314, 0.60408651, 0.60234546, +    0.60056748, 0.59874959, 0.59688839, 0.59502121, 0.59312158, 0.59117279, +    0.58917064, 0.58718501, 0.58514178, 0.58303558, 0.58094288, 0.57879227, +    0.5765793 , 0.57438349, 0.57210749, 0.56981243, 0.56748232, 0.56508082, +    0.56269289, 0.56020367, 0.55773849, 0.5551784 , 0.55261699, 0.54997983, +    0.54732492, 0.54460356, 0.54185741, 0.53904386, 0.53620824, 0.53329363, +    0.53036982, 0.52734442, 0.52433316, 0.52118636]), np.ones(256)) + +# Used to reconstruct the colormap in viscm +parameters = {'xp': [ 3.444773825208614, -17.207400087834856, +                    -12.632024921242106, -21.656364855235495, +                     16.850570926657895,  55.256368028107175, +                     14.676657883179644,  12.502744839701393, +                     40.401295564339051,   0.90854194115064502], +              ‘yp’: [-1.6304347826086598, -24.818840579710098, +                     -9.447194719471895,    6.796617161716227, +                     -5.6159420289854722,  57.065217391304373, +                     13.224637681159436,   3.4420289855072781, +                     58.514492753623216, 0.1811594202898732], +              ‘min_Jp’: 3.96624472574, ‘max_Jp’: 96.5975103734} + +color_map_luts["dusk"] = (array( +  [ 0.02379297, 0.0261157 , 0.02850455, 0.03095137, 0.0334476 , 0.0360304, +    0.03863824, 0.04128529, 0.04384689, 0.04631624, 0.04870907, 0.05097181, +    0.05316059, 0.05519077, 0.05714277, 0.05892787, 0.06062771, 0.06214595, +    0.06357023, 0.06480933, 0.06592827, 0.06687993, 0.06766224, 0.06830946, +    0.06872415, 0.0689718 , 0.06904334, 0.06886045, 0.06844799, 0.06780027, +    0.06689054, 0.06568777, 0.06415629, 0.06225567, 0.05994102, 0.05716433, +    0.0538775 , 0.05003897, 0.04551728, 0.04029295, 0.03446229, 0.02874366, +    0.02385447, 0.02127502, 0.02242508, 0.0275301 , 0.03578777, 0.0460108, +    0.05640918, 0.06656043, 0.07634217, 0.08577769, 0.0948332 , 0.10358394, +    0.11202107, 0.1201887 , 0.12811962, 0.13583301, 0.14334681, 0.15067405, +    0.15783121, 0.16483645, 0.17170112, 0.17843538, 0.18504822, 0.19154762, +    0.19793598, 0.20422296, 0.21041472, 0.21651599, 0.22253073, 0.22846216, +    0.23431275, 0.24008353, 0.24576942, 0.25137838, 0.25691024, 0.26236467, +    0.2677416 , 0.27303884, 0.27827346, 0.28346958, 0.28867439, 0.29395695, +    0.29940706, 0.30508966, 0.31101811, 0.31715338, 0.32345196, 0.32986905, +    0.33636963, 0.34292913, 0.34953992, 0.35619361, 0.36288108, 0.36960242, +    0.37635671, 0.38314097, 0.38995328, 0.39679542, 0.40366619, 0.41056374, +    0.41748952, 0.4244427 , 0.43142299, 0.43843086, 0.44546541, 0.45252642, +    0.45961609, 0.46673201, 0.47387346, 0.48104441, 0.4882424 , 0.4954658, +    0.5027165 , 0.50999774, 0.51730448, 0.52463621, 0.53199987, 0.53939166, +    0.54680881, 0.55425097, 0.56172938, 0.56923401, 0.57676432, 0.58432014, +    0.59191314, 0.59953375, 0.60718079, 0.6148543 , 0.62255842, 0.63029849, +    0.63806608, 0.64586138, 0.65368467, 0.66153629, 0.66942125, 0.67734101, +    0.68528996, 0.69326842, 0.70127674, 0.70931527, 0.71738431, 0.72548409, +    0.73361473, 0.74177618, 0.74996816, 0.75819004, 0.76644077, 0.77471875, +    0.78302933, 0.79137839, 0.79974926, 0.80813611, 0.81657205, 0.82501275, +    0.83349386, 0.84198258, 0.85048492, 0.8590003 , 0.86751392, 0.87598709, +    0.88439937, 0.89263161, 0.90038304, 0.90687168, 0.91166375, 0.91561895, +    0.91938826, 0.92318052, 0.9269946 , 0.93070173, 0.93405155, 0.93665497, +    0.93818572, 0.93886516, 0.93923641, 0.93951639, 0.93979528, 0.94008554, +    0.9403692 , 0.94071214, 0.94104779, 0.94137354, 0.94172077, 0.9420958, +    0.94244563, 0.94274487, 0.94309703, 0.94344151, 0.94369514, 0.94407978, +    0.94432487, 0.94468376, 0.9449135 , 0.94526127, 0.94544804, 0.945808, +    0.94601776, 0.94631082, 0.94656632, 0.9467505 , 0.94706511, 0.94725625, +    0.9474877 , 0.94776129, 0.9479231 , 0.94816834, 0.94843142, 0.94859414, +    0.9488144 , 0.94909331, 0.9492829 , 0.94943682, 0.94975423, 0.94999285, +    0.95015253, 0.9504141 , 0.95072075, 0.95095877, 0.95112839, 0.95145943, +    0.95179158, 0.95206534, 0.95228128, 0.95264039, 0.95303147, 0.95337439, +    0.95367005, 0.95401622, 0.95449739, 0.95494063, 0.95534717, 0.95571839, +    0.95624412, 0.95681749, 0.95736483, 0.9578879 , 0.95838862, 0.95906407, +    0.95978233, 0.96048784, 0.96118301, 0.96187054, 0.96267628, 0.96359786, +    0.96452242, 0.96545346, 0.9663949 , 0.96735109, 0.96853232, 0.96975252, +    0.97100046, 0.9722811 , 0.97360166, 0.97499094]), array( +  [ 0.01131879, 0.01391783, 0.01674789, 0.01980761, 0.02309557, 0.02659703, +    0.03032697, 0.03427332, 0.03844574, 0.04276988, 0.04704341, 0.05129054, +    0.05550078, 0.05969933, 0.06386921, 0.06803423, 0.07217737, 0.07632217, +    0.08045053, 0.08458326, 0.0887074 , 0.09283339, 0.0969619 , 0.10108667, +    0.10522618, 0.10936788, 0.1135134 , 0.1176759 , 0.12185004, 0.12603586, +    0.13023651, 0.1344553 , 0.13869563, 0.14296085, 0.14725413, 0.15157814, +    0.15593465, 0.16032384, 0.16475544, 0.16922528, 0.17373863, 0.17827184, +    0.1827844 , 0.18715937, 0.19126004, 0.19503246, 0.19852956, 0.20182311, +    0.20496848, 0.20800345, 0.21095494, 0.21383778, 0.21666923, 0.21945445, +    0.22220507, 0.22492545, 0.22761943, 0.23029139, 0.232945  , 0.23558391, +    0.23821051, 0.24082617, 0.24343288, 0.24603239, 0.24862627, 0.25121599, +    0.25380393, 0.25639065, 0.25897721, 0.26156482, 0.2641547 , 0.26674815, +    0.26934657, 0.27195171, 0.274567  , 0.27719243, 0.27983033, 0.28248333, +    0.2851544 , 0.28784764, 0.29056213, 0.2932949 , 0.29603493, 0.29876097, +    0.30144013, 0.30404208, 0.30655158, 0.3089731 , 0.31131738, 0.31359848, +    0.31582875, 0.31801758, 0.32016861, 0.32228546, 0.3243719 , 0.32642829, +    0.32845517, 0.33045378, 0.33242493, 0.33436795, 0.33628328, 0.33817163, +    0.34003234, 0.34186568, 0.34367166, 0.34544999, 0.34720092, 0.34892444, +    0.35061943, 0.35228681, 0.35392679, 0.35553735, 0.35711946, 0.35867374, +    0.36019909, 0.36169371, 0.36315988, 0.36459771, 0.36600339, 0.36737862, +    0.36872465, 0.37004148, 0.37132268, 0.37257345, 0.37379387, 0.37498382, +    0.37613623, 0.37725628, 0.37834438, 0.37940027, 0.38042109, 0.38140311, +    0.38235118, 0.38326484, 0.38414358, 0.38498682, 0.38579085, 0.38655416, +    0.38728007, 0.38796794, 0.3886171 , 0.38922686, 0.38979653, 0.39032549, +    0.39081315, 0.39125906, 0.39166297, 0.39202487, 0.39234513, 0.39262465, +    0.39285875, 0.39304214, 0.39318804, 0.39330134, 0.3933541 , 0.39338391, +    0.39336059, 0.3933133 , 0.39323839, 0.39313869, 0.39303156, 0.39295965, +    0.39295557, 0.39315799, 0.39391119, 0.39605497, 0.39998337, 0.40475771, +    0.40971377, 0.41464651, 0.41955776, 0.42457034, 0.42991332, 0.43592086, +    0.44281731, 0.45031271, 0.45790211, 0.46542398, 0.47282633, 0.48011752, +    0.48732483, 0.49440541, 0.50141998, 0.50837558, 0.51525348, 0.52205415, +    0.52881949, 0.53556909, 0.54223396, 0.54885896, 0.55550043, 0.56201556, +    0.56858101, 0.57503769, 0.58153866, 0.58793414, 0.59439323, 0.60071983, +    0.60710417, 0.61341299, 0.61971646, 0.6260332 , 0.63225511, 0.63852001, +    0.64474137, 0.65092034, 0.65713626, 0.66329112, 0.66941973, 0.67558021, +    0.68169667, 0.68777066, 0.69387233, 0.69997643, 0.70599397, 0.71203573, +    0.71810111, 0.72411175, 0.73009422, 0.73609755, 0.74212117, 0.74807095, +    0.75401458, 0.75997634, 0.7659557 , 0.77187449, 0.77777791, 0.78369726, +    0.78963205, 0.79554605, 0.80140962, 0.80728734, 0.81317876, 0.8190834, +    0.82493514, 0.83077307, 0.83662327, 0.84248528, 0.84835861, 0.85417838, +    0.85998992, 0.86581204, 0.87164424, 0.877486  , 0.88329814, 0.88908291, +    0.8948766 , 0.9006787 , 0.90648868, 0.91230608, 0.91806899, 0.9238354, +    0.92961071, 0.93539672, 0.94119732, 0.94701577]), array( +  [ 0.02001135, 0.02410049, 0.0285127 , 0.03327199, 0.03840892, 0.04377278, +    0.04914302, 0.05449872, 0.05987322, 0.06527853, 0.07069504, 0.07616998, +    0.08164232, 0.08718911, 0.0927269 , 0.09833499, 0.10393204, 0.10960072, +    0.11525772, 0.12097641, 0.12669592, 0.13244873, 0.13822862, 0.14400333, +    0.14983392, 0.15566404, 0.16149121, 0.16735218, 0.17321659, 0.17907296, +    0.18491908, 0.19075078, 0.19656126, 0.20233991, 0.20807104, 0.21373203, +    0.21929102, 0.22470403, 0.22993048, 0.2348811 , 0.23944453, 0.24342373, +    0.24654791, 0.24854699, 0.24944069, 0.24964107, 0.24954394, 0.24938897, +    0.24925926, 0.24920029, 0.24923631, 0.24934712, 0.24956187, 0.24984924, +    0.25022917, 0.25068854, 0.25121928, 0.25182018, 0.25248939, 0.25322692, +    0.25402939, 0.25489122, 0.25581039, 0.25678491, 0.25781293, 0.25889267, +    0.26002567, 0.26120803, 0.26243772, 0.26371326, 0.26503318, 0.26639597, +    0.26779993, 0.26924355, 0.27072854, 0.27224553, 0.27378857, 0.27534839, +    0.27691073, 0.27845714, 0.27994688, 0.28132934, 0.28254139, 0.28352939, +    0.28426343, 0.28477016, 0.28511888, 0.2853897 , 0.28562523, 0.28584846, +    0.28606765, 0.28628369, 0.28648659, 0.2866717 , 0.28683846, 0.28698041, +    0.28709378, 0.28717794, 0.2872321 , 0.28725271, 0.28723935, 0.28719253, +    0.28710992, 0.28699145, 0.2868367 , 0.28664459, 0.28641544, 0.28614894, +    0.28584249, 0.28549799, 0.28511576, 0.28469141, 0.28422699, 0.28372376, +    0.28317939, 0.28259016, 0.28196082, 0.28129151, 0.28057453, 0.27981338, +    0.27901054, 0.27816595, 0.27726695, 0.2763238 , 0.27533659, 0.27430498, +    0.27321529, 0.27207747, 0.27089221, 0.26965877, 0.26837161, 0.26702355, +    0.26562346, 0.26417019, 0.2626624 , 0.26109861, 0.25947144, 0.25777762, +    0.25602258, 0.25420436, 0.25232078, 0.25036953, 0.2483481 , 0.24625386, +    0.24408403, 0.24183578, 0.23950621, 0.23709248, 0.23459188, 0.23200196, +    0.22930941, 0.22649861, 0.22358618, 0.22057215, 0.21739359, 0.2141051, +    0.21063096, 0.20699978, 0.20316855, 0.19908944, 0.19471496, 0.19000133, +    0.1847768 , 0.17886461, 0.17199335, 0.16449989, 0.15797658, 0.15243265, +    0.1469976 , 0.14126571, 0.13521428, 0.12907937, 0.12349501, 0.11987508, +    0.12047985, 0.12617587, 0.1352476 , 0.14599545, 0.15747549, 0.16925814, +    0.18117203, 0.19298222, 0.20476193, 0.21648737, 0.22808422, 0.23953607, +    0.25094286, 0.26235208, 0.27357466, 0.28472765, 0.29596437, 0.30689052, +    0.31799337, 0.32882896, 0.33982619, 0.35056047, 0.36151349, 0.37212065, +    0.38293088, 0.39355561, 0.40419893, 0.41491671, 0.42538398, 0.43601357, +    0.44654349, 0.4569744 , 0.46755003, 0.47796579, 0.48832714, 0.49881686, +    0.50919369, 0.51945918, 0.52983799, 0.54024888, 0.55039796, 0.56064657, +    0.57099376, 0.58117647, 0.59128027, 0.60146991, 0.6117441 , 0.62177734, +    0.63179964, 0.64189483, 0.65206133, 0.66202135, 0.67193144, 0.68190219, +    0.69193176, 0.70188796, 0.71165938, 0.72147981, 0.73134717, 0.74125921, +    0.75096714, 0.76061378, 0.77029569, 0.78001026, 0.78975461, 0.79927776, +    0.80875027, 0.81824276, 0.82775166, 0.83727291, 0.84665036, 0.85588868, +    0.86512674, 0.87435845, 0.88357649, 0.89277169, 0.90169092, 0.91054951, +    0.91934683, 0.92805132, 0.93660318, 0.9448656 ]), np.ones(256)) +</p>
<pre># Aliases
color_map_luts['B-W LINEAR'] = color_map_luts['idl00']
color_map_luts['BLUE'] = color_map_luts['idl01']</pre>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 yt/visualization/color_maps.py --- a/yt/visualization/color_maps.py +++ b/yt/visualization/color_maps.py @@ -72,9 +72,6 @@</p>
<pre>add_cmap('bds_highcontrast', cdict)
add_cmap('algae', cdict)
</pre>
<p>-# Set the default colormap to be algae. -matplotlib.rc('image', cmap="algae") –</p>
<pre># This next colormap was designed by Tune Kamae and converted here by Matt
_vs = np.linspace(0,1,255)
_kamae_red = np.minimum(255,</pre>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 yt/visualization/eps_writer.py --- a/yt/visualization/eps_writer.py +++ b/yt/visualization/eps_writer.py @@ -19,6 +19,8 @@</p>
<pre>import matplotlib.pyplot as plt
from ._mpl_imports import FigureCanvasAgg
</pre>
<p>+from yt.config import \ +    ytcfg</p>
<pre>from yt.utilities.logger import ytLogger as mylog
from .plot_window import PlotWindow
from .profile_plotter import PhasePlot, ProfilePlot</pre>
<p>@@ -725,7 +727,7 @@</p>
<pre>if plot.cmap is not None:
    _cmap = plot.cmap.name
         if _cmap is None:</pre>
<ul><li><p>_cmap = ‘algae’</p></li></ul>
<p>+            _cmap = ytcfg.get("yt", “default_colormap”)</p>
<pre>         if isinstance(plot, (PlotWindow, PhasePlot)):
if isinstance(plot, PlotWindow):
    try:</pre>
<p>@@ -1345,7 +1347,7 @@</p>
<pre>    return d

#=============================================================================</pre>
<p>-def return_cmap(cmap="algae", label="", range=(0,1), log=False): +def return_cmap(cmap=None, label="", range=(0,1), log=False):</p>
<pre>    r"""Returns a dict that describes a colorbar.  Exclusively for use with
    multiplot.
</pre>
<p>@@ -1364,5 +1366,7 @@</p>
<pre>--------
>>> cb = return_cmap("algae", "Density [cm$^{-3}$]", (0,10), False)
"""</pre>
<p>+    if cmap is None: +        cmap = ytcfg.get("yt", “default_colormap”)</p>
<pre>return {'cmap': cmap, 'name': label, 'range': range, 'log': log}
</pre>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 yt/visualization/image_writer.py --- a/yt/visualization/image_writer.py +++ b/yt/visualization/image_writer.py @@ -15,6 +15,8 @@</p>
<pre>import numpy as np
</pre>
<p>+from yt.config import \ +    ytcfg</p>
<pre>from yt.funcs import mylog, get_image_suffix
from yt.units.yt_array import YTQuantity
from yt.utilities.exceptions import YTNotInsideNotebook</pre>
<p>@@ -175,7 +177,7 @@</p>
<pre>        return pw.write_png_to_string(bitmap_array.copy())
    return bitmap_array
</pre>
<p>-def write_image(image, filename, color_bounds = None, cmap_name = “algae”, func = lambda x: x): +def write_image(image, filename, color_bounds = None, cmap_name = None, func = lambda x: x):</p>
<pre>    r"""Write out a floating point array directly to a PNG file, scaling it and
    applying a colormap.
</pre>
<p>@@ -210,6 +212,8 @@</p>
<pre>(1024, 1024))
     >>> write_image(frb1["Density"], "saved.png")
     """</pre>
<p>+    if cmap_name is None: +        cmap_name = ytcfg.get("yt", “default_colormap”)</p>
<pre>if len(image.shape) == 3:
    mylog.info("Using only channel 1 of supplied image")
    image = image[:,:,0]</pre>
<p>@@ -217,7 +221,7 @@</p>
<pre>    pw.write_png(to_plot, filename)
    return to_plot
</pre>
<p>-def apply_colormap(image, color_bounds = None, cmap_name = ‘algae’, func=lambda x: x): +def apply_colormap(image, color_bounds = None, cmap_name = None, func=lambda x: x):</p>
<pre>    r"""Apply a colormap to a floating point image, scaling to uint8.

    This function will scale an image and directly call libpng to write out a</pre>
<p>@@ -242,6 +246,8 @@</p>
<pre>    to_plot : uint8 image with colorbar applied.

    """</pre>
<p>+    if cmap_name is None: +        cmap_name = ytcfg.get("yt", “default_colormap”)</p>
<pre>from yt.data_objects.image_array import ImageArray
image = ImageArray(func(image))
if color_bounds is None:</pre>
<p>@@ -333,7 +339,7 @@</p>
<pre>def write_projection(data, filename, colorbar=True, colorbar_label=None,
                     title=None, limits=None, take_log=True, figsize=(8,6),</pre>
<ul><li><p>dpi=100, cmap_name='algae', extent=None, xlabel=None,</p></li></ul>
<p>+                     dpi=100, cmap_name=None, extent=None, xlabel=None,</p>
<pre>ylabel=None):
     r"""Write a projection or volume rendering to disk with a variety of
     pretty parameters such as limits, title, colorbar, etc.  write_projection</pre>
<p>@@ -378,6 +384,8 @@</p>
<pre>title="Offaxis Projection", limits=(1e-5,1e-3),
take_log=True)
     """</pre>
<p>+    if cmap_name is None: +        cmap_name = ytcfg.get("yt", “default_colormap”)</p>
<pre>    import matplotlib
    from ._mpl_imports import FigureCanvasAgg, FigureCanvasPdf, FigureCanvasPS
</pre>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 yt/visualization/plot_container.py --- a/yt/visualization/plot_container.py +++ b/yt/visualization/plot_container.py @@ -28,6 +28,8 @@</p>
<pre>from ._mpl_imports import FigureCanvasAgg
from .tick_locators import LogLocator, LinearLocator
</pre>
<p>+from yt.config import \ +    ytcfg</p>
<pre>from yt.funcs import \
    get_image_suffix, \
    get_ipython_api_version, iterable, \</pre>
<p>@@ -190,7 +192,8 @@</p>
<pre>self.plots = PlotDictionary(data_source)
self._callbacks = []
self._field_transform = {}</pre>
<ul><li><p>self._colormaps = defaultdict(lambda: ‘algae’)</p></li></ul>
<p>+        self._colormaps = defaultdict( +            lambda: ytcfg.get("yt", "default_colormap"))</p>
<pre>font_path = matplotlib.get_data_path() + '/fonts/ttf/STIXGeneral.ttf'
self._font_properties = FontProperties(size=fontsize, fname=font_path)
self._font_color = None</pre>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 yt/visualization/plot_modifications.py --- a/yt/visualization/plot_modifications.py +++ b/yt/visualization/plot_modifications.py @@ -27,6 +27,8 @@</p>
<pre>from matplotlib import cm
from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar
</pre>
<p>+from yt.config import \ +    ytcfg</p>
<pre>from yt.funcs import \
    mylog, iterable
from yt.extern.six import add_metaclass</pre>
<p>@@ -1591,9 +1593,12 @@</p>
<pre>    """
    _type_name = "mesh_lines"
</pre>
<ul><li><p>def __init__(self, thresh=0.1):</p></li></ul>
<p>+    def __init__(self, thresh=0.1, cmap=None):</p>
<pre>super(MeshLinesCallback, self).__init__()
self.thresh = thresh</pre>
<p>+        if cmap is None: +            cmap = ytcfg.get("yt", “default_colormap”) +        self.cmap = cmap</p>
<pre>    def __call__(self, plot):
</pre>
<p>@@ -1646,7 +1651,7 @@</p>
<pre>         plot._axes.imshow(image, zorder=1,
extent=[xx0, xx1, yy0, yy1],</pre>
<ul><li><p>origin='lower',</p></li></ul>
<p>+                          origin='lower', cmap=self.cmap,</p>
<pre>                          interpolation='nearest')

</pre>
<p>@@ -2352,7 +2357,7 @@</p>
<pre>lic_data_clip_rescale = (lic_data_clip - self.lim[0]) \
                        / (self.lim[1] - self.lim[0])
lic_data_rgba[...,3] = lic_data_clip_rescale * self.alpha</pre>
<ul><li><p>plot._axes.imshow(lic_data_rgba, extent=extent)</p></li></ul>
<p>+            plot._axes.imshow(lic_data_rgba, extent=extent, cmap=self.cmap)</p>
<pre>        plot._axes.hold(False)

        return plot</pre>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 yt/visualization/tests/test_callbacks.py --- a/yt/visualization/tests/test_callbacks.py +++ b/yt/visualization/tests/test_callbacks.py @@ -18,6 +18,8 @@</p>
<pre>from numpy.testing import \
    assert_raises
</pre>
<p>+from yt.config import \ +    ytcfg</p>
<pre>from yt.testing import \
    fake_amr_ds
import yt.units as u</pre>
<p>@@ -357,7 +359,7 @@</p>
<pre>         p = SlicePlot(ds, "x", "density")
         p.annotate_line_integral_convolution("velocity_x", "velocity_y",
kernellen=100., lim=(0.4,0.7),</pre>
<ul><li><p>cmap='algae', alpha=0.9,</p></li>
<li><p>const_alpha=True)</p></li></ul>
<p>+                                             cmap=ytcfg.get("yt", "default_colormap"), +                                             alpha=0.9, const_alpha=True)</p>
<pre>        p.save(prefix)
</pre>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 yt/visualization/volume_rendering/old_camera.py --- a/yt/visualization/volume_rendering/old_camera.py +++ b/yt/visualization/volume_rendering/old_camera.py @@ -16,6 +16,8 @@</p>
<pre>from yt.extern.six.moves import builtins
import numpy as np
</pre>
<p>+from yt.config import \ +    ytcfg</p>
<pre>from yt.funcs import \
    iterable, mylog, get_pbar, \
    get_num_threads, ensure_numpy_array</pre>
<p>@@ -236,7 +238,7 @@</p>
<pre>        px = (res[1]*(dy/self.width[1])).astype('int')
        return px, py, dz
</pre>
<ul><li><p>def draw_grids(self, im, alpha=0.3, cmap='algae', min_level=None,</p></li></ul>
<p>+    def draw_grids(self, im, alpha=0.3, cmap=None, min_level=None,</p>
<pre>                   max_level=None):
        r"""Draws Grids on an existing volume rendering.
</pre>
<p>@@ -269,6 +271,8 @@</p>
<pre>        >>> write_bitmap(im, 'render_with_grids.png')

        """</pre>
<p>+        if cmap is None: +            cmap = ytcfg.get("yt", “default_colormap”)</p>
<pre>region = self.data_source
corners = []
levels = []</pre>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 yt/visualization/volume_rendering/render_source.py --- a/yt/visualization/volume_rendering/render_source.py +++ b/yt/visualization/volume_rendering/render_source.py @@ -12,6 +12,8 @@</p>
<pre># -----------------------------------------------------------------------------

import numpy as np</pre>
<p>+from yt.config import \ +    ytcfg</p>
<pre>from yt.funcs import mylog, ensure_numpy_array
from yt.utilities.parallel_tools.parallel_analysis_interface import \
    ParallelAnalysisInterface</pre>
<p>@@ -355,7 +357,7 @@</p>
<pre>        self.current_image = None

        # default color map</pre>
<ul><li><p>self._cmap = ‘algae’</p></li></ul>
<p>+        self._cmap = ytcfg.get("yt", “default_colormap”)</p>
<pre>        self._color_bounds = None

        # default mesh annotation options</pre>
<p>@@ -939,7 +941,7 @@</p>
<pre>    """
</pre>
<ul><li><p>def __init__(self, data_source, alpha=0.3, cmap='algae',</p></li></ul>
<p>+    def __init__(self, data_source, alpha=0.3, cmap=None,</p>
<pre>min_level=None, max_level=None):
         self.data_source = data_source_or_all(data_source)
         corners = []</pre>
<p>@@ -959,6 +961,8 @@</p>
<pre>levels.append(block.Level)
         corners = np.dstack(corners)
         levels = np.array(levels)</pre>
<p>+        if cmap is None: +            cmap = ytcfg.get("yt", “default_colormap”)</p>
<pre>         if max_level is not None:
subset = levels <= max_level</pre>
<p>diff -r c956b4087291b6717fd870f09c9fd5176057d1f6 -r b608c33bfeaed20a0e588602b89ceec19d3714d0 yt/visualization/volume_rendering/scene.py --- a/yt/visualization/volume_rendering/scene.py +++ b/yt/visualization/volume_rendering/scene.py @@ -15,6 +15,8 @@</p>
<pre>import functools
import numpy as np
from collections import OrderedDict</pre>
<p>+from yt.config import \ +    ytcfg</p>
<pre>from yt.funcs import mylog, get_image_suffix
from yt.extern.six import iteritems, itervalues, string_types
from yt.units.dimensions import \</pre>
<p>@@ -420,7 +422,8 @@</p>
<pre>del nz
         else:
nim = im</pre>
<ul><li><p>axim = plt.imshow(nim[:,:,:3]/nim[:,:,:3].max(), interpolation="nearest")</p></li></ul>
<p>+        axim = plt.imshow(nim[:,:,:3]/nim[:,:,:3].max(), +                          interpolation="nearest")</p>
<pre>        return axim
</pre>
<p>@@ -643,7 +646,7 @@</p>
<pre>        self.add_source(box_source)
        return self
</pre>
<ul><li><p>def annotate_grids(self, data_source, alpha=0.3, cmap='algae',</p></li></ul>
<p>+    def annotate_grids(self, data_source, alpha=0.3, cmap=None,</p>
<pre>                       min_level=None, max_level=None):
        r"""
</pre>
<p>@@ -677,6 +680,8 @@</p>
<pre>        >>> im = sc.render()

        """</pre>
<p>+        if cmap is None: +            cmap = ytcfg.get("yt", “default_colormap”)</p>
<pre>         grids = GridSource(data_source, alpha=alpha, cmap=cmap,
min_level=min_level, max_level=max_level)
         self.add_source(grids)</pre>
<p>Repository URL: <a href="https://bitbucket.org/yt_analysis/yt/">https://bitbucket.org/yt_analysis/yt/</a></p>
<p>—</p>
<p>This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.</p>

<img src="http://link.bitbucket.org/wf/open?upn=ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27DHiSlXh7lmnxKXeBIWbeefOHFnPOUPRT6z791d8YmADnsIueR9PSsSwxWap03yuCJnajv5EQZsFJLahrCdQ-2F-2FGs36arcRFlumHmPt7Ole-2FVzFmja7JQJjv419yBk5cucTClWtMhODDP71iDPmyZ9ABafiXtWQcgB3OVm-2FrVYMBd-2Bmkyqv4Z2VxC6EazT-2F9I3M-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>
</body></html>