• R/O
  • HTTP
  • SSH
  • HTTPS

tutorial: Commit

This repository is for tutorials of Eos.


Commit MetaInfo

Revisión34c3378beb409e2d86fd188e798a5b5660974b28 (tree)
Tiempo2014-11-04 15:28:18
Autorkinoshita-eos <kinoshita@yasu...>
Commiterkinoshita-eos

Log Message

Add: tutorial for PIONE-PNML
new file: SampleCode/PIONE-PNML/Basic1/HelloWorld.md
new file: SampleCode/PIONE-PNML/Basic1/HelloWorld.pnml
new file: SampleCode/PIONE-PNML/Basic2/Serial2.md
new file: SampleCode/PIONE-PNML/Basic2/Serial2.pnml
new file: SampleCode/PIONE-PNML/Basic2/SerialInput/test1.in
new file: SampleCode/PIONE-PNML/Basic2/SerialInput/test2.in
new file: SampleCode/PIONE-PNML/Basic2/SerialInput/test3.in
new file: SampleCode/PIONE-PNML/Basic2/SerialInput/test4.in
new file: SampleCode/PIONE-PNML/Basic2/SerialInput/test5.in

Add: tutorial for PIONE
new file: SampleCode/PIONE/Advanced1/CenterGet.pione

Cambiar Resumen

Diferencia incremental

