toji 2.26.0 → 2.27.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,7 @@ table = Terminal::Table.new do |t|
11
11
  t << :separator
12
12
  moromi.states.each {|s|
13
13
  temp = s.temps.map(&:to_s).join(" / ")
14
- t << [s.mark, s.day_label, temp, s.room_temp, s.display_baume, s.alcohol, s.bmd&.round(2), s.expected_alcohol(16.5, +3, 1.5)&.round(2), s.elapsed_time, s.display_time]
14
+ t << [s.mark, s.day_label, temp, s.room_dry_temp, s.display_baume, s.alcohol, s.bmd&.round(2), s.expected_alcohol(16.5, +3, 1.5)&.round(2), s.elapsed_time, s.display_time]
15
15
  }
16
16
  end
17
17
  puts table
@@ -8,110 +8,110 @@ prefix_day_labels:
8
8
  states:
9
9
  - time: 2019-01-16
10
10
  mark: 添
11
- room_temp: 9
11
+ room_dry_temp: 9
12
12
  temps:
13
13
  - 14.8
14
14
  - 11.0
15
15
  - time: 2019-01-17
16
- room_temp: 9
16
+ room_dry_temp: 9
17
17
  temps: 14.3
18
18
  - time: 2019-01-18
19
- room_temp: 8.5
19
+ room_dry_temp: 8.5
20
20
  temps: 11.3
21
21
  - time: 2019-01-19
22
22
  mark: 仲
23
- room_temp: 9
23
+ room_dry_temp: 9
24
24
  temps:
25
25
  - 6.9
26
26
  - 10.6
27
27
  - time: 2019-01-20
28
28
  mark: 留
29
- room_temp: 6
29
+ room_dry_temp: 6
30
30
  temps:
31
31
  - 7.5
32
32
  - 8.0
33
33
  - time: 2019-01-21
34
- room_temp: 7
34
+ room_dry_temp: 7
35
35
  temps: 9.1
36
36
  - time: 2019-01-22
37
- room_temp: 7
37
+ room_dry_temp: 7
38
38
  temps: 10.4
39
39
  - time: 2019-01-23
40
- room_temp: 8
40
+ room_dry_temp: 8
41
41
  temps: 11.9
42
42
  baume: 8.6
43
43
  - time: 2019-01-24
44
- room_temp: 8
44
+ room_dry_temp: 8
45
45
  temps: 12.3
46
46
  baume: 8.0
47
47
  alcohol: 4.8
48
48
  - time: 2019-01-25
49
- room_temp: 7.5
49
+ room_dry_temp: 7.5
50
50
  temps: 13.1
51
51
  baume: 7.2
52
52
  alcohol: 6.75
53
53
  - time: 2019-01-26
54
- room_temp: 7.5
54
+ room_dry_temp: 7.5
55
55
  temps: 13.1
56
56
  baume: 5.8
57
57
  alcohol: 7.992
58
58
  - time: 2019-01-27
59
- room_temp: 7.5
59
+ room_dry_temp: 7.5
60
60
  temps: 12.9
61
61
  baume: 4.8
62
62
  - time: 2019-01-28
63
- room_temp: 7.0
63
+ room_dry_temp: 7.0
64
64
  temps: 12.8
65
65
  baume: 4.0
66
66
  alcohol: 10.7
67
67
  - time: 2019-01-29
68
- room_temp: 8.0
68
+ room_dry_temp: 8.0
69
69
  temps: 12.9
70
70
  baume: 3.4
71
71
  alcohol: 11.6
72
72
  - time: 2019-01-30
73
- room_temp: 8.0
73
+ room_dry_temp: 8.0
74
74
  temps: 12.6
75
75
  nihonshudo: -27
76
76
  alcohol: 12.7
77
77
  - time: 2019-01-31
78
- room_temp: 7.0
78
+ room_dry_temp: 7.0
79
79
  temps: 12.0
80
80
  nihonshudo: -21
81
81
  alcohol: 13.7
82
82
  - time: 2019-02-01
83
- room_temp: 7.0
83
+ room_dry_temp: 7.0
84
84
  temps: 11.2
85
85
  nihonshudo: -17
