OSDN Git Service

modified ctfDeterminationByBayes
[eos/base.git] / src / Objects / DataManip / ctfInfo / src / ctfInfoWrite.c
1 /*
2 # %M% %Y% %I%
3 # The latest update : %G% at %U%
4 #
5 #%Z% ctfInfoWrite ver %I%
6 #%Z% Created by 
7 #%Z%
8 #%Z% Usage : ctfInfoWrite 
9 #%Z% Attention
10 #%Z%
11 */
12 static char __sccs_id[] = "%Z%ctfInfoWrite ver%I%; Date:%D% %Z%";
13 #include "genUtil.h"
14 #include "String.h"
15 #include "../inc/ctfInfo.h"
16 #include <stdio.h>
17 #include <stdlib.h>
18
19 void
20 ctfInfoWrite(FILE* fpt, ctfInfo ctf, char* head, int mode)
21 {
22         int i;
23
24     fprintf(fpt, "%sI:             %15.6g\n", head, ctf.I0);
25     fprintf(fpt, "%sIsignal:       %15.6g\n", head, ctf.I0);
26     fprintf(fpt, "%sMagnification: %15.6g\n", head, ctf.Magnification);
27     fprintf(fpt, "%sdefocus:       %15.6g\n", head, ctf.defocus);
28     fprintf(fpt, "%sAoverP:        %15.6g\n", head, ctf.ratioOfAmpToPhase);
29     fprintf(fpt, "%sCs:            %15.6g\n", head, ctf.Cs);
30     fprintf(fpt, "%sCc:            %15.6g\n", head, ctf.Cc);
31     fprintf(fpt, "%sdE:            %15.6g\n", head, ctf.dE);
32     fprintf(fpt, "%sAi:            %15.6g\n", head, ctf.Ain);
33     fprintf(fpt, "%sMTFMode:       %15d\n",   head, ctf.MTFMode);
34     fprintf(fpt, "%sMTF:           %15.6g\n", head, ctf.BofMTF);
35     fprintf(fpt, "%sMTF2:          %15.6g\n", head, ctf.BofMTF2);
36     fprintf(fpt, "%sflagVibration: %15d\n", head, ctf.flagVibration);
37     fprintf(fpt, "%sBofVibration:  %15.6g\n", head, ctf.BofVibration);
38     fprintf(fpt, "%sflagSN:        %15d  \n", head, ctf.flagWhiteNoise);
39     fprintf(fpt, "%sSN:            %15.6g\n", head, ctf.WhiteNoise);
40     fprintf(fpt, "%sInoise:        %15.6g\n", head, ctf.I0*ctf.WhiteNoise);
41     fprintf(fpt, "%sflagSN2:       %15d  \n", head, ctf.flagWhiteNoise2);
42     fprintf(fpt, "%sSN2:           %15.6g\n", head, ctf.WhiteNoise2);
43     fprintf(fpt, "%sInoise2:       %15.6g\n", head, ctf.I0*ctf.WhiteNoise2);
44     fprintf(fpt, "%sNyquistFrequency: %15.6g\n", head, ctf.NyquistFrequency);
45     fprintf(fpt, "%sflagAliasing:  %15d\n", head, ctf.flagAliasing);
46     fprintf(fpt, "%sflagSampling:  %15d\n", head, ctf.flagSampling);
47     fprintf(fpt, "%sflagMolecEnvTable: %15d\n", head, ctf.flagMolecEnvTable);
48         switch(ctf.flagMolecEnvTable) {
49                 case 0: { /* No Table */
50                 fprintf(fpt, "%sMolecEnv:      %15.6g\n", head, ctf.MolecEnv);
51                         break;
52                 }
53                 case 1: { 
54                         fprintf(fpt, "%sMET-File:      %s\n", head, ctf.MolecEnvTable.filename);
55                         break;
56                 }
57                 case 2: {       
58                 fprintf(fpt, "%sMET-nR:        %15d\n",   head, ctf.MolecEnvTable.nR);
59                 fprintf(fpt, "%sMET-mode:      %15d\n",   head, ctf.MolecEnvTable.mode);
60                         for(i=0; i<ctf.MolecEnvTable.nR; i++) {
61                                 fprintf(fpt, "%sMET-Table: %15.6g %15.6g\n", head, ctf.MolecEnvTable.R[i], ctf.MolecEnvTable.Envelope[i]);
62                         }
63                         break;
64                 }
65                 default: {
66                         break;
67                 }
68         }
69     fprintf(fpt, "%sdefocus2D0:    %15.6g\n", head, ctf.defocus2D[0]);
70     fprintf(fpt, "%sdefocus2D1:    %15.6g\n", head, ctf.defocus2D[1]);
71     fprintf(fpt, "%sdefocus0axis:  %15.6g\n", head, ctf.defocus0axis);
72     fprintf(fpt, "%skV:            %15.6g\n", head, ctf.kV);
73     fprintf(fpt, "%sflagWin:       %15d  \n", head, ctf.flagWin);
74     fprintf(fpt, "%sCutLow:        %15.6g\n", head, ctf.CutLow);
75     fprintf(fpt, "%sCutHigh:       %15.6g\n", head, ctf.CutHigh);
76 }
77