CHESS-ID3A-FAST

Tomography reconstruction

Tomography scans are reconstructed with a Jupyter notebook that uses tomopy.

Files

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/

Python environment

Use the conda env analysis:

/nfs/chess/sw/miniforge3_fast/envs/analysis

In VS Code, open the notebook, then:

  1. Click Select Kernel (top right).
  2. Choose Python Environments…
  3. Pick analysis (/nfs/chess/sw/miniforge3_fast/envs/analysis/bin/python). If it is not listed, choose Enter interpreter path and paste that path.

Inputs

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):

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>/.

Workflow

  1. Set the inputs and run the cells down to and including the cell that builds cfg. Run the next cell to save the settings as a YAML file in the output folder.
  2. Sequence 1: find the rotation center. Reconstructs only the two centering rows for a range of trial centers and plots them. Pick the best center for each row, enter the two values as position 6 of the scan’s scan_list entry, and repeat until you are happy with them.
  3. Sequence 2: full reconstruction. Processes all rows between the first and last rows (position 4), using centers interpolated between the two centering rows. Plot the first and last slice and set x_bounds / y_bounds to crop the volume.
  4. Save the cropped reconstruction as a stack of TIFFs (float16 or float32), a single TIFF stack, and/or an .h5 file.