86
86
  - time: 2019-02-02
87
- room_temp: 6.5
87
+ room_dry_temp: 6.5
88
88
  temps: 10.2
89
89
  nihonshudo: -13
90
90
  - time: 2019-02-03
91
- room_temp: 7.0
91
+ room_dry_temp: 7.0
92
92
  temps: 9.7
93
93
  - time: 2019-02-04
94
- room_temp: 8.0
94
+ room_dry_temp: 8.0
95
95
  temps: 9.8
96
96
  nihonshudo: -8
97
97
  alcohol: 16.0
98
98
  - time: 2019-02-05
99
- room_temp: 6.0
99
+ room_dry_temp: 6.0
100
100
  temps: 9.1
101
101
  nihonshudo: -5
102
102
  - time: 2019-02-06
103
- room_temp: 5.0
103
+ room_dry_temp: 5.0
104
104
  temps: 8.4
105
105
  nihonshudo: -3
106
106
  alcohol: 16.3
107
107
  - time: 2019-02-07
108
- room_temp: 5.0
108
+ room_dry_temp: 5.0
109
109
  temps: 8.1
110
110
  nihonshudo: -2
111
111
  - time: 2019-02-08
112
- room_temp: 7.0
112
+ room_dry_temp: 7.0
113
113
  temps: 8.3
114
114
  nihonshudo: 0
115
115
  - time: 2019-02-09
116
- room_temp: 6.0
116
+ room_dry_temp: 6.0
117
117
  temps: 8.1
@@ -2,7 +2,7 @@
2
2
  "cells": [
3
3
  {
4
4
  "cell_type": "code",
5
- "execution_count": 1,
5
+ "execution_count": 2,
6
6
  "metadata": {},
7
7
  "outputs": [
8
8
  {
@@ -14,25 +14,25 @@
14
14
  " </script>\n",
15
15
  "\n",
16
16
  "\n",
17
- "<div id=\"9d0ee2a7-322e-41db-838e-dfe6129038ea\" style=\"height: 100%; width: 100%;\"></div>\n",
17
+ "<div id=\"12217db0-580e-427c-80de-8f8d6efd9f9f\" style=\"height: 100%; width: 100%;\"></div>\n",
18
18
  "\n",
19
19
  "<script>\n",
20
20
  " require(['plotly'], function(Plotly) { \n",
21
21
  "Plotly.newPlot(\n",
22
- " '9d0ee2a7-322e-41db-838e-dfe6129038ea',\n",
23
- " [{\"x\":[0.0,3600.0,86400.0,172800.0,172801.0,259200.0,259201.0,345600.0,345601.0,432000.0,518400.0,604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0],\"y\":[12.0,20.0,14.0,8.0,11.0,10.0,13.0,12.0,15.0,14.0,20.0,20.0,20.0,20.0,15.0,12.0,10.0,9.0],\"text\":[\"01/16 00:00\",\"01/16 01:00\",\"01/17 00:00\",\"01/18 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\"],\"name\":\"temps\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#1f77b4\"}},{\"x\":[86400.0,172800.0,259200.0,345600.0,432000.0,518400.0,604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0],\"y\":[15.0,16.0,16.5,17.0,17.0,17.0,14.0,12.0,9.0,8.0,7.0,6.0,5.0],\"text\":[\"01/17 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\"],\"name\":\"baume\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#9467bd\"}},{\"x\":[0.0,3600.0,86400.0,172800.0,259200.0,345600.0,432000.0,518400.0,604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0],\"y\":[13.0,13.0,13.0,13.0,13.5,13.5,14.0,14.5,15.5,16.0,16.0,16.5,17.0,17.5,17.5],\"text\":[\"01/16 00:00\",\"01/16 01:00\",\"01/17 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\"],\"name\":\"acid\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#8c564b\"}}],\n",
22
+ " '12217db0-580e-427c-80de-8f8d6efd9f9f',\n",
23
+ " [{\"x\":[0.0,3600.0,86400.0,172800.0,172801.0,259200.0,259201.0,345600.0,345601.0,432000.0,518400.0,604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0],\"y\":[12.0,20.0,14.0,8.0,11.0,10.0,13.0,12.0,15.0,14.0,20.0,20.0,20.0,20.0,15.0,12.0,10.0,9.0],\"text\":[\"01/16 00:00\",\"01/16 01:00\",\"01/17 00:00\",\"01/18 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\"],\"name\":\"temps\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#1f77b4\"}},{\"x\":[86400.0,172800.0,259200.0,345600.0,432000.0,518400.0,604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0],\"y\":[15.0,16.0,16.5,17.0,17.0,17.0,14.0,12.0,9.0,8.0,7.0,6.0,5.0],\"text\":[\"01/17 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\"],\"name\":\"baume\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#e377c2\"}},{\"x\":[0.0,3600.0,86400.0,172800.0,259200.0,345600.0,432000.0,518400.0,604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0],\"y\":[13.0,13.0,13.0,13.0,13.5,13.5,14.0,14.5,15.5,16.0,16.0,16.5,17.0,17.5,17.5],\"text\":[\"01/16 00:00\",\"01/16 01:00\",\"01/17 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\"],\"name\":\"acid\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#7f7f7f\"}}],\n",
24
24
  " {\"xaxis\":{\"dtick\":86400,\"tickvals\":[0,86400,172800,259200,345600,432000,518400,604800,691200,777600,864000,950400,1036800,1123200],\"ticktext\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\"]},\"annotations\":[{\"x\":0.0,\"y\":12.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"水麹\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":3600.0,\"y\":20.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"仕込み\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":86400.0,\"y\":14.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"打瀬\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":777600.0,\"y\":20.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"分け\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40}]},\n",
25
25
  " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
26
26
  ")\n",
27
27
  "\n",
28
28
  "window.addEventListener('resize', function() {\n",
29
- " Plotly.Plots.resize(document.getElementById('9d0ee2a7-322e-41db-838e-dfe6129038ea'))\n",
29
+ " Plotly.Plots.resize(document.getElementById('12217db0-580e-427c-80de-8f8d6efd9f9f'))\n",
30
30
  "})\n",
31
31
  " }) \n",
32
32
  "</script>"
33
33
  ],
