• R/O
  • HTTP
  • SSH
  • HTTPS

base: Commit

This repository is a base of Eos.


Commit MetaInfo

Revisión0fb2c4064f56306f4b6f4bf3e040cc607f366e67 (tree)
Tiempo2017-01-16 06:17:45
Autor久永浩司 <hisanagakouji@hisa...>
Commiter久永浩司

Log Message

modified ctfDeterminationByBayes.c

Cambiar Resumen

Diferencia incremental

--- a/src/Tools/ctfInfo/ctfDeterminationByBayes/src/ctfDeterminationByBayes.c
+++ b/src/Tools/ctfInfo/ctfDeterminationByBayes/src/ctfDeterminationByBayes.c
@@ -45,6 +45,7 @@ main(int argc, char* argv[])
4545
4646 int i;
4747 int j;
48+
4849 ctfDeterminationByBayesInfo info;
4950 ctfInfo ctfinfo;
5051 eosBayesDistributionInfo llinfo;
@@ -93,11 +94,10 @@ main(int argc, char* argv[])
9394 DEBUGPRINT("carse search finish\n");
9495 ctfforbayescheckIntensityOfMaxPosterior(ctf,out.posterior,out.numDistribution,&ctfinfo,intensity.MTFmode,intensity.Ainmode,1,1);
9596
96-
9797 /*MTF,B serch start\n*/
98- for(j=0;j<2;j++){
9998 DEBUGPRINT("MTF,B search start\n");
100- ctf.rmax = Rintermediate;
99+ ctf.rmax = Rintermediate;
100+ ctf.rmin = Rmin;
101101 DEBUGPRINT2("set R range:%f~%f\n",ctf.rmin,ctf.rmax);
102102 DEBUGPRINT("set maxposteriorflag of MTF,B\n");
103103 eosBayesMaxposteriorflagSet(&out,0);
@@ -129,9 +129,39 @@ main(int argc, char* argv[])
129129 }
130130 #endif
131131
132- DEBUGPRINT1("----A:%f----\n",out.posterior[1].valueofmaxposterior);
133132 ctfforbayescheckIntensityOfMaxPosterior(ctf,out.posterior,out.numDistribution,&ctfinfo,intensity.MTFmode,intensity.Ainmode,1,1);
134- DEBUGPRINT1("----A:%f----\n",out.posterior[1].valueofmaxposterior);
133+
134+ /*B search*/
135+/*
136+ DEBUGPRINT("B,refinement\n");
137+ ctf.rmax = Rintermediate;
138+ ctf.rmin = Rmin;
139+ DEBUGPRINT2("set R range:%f~%f\n",ctf.rmin,ctf.rmax);
140+
141+ DEBUGPRINT("set maxposteriorflag of defocus,A,k\n");
142+ eosBayesMaxposteriorflagSet(&out,0);
143+ eosBayesMaxposteriorflagSet(&out,1);
144+ eosBayesMaxposteriorflagSet(&out,4);
145+ eosBayesMaxposteriorflagSet(&out,3);
146+
147+ DEBUGPRINT("set canstantflag of Ain");
148+ out.posterior[5].constantflag = 1;
149+
150+ DEBUGPRINT("set resetflag of B,MTF\n");
151+ out.prior[2].resetflag = 1;
152+ eosBayesProbabilityReset(info.fptIn,&out,5,0);
153+
154+ DEBUGPRINT("----maxflagcheck----\n");
155+ #ifdef DEBUG
156+ for(i=0;i<out.numDistribution;i++){
157+ printf("dist%d:%d\n",i,(out.posterior[i].maxposteriorflag));
158+ }
159+ #endif
160+
161+ DefocusEstimationLoop(info,&out,&ctfinfo,&ctf,&intensity,&likelihood,1);
162+ DEBUGPRINT("B refinement finish\n");
163+ ctfforbayescheckIntensityOfMaxPosterior(ctf,out.posterior,out.numDistribution,&ctfinfo,intensity.MTFmode,intensity.Ainmode,1,1);
164+*/
135165
136166 /*df,A serch*/
137167 DEBUGPRINT("df, A, k search start\n");
@@ -149,7 +179,7 @@ main(int argc, char* argv[])
149179 DEBUGPRINT("set resetflag of df,A,k\n");
150180 out.prior[0].resetflag = 1;
151181 out.prior[1].resetflag = 1;
152- out.prior[3].resetflag = 1;
182+ out.prior[2].resetflag = 1;
153183 eosBayesProbabilityReset(info.fptIn,&out,1,0);
154184
155185 DEBUGPRINT("----maxflagcheck----\n");
@@ -163,10 +193,10 @@ main(int argc, char* argv[])
163193 DEBUGPRINT("A,df,A search finish\n");
164194 ctfforbayescheckIntensityOfMaxPosterior(ctf,out.posterior,out.numDistribution,&ctfinfo,intensity.MTFmode,intensity.Ainmode,1,1);
165195
166-
167- /*df search*/
196+ /*df refinement*/
168197 DEBUGPRINT("df serch start\n");
169198 ctf.rmax = Rintermediate;
199+ ctf.rmin = Rmin;
170200 DEBUGPRINT2("set R range:%f~%f\n",ctf.rmin,ctf.rmax);
171201
172202 DEBUGPRINT("set maxposteriorflag of defocus,A,B\n");
@@ -189,15 +219,11 @@ main(int argc, char* argv[])
189219 }
190220 #endif
191221
192- DefocusEstimationLoop(info,&out,&ctfinfo,&ctf,&intensity,&likelihood,1);
193- DEBUGPRINT("df search finish\n");
194- ctfforbayescheckIntensityOfMaxPosterior(ctf,out.posterior,out.numDistribution,&ctfinfo,intensity.MTFmode,intensity.Ainmode,1,1);
195-
196- }
197-
222+
198223 /*MTF refinement*/
199- DEBUGPRINT("MTF,refinement\n");
224+ DEBUGPRINT("MTF, B refinement\n");
200225 ctf.rmax = Rmax;
226+ ctf.rmin = Rmin;
201227 DEBUGPRINT2("set R range:%f~%f\n",ctf.rmin,ctf.rmax);
202228
203229 DEBUGPRINT("set maxposteriorflag of defocus,A,k\n");
@@ -210,6 +236,7 @@ main(int argc, char* argv[])
210236 out.posterior[5].constantflag = 1;
211237
212238 DEBUGPRINT("set resetflag of B,MTF\n");
239+// out.prior[2].resetflag = 1;
213240 out.prior[4].resetflag = 1;
214241 eosBayesProbabilityReset(info.fptIn,&out,5,0);
215242
@@ -221,27 +248,26 @@ main(int argc, char* argv[])
221248 #endif
222249
223250 DefocusEstimationLoop(info,&out,&ctfinfo,&ctf,&intensity,&likelihood,1);
224- DEBUGPRINT("MTF, B refinement finish\n");
251+ DEBUGPRINT("MTF refinement finish\n");
225252 ctfforbayescheckIntensityOfMaxPosterior(ctf,out.posterior,out.numDistribution,&ctfinfo,intensity.MTFmode,intensity.Ainmode,1,1);
226253
227-
228- /*df search*/
229- /*
230- DEBUGPRINT("df serch start\n");
254+ /*B refinement*/
255+ DEBUGPRINT("B,refinement\n");
231256 ctf.rmax = Rintermediate;
257+ ctf.rmin = Rmin;
232258 DEBUGPRINT2("set R range:%f~%f\n",ctf.rmin,ctf.rmax);
233-
234- DEBUGPRINT("set maxposteriorflag of defocus,A,B\n");
259+
260+ DEBUGPRINT("set maxposteriorflag of defocus,A,k\n");
261+ eosBayesMaxposteriorflagSet(&out,0);
235262 eosBayesMaxposteriorflagSet(&out,1);
236- eosBayesMaxposteriorflagSet(&out,2);
237- eosBayesMaxposteriorflagSet(&out,3);
238263 eosBayesMaxposteriorflagSet(&out,4);
264+ eosBayesMaxposteriorflagSet(&out,3);
239265
240266 DEBUGPRINT("set canstantflag of Ain");
241267 out.posterior[5].constantflag = 1;
242268
243- DEBUGPRINT("set resetflag of df\n");
244- out.prior[0].resetflag = 1;
269+ DEBUGPRINT("set resetflag of B,MTF\n");
270+ out.prior[2].resetflag = 1;
245271 eosBayesProbabilityReset(info.fptIn,&out,5,0);
246272
247273 DEBUGPRINT("----maxflagcheck----\n");
@@ -252,31 +278,26 @@ main(int argc, char* argv[])
252278 #endif
253279
254280 DefocusEstimationLoop(info,&out,&ctfinfo,&ctf,&intensity,&likelihood,1);
255- DEBUGPRINT("df search finish\n");
281+ DEBUGPRINT("B refinement finish\n");
256282 ctfforbayescheckIntensityOfMaxPosterior(ctf,out.posterior,out.numDistribution,&ctfinfo,intensity.MTFmode,intensity.Ainmode,1,1);
257-*/
258-
259- /*A, Ain refinement*/
260-/*
261- DEBUGPRINT("A, k, Ain refinement start\n");
262283
284+ /*df refinement*/
285+ DEBUGPRINT("df serch start\n");
263286 ctf.rmax = Rintermediate;
264287 ctf.rmin = Rmin;
265288 DEBUGPRINT2("set R range:%f~%f\n",ctf.rmin,ctf.rmax);
266289
267- DEBUGPRINT("set maxposteriorflag of MTF,B\n");
268- eosBayesMaxposteriorflagSet(&out,0);
290+ DEBUGPRINT("set maxposteriorflag of defocus,A,B\n");
291+ eosBayesMaxposteriorflagSet(&out,1);
269292 eosBayesMaxposteriorflagSet(&out,2);
293+ eosBayesMaxposteriorflagSet(&out,3);
270294 eosBayesMaxposteriorflagSet(&out,4);
271295
272296 DEBUGPRINT("set canstantflag of Ain");
273- out.posterior[5].constantflag = 0;
297+ out.posterior[5].constantflag = 1;
274298
275- DEBUGPRINT("set resetflag of df,A,k\n");
299+ DEBUGPRINT("set resetflag of df\n");
276300 out.prior[0].resetflag = 1;
277- out.prior[1].resetflag = 1;
278- out.prior[3].resetflag = 1;
279- out.prior[5].resetflag = 1;
280301 eosBayesProbabilityReset(info.fptIn,&out,5,0);
281302
282303 DEBUGPRINT("----maxflagcheck----\n");
@@ -286,10 +307,7 @@ main(int argc, char* argv[])
286307 }
287308 #endif
288309
289- DefocusEstimationLoop(info,&out,&ctfinfo,&ctf,&intensity,&likelihood,1);
290- DEBUGPRINT("df, A, k, Ain refinementfinish\n");
291- ctfforbayescheckIntensityOfMaxPosterior(ctf,out.posterior,out.numDistribution,&ctfinfo,intensity.MTFmode,intensity.Ainmode,1,1);
292-*/
310+
293311 /*defocus refinement*/
294312
295313 DEBUGPRINT("defocus refinement start\n");
Show on old repository browser