Difference between revisions of "lctfDetermination(API)"
From EosPedia
(Created page with "DataManip/ctfInfo/src/'''lctfDetermination''' is API for ctfDetermine. == constant == == struct == typedef struct lctfDetermineInfo { ctfInfo initial; long Tho...") |
|||
Line 1: | Line 1: | ||
− | DataManip/ctfInfo/src/'''lctfDetermination''' is API | + | DataManip/ctfInfo/src/'''lctfDetermination''' is [[API]] to determine [[CTF]], and it is used by [[ctfDetermine]]. |
== constant == | == constant == | ||
Line 23: | Line 23: | ||
== API == | == API == | ||
+ | === CTF Determination === | ||
+ | ==== Main ==== | ||
+ | Perform [[CTF]] Determination depending on mode(masked by 0x000000F0).<br> | ||
+ | Basically, mode of called function is used with masking at 0x0000000Fでマスク.<br> | ||
+ | Currently, [[ctfDetermine]] doesn't use this [[API]], and uses directly other [[API]]s. | ||
extern void lctfDetermine(ctfInfo* result, ctfInfo* var, mrcImage* mrc, lctfDetermineInfo* linfo, long mode); | extern void lctfDetermine(ctfInfo* result, ctfInfo* var, mrcImage* mrc, lctfDetermineInfo* linfo, long mode); | ||
− | + | <table border="1"> | |
+ | <tr> | ||
+ | <th>mode(& 0x000000F0)</th> | ||
+ | <th>Used Function</th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>0</td> | ||
+ | <td>lctfDeterminationbyMinMaxMethods</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>16</td> | ||
+ | <td>lctfDeterminationbyFittingMethods</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>32</td> | ||
+ | <td>lctfDeterminationbyDifferentialMethods</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>64</td> | ||
+ | <td>lctfDeterminationbyCovarianceMethods</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>96</td> | ||
+ | <td>lctfDeterminationbyMixMethods</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>128</td> | ||
+ | <td>lctfDeterminationbyMinSquareMethods</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>160, 161, 163(uses also mask of 0x0000000F)</td> | ||
+ | <td>lctfDeterminationbyMinSquareMethods<br> | ||
+ | EnvelopeDetermine<br> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>167(uses also mask of 0x0000000F)</td> | ||
+ | <td>lctfDeterminationbyMinSquareMethodsWithAcomp</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>176</td> | ||
+ | <td>lmrcFSInfoScatteringAngularDistributionAverageSection<br> | ||
+ | lctfDeterminationbyMinSquareMethods<br> | ||
+ | lctfDeterminationByTangent<br> | ||
+ | lastigmatismDetection<br> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | <br> | ||
+ | ==== MinMax Methods ==== | ||
extern void lctfDeterminationbyMinMaxMethods(ctfInfo* res, mrcImage* mrc, ctfInfo* ini, long mode); | 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); | 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); | extern void angularDistributionFunctionOfSignalAndNoise(float x, float p[], float* y, float dyda[], int na); | ||
+ | Input: x, p<br> | ||
+ | Output: y, dyda<br> | ||
+ | <br> | ||
+ | Elements of '''p''' and '''dyda''' are used as the following member in '''ctfinfo'''. | ||
+ | <table border="1"> | ||
+ | <tr> | ||
+ | <th>No.</th> | ||
+ | <th>corresponded '''ctfInfo''''s member</th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>1</td> | ||
+ | <td>I0</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>2</td> | ||
+ | <td>defocus</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>3</td> | ||
+ | <td>Cs</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>4</td> | ||
+ | <td>ratioOfAmpToPhase</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>5</td> | ||
+ | <td>Ain</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>6</td> | ||
+ | <td>Cc</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>7</td> | ||
+ | <td>dE</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>8</td> | ||
+ | <td>BofVibration</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>9</td> | ||
+ | <td>WhiteNoise</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>10</td> | ||
+ | <td>WhiteNoise2</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>11</td> | ||
+ | <td>BofMTF</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>12</td> | ||
+ | <td>MolecEnv</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>13</td> | ||
+ | <td>kV</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>14</td> | ||
+ | <td>(Constant value)511*1e3</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>15</td> | ||
+ | <td>(Function value)wavelengthOfElectron(ini->kV*1e3)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>16</td> | ||
+ | <td>Magnification</td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | <br> | ||
+ | |||
+ | ==== Differential Methods ==== | ||
extern void lctfDeterminationbyDifferentialMethods(ctfInfo* res, mrcImage* mrc, ctfInfo* ini,long* ThonRing, long mode); | 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); | 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); | 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); | 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); | 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); | extern void EnvelopeDetermine(ctfInfo* res, mrcImage* mrc, ctfInfo* ini,lctfDetermineInfo* linfo,floatVector* defocus,floatVector* Eres, long mode); | ||
+ | |||
+ | ==== By using tan Function ==== | ||
+ | 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); |
Revision as of 07:33, 30 September 2014
DataManip/ctfInfo/src/lctfDetermination is API to determine CTF, and it is used by ctfDetermine.
Contents
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 |
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 tan Function
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);