nod3luts.py 11.3 KB
# -*- coding: utf-8 -*-
#
# Copyright © 2013 MPIfR
# Peter Mueller
# contact: peter@mpifr.de
"""
Color data and pre-defined cmap objects.

This is a helper for cm.py, originally part of that file.
Separating the data (this file) from cm.py makes both easier
to deal with.

"""

L = 255.0

_nod3_pem_step_data =  {'red':   [
          (0.000000, 0.196078, 0.196078),
          (0.023529, 0.196078, 0.196078),
          (0.027451, 0.000000, 0.000000),
          (0.184314, 0.000000, 0.000000),
          (0.188235, 0.392157, 0.392157),
          (0.207843, 0.392157, 0.392157),
          (0.211765, 0.470588, 0.470588),
          (0.231373, 0.470588, 0.470588),
          (0.235294, 0.588235, 0.588235),
          (0.254902, 0.588235, 0.588235),
          (0.258824, 0.705882, 0.705882),
          (0.298039, 0.705882, 0.705882),
          (0.301961, 0.901961, 0.901961),
          (0.341176, 0.901961, 0.901961),
          (0.345098, 1.000000, 1.000000),
          (0.384314, 1.000000, 1.000000),
          (0.388235, 0.941176, 0.941176),
          (0.470588, 0.941176, 0.941176),
          (0.474510, 1.000000, 1.000000),
          (0.690196, 1.000000, 1.000000),
          (0.694118, 0.784314, 0.784314),
          (0.768627, 0.784314, 0.784314),
          (0.772549, 0.588235, 0.588235),
          (0.925490, 0.588235, 0.588235),
          (0.929412, 0.784314, 0.784314),
          #(0.996078, 0.784314, 0.784314)],
          (0.996078, 0.784314, 0.784314),
          #(1.000000, 1.000000, 1.000000)],
          (1.000000, 0.900000, 0.900000)],

       'green': [
          (0.000000, 0.000000, 0.000000),
          (0.066667, 0.000000, 0.000000),
          (0.070588, 0.470588, 0.470588),
          (0.090196, 0.470588, 0.470588),
          (0.094118, 0.588235, 0.588235),
          (0.113725, 0.588235, 0.588235),
          (0.117647, 0.705882, 0.705882),
          (0.137255, 0.705882, 0.705882),
          (0.141176, 0.784314, 0.784314),
          (0.160784, 0.784314, 0.784314),
          (0.164706, 0.862745, 0.862745),
          (0.207843, 0.862745, 0.862745),
          (0.211765, 0.705882, 0.705882),
          (0.298039, 0.705882, 0.705882),
          (0.301961, 0.901961, 0.901961),
          (0.341176, 0.901961, 0.901961),
          (0.345098, 1.000000, 1.000000),
          (0.384314, 1.000000, 1.000000),
          (0.388235, 0.784314, 0.784314),
          (0.427451, 0.784314, 0.784314),
          (0.431373, 0.666667, 0.666667),
          (0.525490, 0.666667, 0.666667),
          (0.529412, 0.392157, 0.392157),
          (0.580392, 0.392157, 0.392157),
          (0.584314, 0.196078, 0.196078),
          (0.635294, 0.196078, 0.196078),
          (0.639216, 0.000000, 0.000000),
          (0.847059, 0.000000, 0.000000),
          (0.850980, 0.392157, 0.392157),
          (0.925490, 0.392157, 0.392157),
          (0.929412, 0.784314, 0.784314),
          #(0.996078, 0.784314, 0.784314)],
          (0.996078, 0.784314, 0.784314),
          #(1.000000, 1.000000, 1.000000)],
          (1.000000, 0.900000, 0.900000)],

       'blue': [
          (0.000000, 0.705882, 0.705882),
          (0.023529, 0.705882, 0.705882),
          (0.027451, 0.870588, 0.870588),
          (0.043137, 0.870588, 0.870588),
          (0.047059, 1.000000, 1.000000),
          (0.066667, 1.000000, 1.000000),
          (0.070588, 0.705882, 0.705882),
          (0.113725, 0.705882, 0.705882),
          (0.117647, 0.588235, 0.588235),
          (0.137255, 0.588235, 0.588235),
          (0.141176, 0.470588, 0.470588),
          (0.160784, 0.470588, 0.470588),
          (0.164706, 0.000000, 0.000000),
          (0.686275, 0.000000, 0.000000),
          (0.690196, 0.588235, 0.588235),
          (0.847059, 0.588235, 0.588235),
          (0.850980, 0.392157, 0.392157),
          (0.925490, 0.392157, 0.392157),
          (0.929412, 0.784314, 0.784314),
          #(0.996078, 0.784314, 0.784314)]}
          (0.996078, 0.784314, 0.784314),
          #(1.000000, 1.000000, 1.000000)]}
          (1.000000, 0.900000, 0.900000)]}


