Last modified by flenners on 2026-02-04 17:25

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