(* 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 are replaced with user defined values   *)
(* from within Appion.                                                 *)
(* ====================================================================*) 

tiltseries {

 W = { 3838, 3710 } (* AP orig window *)

 O = 178.73100983 	(* AP orig thickness *)

 S = 8             (* AP sampling *)

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

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

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

 sampling: S

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

 preprocessing: true  (* AP enable or 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.0, 999999.0 }   (* 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: { 454, 438 }  (* If working on your own, consider using N - 2.5 * apodization *)
   }

   lowpass {
     diameter:    { 0.17904, 0.17904 } (* AP lowpass diameter *)  (* If working on your own, consider using { lp_diam_x, lp_diam_y } * S *)
     apodization: { 0.071616, 0.071616 } (* AP lowpass apodization *)  (* If working on your own, consider using { lp_apod_x, lp_apod_y } * S *)
   }

   highpass {
     diameter:    { 0.00431213872832, 0.00431213872832 } (* AP highpass diameter *)  (* If working on your own, consider using { lp_diam_x, lp_diam_y } * S *)
     apodization: { 0.00862427745665, 0.00862427745665 } (* AP highpass apodization *)  (* If working on your own, consider using { hp_apod_x, hp_apod_y } * S *)
   }

 }


 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 {

   estimate: false

   maxcorrection: 999999.0
   maxshift: 999999.0
   translimit: 3429.84807864
   
   norotations: false
   include: "0-999999"  (* AP select specific images in the tilt series *)
 
   exclude: "999999"  (* AP exclude specific images from the tilt series *)
   mask {
     apodization: { 10, 10 }
     width: { 454, 438 }  (* If working on your own, consider using N - 2.5 * apodization *)
   }

   correlation {
     mode: "mcf"      (* AP corr mode *)
     size: { 160, 160 } 
   }

   peaksearch {
     radius: { 300.0, 300.0 }
     cmdiameter: { 0.0, 0.0 } (* AP_optional_cmdiameter *) (* Note: { 0, 0 } is equivalent to turning cmdiameter off *)
   }

 }


 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: { 959, 927, 44 }  (* 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 {  (* AP lowpass map *)
     diameter:    { 0.17904, 0.17904 }  (* If working on your own, consider using { lp_diam_x, lp_diam_y } * S *)
   }

   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/anoble/17aug18i/protomo_alignments/tiltseries0013_thick100/raw"  (* AP path to raw directory *)

 cachedir: "/gpfs/appion/anoble/17aug18i/protomo_alignments/tiltseries0013_thick100/cache"  (* AP directory where cache files are stored *)

 outdir: "/gpfs/appion/anoble/17aug18i/protomo_alignments/tiltseries0013_thick100/out"  (* AP directory where other output files are stored *)

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

}