OSDN Git Service

Document Added
[eos/optional.git] / doc / Objects / ctfInfo.html
1 <HTML>
2 <HEAD>
3 <TITLE>
4 ctfInfo
5 </TITLE>
6 </HEAD>
7 <BODY bgcolor="#ffffcc">
8 <H1> ctfInfo Object </H1>
9
10 <H2> <A HREF="#information"> information from souce codes</A></H2>
11 <H2> <A HREF="#include"> include file </A></H2>
12 <HR>
13 <A NAME="Information">
14 <H2>Information from source codes</H2>
15 </A>
16 <PRE>
17 </PRE>
18 <HR>
19 <A NAME="include">
20 <H2>ctfInfo.h</H2>
21 </A>
22 <PRE>
23 #ifndef CTF_INFO_H
24 #define CTF_INFO_H
25 #include <stdio.h>
26
27 /* constant begin */
28 #define ctfInfoModeWithAmplitudeContrast    0x0f
29 #define ctfInfoModeWithMTF                  0x10
30 #define ctfInfoModeWithIlluminationAngle    0x20
31 #define ctfInfoModeWithEnergySpread         0x40
32 #define ctfInfoModeAbsoluteValue            0x100 
33
34 typedef enum ctfInfoMode {
35         ctfInfoModePhaseCTFOnly   = 0,
36         ctfInfoModePhaseAndAmpCTF = 1 
37 } ctfInfoMode;
38
39 typedef enum ctfInfoMTFMode {
40         ctfInfoMTFModeSingleExp = 0,
41         ctfInfoMTFModeSingleLorentzian = 1,
42         ctfInfoMTFModeBoth      = 2,
43         ctfInfoMTFModeLinear    = 3, 
44         ctfInfoMTFModeBothSum   = 4,
45         ctfInfoMTFModePolynomial = 5
46 } ctfInfoMTFMode;
47 /* constant end */
48
49 /* struct begin */
50 typedef struct moleculrEnvelope {
51         char* filename; 
52         int   nR;
53         float* R;
54         float* Envelope;
55         int    mode;    
56 } molecularEnvelope;
57
58 typedef struct ctfInfo {
59         float kV;      /* kV */
60         float defocus; /* A : Underfocus is plus, while overfocus is minus*/
61         float Cc;      /* mm */
62         float dE; 
63         float Cs;      /* mm */
64         float Ain;     /* mrad : Illumination Angle */
65         long  flagWin; /* Windowing */ 
66         float CutLow;  /* Windowing: CutLow  A-1 */
67         float CutHigh; /* Windowing: CutHigh A-1 */
68
69         float I0;      /* Intensity */
70         float Isignal; /* Intensity of signal */
71
72         float ratioOfAmpToPhase; /* The ratio of amp to phase */
73
74         float Inoise;  /* Intensity of noise : Isignal*/
75         long  flagWhiteNoise;
76         float WhiteNoise;  /* Affected by MTF(R) */
77
78         long  flagWhiteNoiseRaising;    
79         float WhiteNoiseRaising; /* WhiteNoise Raising depending upon R */
80
81         long  flagMaxWhiteNoise;        
82         float MaxWhiteNoise; /* max White Noise*/
83
84         long  flagNdependentWhiteNoise;         
85         float NdependentWhiteNoise; /* max White Noise*/
86
87         float Inoise2; /* Intensity of noise */
88         long  flagWhiteNoise2;
89         float WhiteNoise2; /* Not Affected by MTF(R)*/
90
91         int   flagAstigmatism;
92         float defocus2D[2];      /* A : Normally [0]: Max [1]: Min */
93         float defocus0axis;      /* radian : angle of the defocus2D[0]-axis */
94
95         long mode;
96         
97         long  flagMagnification;        
98         float Magnification;
99
100         /* MTF(R): Modulation Transfer Function */ 
101         ctfInfoMTFMode MTFMode;
102         float BofMTF;  /* Exponential: exp(-B R)   */
103         float BofMTF2; /* Lorentzian : 1/(B*B+R*R) */   
104         float WeightOfSecondTermForMTF; /* 0 <-> 1 */
105         /*for PolynomialExpNoise*//*d = degree*/
106         float BofMTFd2;
107         float BofMTFd3;
108         float BofMTFd4;
109         float BofMTFd5;
110         float BofMTFd6;
111
112         /* Molecular Envelope: Scattering Factor */
113         /* For Gaussian */
114         float MolecEnv;                   /* A : */
115         /* For Table */
116         long  flagMolecEnvTable;
117         molecularEnvelope MolecEnvTable;
118         /* For Lorentzian */
119         long flagElastic;
120         float Elastic;
121         float ElasticShift;
122         float ElasticWidth;
123         float ElasticRing;
124         float ElasticRingPosition;
125         float ElasticRingWidth;
126
127         /* Stage Vibration */
128         long  flagVibration;
129         long  VibrationMode;
130         float BofVibration;
131
132         /* Aliasing and Sampling */
133         long flagAliasing;
134         float NyquistFrequency;
135         long flagSampling; 
136
137         /* Inelastic Signal */
138         /* For Gaussian */
139         long flagWithInElastic;
140         float InElasticGaussian;
141         /* For Table */
142         long flagWithInElasticTable;
143         molecularEnvelope InElasticEnvTable;    
144         /* Lorentzian */        
145         long flagInElastic;
146         float InElastic;
147         float InElasticShift;
148         float InElasticWidth;
149         float InElasticRing;
150         float InElasticRingPosition;
151         float InElasticRingWidth;
152 } ctfInfo;
153 /* struct end */
154
155
156 #ifdef __cplusplus
157 extern "C" {
158 #endif
159
160 /* prototype begin */
161
162 extern void ctfInfoSendByPVM(ctfInfo* info, int tid, long mode);
163 extern void ctfInfoRecieveByPVM(ctfInfo* info, int tid, long mode);
164 extern float ctfSignalFunction(ctfInfo* info, float R, long mode);
165 extern float ctfNoiseFunction(ctfInfo* info, float R, long mode);
166 extern float ctfNoise2Function(ctfInfo* info, float R, long mode);
167 extern float ctfSignalPowerFunction(ctfInfo* info, float R, long mode);
168 extern float ctfNoisePowerFunction(ctfInfo* info, float R, long mode);
169 extern float ctfNoise2PowerFunction(ctfInfo* info, float R, long mode);
170 extern float ctfScatteringFunction(ctfInfo* info, float R, long mode);
171 extern float ctfMolecularEnvelopeFunction(ctfInfo* info, float R, long mode);
172 extern float ctfMolecularEnvelopeInElasticFunction(ctfInfo* info, float R, long mode);
173 extern float ctfVibrationFunction(ctfInfo* info, float R, long mode);
174 extern float ctfFunction(ctfInfo* info, float R, long mode);
175 extern float ctfFunctionSampling(float R, float Nyquist, long mode);
176 extern void  ctfFunctionPVMStart(ctfInfo* info, float R, int tid, long mode);
177 extern float ctfFunctionPVMEnd(ctfInfo* info, float R, int tid, long mode);
178 extern void  ctfFunctionPVMServer();
179 extern float ctfEnvelopFunction(ctfInfo* info, float R, long mode);
180 extern float ctfMTFFunction(ctfInfo* info, float R, long mode);
181 extern float ctfFunction2D(ctfInfo* info, float X, float Y, long mode);
182 extern float wavelengthOfElectron(float E);
183 extern float defocusDeterminationFromThonRing(ctfInfo* info, float R, long n, long mode);
184 extern void ctfWeightForCorrectionUsage(FILE* fpt);
185 extern float ctfWeightForCorrection2D(ctfInfo* info, float X, float Y, long mode);
186 extern float ctfWeightForCorrection(ctfInfo* info, float R, long mode);
187 extern void lmolecularEnvelopeFileRead(FILE* fpt, molecularEnvelope* mol, int mode);
188 extern void lmolecularEnvelopeFileWrite(FILE* fpt, molecularEnvelope* mol, int mode);
189 extern void lmolecularEnvelopeResampling(molecularEnvelope* dst, molecularEnvelope* src, float dR, float RMax, int mode);
190 extern float lmolecularEnvelopeDataGet(molecularEnvelope* src, float R, int mode);
191 extern void ctfInfoRead(FILE* fpt, ctfInfo* ctf, char* pre, int mode);
192 extern void ctfInfoWrite(FILE* fpt, ctfInfo ctf, char* pre, int mode);
193 /* prototype end */
194
195 #ifdef __cplusplus
196 };
197 #endif
198
199 #endif
200 </PRE>
201 </BODY>
202 </HTML>