Annex to Practical N°2

3D projection alignment and CTF correction on simulated micrographs of Lumbricus terrestris giant hemoglobin


Nicolas Boisset et Ricardo Aramayo

IMPMC, CNRS UMR 7590

Campus Boucicaut, Université Paris 6

140 Rue de Lourmel

75015 Paris

The batches displayed in this practical session were written for the SPIDER Unix version number 14.16 issued in 2006. These batches should run on your workstation if you possess a more recent Spider version.

Data set simulation

b01.mkd

;------------------------------------------------------------------------------!
; b01.mkd/hbl : CREATES FOUR ARTIFICIAL MICROGRAPHS of 
;------------------------------------------------------------------------------!
;		Lumbricus terrestris hemoglobin with : four micrographs with
;               120 projections with 5° angular increment of vcem011.hbl
;		and applying 4 defocus values for CTF simulation
;		defocus 1 = 25000 A   dmic001.hbl
;		defocus 2 = 32000 A   dmic002.hbl
;		defocus 3 = 39000 A   dmic003.hbl
;		defocus 4 = 36000 A   dmic004.hbl
;------------------------------------------------------------------------------!
MD
TR ON
;
;----------( create eulerian angles to project the volume )--------------------!
vo ea
5.
0.,90.
0.,60.
_1
;
;-----( Binarisation du volume à 15 Angstroems
th f
vcem011
vcem001
b
0.4
0.0
;
DO LB6 x90=1,4
;-----(Creates a noisy plane to mimic cryoEM fields----------------------------!
MO
fantom{***x90}
(1200,1600)
R
N
;
; Creates random eulerian angles for projection
do lb1 x10=1,120
;
ud ic x10,x11,x12,x13
_1
;
x14=ran(x13)
x15=x14*360.
;
sd x10,x15,x12,x13
../doc/dproj{***x90}
;
lb1
;
ud ice
_1
de
_1
;
;-------------( project the volume )
pj 3q
vcem001
(41.)
(1-120)
../doc/dproj{***x90}
prj***
;
;------------------------------------------------------------------------!
do LB4 X10=1,120
;-----( reads the coordinates of the 120 projections :
UD S X10,X91,X92
dmic{***x90}
X93=X91*2
X93=X93-41.
x94=x92*2
x94=x94-41
;
;-----( rescale the untilted projections between 0 & 1 and patch
FS X51,X52
prj{***X10}
X53=(X51-X52)
AR
prj{***X10}
INT901
((P1-X52)/X53)
AR
INT901
INT902
((P1*0.5)+0.)
PA
INT902
fantom{***x90}
X93,X94
;-----( Save particles' coordinates in the untilted micrograph
SD X10,x10,X93,X94
../doc/dwin{***x90}
LB4
;-----( Delete intermediate files:
de
INT901
de
INT902
de a
prj001
LB6
;------------------------------------------------------------------------------!
; creates the 4 CTF complexe files and apply them on the micrograph + noise
;------------------------------------------------------------------------------!
x60=3.5                ; pixel size in A
x61=0.5                ; Cs = 0.5 mm
x62=25000.             ; Defocus value in A
x63=0.02508            ; lambda value for 200 kV
x64=1200               ; X size of micrograph
x65=1600               ; Y size of micrograph
x66=1/(2*x60)          ; maximum spatial frequency (1/(2*Pixel size in A)
x67=0.00431            ; source size in A-1
x68=100.               ; defocus spread in A
x69=0                  ; astigmatism and azimuth angle (both set to zero here)
x70=0.07               ; amplitude contrast ratio
x71=0.07               ; gaussian envelope half-width
x72=-1                 ; sign related to underfocus
do lb5 x10=1,4
;
RR x62
25000.,32000.,39000.,36000.
tf c
tfc{***x10}
x61
x62,x63
x64,x65
x66
x67,x68
x69,x69
x70,x71
x72
;
ft
fantom{***x10}
int002
;
mu
int002
tfc{***x10}
int003
*
;
FT
int003
../micrographs/MIC{***x10}
;
ip
../micrographs/MIC{***x10}
../micrographs/PIC{***x10}
(600,800)
;
;
x98=1/(2.*x60)
tf d
../r2d/tfd{***x10}
x61
x62,x63
(256)
x98
x67,x68
x69,x69
x70,x71
S
;
ro
../r2d/tfd{***x10}
_3
;
li d
_3
../doc/dctf{***x10}
r
(1)
lb5
;
;-----[ delete intermediate files :
de
int003
de
int002
de
vcem001
de a
fantom001
de a
tfc001
en

dmic001.hbl

 ; DAT/DAT  dmic001.DAT   Thu Aug 10 13:46:56 2006
 0001 6          111           94            0            0            0            0
 0002 6          144          287            0            0            0            0
 0003 6          167          530            0            0            0            0
 0004 6          349          448            0            0            0            0
 0005 6          280          295            0            0            0            0
 0006 6          343          121            0            0            0            0
 0007 6          525          232            0            0            0            0
 0008 6          499          418            0            0            0            0
 0009 6          481          647            0            0            0            0
 0010 6          309          722            0            0            0            0
 0011 6           68          671            0            0            0            0
 0012 6           67          423            0            0            0            0
 0013 6          187          403            0            0            0            0
 0014 6          210          155            0            0            0            0
 0015 6          429          267            0            0            0            0
 0016 6          486           79            0            0            0            0
 0017 6          366          191            0            0            0            0
 0018 6          376          325            0            0            0            0
 0019 6          434          539            0            0            0            0
 0020 6          315          605            0            0            0            0
 0021 6          183          665            0            0            0            0
 0022 6          184          766            0            0            0            0
 0023 6          465          750            0            0            0            0
 0024 6          386          645            0            0            0            0
 0025 6          517          564            0            0            0            0
 0026 6          318          534            0            0            0            0
 0027 6          222          458            0            0            0            0
 0028 6           62          554            0            0            0            0
 0029 6           58          306            0            0            0            0
 0030 6          140          183            0            0            0            0
 0031 6          233           81            0            0            0            0
 0032 6          310          218            0            0            0            0
 0033 6          491          152            0            0            0            0
 0034 6          359           35            0            0            0            0
 0035 6           43           57            0            0            0            0
 0036 6           53          178            0            0            0            0
 0037 6          232          235            0            0            0            0
 0038 6          292          379            0            0            0            0
 0039 6          243          572            0            0            0            0
 0040 6          134          605            0            0            0            0
 0041 6          123          468            0            0            0            0
 0042 6          410          388            0            0            0            0
 0043 6          448          463            0            0            0            0
 0044 6          498          322            0            0            0            0
 0045 6          560          366            0            0            0            0
 0046 6          540          490            0            0            0            0
 0047 6          551          677            0            0            0            0
 0048 6          433          697            0            0            0            0
 0049 6          369          761            0            0            0            0
 0050 6          267          654            0            0            0            0
 0051 6          128          718            0            0            0            0
 0052 6           69          740            0            0            0            0
 0053 6           47          487            0            0            0            0
 0054 6          121          365            0            0            0            0
 0055 6          187          328            0            0            0            0
 0056 6          239          365            0            0            0            0
 0057 6          278          463            0            0            0            0
 0058 6          352          261            0            0            0            0
 0059 6          446          194            0            0            0            0
 0060 6          425          129            0            0            0            0
 0061 6          421           77            0            0            0            0
 0062 6          547          102            0            0            0            0
 0063 6          550           33            0            0            0            0
 0064 6          282           31            0            0            0            0
 0065 6          289          140            0            0            0            0
 0066 6          181           39            0            0            0            0
 0067 6          173          107            0            0            0            0
 0068 6          102           32            0            0            0            0
 0069 6           51          104            0            0            0            0
 0070 6           91          242            0            0            0            0
 0071 6           99          144            0            0            0            0
 0072 6          174          226            0            0            0            0
 0073 6           33          368            0            0            0            0
 0074 6           39          609            0            0            0            0
 0075 6          229          705            0            0            0            0
 0076 6          262          752            0            0            0            0
 0077 6          329          664            0            0            0            0
 0078 6          375          709            0            0            0            0
 0079 6          379          576            0            0            0            0
 0080 6          442          604            0            0            0            0
 0081 6          379          498            0            0            0            0
 0082 6          238          510            0            0            0            0
 0083 6          196          601            0            0            0            0
 0084 6          357          385            0            0            0            0
 0085 6          440          326            0            0            0            0
 0086 6          557          286            0            0            0            0
 0087 6          561          176            0            0            0            0
 0088 6          485          508            0            0            0            0
 0089 6          572          540            0            0            0            0
 0090 6          561          614            0            0            0            0
 0091 6          498          699            0            0            0            0
 0092 6          529          744            0            0            0            0
 0093 6          122          658            0            0            0            0
 0094 6          111          525            0            0            0            0
 0095 6          129          415            0            0            0            0
 0096 6           32          243            0            0            0            0
 0097 6          220          285            0            0            0            0
 0098 6          256          188            0            0            0            0
 0099 6          303           77            0            0            0            0
 0100 6          457           30            0            0            0            0
 0101 6          483          261            0            0            0            0
 0102 6          468          377            0            0            0            0
 0103 6          324          328            0            0            0            0
 0104 6          253          414            0            0            0            0
 0105 6          567          425            0            0            0            0
 0106 6           28          701            0            0            0            0
 0107 6          177          465            0            0            0            0
 0108 6          402          439            0            0            0            0
 0109 6          398          227            0            0            0            0
 0110 6          373           84            0            0            0            0
 0111 6          101          314            0            0            0            0
 0112 6           86          614            0            0            0            0
 0113 6          112          771            0            0            0            0
 0114 6          315          774            0            0            0            0
 0115 6          318          487            0            0            0            0
 0116 6          232           23            0            0            0            0
 0117 6          402          171            0            0            0            0
 0118 6          204          553            0            0            0            0
 0119 6           28          771            0            0            0            0
 0120 6          222          640            0            0            0            0

dmic002.hbl

 ; DAT/DAT  dmic002.DAT   Thu Aug 10 20:50:30 2006
 0001 6           49          257            0            0            0            0
 0002 6          510          137            0            0            0            0
 0003 6          346          749            0            0            0            0
 0004 6           77          608            0            0            0            0
 0005 6          476          552            0            0            0            0
 0006 6          386          464            0            0            0            0
 0007 6          265          421            0            0            0            0
 0008 6          192          420            0            0            0            0
 0009 6          129          390            0            0            0            0
 0010 6          187          316            0            0            0            0
 0011 6          334          300            0            0            0            0
 0012 6          274          191            0            0            0            0
 0013 6          185          145            0            0            0            0
 0014 6          142          194            0            0            0            0
 0015 6          223          221            0            0            0            0
 0016 6          160          254            0            0            0            0
 0017 6           77          310            0            0            0            0
 0018 6          130          314            0            0            0            0
 0019 6          107          258            0            0            0            0
 0020 6           78          201            0            0            0            0
 0021 6          530          213            0            0            0            0
 0022 6          409          210            0            0            0            0
 0023 6          293          248            0            0            0            0
 0024 6          233          275            0            0            0            0
 0025 6          273          293            0            0            0            0
 0026 6          241          330            0            0            0            0
 0027 6          309          344            0            0            0            0
 0028 6          412          353            0            0            0            0
 0029 6          395          307            0            0            0            0
 0030 6          360          351            0            0            0            0
 0031 6          347          412            0            0            0            0
 0032 6          301          394            0            0            0            0
 0033 6          253          374            0            0            0            0
 0034 6          196          372            0            0            0            0
 0035 6          526          401            0            0            0            0
 0036 6          319          577            0            0            0            0
 0037 6           58          464            0            0            0            0
 0038 6           48          389            0            0            0            0
 0039 6           54          543            0            0            0            0
 0040 6           29          687            0            0            0            0
 0041 6          144          732            0            0            0            0
 0042 6           78          757            0            0            0            0
 0043 6           81          697            0            0            0            0
 0044 6          236          755            0            0            0            0
 0045 6          218          702            0            0            0            0
 0046 6          296          705            0            0            0            0
 0047 6          379          678            0            0            0            0
 0048 6          434          734            0            0            0            0
 0049 6          520          748            0            0            0            0
 0050 6          476          701            0            0            0            0
 0051 6          424          677            0            0            0            0
 0052 6          484          653            0            0            0            0
 0053 6          566          655            0            0            0            0
 0054 6          524          597            0            0            0            0
 0055 6          481          602            0            0            0            0
 0056 6          419          620            0            0            0            0
 0057 6          356          627            0            0            0            0
 0058 6          375          575            0            0            0            0
 0059 6          426          568            0            0            0            0
 0060 6          432          503            0            0            0            0
 0061 6          387          521            0            0            0            0
 0062 6          338          490            0            0            0            0
 0063 6          311          447            0            0            0            0
 0064 6          229          464            0            0            0            0
 0065 6          273          488            0            0            0            0
 0066 6          307          533            0            0            0            0
 0067 6          138          443            0            0            0            0
 0068 6          173          476            0            0            0            0
 0069 6          209          525            0            0            0            0
 0070 6          246          577            0            0            0            0
 0071 6          276          623            0            0            0            0
 0072 6          218          649            0            0            0            0
 0073 6          128          684            0            0            0            0
 0074 6          173          674            0            0            0            0
 0075 6          168          617            0            0            0            0
 0076 6          119          630            0            0            0            0
 0077 6          129          572            0            0            0            0
 0078 6          181          568            0            0            0            0
 0079 6          151          525            0            0            0            0
 0080 6          102          524            0            0            0            0
 0081 6          107          140            0            0            0            0
 0082 6           54          126            0            0            0            0
 0083 6          360          136            0            0            0            0
 0084 6          291          125            0            0            0            0
 0085 6          236          113            0            0            0            0
 0086 6           75           37            0            0            0            0
 0087 6          126           40            0            0            0            0
 0088 6           98           83            0            0            0            0
 0089 6          146           86            0            0            0            0
 0090 6          217           59            0            0            0            0
 0091 6          296           53            0            0            0            0
 0092 6          418           76            0            0            0            0
 0093 6          541          289            0            0            0            0
 0094 6          474          251            0            0            0            0
 0095 6          464          168            0            0            0            0
 0096 6          341          205            0            0            0            0
 0097 6          372          252            0            0            0            0
 0098 6          495          314            0            0            0            0
 0099 6          432          268            0            0            0            0
 0100 6          495          449            0            0            0            0
 0101 6          422          413            0            0            0            0
 0102 6          565          493            0            0            0            0
 0103 6          473          376            0            0            0            0
 0104 6          510          508            0            0            0            0
 0105 6          415          140            0            0            0            0
 0106 6          357           80            0            0            0            0
 0107 6          498           70            0            0            0            0
 0108 6          549           90            0            0            0            0
 0109 6          555          169            0            0            0            0
 0110 6          291          764            0            0            0            0
 0111 6           32          181            0            0            0            0
 0112 6          386           32            0            0            0            0
 0113 6          457           38            0            0            0            0
 0114 6          461          108            0            0            0            0
 0115 6           89          421            0            0            0            0
 0116 6          103          476            0            0            0            0
 0117 6          449          458            0            0            0            0
 0118 6          230          169            0            0            0            0
 0119 6          322          662            0            0            0            0
 0120 6          386          725            0            0            0            0

dmic003.hbl

 ; DAT/DAT  dmic003.hbl.DAT   Thu Aug 10 20:09:30 2006
 0001 6          527           75            0            0            0            0
 0002 6          455          195            0            0            0            0
 0003 6          272          194            0            0            0            0
 0004 6          372           93            0            0            0            0
 0005 6          346          222            0            0            0            0
 0006 6          192           51            0            0            0            0
 0007 6           69          123            0            0            0            0
 0008 6          152          187            0            0            0            0
 0009 6           55          211            0            0            0            0
 0010 6          143          270            0            0            0            0
 0011 6           41          303            0            0            0            0
 0012 6          161          350            0            0            0            0
 0013 6           66          398            0            0            0            0
 0014 6          208          435            0            0            0            0
 0015 6          288          285            0            0            0            0
 0016 6          426          342            0            0            0            0
 0017 6          283          385            0            0            0            0
 0018 6          223          304            0            0            0            0
 0019 6          361          324            0            0            0            0
 0020 6          421          481            0            0            0            0
 0021 6          292          578            0            0            0            0
 0022 6          146          540            0            0            0            0
 0023 6           59          479            0            0            0            0
 0024 6           71          549            0            0            0            0
 0025 6           57          600            0            0            0            0
 0026 6           79          650            0            0            0            0
 0027 6          151          698            0            0            0            0
 0028 6          217          722            0            0            0            0
 0029 6          303          729            0            0            0            0
 0030 6          398          721            0            0            0            0
 0031 6          455          694            0            0            0            0
 0032 6          511          631            0            0            0            0
 0033 6          520          563            0            0            0            0
 0034 6          510          479            0            0            0            0
 0035 6          449          394            0            0            0            0
 0036 6          366          389            0            0            0            0
 0037 6          296          444            0            0            0            0
 0038 6          247          479            0            0            0            0
 0039 6          218          521            0            0            0            0
 0040 6          185          579            0            0            0            0
 0041 6          117          599            0            0            0            0
 0042 6          153          639            0            0            0            0
 0043 6          209          664            0            0            0            0
 0044 6          272          678            0            0            0            0
 0045 6          336          681            0            0            0            0
 0046 6          410          668            0            0            0            0
 0047 6          456          637            0            0            0            0
 0048 6          462          590            0            0            0            0
 0049 6          472          523            0            0            0            0
 0050 6          415          534            0            0            0            0
 0051 6          338          457            0            0            0            0
 0052 6          381          496            0            0            0            0
 0053 6          287          501            0            0            0            0
 0054 6          348          544            0            0            0            0
 0055 6          422          604            0            0            0            0
 0056 6          359          628            0            0            0            0
 0057 6          286          628            0            0            0            0
 0058 6          228          614            0            0            0            0
 0059 6          246          564            0            0            0            0
 0060 6          546          396            0            0            0            0
 0061 6          504          309            0            0            0            0
 0062 6          542          259            0            0            0            0
 0063 6          542          166            0            0            0            0
 0064 6          463          125            0            0            0            0
 0065 6          452           55            0            0            0            0
 0066 6          409          123            0            0            0            0
 0067 6          399          206            0            0            0            0
 0068 6          402          266            0            0            0            0
 0069 6          450          258            0            0            0            0
 0070 6          509          222            0            0            0            0
 0071 6          230          239            0            0            0            0
 0072 6          182          229            0            0            0            0
 0073 6          213          166            0            0            0            0
 0074 6          256          118            0            0            0            0
 0075 6          299          148            0            0            0            0
 0076 6          357          155            0            0            0            0
 0077 6          323           96            0            0            0            0
 0078 6          290           49            0            0            0            0
 0079 6          201          109            0            0            0            0
 0080 6          153          126            0            0            0            0
 0081 6          147           74            0            0            0            0
 0082 6          106          136            0            0            0            0
 0083 6          102          185            0            0            0            0
 0084 6          101          239            0            0            0            0
 0085 6           82          301            0            0            0            0
 0086 6          110          366            0            0            0            0
 0087 6          121          417            0            0            0            0
 0088 6          117          473            0            0            0            0
 0089 6          176          478            0            0            0            0
 0090 6          214          367            0            0            0            0
 0091 6          268          336            0            0            0            0
 0092 6          319          348            0            0            0            0
 0093 6           98          702            0            0            0            0
 0094 6           44          718            0            0            0            0
 0095 6           55          761            0            0            0            0
 0096 6          107          760            0            0            0            0
 0097 6          168          763            0            0            0            0
 0098 6          257          764            0            0            0            0
 0099 6          350          761            0            0            0            0
 0100 6          447          764            0            0            0            0
 0101 6          526          761            0            0            0            0
 0102 6          511          704            0            0            0            0
 0103 6          568          688            0            0            0            0
 0104 6          558          605            0            0            0            0
 0105 6          561          516            0            0            0            0
 0106 6          467          447            0            0            0            0
 0107 6          499          365            0            0            0            0
 0108 6           91           64            0            0            0            0
 0109 6           39           38            0            0            0            0
 0110 6           34          161            0            0            0            0
 0111 6          346           39            0            0            0            0
 0112 6          398           36            0            0            0            0
 0113 6          498           28            0            0            0            0
 0114 6          569           32            0            0            0            0
 0115 6          569          109            0            0            0            0
 0116 6          512          124            0            0            0            0
 0117 6           26          433            0            0            0            0
 0118 6           30          655            0            0            0            0
 0119 6          397          432            0            0            0            0
 0120 6          559          453            0            0            0            0
 0121 6          555          329            0            0            0            0

dmic004.hbl

 ; DAT/DAT  dmic004.hbl.DAT   Thu Aug 10 20:15:31 2006
 0001 6           65          105            0            0            0            0
 0002 6          143          105            0            0            0            0
 0003 6          237          116            0            0            0            0
 0004 6          353          130            0            0            0            0
 0005 6          477          172            0            0            0            0
 0006 6          331          229            0            0            0            0
 0007 6          161          228            0            0            0            0
 0008 6           79          234            0            0            0            0
 0009 6           87          326            0            0            0            0
 0010 6          177          367            0            0            0            0
 0011 6          294          366            0            0            0            0
 0012 6          230          285            0            0            0            0
 0013 6          423          294            0            0            0            0
 0014 6          239          193            0            0            0            0
 0015 6          435           80            0            0            0            0
 0016 6          306           57            0            0            0            0
 0017 6          293          152            0            0            0            0
 0018 6          403          196            0            0            0            0
 0019 6          340          311            0            0            0            0
 0020 6          276          268            0            0            0            0
 0021 6          147          497            0            0            0            0
 0022 6          201          511            0            0            0            0
 0023 6          265          525            0            0            0            0
 0024 6          345          534            0            0            0            0
 0025 6          420          542            0            0            0            0
 0026 6          502          553            0            0            0            0
 0027 6          482          476            0            0            0            0
 0028 6          397          464            0            0            0            0
 0029 6          335          463            0            0            0            0
 0030 6          260          445            0            0            0            0
 0031 6          208          439            0            0            0            0
 0032 6          132          421            0            0            0            0
 0033 6           69          414            0            0            0            0
 0034 6           63          459            0            0            0            0
 0035 6           55          547            0            0            0            0
 0036 6           89          624            0            0            0            0
 0037 6          190          634            0            0            0            0
 0038 6          147          575            0            0            0            0
 0039 6          261          586            0            0            0            0
 0040 6          209          575            0            0            0            0
 0041 6          250          634            0            0            0            0
 0042 6          319          609            0            0            0            0
 0043 6          385          588            0            0            0            0
 0044 6          441          599            0            0            0            0
 0045 6          492          608            0            0            0            0
 0046 6          544          618            0            0            0            0
 0047 6          297          659            0            0            0            0
 0048 6          355          652            0            0            0            0
 0049 6          191          719            0            0            0            0
 0050 6          133          685            0            0            0            0
 0051 6           80          714            0            0            0            0
 0052 6           35          658            0            0            0            0
 0053 6          258          716            0            0            0            0
 0054 6          371          731            0            0            0            0
 0055 6          472          721            0            0            0            0
 0056 6          409          669            0            0            0            0
 0057 6          476          664            0            0            0            0
 0058 6          540          676            0            0            0            0
 0059 6          563          751            0            0            0            0
 0060 6          430          759            0            0            0            0
 0061 6          301          765            0            0            0            0
 0062 6          318          717            0            0            0            0
 0063 6          236          387            0            0            0            0
 0064 6          362          398            0            0            0            0
 0065 6          417          401            0            0            0            0
 0066 6          474          406            0            0            0            0
 0067 6          539          412            0            0            0            0
 0068 6          557          473            0            0            0            0
 0069 6          387          347            0            0            0            0
 0070 6          373          259            0            0            0            0
 0071 6          255          329            0            0            0            0
 0072 6          307          417            0            0            0            0
 0073 6          446          350            0            0            0            0
 0074 6          502          350            0            0            0            0
 0075 6          558          349            0            0            0            0
 0076 6          472          301            0            0            0            0
 0077 6          527          297            0            0            0            0
 0078 6          426          243            0            0            0            0
 0079 6          481          246            0            0            0            0
 0080 6          343          183            0            0            0            0
 0081 6          370           78            0            0            0            0
 0082 6          414          135            0            0            0            0
 0083 6          498          107            0            0            0            0
 0084 6          539          166            0            0            0            0
 0085 6          543          227            0            0            0            0
 0086 6          562          101            0            0            0            0
 0087 6          532           45            0            0            0            0
 0088 6          477           46            0            0            0            0
 0089 6          187          157            0            0            0            0
 0090 6          127          170            0            0            0            0
 0091 6           62          170            0            0            0            0
 0092 6          126          276            0            0            0            0
 0093 6          179          302            0            0            0            0
 0094 6          117          369            0            0            0            0
 0095 6          104           52            0            0            0            0
 0096 6           45           48            0            0            0            0
 0097 6          174           52            0            0            0            0
 0098 6          234           49            0            0            0            0
 0099 6           50          280            0            0            0            0
 0100 6           37          348            0            0            0            0
 0101 6          124          748            0            0            0            0
 0102 6          234          765            0            0            0            0
 0103 6          102          524            0            0            0            0
 0104 6          553          552            0            0            0            0
 0105 6           29          737            0            0            0            0
 0106 6           77          776            0            0            0            0
 0107 6          314          104            0            0            0            0
 0108 6          403           32            0            0            0            0
 0109 6          210          238            0            0            0            0
 0110 6          285          207            0            0            0            0
 0111 6          502          767            0            0            0            0
 0112 6          351          771            0            0            0            0
 0113 6          178          768            0            0            0            0
 0114 6          225          677            0            0            0            0
 0115 6          138          635            0            0            0            0
 0116 6           95          573            0            0            0            0
 0117 6          304          557            0            0            0            0
 0118 6          304          500            0            0            0            0
 0119 6          463          525            0            0            0            0
 0120 6           30          218            0            0            0            0

1. Windowing :

b17.fed

;-----------------------------------------------------------------!
; b17.fed/hbl : batch for boxing images from the SPIDER image
;-----------------------------------------------------------------!

x99=1.                                       ; Number of the micrograph

; PARAMETERS
x76=120                                      ; last image number
x81=100.                                     ; image dimension
x82=x81/2.                                   ; 1/2 image dimension

; INPUTS:
fr l
[coords]../doc/dmic00{*x99}                  ; image coords (from WEB)
fr l
[micrograph]../micrographs/MIC00{*x99}       ; untilted micrograph

; OUTPUTS:
fr l
[images]../images/win{*x99}{***x10}          ; windowed images

; END BATCH HEADER
;-----------------------------------------------------------------!

md
tr on

do lb2 x99=1,4

; IF WEB HAS THIS BUG WITH FILES.DAT rather than FILES.hbl
;vm
;cp ../doc/dmicd00{*x99}.DAT ../doc/dmic00{*x99}.hbl

;-----[ Starts the do loop of the boxing : 

do lb1 x10=1,x76

;   reads central X and Y coordinates for each particle in the micrograph
    ud x10,x11,x12
    [coords]

    x11=x11*2
    x12=x12*2

;   subtract 1/2 image dimension from center coordinates
    X11=X11-x82
    X12=X12-x82

;   boxing out of each particle in a set of small images
    wi
    [micrograph]
    [images]
    x81,x81
    X11,X12

lb1
lb2
en

2. Estimation du Defocus et des paramètres de CTF :

b18.fed

;-----------------------------------------------------------------!
; b18.fed/hbl : calculates average power spectrum of a micrograph
;-----------------------------------------------------------------!

x99=2.                                ; Number of micrograph

; PARAMETERS:
x31=512.                              ; window size of small pieces (Sx=Sy)
x36=50.                               ; % of the overlap in X
x37=50.                               ; % of the overlap in Y
x56=512.                              ; dist. from the edge (X)
x59=512.                              ; dist. from the edge (Y)

; INPUTS:
fr l
[mic]../micrographs/MIC                    ; micrograph

; OUTPUTS:
fr l
[spectrum]../r2d/pow                    ; power spectrum

fr l
[doc]../doc/dpws                        ; radial profile docfile

; END BATCH HEADER
;-----------------------------------------------------------------!

md
tr on

FI x23,x24                           ; gets dimensions of the full image
[mic]{***x99}
(12,2)

; x31 = large window size
; x87=((x23-2*x56)*(x24-2*x59))number of pieces in this micrograph

x38=100/(100-x36)                    ; normalization of % of X overlap
x39=100/(100-x37)                    ; normalization of % of Y overlap

x26=INT(x38*((x23-2*x56)/x31-1)+1)   ; number of pieces (X)
x29=INT(x39*((x24-2*x59)/x31-1)+1)   ; number of pieces (Y)

x94=0.

;---------------------( Loops over X and Y )---------------------!

do lb2 x12=1,x29
x21=(x31/x39)*(x12-1)+x59            ; Y-direction
do lb3 x13=1,x26
x22=(x31/x38)*(x13-1)+x56            ; X-direction

wi
[mic]{***x99}                        ; get small pieces of the input image
_5
x31,x31                              ; size of small pieces
x22,x21                              ; coordinates of the upper left corner

ra                                   ; correct ramp effects
_5
_6

pw                                   ; calculates power spectrum of each small piece
_6
_7

wu
_7
_8

x94=x94+1

if (x94.ge.2) then
   ad
   _3
   _8
   _3
   *
else
   cp
   _8
   _3
endif

lb3

lb2

cp                                  ; write the output file
_8
[spectrum]{***x99}

; create the document file, with column headings and spatial freq. column
ro
_8
_9                                  ; 1D rotational average

li d
_9
_10
r
(1)

; labels for columns in output file
SD /     amplitude     x-axis      spat.freq.
[doc]{***x99}

x71 = x31/2                          ; 1/2 large window size

do lb5 x70=1,x71
   ud ic,x70,x72,x73
   _10

   x74=x70/(2.0*x71)                 ; computes spat.frequencies

   sd x70,x72,x73,x74
   [doc]{***x99}

lb5
ud ice
_10

en

b11.fed

;---------------------------------------------------------------------------!
; b11.fed/hbl : Creating symmetry document files taking into account 
;		the D6 point-group symmetry of Lumbricus hemoglobin :
;---------------------------------------------------------------------------!
md
tr on

; OUTPUTS:
fr l
[top_sym]../doc/d6top    ; top-view symmetry doc file
fr l
[side_sym]../doc/d6side  ; side-view symmetry doc file

; END BATCH HEADER

;   D6 Symmetry for hexagonal top views
;   6-fold axis parallel to Z axis)
do lb1 x10=1,12
    rr x11
    0.0,0.0,0.0,0.0,0.0,0.0,0.0,60.,120.,180.,240.,300.
    rr x12
    0.0,0.0,0.0,0.0,0.0,0.0,180.,180.,180.,180.,180.,180.
    rr x13
    0.0,60.,120.,180.,240.,300.,0.0,0.0,0.0,0.0,0.0,0.0

    sd x10,x13,x12,x11
    [top_sym]
lb1

;   D6 Symmetry for rectangular side views 
;   (6-fold axis parallel to Y axis)
do lb2 x20=1,12
    rr x11
    0.0,0.0,0.0,0.0,0.0,0.0,180.0,180.0,180.0,180.,180.,180.
    rr x12
    0.0,60.0,120.,180.,240.,300.,0.0,60.,120.,180.,240.,300.
    rr x13
    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
    sd x20,x13,x12,x11
    [side_sym]
lb2

en d
 

3. 3D projection matching :

b19.fed

;------------------------------------------------------------------------!
; b19.fed/hbl : Creates a 3D mask and selection docfiles for computing
;               the odd and even volumes and resolution limits at each
;               alignment cycle. It also creates the first reference 
;		volume low-pass filtered to 35A resolution.
;------------------------------------------------------------------------!

x99=1.

; PARAMETERS:
x79=120.                                      ; number of images

; INPUTS:
FR L
[vol]../r3d/vref                              ; current volume

; OUTPUTS:
FR L
[oddsel]../doc/dodd                           ; Selection docfile (odd)
FR L
[evensel]../doc/deven                         ; Selection docfile (even)
FR L
[mask]../r3d/mask                             ; Mask
FR L
[seltotal]../doc/seltot01                     ; Output file

; END BATCH HEADER
;-----------------------------------------------------------------------!

md
tr on

DOC CREATE
[seltotal]
(1)
(1-x79)

DOC SPLIT
[seltotal]
[oddsel]
[evensel]

; low-pass filter the first reference volume to 35A resolution

fq
../makedata/vcem011 
ttt 
5
0.1    
0.01
pd
ttt 
[vol]01 
(100,100,100)
 B
(11,11,11)
de

; Prepare the mask for 3D FSC estimation of resolution :

; Masks half-volumes
TH M
[vol]01
_1
B
(0.305)
;
FQ NP
_1
_2
(5)
(0.1)
(0.01)
;
TH M
_2
_3
B
(0.045)
;
FQ NP
_3
_4
(5)
(0.1)
(0.01)
;
TH M
_4
_5
B
(0.5)
;
FQ NP
_5
[mask]
(5)
(0.1)
(0.02)

en

b20.fed

;------------------------------------------------------------------------!
; b20.fed/hbl : Reference-based alignment with SPIDER operation AP REF
;------------------------------------------------------------------------!

; PARAMETERS:
x74=1.                                        ; First cycle number
x75=3.                                        ; Last cycle number
x79=120.                                      ; number of images
x56=47.                                       ; radius of projection of the volume
x55=24                                        ; alignment shift (pixels) for AP REF
x54=5                                         ; first ring
x98=x56-2.                                    ; last ring for AP REF
x97=1.                                        ; 1st reference volume copy
x14=0.1429                                    ; Nyquist frequency

; INPUTS:
FR L
[vol]../r3d/vref                              ; current volume
FR L
[unaligned_images]../images/win{*x99}         ; unaligned images (no stack!)
FR L
[dsym]../doc/d6top                            ; Symmetry docfile
FR L
[oddsel]../doc/dodd                           ; Selection docfile (odd)
FR L
[evensel]../doc/deven                         ; Selection docfile (even)
FR L
[seltotal]../doc/seltot01                     ; Selection docfile
FR L
[mask]../r3d/mask                             ; Mask

; OUTPUTS:
FR L
[iter_ang_voea]../doc/angvoea{**x76}          ; angle voea file
FR L
[iter_select_voea]../doc/selvoea{**x76}       ; angle voea selection file
FR L
[temp_ref_projs]../images/refproj{**x76}      ; volume projections at each cycle
FR L
[next_align]../doc/align{*x99}{**x76}         ; align output file
FR L
[align]../doc/align{*x99}{**x96}              ; previous cycle align docfile
FR L
[next_aligned_images]../images/ali{*x99}{**x76}     ; next aligned images
FR L
[aligned_images]../images/ali{*x99}{**x96}    ; current aligned images
FR L
[next_vol]../r3d/vol{*x99}{***x76}            ; next volume
FR L
[oddvol]../r3d/odd{*x99}                      ; odd volume
FR L
[evenvol]../r3d/even{*x99}                    ; even volume
FR L
[nextd]../doc/dresol{*x99}                    ; resolution docfile

; END BATCH HEADER
;-----------------------------------------------------------------------!

md
tr on

do lb9 x99=1,4

; Inquires if files exist
IQ FI x88
[iter_ang_voea]
IF (x88.EQ.1) THEN
    DE
    [iter_ang_voea]
ENDIF
;
IQ FI x88
[iter_select_voea]
IF (x88.EQ.1) THEN
    DE
    [iter_select_voea]
ENDIF

;cp
;../r3d/vtot01
;[vol]{**x97}

; Cycles to be done
DO LB1 x76=x74,x75

x86=x76+1                             ; defines following cycle
x96=x76-1                             ; defines previous cycle to delete big files

RR x42                                           ; angular restriction
0.,0.,0.
RR x41                                           ; delta theta for projection
12.,8.,5.

IQ FI x88
[temp_ref_projs]
IF (x88.EQ.1) THEN
    DE
    [temp_ref_projs]
ENDIF

; VO EA creates angular document file
VO EA,x53
x41                                          ; angular step for the theta angles
(0.,90.)                                     ; Range of theta angle:
(0.,60.)                                     ; Range of phi angle
[iter_ang_voea]                              ; ref angle doc file

DOC CREATE
[iter_select_voea]                           ; output document file
(1)                                          ; column number to be filled
(1-x53)                            ; Values to be placed in the specified column

; Projection of the volume
PJ 3Q
[vol]{**x76}
x56                                          ; radius of the object
[iter_select_voea]
[iter_ang_voea]
[temp_ref_projs]@******

IF(x76.EQ.1) THEN
; cycle 1: non-cumulative parameters
AP REF
[temp_ref_projs]@******
(1-x53)
x55                                                ; shift search range
(x54,x98,1)                                        ; first, last ring and skip
[iter_ang_voea]                                    ; ref angles (input)
SCR_{**x76}                                   ; no scratch file if fits in-core
[unaligned_images]***
(1-x79)
*                               ; no previous cycle => no previous alignment doc file
x42
(1)                                                ; check mirrored projections
[next_align]                                       ; output : alignment doc file


ELSE
; if we do not start from beginning (if there were previous cycles): cumulative parameters
AP REF
[temp_ref_projs]@******
(1-x53)
x55                                           ; shift search range
(x54,x98,1)                                   ; first, last ring and skip
[iter_ang_voea]                               ; ref angles (input)
SCR_{**x76}                                   ; no scratch file if fits in-core
[aligned_images]****                          ; current aligned images
(1-x79)                                       ; all the images
[align]                        ; here previous cycle => previous alignment doc file
x42
(1)                                           ; check mirrored projections
[next_align]                                  ; output : alignment doc file
ENDIF

; Creates rotated and shifted images from this cycle
; Retrieve new alignment file data (just created above)
DO LB6 x21=1,x79
;          PSI,THE,PHI, REF#,EXP#,  ANG,SX,SY,   NPROJ,DIFF,CCROT
UD IC,x21, x80,x80,x80, x81,x80,    x61,x62,x63, x80,x12,x31
[next_align]                                 ; Doc file just created by 'AP REF'

; Apply combined transformation to original exp. sample image
IF (x81.GE.0) THEN		             ; No mirror
   RT SQ			             ; Rotate & shift
   [unaligned_images]{***x21}             ; Unaligned original images (stack)
   [next_aligned_images]{****x21}	     ; Current aligned images (output)
   x61  			             ; Inplane rotation angle
   x62,x63			             ; Shifts

ELSE				             ; Mirrored
   RT SQ			             ; Rotate & shift
   [unaligned_images]{***x21}             ; Unaligned original image
   _1				             ; Temp. output file
   x61  			             ; Inplane rotation angle
   x62,x63			             ; Shifts

   MR				             ; Mirror
   _1				             ; Rotated, unaligned original image
   [next_aligned_images]{****x21}	     ; Current aligned images (output)
   Y				             ; Around Y axis
ENDIF
LB6

; Close doc files	
UD ICE
[next_align]		                     ; Finished with align. doc file

; 3D reconstruction
BP 3F
[next_aligned_images]****
[seltotal]
[next_align]
[dsym]
[next_vol]

; Calculates half-volumes
BP 3F
[next_aligned_images]****
[oddsel]
[next_align]
[dsym]
_11

BP 3F
[next_aligned_images]****
[evensel]
[next_align]
[dsym]
_12

MU
_11
[mask]
[oddvol]{**x76}
*
PD
[oddvol]{**x76}
_21
(256,256,256)
b
(79,79,79)

MU
_12
[mask]
[evenvol]{**x76}
*
PD
[evenvol]{**x76}
_22
(256,256,256)
b
(79,79,79)

; Resolution calculation
RF 3 x69,x37                  ; Phase Residual & Fourier shell correlation
_21                           ; Odd volume
_22                           ; Even volume
(0.5)                         ; Ring width
(0.2,2.0)                     ; Scale factor
C                             ; Missing cone/wedge angle 
(90.0)                        ; Maximum tilt angle
(10.4)                        ; Factor for noise comparison
[nextd]{**x76}                ; Resolution doc file

; Calculates resolution
x66=0.5/(x14*x37)

IF (x76.EQ.1) THEN
      SD /    Iteration  resolution
      [next]
   ENDIF

   SD x76,x76,x66,x37
   [nextd]{**x76}

FQ NP
[next_vol]
_22
(5)                            ; 5: Fermi low-pass
x37                            ; at the resolution limit just measured
(0.02)

; Volume centration
CG PH,X11,X12,X13,X21,X22,X23
_22
X21=-X21
X22=-X22
X23=-X23
SH 3
_22
[vol]{**x86}
x21,x22,x23

lb1

lb9

en

4. Wiener filtering :

b21.fed

;------------------------------------------------------------------------!
; b21.fed/hbl : Wiener filtering on the 4 defocus groups
;               Merging and estimation of FSC
;------------------------------------------------------------------------!

; PARAMETERS:
x14=0.1429             ; Nyquist frequency
x60=3.5                ; pixel size in A
x61=0.5                ; Cs = 0.5 mm
x62=25000.             ; Defocus value in A
x63=0.02508            ; lambda value for 200 kV
x66=1/(2*x60)          ; maximum spatial frequency (1/(2*Pixel size in A)
x67=0.00431            ; source size in A-1
x68=100.               ; defocus spread in A
x69=0                  ; astigmatism and azimuth angle (both set to zero here)
x70=0.07               ; amplitude contrast ratio
x71=0.07               ; gaussian envelope half-width
x72=-1                 ; sign related to underfocus
x86=3.                 ; number of cycles performed
x99=4                  ; number of micrographs

; INPUTS:
FR L
[mask]../r3d/mask                        ; Mask
FR L
[oddvol]../r3d/odd{*x99}                 ; odd volume
FR L
[evenvol]../r3d/even{*x99}               ; even volume

; OUTPUTS:
FR L
[ctf_template]../r3d/ctf{**x99}          ; ctf template for Wiener filtering
FR L
[next_vol]../r3d/vol{*x99}***            ; raw volume
FR L
[next_val]../r3d/vctf{***x86}            ; ctf corrected global volume
FR L
[nextodd]../r3d/vctfodd{***x86}          ; ctf corrected odd volume
FR L
[nexteven]../r3d/vctfeven{***x86}        ; ctf corrected even volume
FR L
[nextctf]../doc/dctfresol{***x86}       ; ctf corrected resolution docfile


; END BATCH HEADER
;-----------------------------------------------------------------------!

md
tr on

do lb1 x99=1,4

RR x62
25000.,32000.,39000.,36000.

TF C3
[ctf_template]
x61
x62,x63
(100.)
x66
x67,x68
x69,x69
x70,x71
x72

cp
../r3d/vol{*x99}{***x86}
../r3d/int{***x99}
cp
../r3d/odd{*x99}{**x86}
../r3d/odd{***x99}
cp
../r3d/even{*x99}{**x86}
../r3d/even{***x99}

lb1

TF CTS                           ; Transfer Function - CTF correction
   ../r3d/int***                 ; Template for 3D volumes               (input)
   (1-4)                         ; Group Selection File                  (input)
   [ctf_template]                ; Template for 3D ctf file              (input)
   (0.5)                         ; SNR
   [next_val]                    ; CTF corrected volume                  (output)

   TF CTS                        ; Transfer Function - CTF correction
   ../r3d/odd***                 ; Template for 3D odd volumes           (input)
   (1-4)                         ; Group Selection File                  (input)
   [ctf_template]                ; Template for 3D ctf files - work/ctf  (input)
   (0.5)                         ; SNR
   [nextodd]                     ; Odd volume                            (output)

   TF CTS                        ; Transfer Function - CTF correction
   ../r3d/even***                ; Template for 3D even volumes          (input)
   (1-4)                         ; Group Selection File                  (input)
   [ctf_template]                ; Template for 3D ctf files - work/ctf  (input)
   (0.5)                         ; SNR
   [nexteven]                    ; Even output volume                    (output)

MU
[nextodd]
[mask]
_11
*
PD
_11
_21
(256,256,256)
b
(79,79,79)

MU
[nexteven]
[mask]
_12
*
PD
_12
_22
(256,256,256)
b
(79,79,79)

; Resolution calculation
RF 3 x69,x37                  ; Phase Residual & Fourier shell correlation
_21                           ; Odd volume
_22                           ; Even volume
(0.5)                         ; Ring width
(0.2,2.0)                     ; Scale factor
C                             ; Missing cone/wedge angle 
(90.0)                        ; Maximum tilt angle
(10.4)                        ; Factor for noise comparison
[nextctf]                     ; Global resolution doc file

; Calculates resolution
x66=0.5/(x14*x37)

IF (x86.EQ.1) THEN
      SD /    Iteration  resolution
      [nextctf]
   ENDIF

   SD x86,x86,x66,x37
   [nextctf]
en

b22.fed

;------------------------------------------------------------------------!
; b22.fed/hbl : Wiener filtering on the 4 defocus groups
;               Merging and estimation of FSC
;		when no flaw of alignment or CTF estimation
;		limit the efficiency of Wiener filtering
;------------------------------------------------------------------------!
md
tr on
;
; PARAMETERS:
x14=0.1429             ; Nyquist frequency
x60=3.5                ; pixel size in A
x61=0.5                ; Cs = 0.5 mm
x62=25000.             ; Defocus value in A
x63=0.02508            ; lambda value for 200 kV
x66=1/(2*x60)          ; maximum spatial frequency (1/(2*Pixel size in A)
x67=0.00431            ; source size in A-1
x68=100.               ; defocus spread in A
x69=0                  ; astigmatism and azimuth angle (both set to zero here)
x70=0.07               ; amplitude contrast ratio
x71=0.07               ; gaussian envelope half-width
x72=-1                 ; sign related to underfocus
x86=4.                 ; number of cycles performed
x99=4                  ; number of micrograph
x76=1.                 ; constante

; INPUTS:
FR L
[mask]../r3d/mask                        ; Mask


do lb1 x10=1,4

; 3D reconstruction
BP 3F
../images/win{*x10}***
../doc/seltot01
../doc/dproj{***x10}
../doc/d6top
../r3d/volraw{***x10}

; Calculates half-volumes
BP 3F
../images/win{*x10}***
../doc/dodd
../doc/dproj{***x10}
../doc/d6top
../r3d/volrawodd{***x10}

BP 3F
../images/win{*x10}***
../doc/deven
../doc/dproj{***x10}
../doc/d6top
../r3d/volraweve{***x10}

MU
../r3d/volrawodd{***x10}
[mask]
_11
*
PD
_11
_21
(256,256,256)
b
(79,79,79)

MU
../r3d/volraweve{***x10}
[mask]
_12
*
PD
_12
_22
(256,256,256)
b
(79,79,79)

; Resolution calculation
RF 3 x69,x37                  ; Phase Residual & Fourier shell correlation
_21                           ; Odd volume
_22                           ; Even volume
(0.5)                         ; Ring width
(0.2,2.0)                     ; Scale factor
C                             ; Missing cone/wedge angle
(90.0)                        ; Maximum tilt angle
(10.4)                        ; Factor for noise comparison
../doc/dresvolraw{***x10}     ; Resolution doc file

; Calculates resolution
x66=0.5/(x14*x37)
SD /    Iteration  resolution
../doc/dresvolraw{***x10}
SD x76,x76,x66,x37
../doc/dresvolraw{***x10}

de
_11
de
_12
lb1

;---------------------------------------------------------------


TF CTS                           ; Transfer Function - CTF correction
   ../r3d/volraw***              ; Template for 3D volumes         
   (1-4)                         ; Group Selection File             
   ../r3d/ctf**                  ; Template for 3D ctf file       
   (0.5)                         ; SNR
   ../r3d/volctftot              ; CTF corrected volume            

   TF CTS                        ; Transfer Function - CTF correction
   ../r3d/odd***                 ; Template for 3D odd volumes    
   (1-4)                         ; Group Selection File          
   ../r3d/ctf**                  ; Template for 3D ctf files 
   (0.5)                         ; SNR
   ../r3d/volctfoddtot           ; Odd volume             

   TF CTS                        ; Transfer Function - CTF correction
   ../r3d/even***                ; Template for 3D even volumes 
   (1-4)                         ; Group Selection File          
   ../r3d/ctf**                  ; Template for 3D ctf files 
   (0.5)                         ; SNR
   ../r3d/volctfevetot           ; Even output volume         

MU
../r3d/volctfoddtot
[mask]
_11
*
PD
_11
_21
(256,256,256)
b
(79,79,79)

MU
../r3d/volctfevetot
[mask]
_12
*
PD
_12
_22
(256,256,256)
b
(79,79,79)



; Resolution calculation
RF 3 x69,x37                  ; Phase Residual & Fourier shell correlation
_21                           ; Odd volume
_22                           ; Even volume
(0.5)                         ; Ring width
(0.2,2.0)                     ; Scale factor
C                             ; Missing cone/wedge angle
(90.0)                        ; Maximum tilt angle
(10.4)                        ; Factor for noise comparison
../doc/dresvolctftot          ; Global resolution doc file

; Calculates resolution
x66=0.5/(x14*x37)
SD /    Iteration  resolution
../doc/dresvolctftot     
SD x76,x76,x66,x37
../doc/dresvolctftot     
en 

b23.fed

;------------------------------------------------------------------------------!
; b23.fed/hbl : CREATES FOUR ARTIFICIAL POWER SPECTRUM PROFILES
;------------------------------------------------------------------------------!
;		defocus 1 = 25000 A   dapws001.hbl
;		defocus 2 = 32000 A   dapws002.hbl
;		defocus 3 = 39000 A   dapws003.hbl
;		defocus 4 = 36000 A   dapws004.hbl
;------------------------------------------------------------------------------!
MD
TR ON
;
;------------------------------------------------------------------------------!
; creates the 4 CTF complexe files and apply them on the micrograph + noise
;------------------------------------------------------------------------------!
x60=3.5                ; pixel size in A
x61=0.5                ; Cs = 0.5 mm
x62=25000.             ; Defocus value in A
x63=0.02508            ; lambda value for 200 kV
x64=1200               ; X size of micrograph
x65=1600               ; Y size of micrograph
x66=1/(2*x60)          ; maximum spatial frequency (1/(2*Pixel size in A)
x67=0.00431            ; source size in A-1
x68=100.               ; defocus spread in A
x69=0                  ; astigmatism and azimuth angle (both set to zero here)
x70=0.07               ; amplitude contrast ratio
x71=0.07               ; gaussian envelope half-width
x72=-1                 ; sign related to underfocus
do lb5 x10=1,4
;
RR x62
25000.,32000.,39000.,36000.
;
x98=1/(2.*x60)
tf d
../r2d/int001
x61
x62,x63
(512)
x98
x67,x68
x69,x69
x70,x71
D
;
ro
../r2d/int001
_3
;
li d
_3
../doc/dapws{***x10}
r
(1)
lb5
;
;-----[ delete intermediate files :
de
int001
;
en