34
34
  "text/plain": [
35
- "#<Plotly::Offline::HTML:0x00007fe9601f3cf8 @id=\"9d0ee2a7-322e-41db-838e-dfe6129038ea\", @data=[{:x=>[0.0, 3600.0, 86400.0, 172800.0, 172801.0, 259200.0, 259201.0, 345600.0, 345601.0, 432000.0, 518400.0, 604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0], :y=>[12.0, 20.0, 14.0, 8.0, 11.0, 10.0, 13.0, 12.0, 15.0, 14.0, 20.0, 20.0, 20.0, 20.0, 15.0, 12.0, 10.0, 9.0], :text=>[\"01/16 00:00\", \"01/16 01:00\", \"01/17 00:00\", \"01/18 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\"], :name=>\"temps\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#1f77b4\"}}, {:x=>[86400.0, 172800.0, 259200.0, 345600.0, 432000.0, 518400.0, 604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0], :y=>[15.0, 16.0, 16.5, 17.0, 17.0, 17.0, 14.0, 12.0, 9.0, 8.0, 7.0, 6.0, 5.0], :text=>[\"01/17 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\"], :name=>\"baume\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#9467bd\"}}, {:x=>[0.0, 3600.0, 86400.0, 172800.0, 259200.0, 345600.0, 432000.0, 518400.0, 604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0], :y=>[13.0, 13.0, 13.0, 13.0, 13.5, 13.5, 14.0, 14.5, 15.5, 16.0, 16.0, 16.5, 17.0, 17.5, 17.5], :text=>[\"01/16 00:00\", \"01/16 01:00\", \"01/17 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\"], :name=>\"acid\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#8c564b\"}}], @layout={:xaxis=>{:dtick=>86400, :tickvals=>[0, 86400, 172800, 259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200], :ticktext=>[\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\"]}, :annotations=>[{:x=>0.0, :y=>12.0, :xref=>\"x\", :yref=>\"y\", :text=>\"水麹\", :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>3600.0, :y=>20.0, :xref=>\"x\", :yref=>\"y\", :text=>\"仕込み\", :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>86400.0, :y=>14.0, :xref=>\"x\", :yref=>\"y\", :text=>\"打瀬\", :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>777600.0, :y=>20.0, :xref=>\"x\", :yref=>\"y\", :text=>\"分け\", :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}]}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
35
+ "#<Plotly::Offline::HTML:0x00007fa1a3274420 @id=\"12217db0-580e-427c-80de-8f8d6efd9f9f\", @data=[{:x=>[0.0, 3600.0, 86400.0, 172800.0, 172801.0, 259200.0, 259201.0, 345600.0, 345601.0, 432000.0, 518400.0, 604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0], :y=>[12.0, 20.0, 14.0, 8.0, 11.0, 10.0, 13.0, 12.0, 15.0, 14.0, 20.0, 20.0, 20.0, 20.0, 15.0, 12.0, 10.0, 9.0], :text=>[\"01/16 00:00\", \"01/16 01:00\", \"01/17 00:00\", \"01/18 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\"], :name=>\"temps\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#1f77b4\"}}, {:x=>[86400.0, 172800.0, 259200.0, 345600.0, 432000.0, 518400.0, 604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0], :y=>[15.0, 16.0, 16.5, 17.0, 17.0, 17.0, 14.0, 12.0, 9.0, 8.0, 7.0, 6.0, 5.0], :text=>[\"01/17 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\"], :name=>\"baume\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#e377c2\"}}, {:x=>[0.0, 3600.0, 86400.0, 172800.0, 259200.0, 345600.0, 432000.0, 518400.0, 604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0], :y=>[13.0, 13.0, 13.0, 13.0, 13.5, 13.5, 14.0, 14.5, 15.5, 16.0, 16.0, 16.5, 17.0, 17.5, 17.5], :text=>[\"01/16 00:00\", \"01/16 01:00\", \"01/17 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\"], :name=>\"acid\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#7f7f7f\"}}], @layout={:xaxis=>{:dtick=>86400, :tickvals=>[0, 86400, 172800, 259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200], :ticktext=>[\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\"]}, :annotations=>[{:x=>0.0, :y=>12.0, :xref=>\"x\", :yref=>\"y\", :text=>\"水麹\", :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>3600.0, :y=>20.0, :xref=>\"x\", :yref=>\"y\", :text=>\"仕込み\", :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>86400.0, :y=>14.0, :xref=>\"x\", :yref=>\"y\", :text=>\"打瀬\", :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>777600.0, :y=>20.0, :xref=>\"x\", :yref=>\"y\", :text=>\"分け\", :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}]}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
36
36
  ]
