compare to reference results

need to patch damask.version to be independent of version strings (in
json and ASCII table)
This commit is contained in:
Martin Diehl 2020-06-28 11:20:09 +02:00
parent 6a748d2edf
commit e6a87da37c
5 changed files with 1835 additions and 3 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,258 @@
View.ColorTable = {
255.0,255.0,255.0,
254.0,254.0,254.0,
253.0,253.0,253.0,
252.0,252.0,252.0,
251.0,251.0,251.0,
250.0,250.0,250.0,
249.0,249.0,249.0,
248.0,248.0,248.0,
247.0,247.0,247.0,
246.0,246.0,246.0,
245.0,245.0,245.0,
244.0,244.0,244.0,
243.0,243.0,243.0,
242.0,242.0,242.0,
241.0,241.0,241.0,
240.0,240.0,240.0,
239.0,239.0,239.0,
238.0,238.0,238.0,
237.0,237.0,237.0,
236.0,236.0,236.0,
235.00000000000003,235.00000000000003,235.00000000000003,
234.0,234.0,234.0,
233.0,233.0,233.0,
232.0,232.0,232.0,
231.0,231.0,231.0,
230.0,230.0,230.0,
229.0,229.0,229.0,
228.0,228.0,228.0,
227.0,227.0,227.0,
226.0,226.0,226.0,
225.0,225.0,225.0,
224.0,224.0,224.0,
223.0,223.0,223.0,
222.0,222.0,222.0,
221.0,221.0,221.0,
220.0,220.0,220.0,
219.00000000000003,219.00000000000003,219.00000000000003,
218.00000000000003,218.00000000000003,218.00000000000003,
217.0,217.0,217.0,
216.0,216.0,216.0,
215.0,215.0,215.0,
214.0,214.0,214.0,
213.0,213.0,213.0,
211.99999999999997,211.99999999999997,211.99999999999997,
211.0,211.0,211.0,
210.0,210.0,210.0,
209.0,209.0,209.0,
208.0,208.0,208.0,
207.0,207.0,207.0,
206.0,206.0,206.0,
205.0,205.0,205.0,
204.0,204.0,204.0,
203.00000000000003,203.00000000000003,203.00000000000003,
202.00000000000003,202.00000000000003,202.00000000000003,
201.0,201.0,201.0,
200.0,200.0,200.0,
199.0,199.0,199.0,
198.0,198.0,198.0,
197.0,197.0,197.0,
195.99999999999997,195.99999999999997,195.99999999999997,
195.0,195.0,195.0,
194.0,194.0,194.0,
193.0,193.0,193.0,
192.0,192.0,192.0,
191.0,191.0,191.0,
190.0,190.0,190.0,
189.0,189.0,189.0,
188.0,188.0,188.0,
187.00000000000003,187.00000000000003,187.00000000000003,
186.00000000000003,186.00000000000003,186.00000000000003,
185.0,185.0,185.0,
184.0,184.0,184.0,
183.0,183.0,183.0,
182.0,182.0,182.0,
181.0,181.0,181.0,
179.99999999999997,179.99999999999997,179.99999999999997,
179.0,179.0,179.0,
178.0,178.0,178.0,
177.0,177.0,177.0,
176.0,176.0,176.0,
175.0,175.0,175.0,
174.0,174.0,174.0,
173.0,173.0,173.0,
172.0,172.0,172.0,
171.00000000000003,171.00000000000003,171.00000000000003,
170.00000000000003,170.00000000000003,170.00000000000003,
169.0,169.0,169.0,
168.0,168.0,168.0,
167.0,167.0,167.0,
166.0,166.0,166.0,
165.0,165.0,165.0,
163.99999999999997,163.99999999999997,163.99999999999997,
163.0,163.0,163.0,
162.0,162.0,162.0,
161.0,161.0,161.0,
160.0,160.0,160.0,
159.0,159.0,159.0,
158.0,158.0,158.0,
157.0,157.0,157.0,
156.0,156.0,156.0,
155.00000000000003,155.00000000000003,155.00000000000003,
154.00000000000003,154.00000000000003,154.00000000000003,
153.0,153.0,153.0,
152.0,152.0,152.0,
151.0,151.0,151.0,
150.0,150.0,150.0,
149.0,149.0,149.0,
147.99999999999997,147.99999999999997,147.99999999999997,
147.0,147.0,147.0,
146.0,146.0,146.0,
145.0,145.0,145.0,
144.0,144.0,144.0,
143.0,143.0,143.0,
142.0,142.0,142.0,
141.0,141.0,141.0,
140.0,140.0,140.0,
139.00000000000003,139.00000000000003,139.00000000000003,
138.00000000000003,138.00000000000003,138.00000000000003,
137.0,137.0,137.0,
136.0,136.0,136.0,
135.0,135.0,135.0,
134.0,134.0,134.0,
133.0,133.0,133.0,
131.99999999999997,131.99999999999997,131.99999999999997,
131.0,131.0,131.0,
130.0,130.0,130.0,
129.0,129.0,129.0,
128.0,128.0,128.0,
127.0,127.0,127.0,
126.0,126.0,126.0,
125.00000000000001,125.00000000000001,125.00000000000001,
124.00000000000001,124.00000000000001,124.00000000000001,
123.00000000000001,123.00000000000001,123.00000000000001,
121.99999999999999,121.99999999999999,121.99999999999999,
121.0,121.0,121.0,
120.0,120.0,120.0,
119.0,119.0,119.0,
118.0,118.0,118.0,
117.00000000000001,117.00000000000001,117.00000000000001,
116.00000000000001,116.00000000000001,116.00000000000001,
114.99999999999999,114.99999999999999,114.99999999999999,
113.99999999999999,113.99999999999999,113.99999999999999,
113.0,113.0,113.0,
112.0,112.0,112.0,
111.0,111.0,111.0,
110.0,110.0,110.0,
109.00000000000001,109.00000000000001,109.00000000000001,
108.00000000000001,108.00000000000001,108.00000000000001,
107.00000000000001,107.00000000000001,107.00000000000001,
105.99999999999999,105.99999999999999,105.99999999999999,
105.0,105.0,105.0,
104.0,104.0,104.0,
103.0,103.0,103.0,
102.0,102.0,102.0,
101.00000000000001,101.00000000000001,101.00000000000001,
100.00000000000001,100.00000000000001,100.00000000000001,
98.99999999999999,98.99999999999999,98.99999999999999,
97.99999999999999,97.99999999999999,97.99999999999999,
97.0,97.0,97.0,
96.0,96.0,96.0,
95.0,95.0,95.0,
94.0,94.0,94.0,
93.00000000000001,93.00000000000001,93.00000000000001,
92.00000000000001,92.00000000000001,92.00000000000001,
91.00000000000001,91.00000000000001,91.00000000000001,
89.99999999999999,89.99999999999999,89.99999999999999,
89.0,89.0,89.0,
88.0,88.0,88.0,
87.0,87.0,87.0,
86.0,86.0,86.0,
85.00000000000001,85.00000000000001,85.00000000000001,
84.00000000000001,84.00000000000001,84.00000000000001,
82.99999999999999,82.99999999999999,82.99999999999999,
81.99999999999999,81.99999999999999,81.99999999999999,
81.0,81.0,81.0,
80.0,80.0,80.0,
79.0,79.0,79.0,
78.0,78.0,78.0,
77.00000000000001,77.00000000000001,77.00000000000001,
76.00000000000001,76.00000000000001,76.00000000000001,
75.00000000000001,75.00000000000001,75.00000000000001,
73.99999999999999,73.99999999999999,73.99999999999999,
73.0,73.0,73.0,
72.0,72.0,72.0,
71.0,71.0,71.0,
70.0,70.0,70.0,
69.00000000000001,69.00000000000001,69.00000000000001,
68.00000000000001,68.00000000000001,68.00000000000001,
66.99999999999999,66.99999999999999,66.99999999999999,
65.99999999999999,65.99999999999999,65.99999999999999,
65.0,65.0,65.0,
64.0,64.0,64.0,
63.0,63.0,63.0,
62.00000000000001,62.00000000000001,62.00000000000001,
61.00000000000001,61.00000000000001,61.00000000000001,
60.000000000000014,60.000000000000014,60.000000000000014,
59.000000000000014,59.000000000000014,59.000000000000014,
57.99999999999999,57.99999999999999,57.99999999999999,
56.99999999999999,56.99999999999999,56.99999999999999,
56.0,56.0,56.0,
55.0,55.0,55.0,
54.00000000000001,54.00000000000001,54.00000000000001,
53.00000000000001,53.00000000000001,53.00000000000001,
52.000000000000014,52.000000000000014,52.000000000000014,
50.999999999999986,50.999999999999986,50.999999999999986,
49.99999999999999,49.99999999999999,49.99999999999999,
48.99999999999999,48.99999999999999,48.99999999999999,
48.0,48.0,48.0,
47.0,47.0,47.0,
46.00000000000001,46.00000000000001,46.00000000000001,
45.00000000000001,45.00000000000001,45.00000000000001,
44.000000000000014,44.000000000000014,44.000000000000014,
43.000000000000014,43.000000000000014,43.000000000000014,
41.99999999999999,41.99999999999999,41.99999999999999,
40.99999999999999,40.99999999999999,40.99999999999999,
40.0,40.0,40.0,
39.0,39.0,39.0,
38.00000000000001,38.00000000000001,38.00000000000001,
37.00000000000001,37.00000000000001,37.00000000000001,
36.000000000000014,36.000000000000014,36.000000000000014,
34.999999999999986,34.999999999999986,34.999999999999986,
33.99999999999999,33.99999999999999,33.99999999999999,
32.99999999999999,32.99999999999999,32.99999999999999,
32.0,32.0,32.0,
31.000000000000004,31.000000000000004,31.000000000000004,
30.000000000000007,30.000000000000007,30.000000000000007,
29.00000000000001,29.00000000000001,29.00000000000001,
28.000000000000014,28.000000000000014,28.000000000000014,
27.000000000000018,27.000000000000018,27.000000000000018,
25.999999999999993,25.999999999999993,25.999999999999993,
24.999999999999996,24.999999999999996,24.999999999999996,
24.0,24.0,24.0,
23.000000000000004,23.000000000000004,23.000000000000004,
22.000000000000007,22.000000000000007,22.000000000000007,
21.00000000000001,21.00000000000001,21.00000000000001,
20.000000000000014,20.000000000000014,20.000000000000014,
18.99999999999999,18.99999999999999,18.99999999999999,
17.999999999999993,17.999999999999993,17.999999999999993,
16.999999999999996,16.999999999999996,16.999999999999996,
16.0,16.0,16.0,
15.000000000000004,15.000000000000004,15.000000000000004,
14.000000000000007,14.000000000000007,14.000000000000007,
13.00000000000001,13.00000000000001,13.00000000000001,
12.000000000000014,12.000000000000014,12.000000000000014,
11.000000000000018,11.000000000000018,11.000000000000018,
9.999999999999993,9.999999999999993,9.999999999999993,
8.999999999999996,8.999999999999996,8.999999999999996,
8.0,8.0,8.0,
7.0000000000000036,7.0000000000000036,7.0000000000000036,
6.000000000000007,6.000000000000007,6.000000000000007,
5.000000000000011,5.000000000000011,5.000000000000011,
4.000000000000014,4.000000000000014,4.000000000000014,
2.9999999999999893,2.9999999999999893,2.9999999999999893,
1.999999999999993,1.999999999999993,1.999999999999993,
0.9999999999999964,0.9999999999999964,0.9999999999999964,
0.0,0.0,0.0,
}

