Version 18.3 by flenners on 2026-02-04 17:23

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 18.2 13
flenners 13.1 14 Terminal:
15
16
greving 15.1 17 salloc ~-~-partition=psxcpu ~-~-nodes=1 ~-~-time=06:00:00
18 \\(if you need gpu: ~-~-partition=psxgpu )
flenners 13.1 19
20 //Answer~:// salloc: job [//number//] queued and waiting for resources
21
22 salloc: job [number] has been allocated resources
23
24 salloc: Granted job allocation [number]
25
26 salloc: Waiting for resource configuration
27
28 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)
29
30 (% class="code" %)
31 (((
32 ssh max-wn035 (shell to your node)
33 \\module load maxwell mamba
34 )))
35
36 (% class="code" %)
37 (((
38 . mamba-init (. is important! never do without, this can crash your FastX)
39 \\mamba activate /asap3/petra3/gpfs/common/p05/nano/envs/mamba
40 )))
41
42
greving 15.1 43 spyder &
flenners 13.1 44 \\~-~-~-~-~-~-
45 \\\\Spyder will open.
46
47 On the right, choose "file explorer". Navigate to your beamtime folder and find processed/scripts/RecoGUI:
48
49 [[image:attach:image2022-11-1_13-7-14.png||height="250"]]
50
51
52 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
53
54
55 Open RecoGUI.py by double clicking the file and click "Run" (green arrow)
56
57
58
greving 16.1 59 = {{id name="03aReconstructionwithRecoGUI-LoadingData"/}}Loading Data =
flenners 2.1 60
greving 16.1 61 = =
62
flenners 4.1 63 **TXM DATA**
64
flenners 2.1 65 Go to "Load' tab and select year, enter your beamtime ID (e.g. 11001234) and press "enter" on keyboard.
66
67 Now, the list of your scans will be shown below under "folder". Below folders, there are darks with different exposure times.
68
69 Select the scan you want to reconstruct and choose the corresponding dark images.
70
71 If you recorded your data after 2019, you can directly continue by clicking the "Load" button. This will read all data needed for reconstruction.
72
73 Loading the data can take some time (usually several minutes). The GUI will be blocked during this time.
74
flenners 3.1 75 Continue with next step, "Preparation".
flenners 2.1 76
77
flenners 4.1 78 **HOLOTOMO DATA**
79
flenners 12.1 80 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 81
flenners 16.2 82 Go to "Load" tab, load processed data.
flenners 4.1 83
flenners 16.2 84 Check the subfolder path of the phase retievals. Standard path is holopipe/phase_retrieval
flenners 5.1 85
flenners 16.3 86 Click on "Load processed"
wirtenss 9.1 87
flenners 5.1 88 You do not need to load any additional dark images.
89
flenners 17.1 90 Skip "Normalize, Minus Log, Rotate" in the Preperation Tab. The optional steps, eg. padding are still optional. (see below)
flenners 5.1 91
92 In principle, you can directly proceed to the third tab "Reconstruction". 
93
94
greving 15.1 95 = {{id name="03aReconstructionwithRecoGUI-Preparationofdataforreconstruction"/}}Preparation of data for reconstruction =
flenners 2.1 96
greving 16.1 97 (**Can be skipped for Holotomography**)
flenners 2.1 98
flenners 4.1 99 Go to "Prep" tab.
flenners 2.1 100
101 The following is usually required for reconstruction:
102
103 Click "Normalize" button. This will take several minutes.
104
105 Click "Minus Log" button.
106
107 Click "Rotate" button.
108
109
110 The following steps are **optional:**
111
greving 15.1 112 **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 113
114 **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.
115
flenners 17.1 116 **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 117
118 **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.
119
120
121 **Linogram alignment:** Linogram alignment if sample moved. Ask your local contact if this is necessary.
122
123
124 **Save current stack.** Writes the normalized projections to your beamtime folder.
125
126
greving 15.1 127 = {{id name="03aReconstructionwithRecoGUI-Reconstruction"/}}Reconstruction =
flenners 2.1 128
129
130 **Finding the correct center of rotation. **
131
wirtenss 7.1 132 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 133
wirtenss 7.1 134 **~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 135
wirtenss 7.1 136 **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 137
wirtenss 7.1 138 **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 139
wirtenss 7.1 140 **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 141
wirtenss 7.1 142 **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.
143
144 [[image:attach:image2022-11-14_14-4-49.png||thumbnail="true" height="250"]]
145
146 in blue the coordinate of the center of rotation; in yellow the position number of the preview slider
147
148 **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.
149
flenners 2.1 150
wirtenss 8.1 151 How does a good rotation center look like?
152
greving 15.1 153 (% class="relative-table wrapped" style="width:37.5112%" %)
wirtenss 8.1 154 |=(((
155 good
156 )))|=(((
157 bad
158 )))|=(((
159 comment
160 )))
161 |(((
162 (% class="content-wrapper" %)
163 (((
164 [[image:attach:image2022-11-14_14-17-45.png||height="250"]]
165 )))
166 )))|(((
167 (% class="content-wrapper" %)
168 (((
169 [[image:attach:image2022-11-14_14-19-33.png||height="250"]]
170 )))
171 )))|(((
greving 15.1 172
wirtenss 8.1 173 )))
174 |(((
175 (% class="content-wrapper" %)
176 (((
177 [[image:attach:image2022-11-14_15-16-34.png||height="250"]]
178 )))
179 )))|(((
180 (% class="content-wrapper" %)
181 (((
182 [[image:attach:image2022-11-14_15-7-13.png||height="250"]]
183 )))
184 )))|(((
185 The ghosting effect on the edges is due to sample movement during the scan.
186 )))
187 |(((
greving 15.1 188
flenners 10.1 189 )))|(((
greving 15.1 190
flenners 10.1 191 )))|(((
greving 15.1 192
flenners 10.1 193 )))
194 |(((
wirtenss 8.1 195 (% class="content-wrapper" %)
196 (((
197 [[image:attach:image2022-11-14_15-29-47.png||height="250"]]
198 )))
199 )))|(((
200 (% class="content-wrapper" %)
201 (((
202 **[[image:attach:image2022-11-14_15-28-50.png||height="250"]]**
203 )))
204 )))|(((
greving 15.1 205
wirtenss 8.1 206 )))
wirtenss 7.1 207
flenners 11.1 208 [[image:attach:image2023-1-23_11-39-57.png||height="400"]]
wirtenss 7.1 209
wirtenss 8.1 210
211
flenners 3.1 212 **Reconstruction Parameters. **
213
214 When you found the correct rotation center, you can continue with the reconstruction.
215
wirtenss 7.1 216 Enter the final roation center from the above step.
flenners 3.1 217
218 You can select different reconstruction algorithms and filters. Standard is gridrec and shepp.
219
220 You can also add ring removal (can take very long!!!!)
221
222 Mask: If you like a circular mask around your data, check this box.
223
224 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".
225
flenners 2.1 226
flenners 3.1 227 When you are happy with your result, press "Reconstruct full stack".
228
229 You can check the data in ImageJ, and if you are not happy, you can also reconstruct with different parameters/ rotation centers.
230
231 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.
232
233
234
235
greving 15.1 236