-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
101 lines (69 loc) · 4.08 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
PEWR - Parallelized Exit Wave Reconstruction
by Timo Ewalds and Colin Ophus
OVERVIEW
-This code is designed for very fast iterative exit wave reconstruction of two-dimensional
focal series taken with a high-resolution transmission electron microscope (HRTEM).
-PEWR supports padding, resuming previous iterations, regular outputs, geometrically
timed outputs and non-linear spacing of focal planes.
-The motivation behind PEWR is the exit wave reconstruction requires a very large number of iterations. We therefore aimed to make a reconstruction code that is as fast as possible.
-The generic algorithm is described in detail in:
L Allen, W McBride, N O’Leary and M Oxley, Exit wave reconstruction at atomic resolution, Ultramicroscopy 100 (2004) 91–104.
-Alternative, much more developed commercial code is available for MacTempas (www.totalresolution.com).
INSTALLATION
-download source from http://github.com/tewalds/pewr
-Linux: compile by running "make"
-OSX: Install and compile fftw (fftw.org)
compile by running "make" in the PEWR directory
-Windows: ???
DEPENDENCIES
- FFTW: http://www.fftw.org/
- libfftw3-3, libfftw3-dev on Ubuntu
RUNNING PEWR
pewr <config_file>
Pewr will change directories to the config file, so input files and output files
will be read and written relative to the config file.
If Pewr is interrupted before completion, it will finish and output the current
iteration so resuming is possible. A second interrupt will exit immediately.
CONFIGURATION
-PEWR requires a configuration file as an input on the command line.
-This configuration file should contain one input plus argument per line.
-Required inputs: (# gives description)
size <integer> # size of image in pixels.
padding <integer> # size of reconstruction in pixels, must be >= size.
# for zero padding, use padding = size.
psize <number> # pixel dimensions in Angstroms/pixel
lambda <number> # electron wavelength in Angstroms
# 80kV: 0.04176
# 300kV: 0.01969
nplanes <integer> # total number of input planes
qmax <number> # maximum spatial frequency in inverse Angstroms (typical values are near 1)
iters <integer> # number of iterations.
type <string> # image format. Valid formats are: int8, uint8, int16, uint16, int32, uint32, float, double
output <string> # file name stem for the complex double output files.
# A ".#" will be appended onto the end of each output, where # is the iteration number.
-Optional inputs
verbose # Output timing information for each iteration, possibly other stuff in the future
threads <integer> # How many threads to run, number of cores/cpus by default
outputfreq <integer> # How often to output the current exit wave on a linear scale, eg outputfreq = 10: 10, 20, 30, etc
outputgeom <integer> # How often to output the current exit wave on a geometric scale, eg outputgeom = 2: 2, 4, 8, 16, etc
outputlast <integer> # Number of images to output at end of run, default is 1
# Example if iters == 100 and outputlast == 3, iterations 98, 99 and 100 will be written.
guess <filename> <iteration> # Start the simulation with the file referenced by the string in the normal output format,
# starting from the integer iteration
guesstype <float|double> # read the guess file as a floats or doubles. Allows some amount of iterations with floats, then
# run a few more with the higher accuracy of a double
POSSIBLE FUTURE FEATURES
-higher order abberations such as spherical (c3), stigmation (??) or coma (??).
-image alignment.
-suggesting to user approximate number of required iterations.
-stop conditions other than total number of iterations
-optimal focus plane finding.
-over-relaxation factor.
-adaptive relaxation.
-noise filtering (adaptive Wiener).
-late-time "jumping" to the asymptotic result.
KNOWN BUGS
none
CONTACT
programming: timo@ewalds.ca
algorithmic: cophus@gmail.com