View File

@ -0,0 +1,258 @@
# Creator: damask.Colormap 99.99.99-9999-pytest
R G B alpha
1.0 1.0 1.0 1.0
0.996078431372549 0.996078431372549 0.996078431372549 1.0
0.9921568627450981 0.9921568627450981 0.9921568627450981 1.0
0.9882352941176471 0.9882352941176471 0.9882352941176471 1.0
0.9843137254901961 0.9843137254901961 0.9843137254901961 1.0
0.9803921568627451 0.9803921568627451 0.9803921568627451 1.0
0.9764705882352941 0.9764705882352941 0.9764705882352941 1.0
0.9725490196078431 0.9725490196078431 0.9725490196078431 1.0
0.9686274509803922 0.9686274509803922 0.9686274509803922 1.0
0.9647058823529412 0.9647058823529412 0.9647058823529412 1.0
0.9607843137254902 0.9607843137254902 0.9607843137254902 1.0
0.9568627450980393 0.9568627450980393 0.9568627450980393 1.0
0.9529411764705882 0.9529411764705882 0.9529411764705882 1.0
0.9490196078431372 0.9490196078431372 0.9490196078431372 1.0
0.9450980392156862 0.9450980392156862 0.9450980392156862 1.0
0.9411764705882353 0.9411764705882353 0.9411764705882353 1.0
0.9372549019607843 0.9372549019607843 0.9372549019607843 1.0
0.9333333333333333 0.9333333333333333 0.9333333333333333 1.0
0.9294117647058824 0.9294117647058824 0.9294117647058824 1.0
0.9254901960784314 0.9254901960784314 0.9254901960784314 1.0
0.9215686274509804 0.9215686274509804 0.9215686274509804 1.0
0.9176470588235294 0.9176470588235294 0.9176470588235294 1.0
0.9137254901960784 0.9137254901960784 0.9137254901960784 1.0
0.9098039215686274 0.9098039215686274 0.9098039215686274 1.0
0.9058823529411765 0.9058823529411765 0.9058823529411765 1.0
0.9019607843137255 0.9019607843137255 0.9019607843137255 1.0
0.8980392156862745 0.8980392156862745 0.8980392156862745 1.0
0.8941176470588236 0.8941176470588236 0.8941176470588236 1.0
0.8901960784313725 0.8901960784313725 0.8901960784313725 1.0
0.8862745098039215 0.8862745098039215 0.8862745098039215 1.0
0.8823529411764706 0.8823529411764706 0.8823529411764706 1.0
0.8784313725490196 0.8784313725490196 0.8784313725490196 1.0
0.8745098039215686 0.8745098039215686 0.8745098039215686 1.0
0.8705882352941177 0.8705882352941177 0.8705882352941177 1.0
0.8666666666666667 0.8666666666666667 0.8666666666666667 1.0
0.8627450980392157 0.8627450980392157 0.8627450980392157 1.0
0.8588235294117648 0.8588235294117648 0.8588235294117648 1.0
0.8549019607843138 0.8549019607843138 0.8549019607843138 1.0
0.8509803921568627 0.8509803921568627 0.8509803921568627 1.0
0.8470588235294118 0.8470588235294118 0.8470588235294118 1.0
0.8431372549019608 0.8431372549019608 0.8431372549019608 1.0
0.8392156862745098 0.8392156862745098 0.8392156862745098 1.0
0.8352941176470589 0.8352941176470589 0.8352941176470589 1.0
0.8313725490196078 0.8313725490196078 0.8313725490196078 1.0
0.8274509803921568 0.8274509803921568 0.8274509803921568 1.0
0.8235294117647058 0.8235294117647058 0.8235294117647058 1.0
0.8196078431372549 0.8196078431372549 0.8196078431372549 1.0
0.8156862745098039 0.8156862745098039 0.8156862745098039 1.0
0.8117647058823529 0.8117647058823529 0.8117647058823529 1.0
0.807843137254902 0.807843137254902 0.807843137254902 1.0
0.803921568627451 0.803921568627451 0.803921568627451 1.0
0.8 0.8 0.8 1.0
0.7960784313725491 0.7960784313725491 0.7960784313725491 1.0
0.7921568627450981 0.7921568627450981 0.7921568627450981 1.0
0.788235294117647 0.788235294117647 0.788235294117647 1.0
0.7843137254901961 0.7843137254901961 0.7843137254901961 1.0
0.7803921568627451 0.7803921568627451 0.7803921568627451 1.0
0.7764705882352941 0.7764705882352941 0.7764705882352941 1.0
0.7725490196078432 0.7725490196078432 0.7725490196078432 1.0
0.7686274509803921 0.7686274509803921 0.7686274509803921 1.0
0.7647058823529411 0.7647058823529411 0.7647058823529411 1.0
0.7607843137254902 0.7607843137254902 0.7607843137254902 1.0
0.7568627450980392 0.7568627450980392 0.7568627450980392 1.0
0.7529411764705882 0.7529411764705882 0.7529411764705882 1.0
0.7490196078431373 0.7490196078431373 0.7490196078431373 1.0
0.7450980392156863 0.7450980392156863 0.7450980392156863 1.0
0.7411764705882353 0.7411764705882353 0.7411764705882353 1.0
0.7372549019607844 0.7372549019607844 0.7372549019607844 1.0
0.7333333333333334 0.7333333333333334 0.7333333333333334 1.0
0.7294117647058824 0.7294117647058824 0.7294117647058824 1.0
0.7254901960784313 0.7254901960784313 0.7254901960784313 1.0
0.7215686274509804 0.7215686274509804 0.7215686274509804 1.0
0.7176470588235294 0.7176470588235294 0.7176470588235294 1.0
0.7137254901960784 0.7137254901960784 0.7137254901960784 1.0
0.7098039215686275 0.7098039215686275 0.7098039215686275 1.0
0.7058823529411764 0.7058823529411764 0.7058823529411764 1.0
0.7019607843137254 0.7019607843137254 0.7019607843137254 1.0
0.6980392156862745 0.6980392156862745 0.6980392156862745 1.0
0.6941176470588235 0.6941176470588235 0.6941176470588235 1.0
0.6901960784313725 0.6901960784313725 0.6901960784313725 1.0
0.6862745098039216 0.6862745098039216 0.6862745098039216 1.0
0.6823529411764706 0.6823529411764706 0.6823529411764706 1.0
0.6784313725490196 0.6784313725490196 0.6784313725490196 1.0
0.6745098039215687 0.6745098039215687 0.6745098039215687 1.0
0.6705882352941177 0.6705882352941177 0.6705882352941177 1.0
0.6666666666666667 0.6666666666666667 0.6666666666666667 1.0
0.6627450980392157 0.6627450980392157 0.6627450980392157 1.0
0.6588235294117647 0.6588235294117647 0.6588235294117647 1.0
0.6549019607843137 0.6549019607843137 0.6549019607843137 1.0
0.6509803921568628 0.6509803921568628 0.6509803921568628 1.0
0.6470588235294118 0.6470588235294118 0.6470588235294118 1.0
0.6431372549019607 0.6431372549019607 0.6431372549019607 1.0
0.6392156862745098 0.6392156862745098 0.6392156862745098 1.0
0.6352941176470588 0.6352941176470588 0.6352941176470588 1.0
0.6313725490196078 0.6313725490196078 0.6313725490196078 1.0
0.6274509803921569 0.6274509803921569 0.6274509803921569 1.0
0.6235294117647059 0.6235294117647059 0.6235294117647059 1.0
0.6196078431372549 0.6196078431372549 0.6196078431372549 1.0
0.615686274509804 0.615686274509804 0.615686274509804 1.0
0.611764705882353 0.611764705882353 0.611764705882353 1.0
0.607843137254902 0.607843137254902 0.607843137254902 1.0
0.603921568627451 0.603921568627451 0.603921568627451 1.0
0.6 0.6 0.6 1.0
0.596078431372549 0.596078431372549 0.596078431372549 1.0
0.592156862745098 0.592156862745098 0.592156862745098 1.0
0.5882352941176471 0.5882352941176471 0.5882352941176471 1.0
0.5843137254901961 0.5843137254901961 0.5843137254901961 1.0
0.580392156862745 0.580392156862745 0.580392156862745 1.0
0.5764705882352941 0.5764705882352941 0.5764705882352941 1.0
0.5725490196078431 0.5725490196078431 0.5725490196078431 1.0
0.5686274509803921 0.5686274509803921 0.5686274509803921 1.0
0.5647058823529412 0.5647058823529412 0.5647058823529412 1.0
0.5607843137254902 0.5607843137254902 0.5607843137254902 1.0
0.5568627450980392 0.5568627450980392 0.5568627450980392 1.0
0.5529411764705883 0.5529411764705883 0.5529411764705883 1.0
0.5490196078431373 0.5490196078431373 0.5490196078431373 1.0
0.5450980392156863 0.5450980392156863 0.5450980392156863 1.0
0.5411764705882354 0.5411764705882354 0.5411764705882354 1.0
0.5372549019607843 0.5372549019607843 0.5372549019607843 1.0
0.5333333333333333 0.5333333333333333 0.5333333333333333 1.0
0.5294117647058824 0.5294117647058824 0.5294117647058824 1.0
0.5254901960784314 0.5254901960784314 0.5254901960784314 1.0
0.5215686274509804 0.5215686274509804 0.5215686274509804 1.0
0.5176470588235293 0.5176470588235293 0.5176470588235293 1.0
0.5137254901960784 0.5137254901960784 0.5137254901960784 1.0
0.5098039215686274 0.5098039215686274 0.5098039215686274 1.0
0.5058823529411764 0.5058823529411764 0.5058823529411764 1.0
0.5019607843137255 0.5019607843137255 0.5019607843137255 1.0
0.4980392156862745 0.4980392156862745 0.4980392156862745 1.0
0.49411764705882355 0.49411764705882355 0.49411764705882355 1.0
0.4901960784313726 0.4901960784313726 0.4901960784313726 1.0
0.4862745098039216 0.4862745098039216 0.4862745098039216 1.0
0.48235294117647065 0.48235294117647065 0.48235294117647065 1.0
0.4784313725490196 0.4784313725490196 0.4784313725490196 1.0
0.4745098039215686 0.4745098039215686 0.4745098039215686 1.0
0.47058823529411764 0.47058823529411764 0.47058823529411764 1.0
0.4666666666666667 0.4666666666666667 0.4666666666666667 1.0
0.4627450980392157 0.4627450980392157 0.4627450980392157 1.0
0.45882352941176474 0.45882352941176474 0.45882352941176474 1.0
0.4549019607843138 0.4549019607843138 0.4549019607843138 1.0
0.4509803921568627 0.4509803921568627 0.4509803921568627 1.0
0.44705882352941173 0.44705882352941173 0.44705882352941173 1.0
0.44313725490196076 0.44313725490196076 0.44313725490196076 1.0
0.4392156862745098 0.4392156862745098 0.4392156862745098 1.0
0.43529411764705883 0.43529411764705883 0.43529411764705883 1.0
0.43137254901960786 0.43137254901960786 0.43137254901960786 1.0
0.4274509803921569 0.4274509803921569 0.4274509803921569 1.0
0.42352941176470593 0.42352941176470593 0.42352941176470593 1.0
0.41960784313725497 0.41960784313725497 0.41960784313725497 1.0
0.4156862745098039 0.4156862745098039 0.4156862745098039 1.0
0.4117647058823529 0.4117647058823529 0.4117647058823529 1.0
0.40784313725490196 0.40784313725490196 0.40784313725490196 1.0
0.403921568627451 0.403921568627451 0.403921568627451 1.0
0.4 0.4 0.4 1.0
0.39607843137254906 0.39607843137254906 0.39607843137254906 1.0
0.3921568627450981 0.3921568627450981 0.3921568627450981 1.0
0.388235294117647 0.388235294117647 0.388235294117647 1.0
0.38431372549019605 0.38431372549019605 0.38431372549019605 1.0
0.3803921568627451 0.3803921568627451 0.3803921568627451 1.0
0.3764705882352941 0.3764705882352941 0.3764705882352941 1.0
0.37254901960784315 0.37254901960784315 0.37254901960784315 1.0
0.3686274509803922 0.3686274509803922 0.3686274509803922 1.0
0.3647058823529412 0.3647058823529412 0.3647058823529412 1.0
0.36078431372549025 0.36078431372549025 0.36078431372549025 1.0
0.3568627450980393 0.3568627450980393 0.3568627450980393 1.0
0.3529411764705882 0.3529411764705882 0.3529411764705882 1.0
0.34901960784313724 0.34901960784313724 0.34901960784313724 1.0
0.34509803921568627 0.34509803921568627 0.34509803921568627 1.0
0.3411764705882353 0.3411764705882353 0.3411764705882353 1.0
0.33725490196078434 0.33725490196078434 0.33725490196078434 1.0
0.33333333333333337 0.33333333333333337 0.33333333333333337 1.0
0.3294117647058824 0.3294117647058824 0.3294117647058824 1.0
0.3254901960784313 0.3254901960784313 0.3254901960784313 1.0
0.32156862745098036 0.32156862745098036 0.32156862745098036 1.0
0.3176470588235294 0.3176470588235294 0.3176470588235294 1.0
0.3137254901960784 0.3137254901960784 0.3137254901960784 1.0
0.30980392156862746 0.30980392156862746 0.30980392156862746 1.0
0.3058823529411765 0.3058823529411765 0.3058823529411765 1.0
0.3019607843137255 0.3019607843137255 0.3019607843137255 1.0
0.29803921568627456 0.29803921568627456 0.29803921568627456 1.0
0.2941176470588236 0.2941176470588236 0.2941176470588236 1.0
0.2901960784313725 0.2901960784313725 0.2901960784313725 1.0
0.28627450980392155 0.28627450980392155 0.28627450980392155 1.0
0.2823529411764706 0.2823529411764706 0.2823529411764706 1.0
0.2784313725490196 0.2784313725490196 0.2784313725490196 1.0
0.27450980392156865 0.27450980392156865 0.27450980392156865 1.0
0.2705882352941177 0.2705882352941177 0.2705882352941177 1.0
0.2666666666666667 0.2666666666666667 0.2666666666666667 1.0
0.26274509803921564 0.26274509803921564 0.26274509803921564 1.0
0.2588235294117647 0.2588235294117647 0.2588235294117647 1.0
0.2549019607843137 0.2549019607843137 0.2549019607843137 1.0
0.25098039215686274 0.25098039215686274 0.25098039215686274 1.0
0.24705882352941178 0.24705882352941178 0.24705882352941178 1.0
0.2431372549019608 0.2431372549019608 0.2431372549019608 1.0
0.23921568627450984 0.23921568627450984 0.23921568627450984 1.0
0.23529411764705888 0.23529411764705888 0.23529411764705888 1.0
0.2313725490196079 0.2313725490196079 0.2313725490196079 1.0
0.22745098039215683 0.22745098039215683 0.22745098039215683 1.0
0.22352941176470587 0.22352941176470587 0.22352941176470587 1.0
0.2196078431372549 0.2196078431372549 0.2196078431372549 1.0
0.21568627450980393 0.21568627450980393 0.21568627450980393 1.0
0.21176470588235297 0.21176470588235297 0.21176470588235297 1.0
0.207843137254902 0.207843137254902 0.207843137254902 1.0
0.20392156862745103 0.20392156862745103 0.20392156862745103 1.0
0.19999999999999996 0.19999999999999996 0.19999999999999996 1.0
0.196078431372549 0.196078431372549 0.196078431372549 1.0
0.19215686274509802 0.19215686274509802 0.19215686274509802 1.0
0.18823529411764706 0.18823529411764706 0.18823529411764706 1.0
0.1843137254901961 0.1843137254901961 0.1843137254901961 1.0
0.18039215686274512 0.18039215686274512 0.18039215686274512 1.0
0.17647058823529416 0.17647058823529416 0.17647058823529416 1.0
0.1725490196078432 0.1725490196078432 0.1725490196078432 1.0
0.16862745098039222 0.16862745098039222 0.16862745098039222 1.0
0.16470588235294115 0.16470588235294115 0.16470588235294115 1.0
0.16078431372549018 0.16078431372549018 0.16078431372549018 1.0
0.1568627450980392 0.1568627450980392 0.1568627450980392 1.0
0.15294117647058825 0.15294117647058825 0.15294117647058825 1.0
0.14901960784313728 0.14901960784313728 0.14901960784313728 1.0
0.14509803921568631 0.14509803921568631 0.14509803921568631 1.0
0.14117647058823535 0.14117647058823535 0.14117647058823535 1.0
0.13725490196078427 0.13725490196078427 0.13725490196078427 1.0
0.1333333333333333 0.1333333333333333 0.1333333333333333 1.0
0.12941176470588234 0.12941176470588234 0.12941176470588234 1.0
0.12549019607843137 0.12549019607843137 0.12549019607843137 1.0
0.1215686274509804 0.1215686274509804 0.1215686274509804 1.0
0.11764705882352944 0.11764705882352944 0.11764705882352944 1.0
0.11372549019607847 0.11372549019607847 0.11372549019607847 1.0
0.1098039215686275 0.1098039215686275 0.1098039215686275 1.0
0.10588235294117654 0.10588235294117654 0.10588235294117654 1.0
0.10196078431372546 0.10196078431372546 0.10196078431372546 1.0
0.0980392156862745 0.0980392156862745 0.0980392156862745 1.0
0.09411764705882353 0.09411764705882353 0.09411764705882353 1.0
0.09019607843137256 0.09019607843137256 0.09019607843137256 1.0
0.0862745098039216 0.0862745098039216 0.0862745098039216 1.0
0.08235294117647063 0.08235294117647063 0.08235294117647063 1.0
0.07843137254901966 0.07843137254901966 0.07843137254901966 1.0
0.07450980392156858 0.07450980392156858 0.07450980392156858 1.0
0.07058823529411762 0.07058823529411762 0.07058823529411762 1.0
0.06666666666666665 0.06666666666666665 0.06666666666666665 1.0
0.06274509803921569 0.06274509803921569 0.06274509803921569 1.0
0.05882352941176472 0.05882352941176472 0.05882352941176472 1.0
0.05490196078431375 0.05490196078431375 0.05490196078431375 1.0
0.050980392156862786 0.050980392156862786 0.050980392156862786 1.0
0.04705882352941182 0.04705882352941182 0.04705882352941182 1.0
0.04313725490196085 0.04313725490196085 0.04313725490196085 1.0
0.039215686274509776 0.039215686274509776 0.039215686274509776 1.0
0.03529411764705881 0.03529411764705881 0.03529411764705881 1.0
0.03137254901960784 0.03137254901960784 0.03137254901960784 1.0
0.027450980392156876 0.027450980392156876 0.027450980392156876 1.0
0.02352941176470591 0.02352941176470591 0.02352941176470591 1.0
0.019607843137254943 0.019607843137254943 0.019607843137254943 1.0
0.015686274509803977 0.015686274509803977 0.015686274509803977 1.0
0.0117647058823529 0.0117647058823529 0.0117647058823529 1.0
0.007843137254901933 0.007843137254901933 0.007843137254901933 1.0
0.0039215686274509665 0.0039215686274509665 0.0039215686274509665 1.0
0.0 0.0 0.0 1.0

