HomeDocumentationYAML Configuration

YAML Configuration

YAML lets users change experiment settings without editing source code — manage parameters, share reproducible pipelines, and switch between presets instantly.

Why Configuration Matters

Reproducible research requires exact parameter recording. HINEC's YAML system lets you version-control experiment configurations, share pipelines, and switch between parameter presets without modifying any source code.

Available Presets

PresetAlgorithmIntegrationStep SizeSeedsSpeed
hinec_default.ymlHINECRK40.24Medium
high_precision.ymlHINECRKF450.16Slow
fast_exploration.ymlStandardEuler0.51Fast
standard_fact.ymlStandardEuler0.55Medium
irontract.ymlHINECRK40.24Medium

Full Configuration Example

yaml|my_experiment.yml
1preprocessing:
2 run_denoising: true
3 denoise_method: 'dwidenoise'
4 run_motion_correction: true
5 run_eddy: true
6 improve_mask: true
7 atlas_type: 'jhu'
8
9tractography:
10 algorithm: 'hinec'
11 integration_order: 4
12 interp_method: 'trilinear'
13 step_size: 0.2
14 seed_density: 4
15 termination_fa: 0.15
16 angle_thresh: 35
17 max_steps: 1000
18 min_length: 35
19 act_enabled: true
20
21output:
22 tractography_dir: 'tractography_results'
23 include_timestamp: true

Preprocessing Parameters

ParameterTypeRequiredDefaultDescription
run_denoisingboolNotrueEnable MP-PCA or Gaussian denoising
denoise_methodstringNo'dwidenoise''dwidenoise', 'susan', 'nlmeans', or 'gaussian'
run_motion_correctionboolNotrueEnable rigid body motion correction
run_eddyboolNotrueEnable eddy current correction
improve_maskboolNotrueApply mask refinement
atlas_typestringNo'jhu''jhu', 'aal', or 'desikan'
t1_availableboolNofalseT1 structural data is available
use_t1_registrationboolNofalseUse T1 for enhanced registration

Tractography Parameters

ParameterTypeRequiredDefaultDescription
algorithmstringNo'standard''standard' (FACT) or 'hinec' (high-order)
integration_orderintNo11=Euler, 2=RK2, 4=RK4, 5=RKF45
step_sizefloatNo0.20.1-0.2 (precise), 0.2-0.3 (balanced), 0.3-0.5 (fast)
seed_densityintNo41-2 (fast), 4 (balanced), 6-8 (dense)
termination_fafloatNo0.150.05 (long tracks), 0.15 (balanced), 0.20 (short/fast)
angle_threshfloatNo3530° (strict), 35-45° (balanced), 60° (permissive)
adaptive_stepboolNofalseEnable adaptive step size (RKF45 only)
rkf_tolerancefloatNo0.01Error tolerance in voxels (RKF45)

Common Patterns

Publication-Quality Results

yaml
tractography:
integration_order: 5 # RKF45 adaptive
adaptive_step: true
rkf_tolerance: 0.005 # Tight tolerance
step_size: 0.1 # Small initial step
seed_density: 6 # Dense seeding
termination_fa: 0.1 # Continue in low FA
angle_thresh: 30 # Strict curvature

Expected runtime: 2-3x slower than default. Maximum accuracy with smooth tracks.

Fast Exploration

yaml
tractography:
algorithm: 'standard' # Simple FACT
integration_order: 1 # Euler
step_size: 0.5 # Large steps
seed_density: 1 # Sparse seeding
termination_fa: 0.2 # Quick termination

Use for rapid iteration during development or data exploration.

Tip
Create a custom config by copying a template: cp config/hinec_default.yml config/my_experiment.yml, then run with ./bin/run_hinec.sh data/mydata data.mat config/my_experiment.yml.