7 <BODY bgcolor="#ffffcc">
8 <H1> ctfInfo Object </H1>
10 <H2> <A HREF="#information"> information from souce codes</A></H2>
11 <H2> <A HREF="#include"> include file </A></H2>
13 <A NAME="Information">
14 <H2>Information from source codes</H2>
28 #define ctfInfoModeWithAmplitudeContrast 0x0f
29 #define ctfInfoModeWithMTF 0x10
30 #define ctfInfoModeWithIlluminationAngle 0x20
31 #define ctfInfoModeWithEnergySpread 0x40
32 #define ctfInfoModeAbsoluteValue 0x100
34 typedef enum ctfInfoMode {
35 ctfInfoModePhaseCTFOnly = 0,
36 ctfInfoModePhaseAndAmpCTF = 1
39 typedef enum ctfInfoMTFMode {
40 ctfInfoMTFModeSingleExp = 0,
41 ctfInfoMTFModeSingleLorentzian = 1,
42 ctfInfoMTFModeBoth = 2,
43 ctfInfoMTFModeLinear = 3,
44 ctfInfoMTFModeBothSum = 4,
45 ctfInfoMTFModePolynomial = 5
50 typedef struct moleculrEnvelope {
58 typedef struct ctfInfo {
60 float defocus; /* A : Underfocus is plus, while overfocus is minus*/
64 float Ain; /* mrad : Illumination Angle */
65 long flagWin; /* Windowing */
66 float CutLow; /* Windowing: CutLow A-1 */
67 float CutHigh; /* Windowing: CutHigh A-1 */
69 float I0; /* Intensity */
70 float Isignal; /* Intensity of signal */
72 float ratioOfAmpToPhase; /* The ratio of amp to phase */
74 float Inoise; /* Intensity of noise : Isignal*/
76 float WhiteNoise; /* Affected by MTF(R) */
78 long flagWhiteNoiseRaising;
79 float WhiteNoiseRaising; /* WhiteNoise Raising depending upon R */
81 long flagMaxWhiteNoise;
82 float MaxWhiteNoise; /* max White Noise*/
84 long flagNdependentWhiteNoise;
85 float NdependentWhiteNoise; /* max White Noise*/
87 float Inoise2; /* Intensity of noise */
89 float WhiteNoise2; /* Not Affected by MTF(R)*/
92 float defocus2D[2]; /* A : Normally [0]: Max [1]: Min */
93 float defocus0axis; /* radian : angle of the defocus2D[0]-axis */
97 long flagMagnification;
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*/
112 /* Molecular Envelope: Scattering Factor */
114 float MolecEnv; /* A : */
116 long flagMolecEnvTable;
117 molecularEnvelope MolecEnvTable;
124 float ElasticRingPosition;
125 float ElasticRingWidth;
127 /* Stage Vibration */
132 /* Aliasing and Sampling */
134 float NyquistFrequency;
137 /* Inelastic Signal */
139 long flagWithInElastic;
140 float InElasticGaussian;
142 long flagWithInElasticTable;
143 molecularEnvelope InElasticEnvTable;
147 float InElasticShift;
148 float InElasticWidth;
150 float InElasticRingPosition;
151 float InElasticRingWidth;
160 /* prototype begin */
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);