instamatic.gridmontage
Classes
GridMontage(ctrl)
Set up an automated montage map.
Source code in src/instamatic/gridmontage.py
16 17 18 19 20 21 22 | |
Methods:
plot()
Simple plot of the stage coordinates.
Source code in src/instamatic/gridmontage.py
197 198 199 200 201 202 203 204 205 206 | |
save(drc=None)
Save the data to the given directory.
drc : str
Path of the output directory. If None, it defaults to the instamatic data directory defined in the config.
Source code in src/instamatic/gridmontage.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
setup(nx, ny, overlap=defaults.gridmontage['overlap'], stage_shift=(0.0, 0.0), binning=None)
Set up the experiment, run GridMontage.start to acquire data.
Parameters:
-
nx(int) âNumber of images to collect int he x/y directions.
-
ny(int) âNumber of images to collect int he x/y directions.
-
overlap(float, default:gridmontage['overlap']) âHow much the images should overlap to calculate the shift between the images.
-
stage_shift(tuple, default:(0.0, 0.0)) âApply a shift to the calculated stage coordinates. For example, to set the origin. Otherwise, the origin is taken at x=0, y=0.
-
binning(int, default:None) âBinning for the images.
Returns:
-
coords(array) âStage coordinates for the montage acquisition
Source code in src/instamatic/gridmontage.py
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 101 102 103 104 105 106 107 108 109 | |
start()
Start the experiment.
Source code in src/instamatic/gridmontage.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | |
to_montage()
Convert the experimental data to a Montage object.
Source code in src/instamatic/gridmontage.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | |
InstamaticMontage
Bases: Montage
Methods:
export(outfile='stitched.tiff')
Export the stitched image to a tiff file.
Parameters:
-
outfile(str, default:'stitched.tiff') âName of the image file.
Source code in src/instamatic/montage.py
61 62 63 64 65 66 67 68 69 70 71 | |
from_montage_yaml(filename='montage.yaml')
classmethod
Load montage from a series of tiff files + montage.yaml
Source code in src/instamatic/montage.py
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 | |
set_calibration(mode, magnification)
Set the calibration parameters for the montage map. Sets the pixelsize and stagematrix from the config files.
Parameters:
-
mode(str) âThe TEM mode used, i.e.
lowmag,mag1,samag -
magnification(int) âThe magnification used
Source code in src/instamatic/montage.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |