Skip to content

Commit 1ca3f89

Browse files
jessicaversdaurer
andauthored
Add DPC schemas (#38)
* Include JSON schema and UI schema for DPC single * Draft yaml template * Rearrange folders * Use helm bracket structure * Add chart * Add dpc jupyter notebook * Add requirement.txt example * Updated dpc template * Change i14 to chart * Remove visitDir from schemas * Fixed indentation errors, removed visitDir, parameter references * Remove requirements, include correct image path * Fixed further issues in the dpc template * Added HOME env and pointed to /tmp * Alter scan path in template * Correct html output name * Increase memory * Include config file --------- Co-authored-by: Benedikt Daurer <[email protected]>
1 parent cb286b5 commit 1ca3f89

File tree

8 files changed

+967
-3
lines changed

8 files changed

+967
-3
lines changed

.workflows-lint.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
manifests:
2-
- i14
31
charts:
42
- e02
53
- nxstacker
64
- ptypy
75
- httomo
6+
- i14

i14/Chart.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v2
2+
name: dpc
3+
description: DPC is a utility which takes a scan file inpath, reconstructs the differential phase contrast (DPC) images, and saves the results to an outpath.
4+
type: application
5+
version: 0.0.1

i14/configs/processing.yaml

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
notebooks: /dls_sw/i14/ops/notebooks
2+
deim:
3+
Fe_Ka_Oct:
4+
maps: null
5+
number_oversamples: 0
6+
number_significant_components: 10
7+
offset: 2.52
8+
standards: /dls/i14/data/2021/mg28835-1/processing/Fe_marked.nor
9+
pca_outfile: /dls/i14/data/2021/mg28835-1/processing/fast_xanes/Fe_Ka_Oct_deim_pca_20.csv
10+
deim_pointsfile: /dls/i14/data/2021/mg28835-1/processing/fast_xanes/Fe_Ka_Oct_deim_points_20.csv
11+
Fe_K_9:
12+
maps: null
13+
number_oversamples: 0
14+
number_significant_components: 8
15+
offset: 2.8
16+
standards: /dls/i14/data/2021/cm28142-1/processing/fe_full_marked_all.nor
17+
pca_outfile: /dls/i14/data/2021/cm28142-1/processing/fast_xanes/Fe_K_9_deim_pca.csv
18+
deim_pointsfile: /dls/i14/data/2021/cm28142-1/processing/fast_xanes/Fe_K_9_deim_points.csv
19+
Fe_K_short:
20+
maps: null
21+
number_oversamples: 0
22+
number_significant_components: 3
23+
offset: 2.8
24+
standards: /dls/i14/data/2021/cm28142-1/processing/fe_short_marked.nor
25+
pca_outfile: /dls/i14/data/2021/cm28142-1/processing/fast_xanes/Fe_K_short_deim_pca.csv
26+
deim_pointsfile: /dls/i14/data/2021/cm28142-1/processing/fast_xanes/Fe_K_short_deim_points.csv
27+
Fe_K_13:
28+
maps: null
29+
number_oversamples: 0
30+
number_significant_components: 12
31+
offset: 2.8
32+
standards: /dls/i14/data/2021/cm28142-1/processing/fe_full_marked_all.nor
33+
pca_outfile: /dls/i14/data/2021/cm28142-1/processing/fast_xanes/Fe_K_13_deim_pca.csv
34+
deim_pointsfile: /dls/i14/data/2021/cm28142-1/processing/fast_xanes/Fe_K_13_deim_points.csv
35+
Fe_K_Clarke:
36+
maps: null
37+
number_oversamples: 0
38+
number_significant_components: 10
39+
offset: -0.2
40+
standards: /dls/i14/data/2022/mg28835-3/processing/fe_clarke_all.nor
41+
pca_outfile: /dls/i14/data/2022/mg28835-3/processing/fast_xanes/Fe_K_Clarke_deim_pca.csv
42+
deim_pointsfile: /dls/i14/data/2022/mg28835-3/processing/fast_xanes/Fe_K_Clarke_deim_points.csv
43+
Pt_La:
44+
maps: null
45+
number_oversamples: 0
46+
number_significant_components: null
47+
offset: 0.0
48+
standards: /dls/i14/data/2020/cm26479-3/processing/deim/pt_marked.nor
49+
output: processing/fast_xanes
50+
use: Fe_K_Clarke
51+
dpc:
52+
crop_size: 256
53+
dpc_exclude_crop_size: 256
54+
dpc_include_crop_size: 128
55+
fractional_dark: 1.05
56+
pixel_size: 55.0e-6
57+
absorption_map: true
58+
scatter_map: true
59+
radial_scatter_map: true
60+
quick_mask: false
61+
dpc_include_beam: true
62+
dpc_exclude_beam: true
63+
offset_x : 0
64+
offset_y : 0
65+
mirror: true
66+
anti: true
67+
zeropad: false
68+
high_pass_filter: false
69+
regularisation: false
70+
io:
71+
dpc:
72+
- /entry/merlin_addetector
73+
i0:
74+
- /entry/I0_1/data
75+
- /entry/I0_2/data
76+
- /entry/I0_3/data
77+
- /entry/I0_4/data
78+
metadata_keys:
79+
- instrument/dcm_enrg
80+
- instrument/sample/sample_rot
81+
- instrument/detectors/excalibur_z
82+
output:
83+
csv_folder: ../processing/auto/txt
84+
html_folder: ../processing/auto/html
85+
image_folder: ../processing/auto/images
86+
nexus_folder: processing/auto/nexus
87+
xrd:
88+
- /entry/excalibur_addetector
89+
xrf:
90+
- /entry/xsp3_addetector
91+
mapping:
92+
entry.instrument.dcm_enrg.value.value:
93+
- Acquisition_instrument.XRF.beam_energy
94+
- null
95+
entry.instrument.sample.sample_rot.value:
96+
- Acquisition_instrument.XRF.stage.rotation
97+
- null
98+
entry.instrument.detectors.excalibur_z.value:
99+
- Acquisition_instrument.DPC.distance
100+
- null
101+
external_configs:
102+
pymca: /dls_sw/i14/ops/processing/auto/config/pymca.cfg
103+
ptypy_focus: /dls_sw/i14/ops/processing/auto/config/ptypy_focus.yaml
104+
ptypy_long: /dls_sw/i14/ops/processing/auto/config/ptypy_known_probe.yaml
105+
pycho: /dls_sw/i14/ops/processing/auto/config/pycho.json
106+
pyfai: /dls_sw/i14/ops/processing/auto/pyfai.yaml
107+
stack:
108+
sort_by: Acquisition_instrument.XRF.beam_energy
109+
to_stack:
110+
- xrf
111+
- dpc
112+
- xrd
113+
stack_alignment:
114+
align_with: Phase
115+
alignment_method: mutual
116+
crop: true
117+
pyramid_minimum: 16
118+
save_tiffs: false
119+
update_from_scan: true
120+
use_pyramid_levels: true
121+
tomo:
122+
reconstruction_method: null
123+
xanes:
124+
cluster:
125+
cluster_source: decomposition
126+
method: kmeans
127+
preprocessing: norm
128+
source_for_centers: signal
129+
cluster_estimate:
130+
cluster_source: decomposition
131+
metric: gap
132+
normalization: null
133+
xanes_edge: Pt
134+
xrd:
135+
calibration_file: /dls/i14/data/2020/sp20420-5/processing/current_calibrations/97420_18keV_xrd1_calibration.nxs
136+
dilate_mask: true
137+
flat_field: /dls/i14/data/2020/sp20420-5/processing/current_calibrations/ffcoeffs_Zr_fixed.hdf
138+
mask_file: /dls/i14/data/2020/sp20420-5/processing/current_calibrations/mask.nxs
139+
dataset_path_mask: /entry/mask/masl2
140+
polarization_factor: 0.95
141+
unit: 2th_deg
142+
xrf_calibration:
143+
approximation: thin_film
144+
calibrant: axo
145+
scaling_file: null
146+
xrf_windowing:
147+
background:
148+
apply_snip: false
149+
snip_iterations: 30
150+
snip_width: 16
151+
calibration:
152+
label: Energy
153+
offset: 0.0
154+
scale: 0.01
155+
units: keV
156+
elements:
157+
- Fe
158+
- Cu
159+
- S
160+
- K
161+
- Zn
162+
- Ni
163+
- Cr
164+
- Ar
165+
- Pt
166+
- Ca
167+
- Cl
168+
extra_lines:
169+
- scatter
170+
- compton
171+
mva:
172+
- S_Ka
173+
- Zn_Ka
174+
- Pt_La
175+
- K_Ka
176+
update_from_matches: true
177+
xray_lines:
178+
- Fe_Ka
179+
- Cu_Ka
180+
- S_Ka
181+
- K_Ka
182+
- Zn_Ka
183+
- Ni_Ka
184+
- Cr_Ka
185+
- Ni_La
186+
- Ar_Ka
187+
- Cu_La
188+
- Pt_La
189+
- Ca_Ka
190+
- Cl_Ka
191+
- Mg_Ka
192+
- Br_La
193+
- Ti_Ka
194+
- Ne_Ka
195+
- Ga_Ka

0 commit comments

Comments
 (0)