(* Units are pixels for real space quantities, or reciprocal pixels    *)
(* for reciprocal space quantities, unless otherwise stated. The units *)
(* refer to the sampled image. The spatial frequencies for filters are *)
(* multiplied by the sampling factor and thus refer to the unsampled,  *)
(* raw image.                                                          *)

(* ====================================================================*)
(* comments that start with AP or APc (coarse) user defined values     *)
(* with are replaced from within Appion.                               *)
(* ====================================================================*) 

tiltseries {

 W = { 1855, 1919 } (* AP orig window *)

 O = 283.604269946 	(* AP orig thickness *)

 S = 8             (* AP sampling *)

 N = W/S (* window size at sampling S *)

 T = O/S           (* thickness at sampling S *)

 F = 0.743187393571         (* AP cos( highest tilt angle ) *)

 sampling: S

 binning: true  (* AP enable/disable binning of raw images *)

 preprocessing: true  (* AP enable/disable preprocessing of raw images *)
 
 select: "0-999999"  (* AP select specific images in the tilt series *)
 
 exclude: "999999"  (* AP exclude specific images from the tilt series *)

 preprocess {

   logging: false

   border: 100

   clip: { 3.5, 3.5 }   (* specified as a multiple of the standard deviation *)

   thr: { 0, 999999 }   (* specified as density values *)

   grow: 0
   
   mask {
     gradient: true
     iter: false
     filter: "median"
     kernel: { 5, 5 }
     clip: { 3.5, 3.5 }
   }

 }

 window {

   size: N
   area: 0.95  (* AP window area *)

   mask {
     apodization: { 10, 10 }
     width: { 231, 239 }  (* AP width1 *)
   }

   lowpass {
     diameter:    { 0.5641664, 0.5641664 } (* AP lowpass diameter *)
     apodization: { 0.22566656, 0.22566656 } (* AP lowpass apodization *)
   }

   highpass {
     diameter:    { 0.00862639755352, 0.00862639755352 } (* AP highpass diameter *)
     apodization: { 0.017252795107, 0.017252795107 } (* AP highpass apodization *)
   }

 }


 reference {

   body: T / F
   slab: true  (* AP slab-like object *)
   select: "0-999999"  (* AP select specific images in the tilt series *)
 
   exclude: "999999"  (* AP exclude specific images from the tilt series *)
 }
 
 
 align {

   include: "0-999999"  (* AP select specific images in the tilt series *)
 
   exclude: "999999"  (* AP exclude specific images from the tilt series *)
   
   gridsearch {
     limit: 2.0
     step: 0.1
   }
   
   mask {
     apodization: { 10, 10 }
     width: { 231, 239 }  (* AP width2 *)
   }

   correlation {
     mode: "mcf"      (* AP corr mode *)
     size: { 192, 192 } 
   }
   
   peaksearch {
     radius: { 1000.0, 1000.0 }
   }

 }


 fit {

   orientation: true
   azimuth: true
   elevation: false
   rotation: true
   scale: false
   include: "0-999999"  (* AP select specific images in the tilt series *)
 
   exclude: "999999"  (* AP exclude specific images from the tilt series *)
   logging: true  (* AP enable diagnostic terminal output *)
   loglevel: 2  (* AP increase verbosity of diagnostic output *)

 }


 map {

   size: { 463, 479, 70 }   (* AP reconstruction map size *)
   body: T / F
   slab: true  (* AP slab-like object *)
   sampling: 8  (* AP reconstruction map sampling *)
   select: "0-999999"  (* AP select specific images in the tilt series reconstruction *)
   
   exclude: "999999"  (* AP exclude specific images from the tilt series reconstruction *)
   lowpass {
     diameter:    { 0.5641664, 0.5641664 }
     apodization: { 0.22566656, 0.22566656 }
   }

   logging: false  (* AP enable diagnostic terminal output *)

 }

 (* prefix: ""   AP prefix for input and output files *)
 
 suffix: ".mrc"  (* AP filetype extension for images *)

 pathlist: "/gpfs/appion/vdandey/17mar18a/protomo_alignments/tiltseries0003/raw"  (* AP path to raw directory *)

 cachedir: "/gpfs/appion/vdandey/17mar18a/protomo_alignments/tiltseries0003/cache"  (* AP directory where cache files are stored *)

 outdir: "/gpfs/appion/vdandey/17mar18a/protomo_alignments/tiltseries0003/out"  (* AP directory where other output files are stored *)

 logging: true  (* AP enable diagnostic terminal output *)

}