--- /dev/null
+++ b/SampleCode/PIONE-PNML/Basic1/HelloWorld.md
@@ -0,0 +1 @@
1+# HelloWorld.pione ## Hello Here, you can write Comment. ``` echo "Hello PIONE world !" > {$O[1]} ```
\ No newline at end of file
--- /dev/null
+++ b/SampleCode/PIONE-PNML/Basic1/HelloWorld.pnml
@@ -0,0 +1,63 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<!--PLEASE DO NOT EDIT THIS FILE
3+Created with Workflow PetriNet Designer Version 3.2.0 (woped.org)-->
4+<pnml>
5+ <net type="http://www.informatik.hu-berlin.de/top/pntd/ptNetb" id="noID">
6+ <place id="p3">
7+ <name>
8+ <text>>'message.txt'</text>
9+ <graphics>
10+ <offset x="400" y="90"/>
11+ </graphics>
12+ </name>
13+ <graphics>
14+ <position x="420" y="50"/>
15+ <dimension x="40" y="40"/>
16+ </graphics>
17+ </place>
18+ <transition id="t2">
19+ <name>
20+ <text>Hello</text>
21+ <graphics>
22+ <offset x="270" y="90"/>
23+ </graphics>
24+ </name>
25+ <graphics>
26+ <position x="270" y="50"/>
27+ <dimension x="40" y="40"/>
28+ </graphics>
29+ <toolspecific tool="WoPeD" version="1.0">
30+ <time>0</time>
31+ <timeUnit>1</timeUnit>
32+ <orientation>1</orientation>
33+ </toolspecific>
34+ </transition>
35+ <arc id="a3" source="t2" target="p3">
36+ <inscription>
37+ <text>1</text>
38+ </inscription>
39+ <graphics/>
40+ <toolspecific tool="WoPeD" version="1.0">
41+ <probability>1.0</probability>
42+ <displayProbabilityOn>false</displayProbabilityOn>
43+ <displayProbabilityPosition x="500.0" y="0.0"/>
44+ </toolspecific>
45+ </arc>
46+ <toolspecific tool="WoPeD" version="1.0">
47+ <bounds>
48+ <position x="11" y="33"/>
49+ <dimension x="755" y="474"/>
50+ </bounds>
51+ <scale>100</scale>
52+ <treeWidthRight>597</treeWidthRight>
53+ <overviewPanelVisible>true</overviewPanelVisible>
54+ <treeHeightOverview>100</treeHeightOverview>
55+ <treePanelVisible>true</treePanelVisible>
56+ <verticalLayout>false</verticalLayout>
57+ <resources/>
58+ <simulations/>
59+ <partnerLinks/>
60+ <variables/>
61+ </toolspecific>
62+ </net>
63+</pnml>
\ No newline at end of file
--- /dev/null
+++ b/SampleCode/PIONE-PNML/Basic2/Serial2.md
@@ -0,0 +1,15 @@
1+# Serial2.pione
2+
3+## First
4+Multiply 2 to all input data.
5+
6+```
7+awk '{print $1*2}' {$I[1]} > {$O[1]}
8+```
9+
10+## Second
11+Add 1 to all input data.
12+
13+```
14+awk '{print $1+1}' {$I[1]} > {$O[1]}
15+```
--- /dev/null
+++ b/SampleCode/PIONE-PNML/Basic2/Serial2.pnml
@@ -0,0 +1,239 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<!--PLEASE DO NOT EDIT THIS FILE
3+Created with Workflow PetriNet Designer Version 3.2.0 (woped.org)-->
4+<pnml>
5+ <net type="http://www.informatik.hu-berlin.de/top/pntd/ptNetb" id="noID">
6+ <place id="p1">
7+ <name>
8+ <text>&lt;'*.in'</text>
9+ <graphics>
10+ <offset x="10" y="60"/>
11+ </graphics>
12+ </name>
13+ <graphics>
14+ <position x="10" y="20"/>
15+ <dimension x="40" y="40"/>
16+ </graphics>
17+ </place>
18+ <place id="p3">
19+ <name>
20+ <text>'{$*}.out'</text>
21+ <graphics>
22+ <offset x="410" y="60"/>
23+ </graphics>
24+ </name>
25+ <graphics>
26+ <position x="410" y="20"/>
27+ <dimension x="40" y="40"/>
28+ </graphics>
29+ </place>
30+ <place id="p4">
31+ <name>
32+ <text>'*.route'</text>
33+ <graphics>
34+ <offset x="260" y="60"/>
35+ </graphics>
36+ </name>
37+ <graphics>
38+ <position x="270" y="20"/>
39+ <dimension x="40" y="40"/>
40+ </graphics>
41+ </place>
42+ <place id="p5">
43+ <name>
44+ <text>'{$*}.route'</text>
45+ <graphics>
46+ <offset x="130" y="60"/>
47+ </graphics>
48+ </name>
49+ <graphics>
50+ <position x="140" y="20"/>
51+ <dimension x="40" y="40"/>
52+ </graphics>
53+ </place>
54+ <place id="p6">
55+ <name>
56+ <text>>'*.out'</text>
57+ <graphics>
58+ <offset x="530" y="60"/>
59+ </graphics>
60+ </name>
61+ <graphics>
62+ <position x="530" y="20"/>
63+ <dimension x="40" y="40"/>
64+ </graphics>
65+ </place>
66+ <transition id="t6">
67+ <name>
68+ <text/>
69+ <graphics>
70+ <offset x="200" y="60"/>
71+ </graphics>
72+ </name>
73+ <graphics>
74+ <position x="200" y="20"/>
75+ <dimension x="40" y="40"/>
76+ </graphics>
77+ <toolspecific tool="WoPeD" version="1.0">
78+ <time>0</time>
79+ <timeUnit>1</timeUnit>
80+ <orientation>1</orientation>
81+ </toolspecific>
82+ </transition>
83+ <transition id="t7">
84+ <name>
85+ <text/>
86+ <graphics>
87+ <offset x="470" y="60"/>
88+ </graphics>
89+ </name>
90+ <graphics>
91+ <position x="470" y="20"/>
92+ <dimension x="40" y="40"/>
93+ </graphics>
94+ <toolspecific tool="WoPeD" version="1.0">
95+ <time>0</time>
96+ <timeUnit>1</timeUnit>
97+ <orientation>1</orientation>
98+ </toolspecific>
99+ </transition>
100+ <transition id="t1">
101+ <name>
102+ <text>First</text>
103+ <graphics>
104+ <offset x="80" y="60"/>
105+ </graphics>
106+ </name>
107+ <graphics>
108+ <position x="80" y="20"/>
109+ <dimension x="40" y="40"/>
110+ </graphics>
111+ <toolspecific tool="WoPeD" version="1.0">
112+ <time>0</time>
113+ <timeUnit>1</timeUnit>
114+ <orientation>1</orientation>
115+ </toolspecific>
116+ </transition>
117+ <transition id="t2">
118+ <name>
119+ <text>Second</text>
120+ <graphics>
121+ <offset x="340" y="60"/>
122+ </graphics>
123+ </name>
124+ <graphics>
125+ <position x="340" y="20"/>
126+ <dimension x="40" y="40"/>
127+ </graphics>
128+ <toolspecific tool="WoPeD" version="1.0">
129+ <time>0</time>
130+ <timeUnit>1</timeUnit>
131+ <orientation>1</orientation>
132+ </toolspecific>
133+ </transition>
134+ <arc id="a1" source="p1" target="t1">
135+ <inscription>
136+ <text>1</text>
137+ </inscription>
138+ <graphics/>
139+ <toolspecific tool="WoPeD" version="1.0">
140+ <probability>1.0</probability>
141+ <displayProbabilityOn>false</displayProbabilityOn>
142+ <displayProbabilityPosition x="500.0" y="0.0"/>
143+ </toolspecific>
144+ </arc>
145+ <arc id="a11" source="t6" target="p4">
146+ <inscription>
147+ <text>1</text>
148+ </inscription>
149+ <graphics/>
150+ <toolspecific tool="WoPeD" version="1.0">
151+ <probability>1.0</probability>
152+ <displayProbabilityOn>false</displayProbabilityOn>
153+ <displayProbabilityPosition x="500.0" y="0.0"/>
154+ </toolspecific>
155+ </arc>
156+ <arc id="a10" source="p5" target="t6">
157+ <inscription>
158+ <text>1</text>
159+ </inscription>
160+ <graphics/>
161+ <toolspecific tool="WoPeD" version="1.0">
162+ <probability>1.0</probability>
163+ <displayProbabilityOn>false</displayProbabilityOn>
164+ <displayProbabilityPosition x="500.0" y="0.0"/>
165+ </toolspecific>
166+ </arc>
167+ <arc id="a3" source="t2" target="p3">
168+ <inscription>
169+ <text>1</text>
170+ </inscription>
171+ <graphics/>
172+ <toolspecific tool="WoPeD" version="1.0">
173+ <probability>1.0</probability>
174+ <displayProbabilityOn>false</displayProbabilityOn>
175+ <displayProbabilityPosition x="500.0" y="0.0"/>
176+ </toolspecific>
177+ </arc>
178+ <arc id="a13" source="t7" target="p6">
179+ <inscription>
180+ <text>1</text>
181+ </inscription>
182+ <graphics/>
183+ <toolspecific tool="WoPeD" version="1.0">
184+ <probability>1.0</probability>
185+ <displayProbabilityOn>false</displayProbabilityOn>
186+ <displayProbabilityPosition x="500.0" y="0.0"/>
187+ </toolspecific>
188+ </arc>
189+ <arc id="a12" source="p3" target="t7">
190+ <inscription>
191+ <text>1</text>
192+ </inscription>
193+ <graphics/>
194+ <toolspecific tool="WoPeD" version="1.0">
195+ <probability>1.0</probability>
196+ <displayProbabilityOn>false</displayProbabilityOn>
197+ <displayProbabilityPosition x="500.0" y="0.0"/>
198+ </toolspecific>
199+ </arc>
200+ <arc id="a6" source="p4" target="t2">
201+ <inscription>
202+ <text>1</text>
203+ </inscription>
204+ <graphics/>
205+ <toolspecific tool="WoPeD" version="1.0">
206+ <probability>1.0</probability>
207+ <displayProbabilityOn>false</displayProbabilityOn>
208+ <displayProbabilityPosition x="500.0" y="0.0"/>
209+ </toolspecific>
210+ </arc>
211+ <arc id="a9" source="t1" target="p5">
212+ <inscription>
213+ <text>1</text>
214+ </inscription>
215+ <graphics/>
216+ <toolspecific tool="WoPeD" version="1.0">
217+ <probability>1.0</probability>
218+ <displayProbabilityOn>false</displayProbabilityOn>
219+ <displayProbabilityPosition x="500.0" y="0.0"/>
220+ </toolspecific>
221+ </arc>
222+ <toolspecific tool="WoPeD" version="1.0">
223+ <bounds>
224+ <position x="11" y="33"/>
225+ <dimension x="755" y="474"/>
226+ </bounds>
227+ <scale>100</scale>
228+ <treeWidthRight>597</treeWidthRight>
229+ <overviewPanelVisible>true</overviewPanelVisible>
230+ <treeHeightOverview>100</treeHeightOverview>
231+ <treePanelVisible>true</treePanelVisible>
232+ <verticalLayout>false</verticalLayout>
233+ <resources/>
234+ <simulations/>
235+ <partnerLinks/>
236+ <variables/>
237+ </toolspecific>
238+ </net>
239+</pnml>
\ No newline at end of file
--- /dev/null
+++ b/SampleCode/PIONE-PNML/Basic2/SerialInput/test1.in
@@ -0,0 +1,2 @@
1+3
2+5
--- /dev/null
+++ b/SampleCode/PIONE-PNML/Basic2/SerialInput/test2.in
@@ -0,0 +1,2 @@
1+2
2+4
--- /dev/null
+++ b/SampleCode/PIONE-PNML/Basic2/SerialInput/test3.in
@@ -0,0 +1,2 @@
1+7
2+1
--- /dev/null
+++ b/SampleCode/PIONE-PNML/Basic2/SerialInput/test4.in
@@ -0,0 +1,3 @@
1+8
2+9
3+6
--- /dev/null
+++ b/SampleCode/PIONE-PNML/Basic2/SerialInput/test5.in
@@ -0,0 +1,9 @@
1+1
2+2
3+3
4+4
5+5
6+6
7+7
8+8
9+9
--- /dev/null
+++ b/SampleCode/PIONE/Advanced1/CenterGet.pione
@@ -0,0 +1,67 @@
1+Rule Main
2+ input '*.mrc'.all
3+ input '*.parameters'.all
4+ output '*.roi'.all
5+ output '*.tiff'.all
6+Flow
7+# rule Initial
8+ rule First
9+ rule Second
10+ rule Final
11+End
12+
13+Rule Initial
14+ input '${EOS_HOME}/tutorial/SampleData/1VOM.mrc'
15+ input '${EOS_HOME}/tutorial/SampleData/1VOM-N.mrc'
16+ output '1VOM.mrc'
17+ output '1VOM-N.mrc'
18+Action
19+ ln -s {$I[1]} {$O[1]}
20+ ln -s {$I[2]} {$O[2]}
21+End
22+
23+Rule First
24+ input '*.mrc'
25+ output '{$I[1]}.info'
26+Action
27+ mrcImageInfo -I -i {$I[1]} \
28+ | head -2 | tail -1 \
29+ | awk '{printf("%s %s %s", $3, $4, $5)}' \
30+ | tr -c '[0-9]' ' ' \
31+ > {$O[1]}
32+End
33+
34+Rule Second
35+ input '*.mrc'
36+ input '*.info'
37+ input '{$I[1][1]}.parameters'
38+ output '{$I[1][1]}.roi'
39+Action
40+ Center_x=$(awk '{printf("%s\n", $1)}' {$I[2]})
41+ Center_y=$(awk '{printf("%s\n", $2)}' {$I[2]})
42+ Center_z=$(awk '{printf("%s\n", $3)}' {$I[2]})
43+ N_x=$(awk '{printf("%s\n", $1)}' {$I[3]})
44+ N_y=$(awk '{printf("%s\n", $2)}' {$I[3]})
45+ N_z=$(awk '{printf("%s\n", $3)}' {$I[3]})
46+ mrcImageCenterGet -i {$I[1]} -o {$O[1]} \
47+ -Cx $Center_x -Cy $Center_y -Cz $Center_z \
48+ -Nx $N_x -Ny $N_y -Nz $N_z
49+End
50+
51+Rule Final
52+ input '*.mrc'
53+ input '*.roi'
54+ output '{$I[1]}-1.tiff'
55+ output '{$I[2]}-1.tiff'
56+ output '{$I[1]}-2.tiff'
57+ output '{$I[2]}-2.tiff'
58+Action
59+ mrcImageProjection -i {$I[1]} -o {$I[1]}.2d
60+ mrc2tiff -i {$I[1]}.2d -o {$O[1]}
61+ mrcImageProjection -i {$I[1]} -o {$I[1]}.2d1 -m 1
62+ mrc2tiff -i {$I[1]}.2d1 -o {$O[3]}
63+ mrcImageProjection -i {$I[2]} -o {$I[2]}.2d
64+ mrc2tiff -i {$I[2]}.2d -o {$O[2]}
65+ mrcImageProjection -i {$I[2]} -o {$I[2]}.2d1 -m 1
66+ mrc2tiff -i {$I[2]}.2d1 -o {$O[4]}
67+End
Show on old repository browser