_nod3_pem_data =  {'red':   [
          (0.000000, 0.196078, 0.196078),
          (0.027451, 0.000000, 0.000000),
          (0.188235, 0.392157, 0.392157),
          (0.211765, 0.470588, 0.470588),
          (0.235294, 0.588235, 0.588235),
          (0.258824, 0.705882, 0.705882),
          (0.301961, 0.901961, 0.901961),
          (0.345098, 1.000000, 1.000000),
          (0.388235, 0.941176, 0.941176),
          (0.474510, 1.000000, 1.000000),
          (0.694118, 0.784314, 0.784314),
          (0.772549, 0.588235, 0.588235),
          (0.929412, 0.784314, 0.784314),
          #(1.000000, 1.000000, 1.000000)],
          (1.000000, 0.875000, 0.900000)],

       'green': [
          (0.000000, 0.000000, 0.000000),
          (0.070588, 0.470588, 0.470588),
          (0.094118, 0.588235, 0.588235),
          (0.117647, 0.705882, 0.705882),
          (0.141176, 0.784314, 0.784314),
          (0.164706, 0.862745, 0.862745),
          (0.211765, 0.705882, 0.705882),
          (0.301961, 0.901961, 0.901961),
          (0.345098, 1.000000, 1.000000),
          (0.388235, 0.784314, 0.784314),
          (0.431373, 0.666667, 0.666667),
          (0.529412, 0.392157, 0.392157),
          (0.584314, 0.196078, 0.196078),
          (0.639216, 0.000000, 0.000000),
          (0.850980, 0.392157, 0.392157),
          (0.929412, 0.784314, 0.784314),
          #(1.000000, 1.000000, 1.000000)],
          (1.000000, 0.875000, 0.900000)],

       'blue': [
          (0.000000, 0.705882, 0.705882),
          (0.027451, 0.870588, 0.870588),
          (0.047059, 1.000000, 1.000000),
          (0.070588, 0.705882, 0.705882),
          (0.117647, 0.588235, 0.588235),
          (0.141176, 0.470588, 0.470588),
          (0.164706, 0.000000, 0.000000),
          (0.690196, 0.588235, 0.588235),
          (0.850980, 0.392157, 0.392157),
          (0.929412, 0.784314, 0.784314),
          #(1.000000, 1.000000, 1.000000)]}
          (1.000000, 0.875000, 0.900000)]}

_nod3_rainbow_data =  {'red':   [(0.0,  0.5, 0.4),
                     (1.0/6.0,  0.0, 0.0),
                     (1.0,  1.0, 1.0)],

         'green': [(0.0,  0.0, 0.0),
                   (0.6,  1.0, 1.0),
                   (1.0,  0.0, 0.0)],

         'blue':  [(0.0,  0.5, 0.5),
                   (1.0/6.0,  1.0, 1.0),
                   (1.0,  0.0, 0.0)]}

_nod3_easy_data =  {'red':   [(0.0,  0.0, 0.0),
                     (1.0,  1.0, 1.0)],

         'green': [(0.0,  0.0, 0.0),
                   (0.5,  1.0, 1.0),
                   (1.0,  0.0, 0.0)],

         'blue':  [(0.0,  1.0, 1.0),
                   (1.0,  0.0, 0.0)]}

_nod3_heat_data =  {'red':   [(0.0,  0.0, 0.0),
                     (1.0/3.0,  1.0, 1.0),
                     (1.0,  1.0, 1.0)],

         'green': [(0.0,  0.0, 0.0),
                   (1.0,  1.0, 1.0)],

         'blue':  [(0.0,  0.0, 0.0),
                   (2.0/3.0,  0.0, 0.0),
                   (1.0,  1.0, 1.0)]}


_nod3_farbe_data =  {'red':   [(0.0, 0.0, 0.0),
                     (0.16862745, 0.0, 0.0),
                     #(0.34509804, 1.0, 1.0),
                     (0.278431373, 1.0, 1.0),
                     (1.00000000, 1.0, 1.0)],

       'green': [(0.0, 0.0, 0.0),
          (0.0431373, 0.0, 0.0),
          #(0.15686275, 1.0, 1.0),
          #(0.26274510, 1.0, 1.0),
          #(0.94117647, 0.0, 0.0),
          ##(0.286274510, 1.0, 1.0),
          (0.3, 1.0, 1.0),
          ###(0.615686275, 1.0/1.5, 1.0/1.5),
          (0.4, 1.0/1.5, 1.0/1.5),
          (0.941176471, 0.0, 0.0),
          (1.0, 0.0, 0.0)],

       'blue': [(0.0, 0.0, 0.0),
          (0.0509804, 1.0, 1.0),
          (0.0745098, 1.0, 1.0),
          (0.18039216, 0.0, 0.0),
          (1.0, 0.0, 0.0)]}