37
37
  },
38
38
  "metadata": {},
@@ -47,39 +47,29 @@
47
47
  " </script>\n",
48
48
  "\n",
49
49
  "\n",
50
- "<div id=\"eda34d57-4ce4-4676-8f40-05b48811023e\" style=\"height: 100%; width: 100%;\"></div>\n",
50
+ "<div id=\"caa9b1c0-82ae-449e-8224-c01e372b55b9\" style=\"height: 100%; width: 100%;\"></div>\n",
51
51
  "\n",
52
52
  "<script>\n",
53
53
  " require(['plotly'], function(Plotly) { \n",
54
54
  "Plotly.newPlot(\n",
55
- " 'eda34d57-4ce4-4676-8f40-05b48811023e',\n",
55
+ " 'caa9b1c0-82ae-449e-8224-c01e372b55b9',\n",
56
56
  " [{\"type\":\"table\",\"header\":{\"values\":[\"day_label\",\"display_time\",\"mark\",\"temps\",\"baume\",\"acid\",\"warmings\"]},\"cells\":{\"values\":[[\"1\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\"],[\"01/16 00:00\",\"01/16 01:00\",\"01/17 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\"],[\"水麹\",\"仕込み\",\"打瀬\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"分け\",\"\",\"\",\"\",\"\"],[\"12.0\",\"20.0\",\"14.0\",\"8.0, 11.0\",\"10.0, 13.0\",\"12.0, 15.0\",\"14.0\",\"20.0\",\"20.0\",\"20.0\",\"20.0\",\"15.0\",\"12.0\",\"10.0\",\"9.0\"],[\"\",\"\",\"15.0\",\"16.0\",\"16.5\",\"17.0\",\"17.0\",\"17.0\",\"14.0\",\"12.0\",\"9.0\",\"8.0\",\"7.0\",\"6.0\",\"5.0\"],[\"13.0\",\"13.0\",\"13.0\",\"13.0\",\"13.5\",\"13.5\",\"14.0\",\"14.5\",\"15.5\",\"16.0\",\"16.0\",\"16.5\",\"17.0\",\"17.5\",\"17.5\"],[\"\",\"\",\"\",\"暖気\",\"暖気\",\"暖気\",\"行火\",\"行火\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]]}}],\n",
