Skip to main content
TACT uses JSON configuration files to map your CSV columns to the expected format. This guide shows you how to create and customize your config file.

Quick Setup

1

Create config file

Create a new file called config.json in your project directory
2

Copy template

Use the template below and customize the column names to match your data
3

Verify paths

Make sure column names exactly match your CSV headers

Basic Configuration Template

config.json
{
    "input_data_column_mapping": {
        "reference": {
            "wind_speed": "ref_ws",
            "wind_speed_std": "ref_sd",
            "turbulence_intensity": "ref_ti"
        },
        "rsd": {
            "primary": {
                "wind_speed": "rsd_ws",
                "wind_speed_std": "rsd_sd",
                "turbulence_intensity": "rsd_ti"
            }
        }
    },
    "binning_config": {
        "bin_size": 1.0,
        "bin_min": 4.0,
        "bin_max": 20.0
    }
}

Configuration Sections

Reference (Anemometer) Data

Map your reference sensor column names:
"reference": {
    "wind_speed": "your_ref_ws_column",
    "wind_speed_std": "your_ref_sd_column",
    "turbulence_intensity": "your_ref_ti_column"
}
Required fields:
  • wind_speed: Mean wind speed (m/s)
  • wind_speed_std: Standard deviation of wind speed (m/s)
  • turbulence_intensity: Turbulence intensity (decimal, e.g., 0.15 for 15%)

RSD Measurements

Map your RSD/LiDAR column names:
"rsd": {
    "primary": {
        "wind_speed": "your_rsd_ws_column",
        "wind_speed_std": "your_rsd_sd_column",
        "turbulence_intensity": "your_rsd_ti_column"
    }
}
Note: Use "primary" even if you only have one height. Multi-height support is planned for future releases.

Wind Speed Bins

Configure how data is binned by wind speed:
"binning_config": {
    "bin_size": 1.0,      // Width of each bin (m/s)
    "bin_min": 4.0,       // Minimum wind speed (m/s)
    "bin_max": 20.0       // Maximum wind speed (m/s)
}
Default values:
  • bin_size: 1.0 m/s (creates bins: 4-5, 5-6, 6-7, etc.)
  • bin_min: 4.0 m/s (typical cut-in speed)
  • bin_max: 20.0 m/s (typical cut-out speed)
Adjust for your site:
  • Lower bin_min for low-wind sites (e.g., 3.0 m/s)
  • Increase bin_max for high-wind sites (e.g., 25.0 m/s)
  • Use smaller bin_size for finer resolution (e.g., 0.5 m/s)

Real-World Examples

{
    "input_data_column_mapping": {
        "reference": {
            "wind_speed": "WS_80m_Avg",
            "wind_speed_std": "WS_80m_Std",
            "turbulence_intensity": "TI_80m"
        },
        "rsd": {
            "primary": {
                "wind_speed": "LiDAR_WS_80m",
                "wind_speed_std": "LiDAR_SD_80m",
                "turbulence_intensity": "LiDAR_TI_80m"
            }
        }
    },
    "binning_config": {
        "bin_size": 1.0,
        "bin_min": 4.0,
        "bin_max": 20.0
    }
}

Validation

After creating your config file, verify it loads correctly:
import json

# Test loading
with open("config.json", "r") as f:
    config = json.load(f)
    print("Config loaded successfully")
    print(f"Reference WS column: {config['input_data_column_mapping']['reference']['wind_speed']}")

Common Issues

Error: KeyError: 'ref_ws'Cause: Column name in config doesn’t match your CSVFix:
  1. Check exact column names in your CSV: df.columns.tolist()
  2. Update config to match exactly (case-sensitive)
  3. Watch for extra spaces in column names
Error: JSONDecodeError: Expecting ',' delimiterCause: Invalid JSON syntax (missing comma, quote, bracket)Fix:
  • Use a JSON validator: https://jsonlint.com
  • Don’t use comments in JSON (remove // comments)
  • Ensure all strings use double quotes "
Error: KeyError: 'wind_speed_std'Cause: Config missing required field mappingFix: Ensure all 6 required fields are mapped:
  • Reference: wind_speed, wind_speed_std, turbulence_intensity
  • RSD: wind_speed, wind_speed_std, turbulence_intensity

Next Steps