Skip to content

Commit 4f923ac

Browse files
committed
Adding OLEM config
1 parent 275cd4b commit 4f923ac

2 files changed

Lines changed: 79 additions & 7 deletions

File tree

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# --- Standard tomography loader for NeXus files. ---
2+
- method: standard_tomo
3+
module_path: httomo.data.hdf.loaders
4+
parameters:
5+
data_path: auto
6+
image_key_path: auto
7+
rotation_angles: auto
8+
preview:
9+
detector_x: # horizontal data previewing/cropping.
10+
# when null, the full data dimension is used, i.e., no previewing
11+
start: null
12+
stop: null
13+
detector_y: # vertical data previewing/cropping.
14+
# when null, the full data dimension is used, i.e., no previewing
15+
start: null
16+
stop: null
17+
darks: null
18+
flats: null
19+
- method: remove_outlier
20+
module_path: httomolibgpu.misc.corr
21+
parameters:
22+
kernel_size: 3 # The size of the 3D neighbourhood surrounding the voxel. Odd integer.
23+
dif: 1000 # A difference between the outlier value and the median value of neighbouring pixels.
24+
save_result: true
25+
- method: find_center
26+
module_path: tomopy.recon.rotation
27+
parameters:
28+
ind: null
29+
init: 48
30+
tol: 0.5
31+
mask: true
32+
ratio: 1.0
33+
sinogram_order: false
34+
id: centering
35+
side_outputs:
36+
cor: centre_of_rotation
37+
# --- Reconstruction method. ---
38+
- method: OSEM3d_tomobar
39+
module_path: httomolibgpu.recon.algorithm
40+
parameters:
41+
center: ${{centering.side_outputs.centre_of_rotation}}
42+
detector_pad: false
43+
recon_size: null
44+
recon_mask_radius: 0.95
45+
iterations: 20
46+
subsets_number: 12
47+
regularisation_type: PD_TV
48+
regularisation_parameter: 0.01
49+
regularisation_iterations: 30
50+
regularisation_half_precision: true
51+
nonnegativity: true
52+
# --- Calculate global statistics on the reconstructed volume, required for data rescaling. ---
53+
- method: calculate_stats
54+
module_path: httomo.methods
55+
parameters: {}
56+
id: statistics
57+
side_outputs:
58+
glob_stats: glob_stats
59+
# --- Rescaling the data using min/max obtained from `calculate_stats`. ---
60+
- method: rescale_to_int
61+
module_path: httomolibgpu.misc.rescale
62+
parameters:
63+
perc_range_min: 0.0
64+
perc_range_max: 100.0
65+
bits: 32
66+
glob_stats: ${{statistics.side_outputs.glob_stats}}
67+
# --- Saving data into images. ---
68+
- method: save_to_images
69+
module_path: httomolib.misc.images
70+
parameters:
71+
subfolder_name: images
72+
axis: auto
73+
file_format: tif # `tif` or `jpeg` can be used.
74+
asynchronous: true

i14/templates/xrf-tomo-template.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ spec:
2525
- name: outputFolder
2626
value: "testing"
2727
- name: multiScan
28-
value: '[{"multiScan":{"start":423844,"end":423947,"excluded":[423908,423909,423911,423916,423917,423935,423936,423937,423940,423942,423943,423944,423945]}}]'
28+
value: '[{"multiScan":{"start":436147,"end":436230,"excluded":[]}}]'
2929
- name: multiEdge
30-
value: '[{"edgeElement":"Pb","edgeTransition":"La"},{"edgeElement":"Br","edgeTransition":"Ka"}]'
30+
value: '[{"edgeElement":"Tl","edgeTransition":"La"},{"edgeElement":"Ga","edgeTransition":"Ka"}]'
3131
- name: elementToAlign
32-
value: "Pb"
32+
value: "Tl"
3333
- name: transitionToAlign
3434
value: "La"
3535
- name: alignmentSection
@@ -57,16 +57,14 @@ spec:
5757
volumeMounts:
5858
- name: session
5959
mountPath: "{{`{{ workflow.parameters.visitdir }}`}}"
60-
- name: tmp
61-
mountPath: /tmp
6260
command: [bash]
6361
source: |
6462
OUTPUT="{{`{{ workflow.parameters.visitdir }}`}}"/processing/workflows/"{{`{{ workflow.parameters.outputFolder }}`}}"
6563
mkdir -p $OUTPUT
6664
echo '{{ .Files.Get "notebooks/xrf_tomo_align_initial.ipynb" | b64enc }}' | base64 -d > $OUTPUT/align_initial.ipynb
6765
echo '{{ .Files.Get "notebooks/xrf_tomo_align_and_normalise.ipynb" | b64enc }}' | base64 -d > $OUTPUT/align_and_normalise.ipynb
6866
echo '{{ .Files.Get "notebooks/xrf_tomo_plotting.ipynb" | b64enc }}' | base64 -d > $OUTPUT/plotting.ipynb
69-
echo '{{ .Files.Get "configs/httomo_config_fbp.yaml" | b64enc }}' | base64 -d > $OUTPUT/httomo.yaml
67+
echo '{{ .Files.Get "configs/httomo_config_olem.yaml" | b64enc }}' | base64 -d > $OUTPUT/httomo.yaml
7068
volumes:
7169
- name: session
7270
hostPath:
@@ -266,7 +264,7 @@ spec:
266264
parameters:
267265
- name: edge
268266
script:
269-
image: ghcr.io/diamondlightsource/httomo:2.5
267+
image: ghcr.io/diamondlightsource/httomo:3.2.1
270268
env:
271269
- name: CUPY_CACHE_DIR
272270
value: /tmp/.cupy/kernel_cache

0 commit comments

Comments
 (0)