57
57
  " {\"height\":650},\n",
58
58
  " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
59
59
  ")\n",
60
60
  "\n",
61
61
  "window.addEventListener('resize', function() {\n",
62
- " Plotly.Plots.resize(document.getElementById('eda34d57-4ce4-4676-8f40-05b48811023e'))\n",
62
+ " Plotly.Plots.resize(document.getElementById('caa9b1c0-82ae-449e-8224-c01e372b55b9'))\n",
63
63
  "})\n",
64
64
  " }) \n",
65
65
  "</script>"
66
66
  ],
67
67
  "text/plain": [
68
- "#<Plotly::Offline::HTML:0x00007fe9639b2838 @id=\"eda34d57-4ce4-4676-8f40-05b48811023e\", @data=[{:type=>:table, :header=>{:values=>[:day_label, :display_time, :mark, :temps, :baume, :acid, :warmings]}, :cells=>{:values=>[[\"1\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\"], [\"01/16 00:00\", \"01/16 01:00\", \"01/17 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\"], [\"水麹\", \"仕込み\", \"打瀬\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"分け\", \"\", \"\", \"\", \"\"], [\"12.0\", \"20.0\", \"14.0\", \"8.0, 11.0\", \"10.0, 13.0\", \"12.0, 15.0\", \"14.0\", \"20.0\", \"20.0\", \"20.0\", \"20.0\", \"15.0\", \"12.0\", \"10.0\", \"9.0\"], [\"\", \"\", \"15.0\", \"16.0\", \"16.5\", \"17.0\", \"17.0\", \"17.0\", \"14.0\", \"12.0\", \"9.0\", \"8.0\", \"7.0\", \"6.0\", \"5.0\"], [\"13.0\", \"13.0\", \"13.0\", \"13.0\", \"13.5\", \"13.5\", \"14.0\", \"14.5\", \"15.5\", \"16.0\", \"16.0\", \"16.5\", \"17.0\", \"17.5\", \"17.5\"], [\"\", \"\", \"\", \"暖気\", \"暖気\", \"暖気\", \"行火\", \"行火\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"]]}}], @layout={:height=>650}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
68
+ "#<Plotly::Offline::HTML:0x00007fa1a32a4918 @id=\"caa9b1c0-82ae-449e-8224-c01e372b55b9\", @data=[{:type=>:table, :header=>{:values=>[:day_label, :display_time, :mark, :temps, :baume, :acid, :warmings]}, :cells=>{:values=>[[\"1\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\"], [\"01/16 00:00\", \"01/16 01:00\", \"01/17 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\"], [\"水麹\", \"仕込み\", \"打瀬\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"分け\", \"\", \"\", \"\", \"\"], [\"12.0\", \"20.0\", \"14.0\", \"8.0, 11.0\", \"10.0, 13.0\", \"12.0, 15.0\", \"14.0\", \"20.0\", \"20.0\", \"20.0\", \"20.0\", \"15.0\", \"12.0\", \"10.0\", \"9.0\"], [\"\", \"\", \"15.0\", \"16.0\", \"16.5\", \"17.0\", \"17.0\", \"17.0\", \"14.0\", \"12.0\", \"9.0\", \"8.0\", \"7.0\", \"6.0\", \"5.0\"], [\"13.0\", \"13.0\", \"13.0\", \"13.0\", \"13.5\", \"13.5\", \"14.0\", \"14.5\", \"15.5\", \"16.0\", \"16.0\", \"16.5\", \"17.0\", \"17.5\", \"17.5\"], [\"\", \"\", \"\", \"暖気\", \"暖気\", \"暖気\", \"行火\", \"行火\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"]]}}], @layout={:height=>650}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
69
69
  ]
