lctfDetermination(API)

From EosPedia
Jump to: navigation, search

DataManip/ctfInfo/src/lctfDetermination is API to determine CTF, and it is used by ctfDetermine.

constant

struct

typedef struct lctfDetermineInfo {
	ctfInfo initial;

	long    ThonRing; 	
	/* For Astigmatism */
	int     flagAstigmatism;
	int    section;

	int    degree;
	double step;
	double max;
	double min;
	float  firstRingDefocus;
	float  IntensityMin;
	float  IntensityMax;
	float* noise;
} lctfDetermineInfo;

API

CTF Determination

Main

Perform CTF Determination depending on mode(masked by 0x000000F0).
Basically, mode of called function is used with masking at 0x0000000Fでマスク.
Currently, ctfDetermine doesn't use this API, and uses directly other APIs.

extern void lctfDetermine(ctfInfo* result, ctfInfo* var, mrcImage* mrc, lctfDetermineInfo* linfo, long mode);
mode(& 0x000000F0) Used Function
0 lctfDeterminationbyMinMaxMethods
16 lctfDeterminationbyFittingMethods
32 lctfDeterminationbyDifferentialMethods
64 lctfDeterminationbyCovarianceMethods
96 lctfDeterminationbyMixMethods
128 lctfDeterminationbyMinSquareMethods
160, 161, 163(uses also mask of 0x0000000F) lctfDeterminationbyMinSquareMethods

EnvelopeDetermine

167(uses also mask of 0x0000000F) lctfDeterminationbyMinSquareMethodsWithAcomp
176 lmrcFSInfoScatteringAngularDistributionAverageSection

lctfDeterminationbyMinSquareMethods
lctfDeterminationByTangent
lastigmatismDetection


MinMax Methods

extern void lctfDeterminationbyMinMaxMethods(ctfInfo* res, mrcImage* mrc, ctfInfo* ini, long mode);

Fitting Methods

extern void lctfDeterminationbyFittingMethods(ctfInfo* res, ctfInfo* var, mrcImage* mrc, ctfInfo* ini, long mode);

Angular Distribution

extern void angularDistributionFunctionOfSignalAndNoise(float x, float p[], float* y, float dyda[], int na);

Input: x, p
Output: y, dyda

Elements of p and dyda are used as the following member in ctfinfo.

No. corresponded ctfInfo's member
1 I0
2 defocus
3 Cs
4 ratioOfAmpToPhase
5 Ain
6 Cc
7 dE
8 BofVibration
9 WhiteNoise
10 WhiteNoise2
11 BofMTF
12 MolecEnv
13 kV
14 (Constant value)511*1e3
15 (Function value)wavelengthOfElectron(ini->kV*1e3)
16 Magnification


Differential Methods

extern void lctfDeterminationbyDifferentialMethods(ctfInfo* res, mrcImage* mrc, ctfInfo* ini,long* ThonRing, long mode);

Covariance Methods

extern void lctfDeterminationbyCovarianceMethods(ctfInfo* res, mrcImage* mrc, ctfInfo* ini,long* ThonRing, long mode);

Differential & covariance Methods

extern void lctfDeterminationbyMixMethods(ctfInfo* res, mrcImage* mrc, ctfInfo* ini, long* ThonRing,long mode);

MinSquare Methods

extern void lctfDeterminationbyMinSquareMethods(ctfInfo* res, mrcImage* mrc, ctfInfo* ini,long* ThonRing,lctfDetermineInfo* linfo,floatVector* defocus,floatVector* Eres ,long mode);

Add "Ratio of Amplitude to Phase"(0.05 ~ 1.00 (+0.01)) to the condition.

extern void lctfDeterminationbyMinSquareMethodsWithAcomp(ctfInfo* res, mrcImage* mrc, ctfInfo* ini,long* ThonRing,lctfDetermineInfo* linfo,floatVector* defocus,floatVector* Eres ,long mode);

Determine envelope

Output the determined envelope to res.

extern void EnvelopeDetermine(ctfInfo* res, mrcImage* mrc, ctfInfo* ini,lctfDetermineInfo* linfo,floatVector* defocus,floatVector* Eres, long mode);

By using tangent line

extern double lctfDeterminationByTangent(ctfInfo* res, mrcImage* mrc, ctfInfo* ini,lctfDetermineInfo* linfo,floatVector* defocus,floatVector* Eres, long mode);

Help

Output the mode details

extern void lctfDtermmineUsage(FILE* fpt);