• R/O
  • HTTP
  • SSH
  • HTTPS

tutorial: Commit

This repository is for tutorials of Eos.


Commit MetaInfo

Revision6ebdb3491c521a29c79be0398d562a2b501f5a14 (tree)
Time2014-10-27 13:59:26
Authorkinoshita-eos <kinoshita@yasu...>
Commiterkinoshita-eos

Log Message

Modify: support for support a graph for multiple data.
modified: Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile
modified: Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile-lib

Bug fixed: title of graph element.
modified: TIPS/Gnuplot/Makefile/Makefile-lib

Change Summary

Incremental Difference

--- a/Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile
+++ b/Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile
@@ -27,14 +27,15 @@ FNC=txt
2727
2828 #### Definition ####
2929 # Path of Input File
30+#INPUT_PATH=${EOS_HOME}/tutorial/SampleData/1VOM.mrc
3031 INPUT_PATH=${EOS_HOME}/tutorial/SampleData/1VOM-N.mrc
3132
3233 ### SN or NS for Input file
33-INI_SN=1
34+#INI_SN=0.3 1 3 10 100
3435 INI_NS=
3536
3637 ### FileData
37-FILE_NAME=Input$(INI_SN)$(INI_NS)
38+INI_FILE_NAME=Input
3839
3940 ### ForMask
4041 MASK_F_MODE=4
@@ -46,6 +47,7 @@ MASK_SIZE_Y=256
4647 MASK_SIZE_Z=256
4748
4849 # FNC Graph Image
50+GRAPH_STYLE=lines
4951 X_SIZE_GRAPH=360
5052 Y_SIZE_GRAPH=240
5153 S_DATA=5
@@ -58,6 +60,31 @@ E_DATA=2
5860 # Defined at Sub basically
5961 Initial::
6062 make InitialData;
63+ if [ ! -z "$(INI_SN)" ] ; then \
64+ for snratio in $(INI_SN) ; \
65+ do \
66+ export snratio; \
67+ export FILE_NAME="$(INI_FILE_NAME)-SN$$snratio"; \
68+ echo $$FILE_NAME; \
69+ make Initial-one; \
70+ done; \
71+ fi;
72+ if [ ! -z "$(INI_NS)" ] ; then \
73+ for nsratio in $(INI_NS) ; \
74+ do \
75+ export nsratio; \
76+ export FILE_NAME="$(INI_FILE_NAME)-NS$$nsratio"; \
77+ echo $$FILE_NAME; \
78+ make Initial-one; \
79+ done; \
80+ fi;
81+ if [ -z "$(INI_SN)" -a -z "$(INI_NS)" ] ; then \
82+ export FILE_NAME="$(INI_FILE_NAME)"; \
83+ echo $$FILE_NAME; \
84+ make Initial-one; \
85+ fi;
86+
87+Initial-one::
6188 make InitialDataNoiseAdd;
6289 make InputInfo;
6390 make MaskBackImage;
@@ -65,6 +92,29 @@ Initial::
6592 make InputMaskImage;
6693
6794 Exe::
95+ if [ ! -z "$(INI_SN)" ] ; then \
96+ for snratio in $(INI_SN) ; \
97+ do \
98+ export FILE_NAME="$(INI_FILE_NAME)-SN$$snratio"; \
99+ echo $$FILE_NAME; \
100+ make Exe-one; \
101+ done; \
102+ fi;
103+ if [ ! -z "$(INI_NS)" ] ; then \
104+ for nsratio in $(INI_NS) ; \
105+ do \
106+ export FILE_NAME="$(INI_FILE_NAME)-NS$$nsratio"; \
107+ echo $$FILE_NAME; \
108+ make Exe-one; \
109+ done; \
110+ fi;
111+ if [ -z "$(INI_SN)" -a -z "$(INI_NS)" ] ; then \
112+ export FILE_NAME="$(INI_FILE_NAME)"; \
113+ echo $$FILE_NAME; \
114+ make Exe-one; \
115+ fi;
116+
117+Exe-one::
68118 make $(FILE_NAME).$(FNC);
69119
70120 all::
@@ -73,6 +123,32 @@ all::
73123 make Final;
74124
75125 Final::
126+ if [ ! -z "$(INI_SN)" ] ; then \
127+ for snratio in $(INI_SN) ; \
128+ do \
129+ export FILE_NAME="$(INI_FILE_NAME)-SN$$snratio"; \
130+ echo $$FILE_NAME; \
131+ make Final-one; \
132+ done; \
133+ fi;
134+ if [ ! -z "$(INI_NS)" ] ; then \
135+ for nsratio in $(INI_NS) ; \
136+ do \
137+ export FILE_NAME="$(INI_FILE_NAME)-NS$$nsratio"; \
138+ echo $$FILE_NAME; \
139+ make Final-one; \
140+ done; \
141+ fi;
142+ if [ -z "$(INI_SN)" -a -z "$(INI_NS)" ] ; then \
143+ export FILE_NAME="$(INI_FILE_NAME)"; \
144+ echo $$FILE_NAME; \
145+ make Final-one; \
146+ else \
147+ export FILE_NAME="$(INI_FILE_NAME)"; \
148+ make FNCGnuplotList; \
149+ fi;
150+
151+Final-one::
76152 make FNCInputProjection;
77153 make FNCGnudata;
78154 make FNCGnuplot;
@@ -93,7 +169,7 @@ help_mrcImageFourierNeighborCorrelation::
93169 @echo " Final: Create graph images for output file."
94170 @echo
95171 @echo " (Setting Data):"
96- @echo " FILE_NAME: filename of input and output"
172+ @echo " INI_FILE_NAME: filename of input"
97173 @echo " MASK_SIZE_X: size x of covering whole image"
98174 @echo " MASK_SIZE_Y: size y of covering whole image"
99175 @echo " MASK_SIZE_Z: size z of covering whole image"
--- a/Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile-lib
+++ b/Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile-lib
@@ -33,19 +33,20 @@ BACK_VALUE=0
3333
3434 ##### Commands #####
3535 InitialData::
36- $(RM) $(FILE_NAME).$(INI);
37- ln -s $(INPUT_PATH) $(FILE_NAME).$(INI);
36+ $(RM) $(INI_FILE_NAME).$(INI);
37+ ln -s $(INPUT_PATH) $(INI_FILE_NAME).$(INI);
3838
3939 InitialDataNoiseAdd::
40- @export NOISE_IN_FILE_NAME=$(FILE_NAME); \
40+ @export NOISE_IN_FILE_NAME=$(INI_FILE_NAME); \
41+ export NOISE_OUT_FILE_NAME=$(FILE_NAME); \
4142 export IN_NOISE=$(INI); \
42- if [ ! -z "$(INI_SN)" ] ; then \
43- echo "Add Noise SN=$(INI_SN)"; \
44- export NOISE_SN=$(INI_SN); \
43+ if [ ! -z "$(snratio)" ] ; then \
44+ echo "Add Noise SN=$(snratio)"; \
45+ export NOISE_SN=$(snratio); \
4546 make NoiseAdd; \
46- elif [ ! -z "$(INI_NS)" ] ; then \
47- echo "Add Noise NS=$(INI_NS)"; \
48- export NOISE_NS=$(INI_NS); \
47+ elif [ ! -z "$(nsratio)" ] ; then \
48+ echo "Add Noise NS=$(nsratio)"; \
49+ export NOISE_NS=$(nsratio); \
4950 make NoiseAdd; \
5051 else \
5152 echo "Not Add Noise."; \
@@ -75,7 +76,7 @@ MaskBackImage::
7576
7677 FNCInputProjection::
7778 export PRJ_FILE_NAME=$(FILE_NAME); \
78- for ext in $(INI)pad $(MASK) $(MASKBACK) ; \
79+ for ext in $(INI) $(INI)pad $(MASK) $(MASKBACK) ; \
7980 do \
8081 export IN_PRJ=$$ext; \
8182 export PRJ=$$ext'2d'; \
@@ -112,6 +113,7 @@ FNCGnudata::
112113 FNCGnuplot::
113114 export IN_GNU_FILE_NAME=$(FILE_NAME); \
114115 export OUT_GNU=png; \
116+ export GNU_STYLE=$(GRAPH_STYLE); \
115117 export GNU_X_SIZE=$(X_SIZE_GRAPH); \
116118 export GNU_Y_SIZE=$(Y_SIZE_GRAPH); \
117119 data=FNC; \
@@ -133,6 +135,69 @@ FNCGnuplot::
133135 data=$$(head -1 $(FILE_NAME).cut | awk -v v=$$num '{printf("%s", $$v)}'); \
134136 done;
135137
138+FNCGnuplotList::
139+ export OUT_GNU=png; \
140+ export GNU_STYLE=$(GRAPH_STYLE); \
141+ export GNU_X_SIZE=$(X_SIZE_GRAPH); \
142+ export GNU_Y_SIZE=$(Y_SIZE_GRAPH); \
143+ data=FNC; \
144+ echo $$data; \
145+ export IN_GNU=$$data; \
146+ export OUT_GNU_FILE_NAME="$(FILE_NAME)-$$data"; \
147+ IN_GNU_FILE_NAME= ; \
148+ VIEW_GNU_FILE_NAME= ; \
149+ if [ ! -z "$(INI_SN)" ] ; then \
150+ for snratio in $(INI_SN) ; \
151+ do \
152+ export IN_GNU_FILE_NAME="$${IN_GNU_FILE_NAME} $(INI_FILE_NAME)-SN$${snratio}"; \
153+ export VIEW_GNU_FILE_NAME="$${VIEW_GNU_FILE_NAME} SN$${snratio}"; \
154+ done; \
155+ fi; \
156+ if [ ! -z "$(INI_NS)" ] ; then \
157+ for nsratio in $(INI_NS) ; \
158+ do \
159+ export IN_GNU_FILE_NAME="$${IN_GNU_FILE_NAME} $(INI_FILE_NAME)-NS$${nsratio}"; \
160+ export VIEW_GNU_FILE_NAME="$${VIEW_GNU_FILE_NAME} NS$${nsratio}"; \
161+ done; \
162+ fi; \
163+ make gnuplot2D; \
164+ num=4; \
165+ if [ ! -z "$(INI_SN)" ] ; then \
166+ first=$$(echo "$(INI_SN)" | awk '{printf("%s", $$1)}'); \
167+ filename="$(FILE_NAME)-SN$${first}"; \
168+ elif [ ! -z "$(INI_NS)" ] ; then \
169+ first=$$(echo "$(INI_NS)" | awk '{printf("%s", $$1)}'); \
170+ filename="$(FILE_NAME)-NS$${first}"; \
171+ else \
172+ filename=$(FILE_NAME); \
173+ fi; \
174+ data=$$(head -1 $${filename}.cut | awk -v v=$$num '{printf("%s", $$v)}'); \
175+ while [ ! -z "$$data" ] ; \
176+ do \
177+ echo $$data; \
178+ export IN_GNU=$$data; \
179+ export OUT_GNU_FILE_NAME="$(FILE_NAME)-$$data"; \
180+ IN_GNU_FILE_NAME= ; \
181+ VIEW_GNU_FILE_NAME= ; \
182+ if [ ! -z "$(INI_SN)" ] ; then \
183+ for snratio in $(INI_SN) ; \
184+ do \
185+ export IN_GNU_FILE_NAME="$$IN_GNU_FILE_NAME $(INI_FILE_NAME)-SN$$snratio"; \
186+ export VIEW_GNU_FILE_NAME="$$VIEW_GNU_FILE_NAME SN$$snratio"; \
187+ done; \
188+ fi; \
189+ if [ ! -z "$(INI_NS)" ] ; then \
190+ for nsratio in $(INI_NS) ; \
191+ do \
192+ export IN_GNU_FILE_NAME="$$IN_GNU_FILE_NAME $(INI_FILE_NAME)-NS$$nsratio"; \
193+ export VIEW_GNU_FILE_NAME="$$VIEW_GNU_FILE_NAME NS$$nsratio"; \
194+ done; \
195+ fi; \
196+ make gnuplot2D; \
197+ num=`expr $$num + 2`; \
198+ data=$$(head -1 $${filename}.cut | awk -v v=$$num '{printf("%s", $$v)}'); \
199+ done;
200+
136201 ##### Commands(Input to Output) #####
137202 ifdef INI
138203 .$(INI).$(INI)info:
--- a/TIPS/Gnuplot/Makefile/Makefile-lib
+++ b/TIPS/Gnuplot/Makefile/Makefile-lib
@@ -53,7 +53,7 @@ gnuplotSet::
5353 declare inext=( $(IN_GNU) ); \
5454 inextnum=$${#inext[@]}; \
5555 declare viewname=( $(VIEW_GNU_FILE_NAME) ); \
56- viewnum=$${#view[@]}; \
56+ viewnum=$${#viewname[@]}; \
5757 if [ $$infilenum -le 1 ] ; then \
5858 for (( num = 0 ; $$num < $$inextnum ; num++ )) ; \
5959 do \
@@ -68,7 +68,10 @@ gnuplotSet::
6868 if [ ! -z "$${OPTION3}" ] ; then \
6969 OPTION3="$${OPTION3} ,"; \
7070 fi; \
71- OPTION3="$${OPTION3} $${view}'"; \
71+ OPTION3="$${OPTION3} '$${view}'"; \
72+ if [ ! -z "$(GNU_STYLE)" ] ; then \
73+ OPTION3="$${OPTION3} with $(GNU_STYLE)"; \
74+ fi; \
7275 done; \
7376 elif [ $$inextnum -le 1 ] ; then \
7477 for (( num = 0 ; $$num < $$infilenum ; num++ )) ; \
@@ -85,6 +88,9 @@ gnuplotSet::
8588 OPTION3="$${OPTION3} ,"; \
8689 fi; \
8790 OPTION3="$${OPTION3} '$${view}'"; \
91+ if [ ! -z "$(GNU_STYLE)" ] ; then \
92+ OPTION3="$${OPTION3} with $(GNU_STYLE)"; \
93+ fi; \
8894 done; \
8995 else \
9096 for (( num = 0 ; $$num < $$infilenum ; num++ )) ; \
@@ -101,6 +107,9 @@ gnuplotSet::
101107 OPTION3="$${OPTION3} ,"; \
102108 fi; \
103109 OPTION3="$${OPTION3} '$${view}'"; \
110+ if [ ! -z "$(GNU_STYLE)" ] ; then \
111+ OPTION3="$${OPTION3} with $(GNU_STYLE)"; \
112+ fi; \
104113 done; \
105114 fi; \
106115 echo "$${OPTION3} ;";
@@ -114,6 +123,7 @@ help_Gnuplot::
114123 @echo " (Command):"
115124 @echo " gnuplot2D: view 2D data by gnuplot."
116125 @echo " gnuplot3D: view 3D data by gnuplot."
126+ @echo " (Note) multiple input files -> one output file(display or image)"
117127 @echo
118128 @echo " (Setting Data):"
119129 @echo " G_PLOT_PATH: gnuplot application directory path in this lib file.(Essential)"
@@ -123,6 +133,7 @@ help_Gnuplot::
123133 @echo " ====== If the following is set, output the image. ======"
124134 @echo " OUT_GNU_FILE_NAME: output file name."
125135 @echo " OUT_GNU: output file extention."
136+ @echo " GNU_STYLE: plot style.(lines, points, linespoints, ...)"
126137 @echo " GNU_X_SIZE: output tiff size x"
127138 @echo " GNU_Y_SIZE: output tiff size y"
128139 @echo " ====== Option ======"
Show on old repository browser