Tomography scans are reconstructed with a Jupyter notebook that uses tomopy.
Ask your beamline scientist for the reconstruction notebook,
tomo_recon_notebook.ipynb, and save it in your experiment’s reduced_data
folder:
/nfs/chess/aux/cycles/<cycle>/id3a/<btr>/reduced_data/
Use the conda env analysis:
/nfs/chess/sw/miniforge3_fast/envs/analysis
In VS Code, open the notebook, then:
analysis (/nfs/chess/sw/miniforge3_fast/envs/analysis/bin/python). If it is not listed, choose Enter interpreter path and paste that path.All inputs are in the cells at the top of the notebook. The cell that builds
cfg (it starts with “Build cfg from the inputs above”) has no inputs; do
not edit it.
Experiment and scans (first input cell):
raw_dir, aux_dir, cycle, beamline, btr: where the raw data are
(<raw_dir>/<cycle>/<beamline>/<btr>) and where results go
(<aux_dir>/<cycle>/<beamline>/<btr>/reduced_data).tomo_detector and detectors: which detector’s files to read and how.scan_list: one entry per tomography scan:
| Position | Meaning |
|---|---|
| 1 | sample folder name |
| 2 | spec file name, e.g. spec.log |
| 3 | tomography scan number |
| 4 | [first, last] rows to reconstruct |
| 5 | [first, last] centering rows |
| 6 | rotation centers found for the two centering rows |
| 7 | x_bounds: columns to keep when saving the reconstruction |
| 8 | y_bounds: rows to keep when saving the reconstruction |
dark_list, bright_list: the dark-field and bright-field scan for each
entry of scan_list, as [sample folder, spec file, scan number].Which scan (scan_index): the position in scan_list to process,
starting at 0.
Processing settings (the cell starting with “Processing settings”):
| Setting | Meaning |
|---|---|
export_plots |
Save the plots into the output folder |
dateID |
Added to the output folder name |
theta_label, presample_intensity_label |
spec counter names for the rotation angle and the incident intensity (e.g. ic3) |
roi_col_start, roi_col_end |
Detector columns to process |
post_recon_remove_ring, remove_ring_rwidth |
Ring removal after reconstruction |
post_recon_gauss_filter, gauss_filter_width |
Gaussian filter after reconstruction |
save_sinograms |
Save the corrected sinograms (.h5) |
log_times |
Print how long each step takes |
Results go to
<aux_dir>/<cycle>/<beamline>/<btr>/reduced_data/<sampleID>_<dateID>/.
cfg. Run the next cell to save the settings as a YAML file in the
output folder.scan_list entry, and repeat until you are happy with them.x_bounds /
y_bounds to crop the volume..h5 file.