• R/O
  • HTTP
  • SSH
  • HTTPS

tutorial: Commit

This repository is for tutorials of Eos.


Commit MetaInfo

Revision239f44b1c680e43b587aa615164c622d4d9a7391 (tree)
Time2014-10-21 17:34:30
Authorkinoshita-eos <kinoshita@yasu...>
Commiterkinoshita-eos

Log Message

Modify: Support the graph for output file.
modified: Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile
modified: Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile-lib
Modify: Bug fixed.
modified: TIPS/ASCII/Makefile/Makefile
modified: TIPS/ASCII/Makefile/Makefile-lib
modified: TIPS/Gnuplot/Makefile/Makefile-lib
modified: TIPS/Template/Makefile/Makefile-lib

Change Summary

Incremental Difference

--- a/Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile
+++ b/Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile
@@ -9,7 +9,7 @@ MAKE_ROOT=mrcImageFourierNeighborCorrelation
99 INI=mrc
1010 MASK=mask
1111 MASKBACK=maskback
12-FSC=fsc
12+FNC=txt
1313
1414 #### Suffixes rule ####
1515 # Defined at Sub
@@ -34,6 +34,12 @@ MASK_SIZE_X=256
3434 MASK_SIZE_Y=256
3535 MASK_SIZE_Z=256
3636
37+# FNC Graph Image
38+X_SIZE_GRAPH=360
39+Y_SIZE_GRAPH=240
40+S_DATA=11
41+E_DATA=11
42+
3743 #### Rules of the list created ####
3844 # Defined at Sub
3945
@@ -47,7 +53,7 @@ Initial::
4753 make InputMaskImage;
4854
4955 Exe::
50- make FSC;
56+ make FNC;
5157
5258 all::
5359 make Initial;
@@ -55,7 +61,8 @@ all::
5561 make Final;
5662
5763 Final::
58-
64+ make FNCGnudata;
65+ make FNCGnuplot;
5966
6067 help_mrcImageFourierNeighborCorrelation::
6168 @echo
@@ -69,7 +76,7 @@ help_mrcImageFourierNeighborCorrelation::
6976 @echo " INIpad: for -i"
7077 @echo " MASK: for -mask"
7178 @echo " MASKBACK: for -maskBack"
72- @echo " FSC: Sample of execution."
79+ @echo " FNC: Sample of execution."
7380 @echo
7481 @echo " (Setting Data):"
7582 @echo " FILE_NAME: filename of input and output"
@@ -81,6 +88,7 @@ help_mrcImageFourierNeighborCorrelation::
8188
8289 ##### Commands(Input to Output) #####
8390 # Defined at Sub
84-.$(MASK).$(FSC):
85- mrcImageFourierNeighborCorrelation -i $*.$(INI)pad -o $*.$(FSC) -d 0.025 \
86- -FSC -mask $*.$(MASK) -maskBack $*.$(MASKBACK);
91+.$(MASK).$(FNC):
92+ mrcImageFourierNeighborCorrelation -i $*.$(INI)pad -o $*.$(FNC) \
93+ -FSC -mask $*.$(MASK) -maskBack $*.$(MASKBACK) \
94+ -NoiseWeighted 10 -FSCfull -Cref;
--- a/Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile-lib
+++ b/Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile-lib
@@ -6,11 +6,13 @@
66 # Defined at Main
77
88 #### Suffixes rule ####
9-.SUFFIXES: .$(INI) .$(INI)info .$(FSC)
9+.SUFFIXES: .$(INI) .$(INI)info .$(FNC)
1010
1111 #### INCLUDE ####
1212 -include ${EOS_HOME}/tutorial/TIPS/MaskImage/Makefile/Makefile-lib
1313 -include ${EOS_HOME}/tutorial/TIPS/BackImage/Makefile/Makefile-lib
14+-include ${EOS_HOME}/tutorial/TIPS/ASCII/Makefile/Makefile-lib
15+-include ${EOS_HOME}/tutorial/TIPS/Gnuplot/Makefile/Makefile-lib
1416
1517 #### Definition ####
1618 # Defined at Main
@@ -29,9 +31,8 @@ BACK_VALUE=0
2931
3032 ##### Commands #####
3133 InitialData::
32- touch $(FILE_NAME).$(INI);
33- rm $(FILE_NAME).$(INI);
34- ln -s $(INPUT_PATH) $(FILE_NAME).$(INI)
34+ $(RM) $(FILE_NAME).$(INI);
35+ ln -s $(INPUT_PATH) $(FILE_NAME).$(INI);
3536
3637 InputInfo::
3738 make $(FILE_NAME).$(INI)info;
@@ -55,9 +56,49 @@ MaskBackImage::
5556 make IniBackImage; \
5657 make BackImage;
5758
58-FSC::
59- make $(FILE_NAME).$(FSC);
59+FNC::
60+ make $(FILE_NAME).$(FNC);
61+
62+FNCGnudata::
63+ export IN_ASCII_FILE_NAME=$(FILE_NAME); \
64+ export IN_ASCII=$(FNC); \
65+ export OUT_ASCII_FILE_NAME=$(FILE_NAME); \
66+ export OUT_ASCII=cut; \
67+ export ASCII_S_LINE=$(S_DATA); \
68+ export ASCII_E_LINE=$(E_DATA); \
69+ make ExtractLine;
70+ export IN_ASCII_FILE_NAME=$(FILE_NAME); \
71+ export IN_ASCII=cut; \
72+ export OUT_ASCII_FILE_NAME=$(FILE_NAME); \
73+ export OUT_ASCII=FNC; \
74+ export ASCII_CLMN="1 2"; \
75+ make ExtractColumn; \
76+ export OUT_ASCII=FSC; \
77+ export ASCII_CLMN="1 5"; \
78+ make ExtractColumn; \
79+ export OUT_ASCII=SNR; \
80+ export ASCII_CLMN="1 7"; \
81+ make ExtractColumn; \
82+ export OUT_ASCII=FNCF; \
83+ export ASCII_CLMN="1 9"; \
84+ make ExtractColumn; \
85+ export OUT_ASCII=FNCN; \
86+ export ASCII_CLMN="1 11"; \
87+ make ExtractColumn;
88+
89+FNCGnuplot::
90+ export IN_GNU_FILE_NAME=$(FILE_NAME); \
91+ export OUT_GNU=png; \
92+ export GNU_X_SIZE=$(X_SIZE_GRAPH); \
93+ export GNU_Y_SIZE=$(Y_SIZE_GRAPH); \
94+ for data in FNC FSC SNR FNCF FNCN ; \
95+ do \
96+ export IN_GNU=$$data; \
97+ export OUT_GNU_FILE_NAME="$(FILE_NAME)-$$data"; \
98+ export VIEW_FILE_NAME=$$data; \
99+ make gnuplot2D; \
100+ done;
60101
61102 ##### Commands(Input to Output) #####
62103 .$(INI).$(INI)info:
63- mrcInfo -i $*.$(INI) | head -5 > $*.$(INI)info
104+ mrcInfo -i $*.$(INI) | head -5 > $*.$(INI)info;
--- a/TIPS/ASCII/Makefile/Makefile
+++ b/TIPS/ASCII/Makefile/Makefile
@@ -19,14 +19,12 @@ INI=txt
1919 # Path of Input File
2020 # Basically, use a linked data from /SampleData.
2121 INPUT_PATH=${EOS_HOME}/tutorial/SampleData/1VOM-N.mrc
22-ASCII_DELIMITER=" "
22+ASCII_DELIMITER='\t'
2323
2424 ASCII_S_LINE=3041
2525 ASCII_E_LINE=3041
2626
27-ASCII_CLMN= 1 \
28- 2 \
29- 3 \
27+ASCII_CLMN=1 2 3
3028
3129 ### FileData
3230 FILE_NAME=Input
--- a/TIPS/ASCII/Makefile/Makefile-lib
+++ b/TIPS/ASCII/Makefile/Makefile-lib
@@ -6,7 +6,6 @@
66 # Defined at Main
77
88 #### Suffixes rule ####
9-.SUFFIXES:
109
1110 #### INCLUDE ####
1211 # Use TIPS File.
@@ -25,21 +24,23 @@ help_ASCII::
2524 @echo "This is Sub Makefile to Extract from ASCII."
2625 @echo
2726 @echo " (Command):"
28- @echo " ExtractLine: Extract some lines from ASCII. "
27+ @echo " ExtractLine: Extract some lines from ASCII. "
2928 @echo " (Setting Data):"
30- @echo " ASCII_S_LINE: Start of extracted line. (count from top=1)"
31- @echo " ASCII_E_LINE: End of extracted line. (count from bottom=1)"
32- @echo " ExtractColumn: Extract some columns from ASCII. "
29+ @echo " ASCII_S_LINE: Start of extracted line. (count from top=1)"
30+ @echo " ASCII_E_LINE: End of extracted line. (count from bottom=1)"
31+ @echo
32+ @echo " ExtractColumn: Extract some columns from ASCII. "
3333 @echo " (Setting Data):"
34- @echo " ASCII_CLMN: extracted column list.(cf. Main Makefile)"
34+ @echo " ASCII_CLMN: Extracted column list.(e.g. \"0 2 3\")"
3535 @echo " (NOTE) If the column is undefined, finish extracting."
3636 @echo " If the column is defined to 0, write the line number there."
37+ @echo " ASCII_DELIMITER: Delimiter between columns. (undefined -> tab space)"
3738 @echo
3839 @echo " (Setting Data):"
39- @echo " IN_ASCII_FILE_NAME: Input file name."
40- @echo " IN_ASCII: Input file extention"
41- @echo " OUT_ASCII_FILE_NAME: Output file name."
42- @echo " OUT_ASCII: Output file extetion."
40+ @echo " IN_ASCII_FILE_NAME: Input file name."
41+ @echo " IN_ASCII: Input file extention"
42+ @echo " OUT_ASCII_FILE_NAME: Output file name."
43+ @echo " OUT_ASCII: Output file extetion."
4344 @echo
4445
4546 ExtractLine::
@@ -75,15 +76,20 @@ ExtractLine::
7576
7677 ExtractColumn::
7778 @${RM} $(OUT_ASCII_FILE_NAME).$(OUT_ASCII);
78- @num=1; \
79+ @if [ -z "$(ASCII_DELIMITER)" ] ; then \
80+ dl='\t'; \
81+ else \
82+ dl=$(ASCII_DELIMITER); \
83+ fi; \
84+ num=1; \
7985 while read line ; \
8086 do \
8187 for clmn in $(ASCII_CLMN) ; \
8288 do \
8389 if [ $$clmn -gt 0 ] ; then \
84- echo $$line | awk -v v=$$clmn -v dl=$(ASCII_DELIMITER) '{printf("%d%s"), $$v, dl}' >> "$(OUT_ASCII_FILE_NAME).$(OUT_ASCII)"; \
90+ echo $$line | awk -v v=$$clmn -v dl=$$dl '{printf("%s%s"), $$v, dl}' >> "$(OUT_ASCII_FILE_NAME).$(OUT_ASCII)"; \
8591 else \
86- echo $$line | awk -v v=$$num -v dl=$(ASCII_DELIMITER) '{printf("%d%s"), v, dl}' >> "$(OUT_ASCII_FILE_NAME).$(OUT_ASCII)"; \
92+ echo $$line | awk -v v=$$num -v dl=$$dl '{printf("%s%s"), v, dl}' >> "$(OUT_ASCII_FILE_NAME).$(OUT_ASCII)"; \
8793 fi; \
8894 done; \
8995 echo >> "$(OUT_ASCII_FILE_NAME).$(OUT_ASCII)"; \
--- a/TIPS/Gnuplot/Makefile/Makefile-lib
+++ b/TIPS/Gnuplot/Makefile/Makefile-lib
@@ -6,7 +6,6 @@
66 # Defined at Main
77
88 #### Suffixes rule ####
9-.SUFFIXES:
109
1110 #### INCLUDE ####
1211 # Use TIPS File.
@@ -76,14 +75,14 @@ help_Gnuplot::
7675 @echo
7776 @echo "Gnuplot"
7877 @echo "This is Sub Makefile for Gnuplot."
79- @echo "(Note) Set the gnuplot path to \"G_PLOT_PATH\"."
78+ @echo "(Note) Set the gnuplot path to \"G_PLOT_PATH\" in this lib file."
8079 @echo
8180 @echo " (Command):"
8281 @echo " gnuplot2D: view 2D data by gnuplot."
8382 @echo " gnuplot3D: view 3D data by gnuplot."
8483 @echo
8584 @echo " (Setting Data):"
86- @echo " G_PLOT_PATH: gnuplot application directory path (Essential)"
85+ @echo " G_PLOT_PATH: gnuplot application directory path in this lib file.(Essential)"
8786 @echo " IN_GNU_FILE_NAME: input file name."
8887 @echo " IN_GNU: input file extention."
8988 @echo " (Note) Input file is required to be 2D or 3D that is delimited by space or tab."
--- a/TIPS/Template/Makefile/Makefile-lib
+++ b/TIPS/Template/Makefile/Makefile-lib
@@ -6,7 +6,6 @@
66 # Defined at Main
77
88 #### Suffixes rule ####
9-.SUFFIXES:
109
1110 #### INCLUDE ####
1211 # Use TIPS File.
Show on old repository browser