Version 19.2 by flenners on 2026-02-04 17:24

Hide last authors
greving 15.1 1 == {{id name="03aReconstructionwithRecoGUI-Preperation:"/}}Preperation: ==
flenners 13.1 2
flenners 17.2 3
4 Open the following link in a browser and log in with your DESY account (not door account!).
5
6 [[https:~~/~~/max-display.desy.de:3389/auth/ssh>>url:https://max-display.desy.de:3443/auth/ssh]]
7
flenners 18.3 8 Start a new XFCE session by clicking on the running mouse:, select browser session
flenners 17.2 9
flenners 18.2 10 [[image:image2021-4-27_13-55-52.png||height="405" width="911"]]
flenners 17.2 11
12
flenners 19.2 13 Open a terminal:
flenners 18.2 14
flenners 19.2 15 [[image:1770222205178-264.png]]
flenners 13.1 16
flenners 19.2 17 In this terminal, type:
flenners 13.1 18
flenners 19.2 19 {{{salloc --partition=psxcpu --nodes=1 --time=06:00:00}}}
flenners 13.1 20
flenners 19.2 21 (((
22
23 )))
24
25 (((
26 (if you need gpu: ~-~-partition=psxgpu )
27 )))
28
29 (((
flenners 13.1 30 //Answer~:// salloc: job [//number//] queued and waiting for resources
flenners 19.2 31 )))
flenners 13.1 32
flenners 19.2 33 (((
flenners 13.1 34 salloc: job [number] has been allocated resources
flenners 19.2 35 )))
flenners 13.1 36
flenners 19.2 37 (((
flenners 13.1 38 salloc: Granted job allocation [number]
flenners 19.2 39 )))
flenners 13.1 40
flenners 19.2 41 (((
flenners 13.1 42 salloc: Waiting for resource configuration
flenners 19.2 43 )))
flenners 13.1 44
flenners 19.2 45 (((
flenners 13.1 46 salloc: Nodes //max-wn035// are ready for job  (name of your node; code after “max-“ can vary, in this example wn035, if you do not get a specific node name, repeat salloc command)
flenners 19.2 47 )))
flenners 13.1 48
49 (% class="code" %)
50 (((
flenners 19.2 51 (((
flenners 13.1 52 ssh max-wn035 (shell to your node)
53 \\module load maxwell mamba
54 )))
flenners 19.2 55 )))
flenners 13.1 56
57 (% class="code" %)
58 (((
59 . mamba-init (. is important! never do without, this can crash your FastX)
60 \\mamba activate /asap3/petra3/gpfs/common/p05/nano/envs/mamba
61 )))
62
63
greving 15.1 64 spyder &
flenners 13.1 65 \\~-~-~-~-~-~-
66 \\\\Spyder will open.
67
68 On the right, choose "file explorer". Navigate to your beamtime folder and find processed/scripts/RecoGUI:
69
70 [[image:attach:image2022-11-1_13-7-14.png||height="250"]]
71
72
73 Important: you need to be in the right folder, else the script will not be able to find a file in the first cell of the script
74
75
76 Open RecoGUI.py by double clicking the file and click "Run" (green arrow)
77
78
79
greving 16.1 80 = {{id name="03aReconstructionwithRecoGUI-LoadingData"/}}Loading Data =
flenners 2.1 81
greving 16.1 82 = =
83
flenners 4.1 84 **TXM DATA**
85
flenners 2.1 86 Go to "Load' tab and select year, enter your beamtime ID (e.g. 11001234) and press "enter" on keyboard.
87
88 Now, the list of your scans will be shown below under "folder". Below folders, there are darks with different exposure times.
89
90 Select the scan you want to reconstruct and choose the corresponding dark images.
91
92 If you recorded your data after 2019, you can directly continue by clicking the "Load" button. This will read all data needed for reconstruction.
93
94 Loading the data can take some time (usually several minutes). The GUI will be blocked during this time.
95
flenners 3.1 96 Continue with next step, "Preparation".
flenners 2.1 97
98
flenners 4.1 99 **HOLOTOMO DATA**
100
flenners 12.1 101 Hint: you have to perform the phase reconstruction of your projections first! This is usually done by beamline staff. Then you can continue:
flenners 4.1 102
flenners 16.2 103 Go to "Load" tab, load processed data.
flenners 4.1 104
flenners 16.2 105 Check the subfolder path of the phase retievals. Standard path is holopipe/phase_retrieval
flenners 5.1 106
flenners 16.3 107 Click on "Load processed"
wirtenss 9.1 108
flenners 5.1 109 You do not need to load any additional dark images.
110
flenners 17.1 111 Skip "Normalize, Minus Log, Rotate" in the Preperation Tab. The optional steps, eg. padding are still optional. (see below)
flenners 5.1 112
113 In principle, you can directly proceed to the third tab "Reconstruction". 
114
115
greving 15.1 116 = {{id name="03aReconstructionwithRecoGUI-Preparationofdataforreconstruction"/}}Preparation of data for reconstruction =
flenners 2.1 117
greving 16.1 118 (**Can be skipped for Holotomography**)
flenners 2.1 119
flenners 4.1 120 Go to "Prep" tab.
flenners 2.1 121
122 The following is usually required for reconstruction:
123
124 Click "Normalize" button. This will take several minutes.
125
126 Click "Minus Log" button.
127
128 Click "Rotate" button.
129
130
131 The following steps are **optional:**
132
greving 15.1 133 **Cropping:** If your samples are significantly (% style="color:#003366" %)__smaller__(%%) than the field of view, you can crop the data to reduce computation time and storage. Draw a rectangle around your sample by keeping the left mouse button pressed. Check that your sample stays inside that rectangle at all angles. If you are happy, press the "crop" button to crop your data.
flenners 2.1 134
135 **Binning:** You can bin your data before reconstruction. Since the detector has a point spread function of 2-3 pixels, it is save to bin by a factor of 2 without loosing spatial resolution. This reduces computation time and storage space needed.
136
flenners 17.1 137 **Padding:** **//RECOMENDED FOR ROI scans//**! If your samples are significantly __larger__ than the field of view, you can pad your data to prevent artifacts at the outer field of view. Example: 100
flenners 2.1 138
139 **Filter Projections before reconstruction:** You can filter the data before reconstruction. This reduces the noise, but also can induce blurring in the data. Only recommended for very noisy data. Filtering after reconstruction is usually better.
140
141
142 **Linogram alignment:** Linogram alignment if sample moved. Ask your local contact if this is necessary.
143
144
145 **Save current stack.** Writes the normalized projections to your beamtime folder.
146
147
greving 15.1 148 = {{id name="03aReconstructionwithRecoGUI-Reconstruction"/}}Reconstruction =
flenners 2.1 149
150
151 **Finding the correct center of rotation. **
152
wirtenss 7.1 153 First, you have to find the correct center of rotation. For this, a single slice is reconstructed with different centers of rotation
flenners 2.1 154
wirtenss 7.1 155 **~1. Rot center: **Defines the rotation center in pixel coordinates. For the start, enter half of your image size (1024 for unbinned data, 512 for data with binning 2.)
flenners 2.1 156
wirtenss 7.1 157 **2. Delta: **Range of pixels around the in step 1 given rot center for which the test slice is reconstructed. Good starting value is 50. For fine rot center, choose 10. 
flenners 2.1 158
wirtenss 7.1 159 **3. Stepsize:** Stepsize beween the different rotation centers. Good start value is 5 and 1 for fine rot center. (for example [ ... , 507, 512, 517, ... ] for a stepsize of 5)
flenners 3.1 160
wirtenss 7.1 161 **4. Slice:** Defines the pixel row which is used to reconstruct the test slice. Tip: Choose a region where you expect to see distinctive structures. (You can also check different slices for checking the rotation center.)
flenners 3.1 162
wirtenss 7.1 163 **5. Check rotation center: **Click on the "Check rotation center" button.** **In the preview window move the slider around until you find the positions with the least artifacts. Remember the position number and check the Spyder Console to get the new rot center coordinates in pixel.
164
165 [[image:attach:image2022-11-14_14-4-49.png||thumbnail="true" height="250"]]
166
167 in blue the coordinate of the center of rotation; in yellow the position number of the preview slider
168
169 **6. Update and Repeat:** Replace the Rot Center (step 1) with the new found coordinate, lower the Delta (step 2) and Stepsize (step 3) and repeat the process until you are satisfied with the result.
170
flenners 2.1 171
wirtenss 8.1 172 How does a good rotation center look like?
173
greving 15.1 174 (% class="relative-table wrapped" style="width:37.5112%" %)
wirtenss 8.1 175 |=(((
176 good
177 )))|=(((
178 bad
179 )))|=(((
180 comment
181 )))
182 |(((
183 (% class="content-wrapper" %)
184 (((
185 [[image:attach:image2022-11-14_14-17-45.png||height="250"]]
186 )))
187 )))|(((
188 (% class="content-wrapper" %)
189 (((
190 [[image:attach:image2022-11-14_14-19-33.png||height="250"]]
191 )))
192 )))|(((
greving 15.1 193
wirtenss 8.1 194 )))
195 |(((
196 (% class="content-wrapper" %)
197 (((
198 [[image:attach:image2022-11-14_15-16-34.png||height="250"]]
199 )))
200 )))|(((
201 (% class="content-wrapper" %)
202 (((
203 [[image:attach:image2022-11-14_15-7-13.png||height="250"]]
204 )))
205 )))|(((
206 The ghosting effect on the edges is due to sample movement during the scan.
207 )))
208 |(((
greving 15.1 209
flenners 10.1 210 )))|(((
greving 15.1 211
flenners 10.1 212 )))|(((
greving 15.1 213
flenners 10.1 214 )))
215 |(((
wirtenss 8.1 216 (% class="content-wrapper" %)
217 (((
218 [[image:attach:image2022-11-14_15-29-47.png||height="250"]]
219 )))
220 )))|(((
221 (% class="content-wrapper" %)
222 (((
223 **[[image:attach:image2022-11-14_15-28-50.png||height="250"]]**
224 )))
225 )))|(((
greving 15.1 226
wirtenss 8.1 227 )))
wirtenss 7.1 228
flenners 11.1 229 [[image:attach:image2023-1-23_11-39-57.png||height="400"]]
wirtenss 7.1 230
wirtenss 8.1 231
232
flenners 3.1 233 **Reconstruction Parameters. **
234
235 When you found the correct rotation center, you can continue with the reconstruction.
236
wirtenss 7.1 237 Enter the final roation center from the above step.
flenners 3.1 238
239 You can select different reconstruction algorithms and filters. Standard is gridrec and shepp.
240
241 You can also add ring removal (can take very long!!!!)
242
243 Mask: If you like a circular mask around your data, check this box.
244
245 before the final reconstruction, you can reconstruct a test slice to check your reconstruction parameters. Enter the slice number you want to reconstruct and press " Reconstruct slice".
246
flenners 2.1 247
flenners 3.1 248 When you are happy with your result, press "Reconstruct full stack".
249
250 You can check the data in ImageJ, and if you are not happy, you can also reconstruct with different parameters/ rotation centers.
251
252 When you are finished with one scan, please press the "clear all" button! This saves the log data you see on the right, so you can later check what you did. The data are also removed from the memory.
253
254
255
256
greving 15.1 257