This guide explains how to extract reference data from published experimental graphs and add it to the project.
Many experimental papers present results as graphs rather than tables. To use these as validation data:
Recommended free tool: WebPlotDigitizer (https://automeris.io)
# Install (web version works without installation)
# Or use the desktop app:
# https://github.com/ankitrohatgi/WebPlotDigitizer/releases
Alternative: PlotDigitizer (https://plotdigitizer.com), Engauge Digitizer
If you have access to Wolfram Mathematica, the built-in image processing tools provide a fast digitization workflow (2-3 minutes per graph):
img = Import["figure.png"];
LocatorPane for interactive calibration — click known axis points:
pts = {{x1, y1}, {x2, y2}}; (* replace with axis min/max coordinates *)
ImageLines or manual tracing via Graphics + Locator:
curve = ImageData[Binarize[img, 0.5]];
(* or use DynamicModule with Locator for interactive point selection *)
LinearModelFit or a manual affine transform:
transform[{px_, py_}] := {
a1 + b1*px + c1*py,
a2 + b2*px + c2*py
};
(* fit coefficients from calibration points *)
Export["reference/experimental/profile.csv", data, "CSV"]
Tips for Mathematica digitization:
ImageTake to crop to the graph area before processingColorNegate and Binarize help isolate curves from the backgroundFindPeaks can automate extraction from profile plotsComponentMeasurements is useful for scatter plot digitizationIn WebPlotDigitizer:
The exported CSV needs to be transformed to the project format:
import csv
# Example: digitized velocity profile u(y/c) at x/c=0.5
# WebPlotDigitizer output: x_pixel, y_pixel, u_Uinf
# We need: y, u, v (or x, y, u, v for 2D)
with open('digitized.csv', 'r') as f_in:
reader = csv.reader(f_in)
next(reader) # skip header
data = [(float(row[1]), float(row[2])) for row in reader]
with open('reference/experimental/profile_mid.csv', 'w', newline='') as f_out:
w = csv.writer(f_out)
w.writerow(['y', 'u', 'v']) # standard field names
for y, u in data:
w.writerow([y, u, 0.0])
Every digitized dataset requires:
case.yaml and README.mdAdd this information to the README.md of the case and to docs/data-provenance.md.
reference:
type: experimental
source: "Author et al. Journal, Vol, pp, Year. Digitized from Fig. X."
doi: "https://doi.org/..." # if available
digitization:
tool: "WebPlotDigitizer v4.6"
figure: "Fig. 7"
notes: "21 points extracted from u/U_inf vs y/delta plot"
# Compare digitized data against known checkpoints
# For example, the maximum value should match the quoted value in the paper
python -c "
import numpy as np
data = np.loadtxt('reference/experimental/profile.csv', delimiter=',', skiprows=1)
print(f'Max u/U_inf = {np.max(data[:,1]):.4f} (paper quotes: 0.995)')
print(f'{len(data)} points extracted')
"
Update docs/data-provenance.md with a new entry describing what was digitized and how.
Before submitting a digitized dataset: