• R/O
  • HTTP
  • SSH
  • HTTPS

tutorial: Commit

This repository is for tutorials of Eos.


Commit MetaInfo

Revision5d58f051f93fd1f505da8c6d72a69ec057409a18 (tree)
Time2014-09-18 21:14:00
Authorkinoshita-eos <kinoshita@yasu...>
Commiterkinoshita-eos

Log Message

Add: tutorial of CTFCorrection
new file: CTFCorrection/CTFCorrection4/Makefile
Modify: Loop of each file
modified: TIPS/LoopCommand/Makefile.config

Change Summary

Incremental Difference

--- /dev/null
+++ b/CTFCorrection/CTFCorrection4/Makefile
@@ -0,0 +1,94 @@
1+#
2+# This is Makefile for CTF Correction Demo.
3+#
4+
5+
6+#### Input extention ####
7+CTF_INFO_EXT=ctfinfo
8+
9+#### Suffixes rule ####
10+
11+#### INCLUDE ####
12+-include ../../TIPS/LoopCommand/Makefile.config
13+-include ../CTFCorrection2/Makefile
14+
15+#### Definition ####
16+## For define varioable
17+
18+#### Rules of the list created ####
19+
20+##### Commands #####
21+all4::
22+ make InitialSiemensStar;
23+ make ProcessForInputLoop;
24+ make ProcessForInfoLoop;
25+ make PRECTF2GIF;
26+ make PRECTF2FFT;
27+ make FFT2GIF;
28+ make FFT2CTF;
29+ make CTF2GIF;
30+
31+ProcessForInputLoop::
32+ EXE_COMMAND=mrcImageCTFObservation \
33+ FIXED_OPTION="-i $(INPUT).$(INPUT_2D_EXT) -ctfMode $(CTF_MODE) -kV $(CTF_KV) -Cs $(CTF_CS) -Ain $(CTF_AIN)" \
34+ VARIABLE_OPTION="-o $(INPUT)$(CALC_S)$(VAR)+100000$(CALC_E).$(CTF_2D_EXT) -df $(VAR)" \
35+ VARIABLE_OPTION=$(CALC_VAR) \
36+ LOOP_MIN=0 \
37+ LOOP_MAX=54000 \
38+ LOOP_DELTA=1000 \
39+ make LoopCommand;
40+
41+ProcessForInfoLoop::
42+ EXE_COMMAND=echo \
43+ FIXED_OPTION= \
44+ VARIABLE_OPTION="\"$(VAR) $(CTF_CS) $(CTF_KV) $(CTF_AIN)\" > $(INPUT)$(CALC_S)$(VAR)+100000$(CALC_E).$(CTF_INFO_EXT)" \
45+ VARIABLE_OPTION=$(CALC_VAR) \
46+ LOOP_MIN=0 \
47+ LOOP_MAX=54000 \
48+ LOOP_DELTA=1000 \
49+ make LoopCommand;
50+
51+PRECTF2FFT::
52+ INPUT_EXT=prectf \
53+ OUTPUT_EXT=fft \
54+ make LoopCommandEachFile;
55+
56+PRECTF2GIF::
57+ mkdir -p _PRECTF;
58+ INPUT_EXT=prectf \
59+ OUTPUT_EXT=prectf.gif \
60+ make LoopCommandEachFile;
61+
62+FFT2CTF::
63+ INPUT_EXT=fft \
64+ OUTPUT_EXT=ctf \
65+ make LoopCommandEachFile;
66+
67+FFT2GIF::
68+ mkdir -p _FFT;
69+ INPUT_EXT=fft \
70+ OUTPUT_EXT=fft.gif \
71+ make LoopCommandEachFile;
72+
73+CTF2GIF::
74+ mkdir -p _CTF;
75+ INPUT_EXT=ctf \
76+ OUTPUT_EXT=ctf.gif \
77+ make LoopCommandEachFile;
78+
79+##### Commands(Input to Output) #####
80+.prectf.fft:
81+ mrcImageFFT -i $*.prectf -o $*.fft
82+
83+.fft.ctf:
84+ mrcImageCTFCompensation -i $*.fft -info $*.ctfinfo -o $*.ctf -m 1
85+
86+.prectf.prectf.gif:
87+ mrc2gif -i $*.prectf -o _PRECTF/$*.prectf.gif
88+
89+.fft.fft.gif:
90+ mrcFFTExpression -i $*.fft -o $*.fftex -m 1;
91+ mrc2gif -i $*.fftex -o _FFT/$*.gif
92+
93+.ctf.ctf.gif:
94+ mrc2gif -i $*.ctf -o _CTF/$*.ctf.gif
--- a/TIPS/LoopCommand/Makefile.config
+++ b/TIPS/LoopCommand/Makefile.config
@@ -7,11 +7,14 @@
77
88 #### Suffixes rule ####
99 # Defined at Main
10+.SUFFIXES: .$(INPUT_EXT) .$(OUTPUT_EXT)
1011
1112 #### INCLUDE ####
13+-include $(INPUT_EXT)_LIST
1214
1315 #### Definition ####
1416 ### Define the following essential data at Main Makefile.
17+## For LoopCommand::
1518 # EXE_COMMAND: Loop Command Name (e.g. mrcImageNoiseAdd)
1619 # FIXED_OPTION: No Change Option (e.g. "-i Input.mrc -SD 1")
1720 # VARIABLE_OPTION: Change Option by Loop (e.g. "-NS $(VAR) -SD $(CALC_S)$(VAR) / 7 $(CALC_E)")
@@ -20,13 +23,25 @@
2023 # LOOP_MAX: LoopMaxValue
2124 # LOOP_DELTA: LoopDeltaValue
2225
26+## For LoopCommandEachFile::
27+# INPUT_EXT: Extention of input files
28+# OUTPUT_EXT: Extention of ouput files
29+
2330 ## For SubMakefile
2431 VAR=LoopNumber
32+CALC_SCALE=15.6
2533 CALC_S=CalculationStart
2634 CALC_E=CalculationEnd
35+CALC_VAR=$$(echo $$VARIABLE_OPTION | sed s/$(VAR)/'$$$$loopnum'/g | sed s/$(CALC_S)/'$$$$(echo "scale=$(CALC_SCALE);'/g | sed s/$(CALC_E)/'" | bc)'/g)
2736
2837 #### Rules of the list created ####
29-CALC_VAR=$$(echo $$VARIABLE_OPTION | sed s/$(VAR)/'$$$$loopnum'/g | sed s/$(CALC_S)/'$$$$(echo "scale=$(CALC_SCALE);'/g | sed s/$(CALC_E)/'" | bc)'/g)
38+$(OUTPUT_EXT):$($(INPUT_EXT)_LIST:.$(INPUT_EXT)=.$(OUTPUT_EXT))
39+
40+$(INPUT_EXT)_LIST::
41+ touch $(INPUT_EXT)_LIST
42+ echo "$(INPUT_EXT)_LIST=\\" > $(INPUT_EXT)_LIST
43+ ls -1 *.$(INPUT_EXT) | sed s/$(INPUT_EXT)/$(INPUT_EXT)\\\\/ >> $(INPUT_EXT)_LIST
44+ echo "" >> $(INPUT_EXT)_LIST
3045
3146 ##### Commands #####
3247 LoopCommand::
@@ -35,6 +50,25 @@ LoopCommand::
3550 echo "Loop: $$loopnum ($(EXE_COMMAND))"; \
3651 $(EXE_COMMAND) $(FIXED_OPTION) $(VARIABLE_OPTION); \
3752 done;
53+
54+LoopCommandEachFile::
55+ make $(INPUT_EXT)_LIST;
56+ make $(OUTPUT_EXT);
57+
58+LoopCommandHelp::
59+ @echo 'Define the following essential data at Main Makefile.'
60+ @echo ' For LoopCommand::'
61+ @echo ' EXE_COMMAND: Loop Command Name (e.g. mrcImageNoiseAdd)'
62+ @echo ' FIXED_OPTION: No Change Option (e.g. "-i Input.mrc -SD 1")'
63+ @echo ' VARIABLE_OPTION: Change Option by Loop (e.g. "-NS $$(VAR) -SD $$(CALC_S)$$(VAR) / 7 $$(CALC_E)")'
64+ @echo ' CALC_SCALE: Calculation Scale (e.g. 15.6)'
65+ @echo ' LOOP_MIN: LoopMinValue'
66+ @echo ' LOOP_MAX: LoopMaxValue'
67+ @echo ' LOOP_DELTA: LoopDeltaValue'
68+ @echo
69+ @echo ' For LoopCommandEachFile::'
70+ @echo ' INPUT_EXT: Extention of input files'
71+ @echo ' OUTPUT_EXT: Extention of ouput files'
3872
3973 ##### Commands(Input to Output) #####
4074
Show on old repository browser