Configuration Examples¶
This page focuses on working example configs shipped with the plugin.
Recommended Approach¶
Prefer using the maintained configs under:
@vipr_reflectometry/reflectorch/examples/configs/
instead of copying long inline snippets.
Reflectorch Examples (CLI)¶
# XRR example
vipr --config '@vipr_reflectometry/reflectorch/examples/configs/PTCDI-C3.yaml' inference run
# NR example
vipr --config '@vipr_reflectometry/reflectorch/examples/configs/D17_SiO.yaml' inference run
# Another stable example
vipr --config '@vipr_reflectometry/reflectorch/examples/configs/Ni500.yaml' inference run
Flow Model Example (CLI)¶
vipr --config '@vipr_reflectometry/flow_models/examples/configs/NSF_XRR.yaml' inference run
HDF5 Batch Loading (Correct Parameters)¶
For hdf5_spectrareader, use dataset_name (not group_path):
vipr:
inference:
load_data:
handler: hdf5_spectrareader
parameters:
data_path: '@vipr_reflectometry/flow_models/examples/data/xrr_dataset.h5'
dataset_name: 'DIP_1'
batch_processing: true
batch_size: 79
Available loader parameters:
data_path(required)dataset_name(optional)spectrum_index(optional, single-spectrum mode)batch_processing(optional, defaultfalse)batch_size(optional)
Minimal Custom Config Pattern¶
Start from a shipped example and adjust only what you need:
vipr:
inference:
load_data:
handler: csv_spectrareader
parameters:
data_path: '@vipr_reflectometry/examples/data/D17_SiO.dat'
column_mapping:
q: 0
I: 1
dI: 2
dQ: 3
load_model:
handler: reflectorch
parameters:
config_name: NR-1layer-basic-v1
device: cpu
prediction:
handler: reflectorch_predictor
parameters:
calc_pred_curve: true
calc_pred_sld_profile: true
Path Resolution¶
Use package paths for plugin-bundled resources:
data_path: '@vipr_reflectometry/examples/data/D17_SiO.dat'
Notes¶
Some legacy configs may still exist in the repository for compatibility/history.
Prefer the maintained examples listed above (
PTCDI-C3.yaml,D17_SiO.yaml,Ni500.yaml,NSF_XRR.yaml).