Skip to main content
Get TACT installed and run your first turbulence intensity adjustment in just a few steps.

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)
  • Git (for cloning repository)
  • Virtual environment tool (recommended)
  • CSV file with reference and RSD measurements
  • At least 500+ paired observations (2000+ recommended)
  • Wind speed, standard deviation, and TI columns
  • Data across 4-20 m/s wind speed range

Installation

1

Clone Repository

git clone https://github.com/CFARS/TACT.git
cd TACT
2

Create Virtual Environment

macOS/Linux:
python3 -m venv env
source env/bin/activate
Windows:
python -m venv env
env\Scripts\activate
3

Install Dependencies

pip install -r requirements.txt
4

Verify Installation

python -c "from tact import TACT; print('TACT installed successfully')"

Quick Start with Example Data

The fastest way to see TACT in action is to run the included example:
python main.py
This runs the complete pipeline with example data and generates:
  • Adjusted turbulence intensity dataset
  • DNV RP-0661 validation results
  • Visualization plots
  • Statistical summaries
First time using TACT? Run the example first to understand the workflow before using your own data.

Basic Workflow

Here’s the core workflow for adjusting your own data:
from tact import TACT
from tact.utils.load_data import load_data
from tact.utils.setup_processors import setup_processors

# 1. Load data
data = load_data("your_data.csv")

# 2. Set up processors
bp, tp, sp = setup_processors("config.json")

# 3. Process data
data = bp.process(tp.process(data))

# 4. Run adjustment
tact = TACT()
results = tact.adjust(
    data=data,
    method="ss-sf",  # Choose: ss-sf, sswsstd, ssws, or baseline
    parameters={"split": True, "config_path": "config.json"}
)

# 5. Get adjusted data
adjusted_data = results["adjusted_data"]
print(f"Adjusted {len(adjusted_data)} observations")

Using Your Own Data

1

Prepare Your Data

Ensure your CSV includes reference and RSD measurements with wind speed, standard deviation, and turbulence intensity columns.Need detailed data requirements? See the Data Import Guide for column formats, units, and quality requirements.
2

Create Configuration File

Map your CSV column names to TACT’s expected format:
{
  "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
  }
}
Need help with configuration? See the Configuration Guide for detailed setup instructions.
3

Run Adjustment

Use the workflow code above with your data and config file paths.Want step-by-step instructions? See Running Adjustments for complete workflow details.
4

Validate Results

Check your results against DNV RP-0661 standards and generate validation plots.Learn about validation: See the DNV Validation Guide for criteria types, interpretation, and troubleshooting.

Visualization

Generate validation plots to visualize adjustment performance:
from tact.visualization import plot_dnv_validation

plot_dnv_validation(
    validation_results=validation,
    adjusted_data=results["adjusted_data"],
    reference_col="ref_ti",
    adjusted_col="adjTI_RSD_TI",
    unadjusted_col="rsd_ti",
    wind_speed_col="ref_ws",
    bin_col="bins",
    method_name="SS-SF",
    output_dir="output/plots"
)
This generates four plots showing:
  • MRBE by wind speed bin - Systematic bias across wind speeds with DNV acceptance limits
  • RRMSE by wind speed bin - Measurement scatter with acceptance thresholds
  • Scatter plot - Adjusted vs reference TI with 1:1 line and regression fit
  • Comparison plot - Before/after adjustment by wind speed bin

Example Plots

MRBE by Wind Speed Bin

MRBE by wind speed bin

RRMSE by Wind Speed Bin

RRMSE by wind speed bin

TI Scatter Plot

Adjusted vs reference TI scatter

TI Comparison Plot

Before/after adjustment comparison

Available Adjustment Methods

Performance varies by dataset. Compare all methods on your data using compare_all_methods.py to find the best fit.

Next Steps

Common Issues

Solution: Activate your virtual environment
source env/bin/activate  # macOS/Linux
env\Scripts\activate     # Windows
Solution: Check your config file column mappings match your CSV column names
# View your CSV columns
python -c "import pandas as pd; print(pd.read_csv('data.csv').columns.tolist())"
Then update config.json to match.
Common causes:
  • Data not time-synchronized between RSD and reference
  • Missing quality filtering
  • RSD too far from reference (more than 200m)
  • Sensor calibration issues
See the Troubleshooting Guide for detailed solutions.

Quick Reference

Run example:
python main.py
Compare all methods:
python compare_all_methods.py
Example files:
  • Data: tact/example/data/tact-test-data.csv
  • Config: tact/example/config.json
Recommended method: ss-sf DNV acceptance criteria (LV): MRBE ≤ 5%, RRMSE ≤ 15%
Need help? Check the Troubleshooting Guide or contact support at [email protected]