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
| Preset | Algorithm | Integration | Step Size | Seeds | Speed |
|---|---|---|---|---|---|
| hinec_default.yml | HINEC | RK4 | 0.2 | 4 | Medium |
| high_precision.yml | HINEC | RKF45 | 0.1 | 6 | Slow |
| fast_exploration.yml | Standard | Euler | 0.5 | 1 | Fast |
| standard_fact.yml | Standard | Euler | 0.5 | 5 | Medium |
| irontract.yml | HINEC | RK4 | 0.2 | 4 | Medium |
Full Configuration Example
yaml|my_experiment.yml
1preprocessing:2 run_denoising: true3 denoise_method: 'dwidenoise'4 run_motion_correction: true5 run_eddy: true6 improve_mask: true7 atlas_type: 'jhu'8 9tractography:10 algorithm: 'hinec'11 integration_order: 412 interp_method: 'trilinear'13 step_size: 0.214 seed_density: 415 termination_fa: 0.1516 angle_thresh: 3517 max_steps: 100018 min_length: 3519 act_enabled: true20 21output:22 tractography_dir: 'tractography_results'23 include_timestamp: truePreprocessing Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| run_denoising | bool | No | true | Enable MP-PCA or Gaussian denoising |
| denoise_method | string | No | 'dwidenoise' | 'dwidenoise', 'susan', 'nlmeans', or 'gaussian' |
| run_motion_correction | bool | No | true | Enable rigid body motion correction |
| run_eddy | bool | No | true | Enable eddy current correction |
| improve_mask | bool | No | true | Apply mask refinement |
| atlas_type | string | No | 'jhu' | 'jhu', 'aal', or 'desikan' |
| t1_available | bool | No | false | T1 structural data is available |
| use_t1_registration | bool | No | false | Use T1 for enhanced registration |
Tractography Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| algorithm | string | No | 'standard' | 'standard' (FACT) or 'hinec' (high-order) |
| integration_order | int | No | 1 | 1=Euler, 2=RK2, 4=RK4, 5=RKF45 |
| step_size | float | No | 0.2 | 0.1-0.2 (precise), 0.2-0.3 (balanced), 0.3-0.5 (fast) |
| seed_density | int | No | 4 | 1-2 (fast), 4 (balanced), 6-8 (dense) |
| termination_fa | float | No | 0.15 | 0.05 (long tracks), 0.15 (balanced), 0.20 (short/fast) |
| angle_thresh | float | No | 35 | 30° (strict), 35-45° (balanced), 60° (permissive) |
| adaptive_step | bool | No | false | Enable adaptive step size (RKF45 only) |
| rkf_tolerance | float | No | 0.01 | Error 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 curvatureExpected 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 terminationUse 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.