70
70
  },
71
71
  "metadata": {},
72
72
  "output_type": "display_data"
73
- },
74
- {
75
- "data": {
76
- "text/plain": [
77
- "#<CZTop::Socket::PUB:0x7fe965404080 last_endpoint=\"tcp://127.0.0.1:58100\">"
78
- ]
79
- },
80
- "execution_count": 1,
81
- "metadata": {},
82
- "output_type": "execute_result"
83
73
  }
84
74
  ],
85
75
  "source": [
@@ -92,7 +82,8 @@
92
82
  "moto.progress_note.plot.show\n",
93
83
  "moto.progress_note.table.tap {|t|\n",
94
84
  " t.layout.height = 650\n",
95
- "}.show"
85
+ "}.show\n",
86
+ "nil"
96
87
  ]
97
88
  },
98
89
  {
@@ -113,7 +104,7 @@
113
104
  "file_extension": ".rb",
114
105
  "mimetype": "application/x-ruby",
115
106
  "name": "ruby",
116
- "version": "2.6.3"
107
+ "version": "2.7.2"
117
108
  }
118
109
  },
119
110
  "nbformat": 4,
data/lib/toji.rb CHANGED
@@ -9,9 +9,19 @@ require 'toji/calendar'
9
9
  require 'toji/schedule'
10
10
  require 'toji/product'
11
11
  require 'toji/processing'
12
+ require 'toji/swvp'
13
+ require 'toji/psychrometry_to_relative_humidity'
12
14
  require 'toji/utils'
13
15
 
14
16
  module Toji
15
17
  class Error < StandardError; end
16
- # Your code goes here...
18
+
19
+ class DuplicateStepIndexError < Error
20
+ attr_reader :indexes
21
+
22
+ def initialize(indexes)
23
+ super("step indexes is deuplicated: #{indexes.inject}")
24
+ @indexes = indexes
25
+ end
26
+ end
17
27
  end
@@ -2,7 +2,7 @@ module Toji
2
2
  module Processing
3
3
  module SoakedRice
4
4
  # 室内温度
5
- # @dynamic room_temp
5
+ # @dynamic room_dry_temp
6
6
 
7
7
  # 外気温
8
8
  # @dynamic outside_temp
@@ -24,7 +24,7 @@ module Toji
24
24
  end
25
25
 
26
26
  def all_keys
27
- BaseState::REQUIRED_KEYS
27
+ BaseState::KEYS
28
28
  end
29
29
 
30
30
  def has_keys
@@ -3,13 +3,23 @@ module Toji
3
3
  module BaseState
4
4
  include State
5
5
 
