Version 16.3 by flenners on 2026-02-04 17:16

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