View File

@ -1,10 +1,18 @@
import os import os
import filecmp
import time
import numpy as np import numpy as np
import pytest import pytest
import damask
from damask import Colormap from damask import Colormap
@pytest.fixture
def reference_dir(reference_dir_base):
"""Directory containing reference results."""
return reference_dir_base/'Colormap'
class TestColormap: class TestColormap:
def test_conversion(self): def test_conversion(self):
@ -64,14 +72,14 @@ class TestColormap:
assert np.allclose(Colormap._xyz2msh(xyz),msh,atol=1.e-6,rtol=0) assert np.allclose(Colormap._xyz2msh(xyz),msh,atol=1.e-6,rtol=0)
@pytest.mark.parametrize('format',['ASCII','paraview','GOM','gmsh']) @pytest.mark.parametrize('format',['ASCII','paraview','GOM','Gmsh'])
@pytest.mark.parametrize('model',['rgb','hsv','hsl','xyz','lab','msh']) @pytest.mark.parametrize('model',['rgb','hsv','hsl','xyz','lab','msh'])
def test_from_bounds(self,model,format,tmpdir): def test_from_bounds(self,model,format,tmpdir):
N = np.random.randint(2,256) N = np.random.randint(2,256)
c = Colormap.from_bounds(np.random.rand(3),np.random.rand(3),model=model,N=N) c = Colormap.from_bounds(np.random.rand(3),np.random.rand(3),model=model,N=N)
c.to_file(tmpdir/'color_out',format=format) c.to_file(tmpdir/'color_out',format=format)
@pytest.mark.parametrize('format',['ASCII','paraview','GOM','gmsh']) @pytest.mark.parametrize('format',['ASCII','paraview','GOM','Gmsh'])
@pytest.mark.parametrize('name',['strain','gnuplot','Greys','PRGn','viridis']) @pytest.mark.parametrize('name',['strain','gnuplot','Greys','PRGn','viridis'])
def test_from_predefined(self,name,format,tmpdir): def test_from_predefined(self,name,format,tmpdir):
N = np.random.randint(2,256) N = np.random.randint(2,256)
@ -82,7 +90,7 @@ class TestColormap:
@pytest.mark.parametrize('format,name',[('ASCII','test.txt'), @pytest.mark.parametrize('format,name',[('ASCII','test.txt'),
('paraview','test.json'), ('paraview','test.json'),
('GOM','test.legend'), ('GOM','test.legend'),
('gmsh','test.msh') ('Gmsh','test.msh')
]) ])
def test_write_filehandle(self,format,name,tmpdir): def test_write_filehandle(self,format,name,tmpdir):
c = Colormap.from_predefined('Dark2') c = Colormap.from_predefined('Dark2')
@ -113,4 +121,21 @@ class TestColormap:
def test_list(self): def test_list(self):
Colormap.list_predefined() Colormap.list_predefined()
@pytest.mark.parametrize('format,ext',[('ASCII','.txt'),
('paraview','.json'),
('GOM','.legend'),
('Gmsh','.msh')
])
def test_compare_reference(self,format,ext,tmpdir,reference_dir,update,monkeypatch):
monkeypatch.setattr(damask, 'version', '99.99.99-9999-pytest')
name = 'binary'
c = Colormap.from_predefined(name)
if update:
os.chdir(reference_dir)
c.to_file(format=format)
else:
os.chdir(tmpdir)
c.to_file(format=format)
time.sleep(.5)
assert filecmp.cmp(tmpdir/(name+ext),reference_dir/(name+ext))