6
- REQUIRED_KEYS = [
6
+ KEYS = [
7
7
  :time,
8
8
  :elapsed_time,
9
9
  :day,
10
10
  :day_label,
11
11
  :display_time,
12
12
  :mark,
13
+
14
+ :temps,
15
+ :preset_temp,
16
+ :room_dry_temp,
17
+ :room_wet_temp,
18
+ :room_psychrometry,
19
+ :room_relative_humidity_from_dry_and_wet,
20
+ :room_relative_humidity,
21
+
22
+ :note,
13
23
  ].freeze
14
24
 
15
25
  def elapsed_time
@@ -31,6 +41,28 @@ module Toji
31
41
  def display_time(format="%m/%d %H:%M")
32
42
  time.strftime(format)
33
43
  end
44
+
45
+ # @dynamic temps
46
+ # @dynamic preset_temp
47
+ # @dynamic room_dry_temp
48
+ # @dynamic room_wet_temp
49
+ # @dynamic room_relative_humidity
50
+ # @dynamic note
51
+
52
+ # 乾湿差
53
+ def room_psychrometry
54
+ if room_dry_temp && room_wet_temp
55
+ room_dry_temp.to_f - room_wet_temp.to_f
56
+ end
57
+ end
58
+
59
+ # 相対湿度
60
+ def room_relative_humidity_from_dry_and_wet(swvp: Swvp.default, pressure: 1013, k: 0.000662)
61
+ if room_dry_temp && room_wet_temp
62
+ psy2rh = PsychrometryToRelativeHumidity.new(swvp: swvp, pressure: pressure, k: k)
63
+ psy2rh.convert(room_wet_temp.to_f, room_dry_temp.to_f)
64
+ end
65
+ end
34
66
  end
35
67
  end
36
68
  end
@@ -3,7 +3,7 @@ module Toji
3
3
  module Graph
4
4
  class ProgressNote
5
5
 
6
- PLOT_KEYS = [:temps, :preset_temp, :room_temp, :room_psychrometry, :baume, :acid, :amino_acid, :alcohol, :bmd].freeze
6
+ PLOT_KEYS = [:temps, :preset_temp, :room_dry_temp, :room_wet_temp, :room_relative_humidity_from_dry_and_wet, :room_relative_humidity, :baume, :acid, :amino_acid, :alcohol, :bmd].freeze
7
7
 
8
8
  COLORS = [
9
9
  '#1f77b4', # muted blue
@@ -4,7 +4,7 @@ module Toji
4
4
  include BaseProgress
5
5
 
6
6
  def all_keys
7
- KojiState::REQUIRED_KEYS + KojiState::OPTIONAL_KEYS
7
+ KojiState::KEYS
8
8
  end
9
9
 
10
10
  def progress_note(name: nil, dash: :solid, enable_annotations: true)
@@ -2,22 +2,6 @@ module Toji
2
2
  module Progress
3
3
  module KojiState
4
4
  include BaseState
5
-
6
- OPTIONAL_KEYS = [
7
- :temps,
8
- :preset_temp,
9
- :room_temp,
10
- :room_psychrometry,
11
-
12
- :note,
13
- ].freeze
14
-
15
- # @dynamic temps
16
- # @dynamic preset_temp
17
- # @dynamic room_temp
18
- # @dynamic room_psychrometry
19
-
20
- # @dynamic note
21
5
  end
22
6
  end
23
7
  end
@@ -29,7 +29,7 @@ module Toji
29
29
  end
30
30
 
31
31
  def all_keys
32
- MoromiState::REQUIRED_KEYS + MoromiState::OPTIONAL_KEYS
32
+ MoromiState::KEYS
33
33
  end
34
34
 
35
35
  def progress_note(name: nil, dash: :solid, enable_annotations: true)
@@ -3,13 +3,8 @@ module Toji
3
3
  module MoromiState
4
4
  include BaseState
5
5
 
6
- OPTIONAL_KEYS = [
6
+ KEYS = (BaseState::KEYS + [
7
7
  :moromi_day,
8
- :temps,
9
- :preset_temp,
10
- :room_temp,
11
- :room_psychrometry,
12
-
13
8
  :baume,
14
9
  :nihonshudo,
15
10
  :display_baume,
@@ -17,24 +12,15 @@ module Toji
17
12
  :amino_acid,
18
13
  :alcohol,
19
14
  :bmd,
20
-
21
15
  :warmings,
22
- :note,
23
- ].freeze
24
-
25
- # @dynamic temps
26
- # @dynamic preset_temp
27
- # @dynamic room_temp
28
- # @dynamic room_psychrometry
16
+ ]).freeze
29
17
 
30
18
  # @dynamic baume
31
19
  # @dynamic nihonshudo
32
20
  # @dynamic acid
33
21
  # @dynamic amino_acid
34
22
  # @dynamic alcohol
35
-
36
23
  # @dynamic warmings
37
- # @dynamic note
38
24
 
39
25
  def moromi_day
40
26
  _tome_day = progress.moromi_tome_day
@@ -4,7 +4,7 @@ module Toji
4
4
  include BaseProgress
5
5
 
6
6
  def all_keys
7
- MotoState::REQUIRED_KEYS + MotoState::OPTIONAL_KEYS
7
+ MotoState::KEYS
8
8
  end
9
9
 
10
10
  def progress_note(name: nil, dash: :solid, enable_annotations: true)