_nod3_beck_data = {
           'red':   [(0.0, 0.0, 0.0),
                       (0.16182572614107885, 0.0, 0.0),
                       (0.17842323651452283, 0.31372549019607843, 0.31372549019607843),
                       (0.18672199170124482, 0.43137254901960786, 0.43137254901960786),
                       (0.21161825726141079, 0.66666666666666663, 0.66666666666666663),
                       (0.21991701244813278, 0.72549019607843135, 0.72549019607843135),
                       (0.26970954356846472, 0.96078431372549022, 0.96078431372549022),
                       (0.27800829875518673, 0.98039215686274506, 0.98039215686274506),
                       (1.0, 1.0, 1.0)],

           'green':   [(0.0, 0.0, 0.0),
                       (0.029045643153526972, 0.0, 0.0),
                       (0.037344398340248962, 0.15686274509803921, 0.15686274509803921),
                       (0.11203319502074689, 0.86274509803921573, 0.86274509803921573),
                       (0.12863070539419086, 0.94117647058823528, 0.94117647058823528),
                       (0.15352697095435686, 1.0, 1.0),
                       (0.26141078838174275, 1.0, 1.0),
                       (0.26970954356846472, 0.98039215686274506, 0.98039215686274506),
                       (0.63485477178423233, 0.66666666666666663, 0.66666666666666663),
                       (0.98340248962655596, 0.0, 0.0),
                       (1.0, 0.0, 0.0)],

           'blue':   [(0.0, 0.19607843137254902, 0.19607843137254902),
                       (0.0041493775933609959, 0.39215686274509803, 0.39215686274509803),
                       (0.029045643153526972, 0.86274509803921573, 0.86274509803921573),
                       (0.037344398340248962, 1.0, 1.0),
                       (0.062240663900414939, 1.0, 1.0),
                       (0.1037344398340249, 0.80392156862745101, 0.80392156862745101),
                       (0.11203319502074689, 0.74509803921568629, 0.74509803921568629),
                       (0.16182572614107885, 0.27450980392156865, 0.27450980392156865),
                       (0.17012448132780084, 0.15686274509803921, 0.15686274509803921),
                       (0.17842323651452283, 0.0, 0.0),
                       (1.0, 0.0, 0.0)] }


_nod3_xred_data =  {'red':   [(0.0,  0.0, 0.0),
                     (1.0,  1.0, 1.0)],

         'green': [(0.0,  0.0, 0.0),
                   (0.0,  0.0, 0.0)],

         'blue':  [(0.0,  0.0, 0.0),
                   (0.0,  0.0, 0.0)]}


_nod3_xred_data =  {'red':   [(0.0,  0.0, 0.0),
                     (1.0,  1.0, 1.0)],

         'green': [(0.0,  0.0, 0.0),
                   (0.0,  0.0, 0.0)],

         'blue':  [(0.0,  0.0, 0.0),
                   (0.0,  0.0, 0.0)]}


_nod3_xgreen_data =  {'red':   [(0.0,  0.0, 0.0),
                     (0.0,  0.0, 0.0)],

         'green': [(0.0,  0.0, 0.0),
                   (1.0,  1.0, 1.0)],

         'blue':  [(0.0,  0.0, 0.0),
                   (0.0,  0.0, 0.0)]}


_nod3_xblue_data =  {'red':   [(0.0,  0.0, 0.0),
                     (0.0,  0.0, 0.0)],

         'green': [(0.0,  0.0, 0.0),
                   (0.0,  0.0, 0.0)],

         'blue':  [(0.0,  0.0, 0.0),
                   (1.0,  1.0, 1.0)]}

_nod3_xyellow_data =  {'red':   [(0.0,  0.0, 0.0),
                     (1.0,  1.0, 1.0)],

         'green': [(0.0,  0.0, 0.0),
                   (1.0,  1.0, 1.0)],

         'blue':  [(0.0,  0.0, 0.0),
                   (0.0,  0.0, 0.0)]}

datad = {
    'nod3_easy': _nod3_easy_data,
    'nod3_heat': _nod3_heat_data,
    'nod3_pem': _nod3_pem_data,
    'nod3_pem_step': _nod3_pem_step_data,
    'nod3_beck': _nod3_beck_data,
    'nod3_xred': _nod3_xred_data,
    'nod3_xgreen': _nod3_xgreen_data,
    'nod3_xblue': _nod3_xblue_data,
    'nod3_xyellow': _nod3_xyellow_data
    }