diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..7a60b85e148f80966a550e5ab6a762a907c69ca6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+__pycache__/
+*.pyc
diff --git a/README.md b/README.md
index 66890eb02e3bc0a1b7f45da03227149beec743e8..2b75549c1ac2f319b4d508d791ab20dce1357573 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,33 @@
---
-title: Ecflow
-emoji: 👀
-colorFrom: red
-colorTo: blue
+title: ECFlow
+emoji: ⚡
+colorFrom: blue
+colorTo: purple
sdk: gradio
-sdk_version: 6.9.0
+sdk_version: "4.44.0"
app_file: app.py
pinned: false
+license: mit
+short_description: Bayesian inference for CV & TPD analysis
---
-Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
+# ECFlow — Amortized Bayesian Inference for Electrochemistry & Catalysis
+
+Upload cyclic voltammetry (CV) or temperature-programmed desorption (TPD) data to automatically:
+
+1. **Identify the reaction mechanism** from 6 candidates per domain
+2. **Infer kinetic parameters** with full Bayesian posterior uncertainty
+
+Inference takes ~50 ms on CPU. Accepts CSV files or plot images.
+
+## Supported Mechanisms
+
+**Electrochemistry (CV):** Nernst, Butler-Volmer, Marcus-Hush-Chidsey, Adsorption, EC, Langmuir-Hinshelwood
+
+**Catalysis (TPD):** First-order, Second-order, LH Surface, Mars-van Krevelen, Coverage-dependent, Diffusion-limited
+
+## Citation
+
+```
+[Citation to be added upon publication]
+```
diff --git a/app.py b/app.py
new file mode 100644
index 0000000000000000000000000000000000000000..984f8a0a3ee616e86cb9a1a438703774744e37da
--- /dev/null
+++ b/app.py
@@ -0,0 +1,958 @@
+"""
+ECFlow — Amortized Bayesian Inference for Electrochemistry & Catalysis
+
+Gradio web interface for mechanism classification and parameter inference
+from cyclic voltammetry (CV) and temperature-programmed desorption (TPD) data.
+"""
+
+import os
+import sys
+import json
+import tempfile
+from pathlib import Path
+
+import numpy as np
+import gradio as gr
+
+
+
+from inference import ECFlowPredictor
+from preprocessing import (
+ nondimensionalize_cv,
+ estimate_E0,
+ parse_cv_csv,
+ parse_tpd_csv,
+)
+from plotting import (
+ plot_mechanism_probs,
+ plot_posteriors,
+ plot_parameter_table,
+ plot_reconstruction,
+ plot_concentration_profiles,
+)
+
+# ---------------------------------------------------------------------------
+# Model paths (relative to repo root)
+# ---------------------------------------------------------------------------
+REPO_ROOT = Path(__file__).resolve().parent
+
+EC_CHECKPOINT = REPO_ROOT / "checkpoints" / "ec_best.pt"
+TPD_CHECKPOINT = REPO_ROOT / "checkpoints" / "tpd_best.pt"
+
+# Allow override via environment variables
+EC_CHECKPOINT = Path(os.environ.get("ECFLOW_EC_CHECKPOINT", str(EC_CHECKPOINT)))
+TPD_CHECKPOINT = Path(os.environ.get("ECFLOW_TPD_CHECKPOINT", str(TPD_CHECKPOINT)))
+
+predictor = None
+
+
+def get_predictor():
+ global predictor
+ if predictor is None:
+ ec_ckpt = str(EC_CHECKPOINT) if EC_CHECKPOINT.exists() else None
+ tpd_ckpt = str(TPD_CHECKPOINT) if TPD_CHECKPOINT.exists() else None
+ predictor = ECFlowPredictor(
+ ec_checkpoint=ec_ckpt,
+ tpd_checkpoint=tpd_ckpt,
+ device="cpu",
+ )
+ return predictor
+
+
+# =========================================================================
+# CV Analysis
+# =========================================================================
+
+def analyze_cv(files, scan_rates_text, E0_V, T_K, A_cm2,
+ C_mM, D_cm2s, n_electrons, n_samples):
+ """Analyze CV data from potentiostat CSV files.
+
+ Accepts CSV files with columns for potential (V) and current (A/mA/µA).
+ If the CSV includes a Time (s) column, the scan rate is auto-detected.
+ Otherwise, scan rates must be provided.
+ """
+ if not files:
+ return _ec_error("Please upload at least one CSV file.")
+
+ scan_rates_text = scan_rates_text.strip() if scan_rates_text else ""
+
+ user_rates = None
+ if scan_rates_text:
+ try:
+ user_rates = [float(s.strip()) for s in scan_rates_text.split(",")]
+ except ValueError:
+ return _ec_error("Invalid scan rates. Enter comma-separated numbers in V/s.")
+ if len(files) != len(user_rates):
+ return _ec_error(
+ f"Number of files ({len(files)}) must match number of "
+ f"scan rates ({len(user_rates)}).")
+
+ C_molcm3 = float(C_mM) * 1e-6 if C_mM else 1e-6
+ n = int(n_electrons) if n_electrons else 1
+ T = float(T_K) if T_K else 298.15
+ A = float(A_cm2) if A_cm2 else 0.0707
+
+ parsed_data = []
+ scan_rates = []
+ for idx, f in enumerate(files):
+ content = Path(f.name).read_text()
+ parsed = parse_cv_csv(content)
+ parsed_data.append(parsed)
+
+ if user_rates is not None:
+ v = user_rates[idx]
+ elif "scan_rate_Vs" in parsed:
+ v = parsed["scan_rate_Vs"]
+ else:
+ return _ec_error(
+ f"Cannot determine scan rate for file '{Path(f.name).name}'. "
+ "Either provide scan rates (V/s) or upload CSV files that "
+ "include a Time (s) column.")
+ scan_rates.append(v)
+
+ if E0_V:
+ e0 = float(E0_V)
+ e0_source = "user"
+ else:
+ e0_estimates = [estimate_E0(p["E_V"], p["i_A"]) for p in parsed_data]
+ e0 = float(np.median(e0_estimates))
+ e0_source = "auto"
+
+ D = float(D_cm2s) if D_cm2s else 1e-5
+
+ potentials, fluxes, sigmas_list = [], [], []
+ for idx, (parsed, v) in enumerate(zip(parsed_data, scan_rates)):
+ E, i_A = parsed["E_V"], parsed["i_A"]
+
+ theta, flux, sigma = nondimensionalize_cv(
+ E, i_A, v, e0, T, A, C_molcm3, D, n
+ )
+ potentials.append(theta)
+ fluxes.append(flux)
+ sigmas_list.append(sigma)
+
+ result = _run_ec_analysis(potentials, fluxes, sigmas_list, n_samples)
+
+ preproc_info = "\n\n---\n*Preprocessing:* "
+ rate_strs = [f"{v*1000:.1f} mV/s (σ={s:.2f})" for v, s in zip(scan_rates, sigmas_list)]
+ preproc_info += f"Scan rates: {', '.join(rate_strs)}. "
+ if e0_source == "auto":
+ preproc_info += (
+ f"E₀ auto-estimated as {e0:.4f} V from peak midpoints. "
+ "For better accuracy, provide E₀ under Advanced parameters."
+ )
+ else:
+ preproc_info += f"E₀ = {e0:.4f} V (user-provided)."
+
+ result_list = list(result)
+ if isinstance(result_list[1], str):
+ result_list[1] += preproc_info
+ return tuple(result_list)
+
+
+def analyze_cv_image(image, scan_rate_text, E0_V, threshold, n_samples,
+ x_min, x_max, y_min, y_max):
+ """Analyze CV from an uploaded plot image.
+
+ Extracts the CV curve via image digitization, then nondimensionalizes
+ and runs inference identically to the CSV path.
+ Axis bounds are auto-detected via OCR if not provided.
+ """
+ if image is None:
+ return _ec_error("Please upload an image.")
+
+ try:
+ from digitizer import digitize_plot, auto_detect_axis_bounds
+ except ImportError:
+ return _ec_error("OpenCV not available for image digitization.")
+
+ scan_rate_text = scan_rate_text.strip() if scan_rate_text else ""
+ if not scan_rate_text:
+ return _ec_error("Please enter the scan rate (V/s).")
+ try:
+ v_Vs = float(scan_rate_text)
+ except ValueError:
+ return _ec_error("Invalid scan rate. Enter a number in V/s.")
+
+ img_arr = np.array(image)
+
+ # Determine axis bounds: user overrides take priority, else auto-detect
+ has_user_bounds = all(
+ v is not None and v != 0 for v in [x_min, x_max, y_min, y_max]
+ )
+ if has_user_bounds:
+ bounds = {
+ "x_min": float(x_min), "x_max": float(x_max),
+ "y_min": float(y_min), "y_max": float(y_max),
+ }
+ bounds_source = "user"
+ else:
+ bounds = auto_detect_axis_bounds(img_arr)
+ if bounds is None:
+ return _ec_error(
+ "Could not auto-detect axis bounds from the image. "
+ "Please enter E min, E max, I min, I max under "
+ "'Advanced: axis overrides'.")
+ bounds_source = "auto"
+
+ try:
+ E_V, I_raw = digitize_plot(
+ img_arr, bounds["x_min"], bounds["x_max"],
+ bounds["y_min"], bounds["y_max"],
+ threshold=int(threshold),
+ )
+ except Exception as e:
+ return _ec_error(f"Digitization failed: {e}")
+
+ # Convert current units: OCR reads axis labels so I_raw is in the
+ # display unit (µA, mA, A). Assume A unless values are large.
+ i_max = np.max(np.abs(I_raw))
+ if i_max > 100:
+ i_A = I_raw * 1e-6 # likely µA
+ i_unit_guess = "µA"
+ elif i_max > 0.1:
+ i_A = I_raw * 1e-3 # likely mA
+ i_unit_guess = "mA"
+ else:
+ i_A = I_raw
+ i_unit_guess = "A"
+
+ if E0_V is not None and E0_V != 0:
+ e0 = float(E0_V)
+ e0_source = "user"
+ else:
+ e0 = float(estimate_E0(E_V, i_A))
+ e0_source = "auto"
+
+ D = 1e-5
+ T = 298.15
+ A = 0.0707
+ C_molcm3 = 1e-6
+ n = 1
+
+ theta, flux, sigma = nondimensionalize_cv(
+ E_V, i_A, v_Vs, e0, T, A, C_molcm3, D, n
+ )
+
+ result = _run_ec_analysis([theta], [flux], [sigma], n_samples)
+
+ preproc_info = "\n\n---\n*Preprocessing (image):* "
+ preproc_info += f"Scan rate: {v_Vs*1000:.1f} mV/s (σ={sigma:.2f}). "
+ preproc_info += f"Axis bounds ({bounds_source}): E=[{bounds['x_min']:.3f}, {bounds['x_max']:.3f}] V, "
+ preproc_info += f"I=[{bounds['y_min']:.2f}, {bounds['y_max']:.2f}] {i_unit_guess}. "
+ if e0_source == "auto":
+ preproc_info += f"E₀ auto-estimated as {e0:.4f} V."
+ else:
+ preproc_info += f"E₀ = {e0:.4f} V (user-provided)."
+
+ result_list = list(result)
+ if isinstance(result_list[1], str):
+ result_list[1] += preproc_info
+ return tuple(result_list)
+
+
+def _ec_error(msg=""):
+ """Return empty outputs for EC error cases."""
+ return None, msg, None, gr.update(choices=[], value=None), None, None, None
+
+
+def _run_ec_analysis(potentials, fluxes, sigmas, n_samples):
+ """Core EC analysis: predict + reconstruct for top mechanism."""
+ pred = get_predictor()
+ result = pred.predict_ec(potentials, fluxes, sigmas, n_samples=int(n_samples))
+ top_mech = result["predicted_mechanism"]
+ recon = pred.reconstruct_ec(result, potentials, fluxes, sigmas)
+
+ fig_probs = plot_mechanism_probs(result["mechanism_probs"], domain="ec")
+ summary = _build_summary_text(result, recon=recon, domain="ec")
+
+ sorted_mechs = sorted(result["mechanism_probs"].items(), key=lambda x: -x[1])
+ mech_choices = [f"{m} ({p:.1%})" for m, p in sorted_mechs]
+
+ state = {
+ "result": result,
+ "potentials": [p.tolist() for p in potentials],
+ "fluxes": [f.tolist() for f in fluxes],
+ "sigmas": sigmas,
+ }
+
+ fig_post, fig_recon, fig_conc = _render_ec_mechanism(
+ top_mech, result, recon, sigmas
+ )
+
+ return (
+ fig_probs, summary, state,
+ gr.update(choices=mech_choices, value=mech_choices[0]),
+ fig_post, fig_recon, fig_conc,
+ )
+
+
+def _render_ec_mechanism(mech, result, recon, sigmas):
+ """Render posteriors, reconstruction, and concentration for one EC mechanism."""
+ stats = result["parameter_stats"].get(mech)
+ samples = result["posterior_samples"].get(mech)
+
+ fig_posteriors = None
+ if stats and samples is not None:
+ fig_posteriors = plot_posteriors(samples, stats["names"], mech, domain="ec")
+
+ fig_recon = None
+ fig_conc = None
+ if recon is not None:
+ scan_labels = [f"\u03c3 = {s:.2f}" for s in sigmas] if sigmas else None
+ fig_recon = plot_reconstruction(
+ recon["observed"], recon["reconstructed"], domain="ec",
+ nrmses=recon.get("nrmse"), r2s=recon.get("r2"),
+ scan_labels=scan_labels,
+ )
+ conc_curves = recon.get("concentrations")
+ if conc_curves:
+ fig_conc = plot_concentration_profiles(conc_curves, scan_labels=scan_labels)
+
+ return fig_posteriors, fig_recon, fig_conc
+
+
+def _on_ec_mechanism_change(mech_choice, state):
+ """Callback when user selects a different EC mechanism from the dropdown."""
+ if not state or not mech_choice:
+ return None, None, None
+
+ mech = mech_choice.split(" (")[0]
+ result = state["result"]
+ potentials = [np.array(p) for p in state["potentials"]]
+ fluxes = [np.array(f) for f in state["fluxes"]]
+ sigmas = state["sigmas"]
+
+ pred = get_predictor()
+ recon = pred.reconstruct_ec(result, potentials, fluxes, sigmas, mechanism=mech)
+ return _render_ec_mechanism(mech, result, recon, sigmas)
+
+
+# =========================================================================
+# TPD Analysis
+# =========================================================================
+
+def analyze_tpd(files, heating_rates_text, n_samples):
+ """Analyze TPD data."""
+ if not files:
+ return _tpd_error("Please upload at least one CSV file.")
+
+ temperatures, rates = [], []
+ csv_betas = []
+ for f in files:
+ content = Path(f.name).read_text()
+ parsed = parse_tpd_csv(content)
+ temperatures.append(parsed["T_K"])
+ rates.append(parsed["signal"])
+ if "beta_Ks" in parsed:
+ csv_betas.append(parsed["beta_Ks"])
+
+ heating_rates_text = heating_rates_text.strip() if heating_rates_text else ""
+ if heating_rates_text:
+ try:
+ betas = [float(s.strip()) for s in heating_rates_text.split(",")]
+ except ValueError:
+ return _tpd_error("Invalid heating rates. Enter comma-separated numbers in K/s.")
+ if len(files) != len(betas):
+ return _tpd_error(
+ f"Number of files ({len(files)}) must match heating rates ({len(betas)}).")
+ elif len(csv_betas) == len(files):
+ betas = csv_betas
+ else:
+ return _tpd_error(
+ "Please enter the heating rate (β in K/s) for each file. "
+ "This value is critical for correct inference. "
+ "Alternatively, include a 'Time (s)' column in your CSV so β can be computed automatically.")
+
+ return _run_tpd_analysis(temperatures, rates, betas, n_samples)
+
+
+def analyze_tpd_image(image, heating_rates_text, threshold, n_samples,
+ x_min, x_max, y_min, y_max):
+ """Analyze TPD from an uploaded plot image.
+
+ Axis bounds are auto-detected via OCR if not provided.
+ """
+ if image is None:
+ return _tpd_error("Please upload an image.")
+
+ try:
+ from digitizer import digitize_plot, auto_detect_axis_bounds
+ except ImportError:
+ return _tpd_error("OpenCV not available for image digitization.")
+
+ heating_rates_text = heating_rates_text.strip() if heating_rates_text else ""
+ if not heating_rates_text:
+ return _tpd_error(
+ "Please enter the heating rate (β in K/s). "
+ "This value is critical for correct inference.")
+ try:
+ betas = [float(s.strip()) for s in heating_rates_text.split(",")]
+ except ValueError:
+ return _tpd_error("Invalid heating rates.")
+
+ img_arr = np.array(image)
+
+ has_user_bounds = all(
+ v is not None and v != 0 for v in [x_min, x_max, y_min, y_max]
+ )
+ if has_user_bounds:
+ bounds = {
+ "x_min": float(x_min), "x_max": float(x_max),
+ "y_min": float(y_min), "y_max": float(y_max),
+ }
+ else:
+ bounds = auto_detect_axis_bounds(img_arr)
+ if bounds is None:
+ return _tpd_error(
+ "Could not auto-detect axis bounds from the image. "
+ "Please enter T min, T max, Signal min, Signal max "
+ "under 'Advanced: axis overrides'.")
+
+ try:
+ x_data, y_data = digitize_plot(
+ img_arr, bounds["x_min"], bounds["x_max"],
+ bounds["y_min"], bounds["y_max"],
+ threshold=int(threshold),
+ )
+ except Exception as e:
+ return _tpd_error(f"Digitization failed: {e}")
+
+ return _run_tpd_analysis([x_data], [y_data], betas[:1], n_samples)
+
+
+def _tpd_error(msg=""):
+ """Return empty outputs for TPD error cases."""
+ return None, msg, None, gr.update(choices=[], value=None), None, None
+
+
+def _run_tpd_analysis(temperatures, rates, betas, n_samples):
+ """Core TPD analysis: predict + reconstruct for top mechanism."""
+ pred = get_predictor()
+ result = pred.predict_tpd(temperatures, rates, betas, n_samples=int(n_samples))
+ top_mech = result["predicted_mechanism"]
+ recon = pred.reconstruct_tpd(result, temperatures, rates, betas)
+
+ fig_probs = plot_mechanism_probs(result["mechanism_probs"], domain="tpd")
+ summary = _build_summary_text(result, recon=recon, domain="tpd")
+
+ sorted_mechs = sorted(result["mechanism_probs"].items(), key=lambda x: -x[1])
+ mech_choices = [f"{m} ({p:.1%})" for m, p in sorted_mechs]
+
+ state = {
+ "result": result,
+ "temperatures": [t.tolist() for t in temperatures],
+ "rates": [r.tolist() for r in rates],
+ "betas": betas,
+ }
+
+ fig_post, fig_recon = _render_tpd_mechanism(top_mech, result, recon, betas)
+
+ return (
+ fig_probs, summary, state,
+ gr.update(choices=mech_choices, value=mech_choices[0]),
+ fig_post, fig_recon,
+ )
+
+
+def _render_tpd_mechanism(mech, result, recon, betas):
+ """Render posteriors and reconstruction for one TPD mechanism."""
+ stats = result["parameter_stats"].get(mech)
+ samples = result["posterior_samples"].get(mech)
+
+ fig_posteriors = None
+ if stats and samples is not None:
+ fig_posteriors = plot_posteriors(samples, stats["names"], mech, domain="tpd")
+
+ fig_recon = None
+ if recon is not None:
+ scan_labels = [f"\u03b2 = {b:.2f} K/s" for b in betas] if betas else None
+ fig_recon = plot_reconstruction(
+ recon["observed"], recon["reconstructed"], domain="tpd",
+ nrmses=recon.get("nrmse"), r2s=recon.get("r2"),
+ scan_labels=scan_labels,
+ )
+
+ return fig_posteriors, fig_recon
+
+
+def _on_tpd_mechanism_change(mech_choice, state):
+ """Callback when user selects a different TPD mechanism from the dropdown."""
+ if not state or not mech_choice:
+ return None, None
+
+ mech = mech_choice.split(" (")[0]
+ result = state["result"]
+ temperatures = [np.array(t) for t in state["temperatures"]]
+ rates = [np.array(r) for r in state["rates"]]
+ betas = state["betas"]
+
+ pred = get_predictor()
+ recon = pred.reconstruct_tpd(result, temperatures, rates, betas, mechanism=mech)
+ return _render_tpd_mechanism(mech, result, recon, betas)
+
+
+# =========================================================================
+# Shared helpers
+# =========================================================================
+
+def _build_summary_text(result, recon=None, domain="ec"):
+ """Build a markdown summary of inference results."""
+ mech = result["predicted_mechanism"]
+ prob = result["mechanism_probs"][mech]
+
+ lines = [
+ f"## Predicted Mechanism: **{mech}** ({prob:.1%} confidence)\n",
+ ]
+
+ stats = result["parameter_stats"].get(mech)
+ if stats:
+ lines.append("### Parameter Estimates (90% Credible Interval)\n")
+ lines.append("| Parameter | Mean | 90% CI |")
+ lines.append("|-----------|------|--------|")
+ for i, name in enumerate(stats["names"]):
+ mean = stats["mean"][i]
+ q05 = stats["q05"][i]
+ q95 = stats["q95"][i]
+ lines.append(f"| {name} | {mean:.4f} | [{q05:.4f}, {q95:.4f}] |")
+
+ if recon is not None:
+ lines.append("\n### Signal Reconstruction Quality\n")
+ lines.append(f"- **Average NRMSE**: {recon['mean_nrmse']:.4f}")
+ lines.append(f"- **Average R\u00b2**: {recon['mean_r2']:.4f}")
+ if len(recon["nrmse"]) > 1:
+ lines.append("\n| Curve | NRMSE | R\u00b2 |")
+ lines.append("|-------|-------|-----|")
+ for i, (n, r) in enumerate(zip(recon["nrmse"], recon["r2"])):
+ lines.append(f"| {i + 1} | {n:.4f} | {r:.4f} |")
+
+ lines.append("\n### All Mechanism Probabilities\n")
+ lines.append("| Mechanism | Probability |")
+ lines.append("|-----------|-------------|")
+ sorted_mechs = sorted(result["mechanism_probs"].items(), key=lambda x: -x[1])
+ for m, p in sorted_mechs:
+ marker = " \u2190 predicted" if m == mech else ""
+ lines.append(f"| {m} | {p:.4f} |{marker}")
+ lines.append("\n*Use the dropdown below to view posteriors and reconstruction for any mechanism.*")
+
+ result_json = {
+ "predicted_mechanism": mech,
+ "mechanism_probs": result["mechanism_probs"],
+ "parameter_stats": {
+ k: {kk: vv for kk, vv in v.items() if kk != "samples"}
+ for k, v in result["parameter_stats"].items()
+ } if result["parameter_stats"] else {},
+ }
+ if recon:
+ result_json["reconstruction"] = {
+ "mean_nrmse": recon["mean_nrmse"],
+ "mean_r2": recon["mean_r2"],
+ }
+ lines.append(f"\nRaw JSON
\n\n```json\n{json.dumps(result_json, indent=2)}\n```\n ")
+
+ return "\n".join(lines)
+
+
+def download_results(result_text):
+ """Create a downloadable JSON from the summary."""
+ if not result_text:
+ return None
+ tmp = tempfile.NamedTemporaryFile(suffix=".json", delete=False, mode="w")
+ tmp.write(result_text)
+ tmp.close()
+ return tmp.name
+
+
+# =========================================================================
+# Gradio UI
+# =========================================================================
+
+def _build_ec_output_section(prefix):
+ """Build shared output components for one EC input tab.
+
+ Returns (probs_plot, summary_md, state, mech_dropdown,
+ posteriors_plot, recon_plot, conc_plot).
+ """
+ with gr.Row():
+ probs = gr.Plot(label="Mechanism Classification")
+ summary = gr.Markdown(label="Summary")
+ state = gr.State(value=None)
+ gr.Markdown("---")
+ gr.Markdown(
+ "### Mechanism Details\n"
+ "Select a mechanism below to view its parameter posteriors, "
+ "signal reconstruction, and surface concentration profiles."
+ )
+ mech_dd = gr.Dropdown(
+ label="View mechanism (select to explore alternatives)",
+ choices=[],
+ interactive=True,
+ )
+ posteriors = gr.Plot(label="Parameter Posteriors")
+ with gr.Row():
+ recon = gr.Plot(label="Signal Reconstruction")
+ conc = gr.Plot(label="Surface Concentration Profiles")
+ return probs, summary, state, mech_dd, posteriors, recon, conc
+
+
+def _build_tpd_output_section(prefix):
+ """Build shared output components for one TPD input tab.
+
+ Returns (probs_plot, summary_md, state, mech_dropdown,
+ posteriors_plot, recon_plot).
+ """
+ with gr.Row():
+ probs = gr.Plot(label="Mechanism Classification")
+ summary = gr.Markdown(label="Summary")
+ state = gr.State(value=None)
+ gr.Markdown("---")
+ gr.Markdown(
+ "### Mechanism Details\n"
+ "Select a mechanism below to view its parameter posteriors "
+ "and signal reconstruction."
+ )
+ mech_dd = gr.Dropdown(
+ label="View mechanism (select to explore alternatives)",
+ choices=[],
+ interactive=True,
+ )
+ posteriors = gr.Plot(label="Parameter Posteriors")
+ recon = gr.Plot(label="Signal Reconstruction")
+ return probs, summary, state, mech_dd, posteriors, recon
+
+
+def build_app():
+ with gr.Blocks(
+ title="ECFlow — Bayesian Inference for Electrochemistry & Catalysis",
+ ) as app:
+ gr.Markdown(
+ "# ECFlow\n"
+ "### Amortized Bayesian Inference for Electrochemistry & Catalysis\n"
+ "Upload cyclic voltammetry (CV) or temperature-programmed desorption (TPD) data "
+ "to identify the reaction mechanism and infer kinetic parameters with full uncertainty quantification.",
+ elem_classes=["main-title"],
+ )
+
+ with gr.Tabs():
+ # =================================================================
+ # Tab 1: CV Analysis
+ # =================================================================
+ with gr.Tab("CV Analysis"):
+ with gr.Tabs():
+ # --- CSV upload mode (primary) ---
+ with gr.Tab("CSV Data"):
+ gr.Markdown(
+ "Upload CSV files exported from your potentiostat. "
+ "Expected columns: **potential** (V) and **current** (A/mA/µA). "
+ "One file per scan rate. For best accuracy, upload multiple scan rates.\n\n"
+ "If your CSV includes a **Time (s)** column, the scan rate is "
+ "detected automatically. Otherwise, enter scan rates below."
+ )
+ with gr.Row():
+ with gr.Column(scale=3):
+ cv_files = gr.File(
+ label="CSV files (one per scan rate)",
+ file_count="multiple",
+ file_types=[".csv", ".txt"],
+ )
+ cv_rates = gr.Textbox(
+ label="Scan rates (V/s), comma-separated",
+ placeholder="e.g., 0.01, 0.1, 1.0 (leave empty if CSV has time column)",
+ value="",
+ )
+ with gr.Column(scale=1):
+ cv_nsamples = gr.Slider(
+ 100, 2000, value=500, step=100,
+ label="Posterior samples",
+ )
+ cv_btn = gr.Button("Analyze", variant="primary")
+ with gr.Accordion("Advanced parameters", open=False):
+ cv_E0 = gr.Number(
+ label="Formal potential E₀ (V)",
+ value=None,
+ info="Auto-estimated from peak positions if empty",
+ )
+ cv_T = gr.Number(label="Temperature (K)", value=298.15)
+ cv_A = gr.Number(label="Electrode area (cm²)", value=0.0707)
+ cv_C = gr.Number(label="Concentration (mM)", value=1.0)
+ cv_D = gr.Number(
+ label="Diffusion coeff D (cm²/s)",
+ value=None,
+ info="Estimated via Randles-Ševčík if empty",
+ )
+ cv_n = gr.Number(label="Number of electrons", value=1, precision=0)
+
+ (cv_probs, cv_summary, cv_state,
+ cv_mech_dd, cv_posteriors,
+ cv_recon, cv_conc) = _build_ec_output_section("cv")
+
+ ec_outputs = [
+ cv_probs, cv_summary, cv_state,
+ cv_mech_dd, cv_posteriors,
+ cv_recon, cv_conc,
+ ]
+ cv_btn.click(
+ analyze_cv,
+ inputs=[
+ cv_files, cv_rates, cv_E0, cv_T,
+ cv_A, cv_C, cv_D, cv_n, cv_nsamples,
+ ],
+ outputs=ec_outputs,
+ )
+ cv_mech_dd.change(
+ _on_ec_mechanism_change,
+ inputs=[cv_mech_dd, cv_state],
+ outputs=[cv_posteriors, cv_recon, cv_conc],
+ )
+
+ # --- Image mode ---
+ with gr.Tab("From Image"):
+ gr.Markdown(
+ "Upload an image of a CV plot (potential in V on x-axis, "
+ "current in A/mA/µA on y-axis). Axis bounds are "
+ "**auto-detected** via OCR — override in Advanced if needed."
+ )
+ with gr.Row():
+ with gr.Column(scale=3):
+ cv_img = gr.Image(label="Plot image", type="numpy")
+ cv_img_scan_rate = gr.Textbox(
+ label="Scan rate (V/s)",
+ placeholder="e.g., 0.1",
+ value="",
+ )
+ with gr.Column(scale=1):
+ cv_img_nsamples = gr.Slider(
+ 100, 2000, value=500, step=100,
+ label="Posterior samples",
+ )
+ cv_img_btn = gr.Button("Analyze", variant="primary")
+ with gr.Accordion("Advanced parameters", open=False):
+ cv_img_E0 = gr.Number(
+ label="Formal potential E₀ (V)",
+ value=None,
+ info="Auto-estimated from peaks if empty",
+ )
+ cv_img_threshold = gr.Slider(
+ 0, 255, value=128, step=1,
+ label="Binarization threshold",
+ )
+ with gr.Accordion("Advanced: axis overrides", open=False):
+ gr.Markdown(
+ "Leave at 0 to auto-detect from the image. "
+ "Override if OCR detection is inaccurate."
+ )
+ with gr.Row():
+ cv_img_xmin = gr.Number(label="E min (V)", value=None)
+ cv_img_xmax = gr.Number(label="E max (V)", value=None)
+ with gr.Row():
+ cv_img_ymin = gr.Number(label="I min", value=None)
+ cv_img_ymax = gr.Number(label="I max", value=None)
+
+ (cv_img_probs, cv_img_summary, cv_img_state,
+ cv_img_mech_dd, cv_img_posteriors,
+ cv_img_recon, cv_img_conc) = _build_ec_output_section("cv_img")
+
+ ec_img_outputs = [
+ cv_img_probs, cv_img_summary, cv_img_state,
+ cv_img_mech_dd, cv_img_posteriors,
+ cv_img_recon, cv_img_conc,
+ ]
+ cv_img_btn.click(
+ analyze_cv_image,
+ inputs=[
+ cv_img, cv_img_scan_rate, cv_img_E0,
+ cv_img_threshold, cv_img_nsamples,
+ cv_img_xmin, cv_img_xmax,
+ cv_img_ymin, cv_img_ymax,
+ ],
+ outputs=ec_img_outputs,
+ )
+ cv_img_mech_dd.change(
+ _on_ec_mechanism_change,
+ inputs=[cv_img_mech_dd, cv_img_state],
+ outputs=[cv_img_posteriors, cv_img_recon, cv_img_conc],
+ )
+
+ # =================================================================
+ # Tab 2: TPD Analysis
+ # =================================================================
+ with gr.Tab("TPD Analysis"):
+ with gr.Tabs():
+ # --- CSV mode ---
+ with gr.Tab("CSV Data"):
+ gr.Markdown(
+ "Upload CSV files with Temperature (K) and Signal columns. "
+ "One file per heating rate. **You must provide the correct β for each file** — "
+ "the model uses β to condition inference. "
+ "If your CSV includes a Time (s) column, β is computed automatically. "
+ "For best accuracy, upload multiple heating rates."
+ )
+ with gr.Row():
+ with gr.Column(scale=1):
+ tpd_files = gr.File(
+ label="CSV files (one per heating rate)",
+ file_count="multiple",
+ file_types=[".csv", ".txt"],
+ )
+ tpd_betas = gr.Textbox(
+ label="Heating rates β (K/s), comma-separated (auto-detected if CSV has time column)",
+ placeholder="e.g., 0.3, 2.6, 22.1 (leave empty for auto-detect)",
+ value="",
+ )
+ tpd_nsamples = gr.Slider(
+ 100, 2000, value=500, step=100,
+ label="Posterior samples",
+ )
+ tpd_btn = gr.Button("Analyze", variant="primary")
+
+ (tpd_probs, tpd_summary, tpd_state,
+ tpd_mech_dd, tpd_posteriors,
+ tpd_recon) = _build_tpd_output_section("tpd")
+
+ tpd_outputs = [
+ tpd_probs, tpd_summary, tpd_state,
+ tpd_mech_dd, tpd_posteriors, tpd_recon,
+ ]
+ tpd_btn.click(
+ analyze_tpd,
+ inputs=[tpd_files, tpd_betas, tpd_nsamples],
+ outputs=tpd_outputs,
+ )
+ tpd_mech_dd.change(
+ _on_tpd_mechanism_change,
+ inputs=[tpd_mech_dd, tpd_state],
+ outputs=[tpd_posteriors, tpd_recon],
+ )
+
+ # --- Image mode ---
+ with gr.Tab("From Image"):
+ gr.Markdown(
+ "Upload an image of a TPD plot (temperature in K on "
+ "x-axis, signal on y-axis). Axis bounds are "
+ "**auto-detected** via OCR — override in Advanced if needed."
+ )
+ with gr.Row():
+ with gr.Column(scale=3):
+ tpd_img = gr.Image(label="Plot image", type="numpy")
+ tpd_img_betas = gr.Textbox(
+ label="Heating rate β (K/s)",
+ placeholder="e.g., 5.0",
+ value="",
+ )
+ with gr.Column(scale=1):
+ tpd_img_nsamples = gr.Slider(
+ 100, 2000, value=500, step=100,
+ label="Posterior samples",
+ )
+ tpd_img_btn = gr.Button("Analyze", variant="primary")
+ with gr.Accordion("Advanced parameters", open=False):
+ tpd_img_threshold = gr.Slider(
+ 0, 255, value=128, step=1,
+ label="Binarization threshold",
+ )
+ with gr.Accordion("Advanced: axis overrides", open=False):
+ gr.Markdown(
+ "Leave at 0 to auto-detect from the image. "
+ "Override if OCR detection is inaccurate."
+ )
+ with gr.Row():
+ tpd_img_xmin = gr.Number(label="T min (K)", value=None)
+ tpd_img_xmax = gr.Number(label="T max (K)", value=None)
+ with gr.Row():
+ tpd_img_ymin = gr.Number(label="Signal min", value=None)
+ tpd_img_ymax = gr.Number(label="Signal max", value=None)
+
+ (tpd_img_probs, tpd_img_summary, tpd_img_state,
+ tpd_img_mech_dd, tpd_img_posteriors,
+ tpd_img_recon) = _build_tpd_output_section("tpd_img")
+
+ tpd_img_outputs = [
+ tpd_img_probs, tpd_img_summary, tpd_img_state,
+ tpd_img_mech_dd, tpd_img_posteriors, tpd_img_recon,
+ ]
+ tpd_img_btn.click(
+ analyze_tpd_image,
+ inputs=[
+ tpd_img, tpd_img_betas,
+ tpd_img_threshold, tpd_img_nsamples,
+ tpd_img_xmin, tpd_img_xmax,
+ tpd_img_ymin, tpd_img_ymax,
+ ],
+ outputs=tpd_img_outputs,
+ )
+ tpd_img_mech_dd.change(
+ _on_tpd_mechanism_change,
+ inputs=[tpd_img_mech_dd, tpd_img_state],
+ outputs=[tpd_img_posteriors, tpd_img_recon],
+ )
+
+ # =================================================================
+ # Tab 3: About
+ # =================================================================
+ with gr.Tab("About"):
+ gr.Markdown("""
+## About ECFlow
+
+ECFlow performs **amortized Bayesian inference** for electrochemical and catalytic systems.
+Given experimental data, it simultaneously:
+
+1. **Classifies the reaction mechanism** from a library of 6 mechanisms per domain
+2. **Infers kinetic parameters** with full posterior uncertainty quantification
+
+### Electrochemistry (CV) Mechanisms
+
+| Mechanism | Parameters | Description |
+|-----------|-----------|-------------|
+| Nernst | E₀, d_A, d_B | Reversible (Nernstian) electron transfer |
+| BV | K₀, α, d_B | Butler-Volmer kinetics |
+| MHC | K₀, λ, d_B | Marcus-Hush-Chidsey kinetics |
+| Ads | K₀, α, Γ_sat | Surface-confined (Laviron) kinetics |
+| EC | K₀, α, k_c, d_B | Electron transfer + chemical follow-up |
+| LH | K₀, α, K_A, K_B, d_B | Langmuir-Hinshelwood surface reaction |
+
+### Catalysis (TPD) Mechanisms
+
+| Mechanism | Parameters | Description |
+|-----------|-----------|-------------|
+| FirstOrder | E_d, ν, θ₀ | First-order desorption |
+| SecondOrder | E_d, ν, θ₀ | Second-order (recombinative) desorption |
+| LH_Surface | E_a, ν, θ_A0, θ_B0 | Langmuir-Hinshelwood surface reaction |
+| MvK | E_a,red, E_a,reox, ν_red, θ_O0 | Mars-van Krevelen mechanism |
+| FirstOrderCovDep | E_d0, α_cov, ν, θ₀ | Coverage-dependent activation energy |
+| DiffLimited | E_d, ν, D₀, E_diff, θ₀ | Diffusion-limited desorption |
+
+### How It Works
+
+The model uses **conditional normalizing flows** with a Set Transformer encoder
+to process multi-scan-rate/multi-heating-rate data. Training uses simulated data
+with coverage-aware calibration loss for well-calibrated uncertainty estimates.
+
+Inference takes **~5 ms per sample** on CPU, making it suitable for real-time analysis.
+
+### Citation
+
+If you use ECFlow in your research, please cite:
+```
+[Citation to be added upon publication]
+```
+""")
+
+ return app
+
+
+# =========================================================================
+# Entry point
+# =========================================================================
+
+if __name__ == "__main__":
+ app = build_app()
+ app.launch(
+ server_name="0.0.0.0",
+ server_port=7860,
+ share=False,
+ show_error=True,
+ theme=gr.themes.Soft(
+ primary_hue="blue",
+ secondary_hue="purple",
+ ),
+ )
diff --git a/checkpoints/ec_best.pt b/checkpoints/ec_best.pt
new file mode 100644
index 0000000000000000000000000000000000000000..d151f1524a7d9c96b417366aa3b3c8db2a4f2ab7
--- /dev/null
+++ b/checkpoints/ec_best.pt
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:875cfed256127e9a3d1fd63cf37f53fd911333e4bd606f5693605503b4e3c7d3
+size 24782085
diff --git a/checkpoints/ec_norm_stats.json b/checkpoints/ec_norm_stats.json
new file mode 100644
index 0000000000000000000000000000000000000000..5161260c267d655d23629c693ada94f4ab05ed05
--- /dev/null
+++ b/checkpoints/ec_norm_stats.json
@@ -0,0 +1,14 @@
+{
+ "potential": [
+ -0.2561522126197815,
+ 6.610905647277832
+ ],
+ "flux": [
+ -0.16024018824100494,
+ 0.4030846059322357
+ ],
+ "time": [
+ 55.81125259399414,
+ 97.78398132324219
+ ]
+}
\ No newline at end of file
diff --git a/checkpoints/ec_theta_stats.json b/checkpoints/ec_theta_stats.json
new file mode 100644
index 0000000000000000000000000000000000000000..fe2ce34f58393cd9ec2fb1ea46beb84bdeab814d
--- /dev/null
+++ b/checkpoints/ec_theta_stats.json
@@ -0,0 +1,86 @@
+{
+ "Nernst": {
+ "mean": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "std": [
+ 1.0,
+ 1.0,
+ 1.0
+ ],
+ "count": 0
+ },
+ "BV": {
+ "mean": [
+ 0.24877089262008667,
+ 0.5012289881706238,
+ 0.001087042037397623
+ ],
+ "std": [
+ 1.2288978099822998,
+ 0.11590524017810822,
+ 0.17334586381912231
+ ],
+ "count": 50000
+ },
+ "MHC": {
+ "mean": [
+ 0.24597173929214478,
+ 1.2555487155914307,
+ 6.6473007791501004e-06
+ ],
+ "std": [
+ 1.230795979499817,
+ 0.43290403485298157,
+ 0.17297042906284332
+ ],
+ "count": 25000
+ },
+ "Ads": {
+ "mean": [
+ 0.5109419822692871,
+ 0.5001951456069946,
+ -0.0006525946082547307
+ ],
+ "std": [
+ 1.4398391246795654,
+ 0.11588186025619507,
+ 0.5781700611114502
+ ],
+ "count": 25000
+ },
+ "EC": {
+ "mean": [
+ 0.2524825632572174,
+ 0.5007891654968262,
+ 0.49757543206214905,
+ 0.0015599444741383195
+ ],
+ "std": [
+ 1.2367433309555054,
+ 0.11539296805858612,
+ 1.447318196296692,
+ 0.1735958307981491
+ ],
+ "count": 25000
+ },
+ "LH": {
+ "mean": [
+ 0.2653096616268158,
+ 0.5004855394363403,
+ 0.49786701798439026,
+ 0.5003064870834351,
+ -0.0005569184431806207
+ ],
+ "std": [
+ 1.2338130474090576,
+ 0.11521629244089127,
+ 0.8666039705276489,
+ 0.8665307760238647,
+ 0.17345362901687622
+ ],
+ "count": 25000
+ }
+}
\ No newline at end of file
diff --git a/checkpoints/tpd_best.pt b/checkpoints/tpd_best.pt
new file mode 100644
index 0000000000000000000000000000000000000000..68c8b887867dc95a07411c89b05b15653a5c6991
--- /dev/null
+++ b/checkpoints/tpd_best.pt
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:656bfaa0b3b0c3cfdbb13f528961966bfb135baec10141aa08dbe698628568b2
+size 27588293
diff --git a/checkpoints/tpd_norm_stats.json b/checkpoints/tpd_norm_stats.json
new file mode 100644
index 0000000000000000000000000000000000000000..105536b9ecc9bc9a42321a4f141a88cb85111ba5
--- /dev/null
+++ b/checkpoints/tpd_norm_stats.json
@@ -0,0 +1,10 @@
+{
+ "temperature": [
+ 706.4283447265625,
+ 208.69534301757812
+ ],
+ "rate": [
+ 0.07081261277198792,
+ 0.20301415026187897
+ ]
+}
\ No newline at end of file
diff --git a/checkpoints/tpd_theta_stats.json b/checkpoints/tpd_theta_stats.json
new file mode 100644
index 0000000000000000000000000000000000000000..075a499c71c2ef98489a870bc898850e10c328da
--- /dev/null
+++ b/checkpoints/tpd_theta_stats.json
@@ -0,0 +1,90 @@
+{
+ "FirstOrder": {
+ "mean": [
+ 20736.841796875,
+ 14.062206268310547,
+ 0.5502052903175354
+ ],
+ "std": [
+ 4000.0927734375,
+ 1.1509202718734741,
+ 0.2610560357570648
+ ],
+ "count": 25000
+ },
+ "SecondOrder": {
+ "mean": [
+ 20673.869140625,
+ 14.048384666442871,
+ 0.5504401326179504
+ ],
+ "std": [
+ 3984.716552734375,
+ 1.1555602550506592,
+ 0.26032009720802307
+ ],
+ "count": 25000
+ },
+ "LH_Surface": {
+ "mean": [
+ 20714.19921875,
+ 14.058112144470215,
+ 0.5499274730682373,
+ 0.5487093925476074
+ ],
+ "std": [
+ 4012.2021484375,
+ 1.1622954607009888,
+ 0.25901710987091064,
+ 0.2591571807861328
+ ],
+ "count": 25000
+ },
+ "MvK": {
+ "mean": [
+ 20632.32421875,
+ 20696.904296875,
+ 14.04337215423584,
+ 0.749657392501831
+ ],
+ "std": [
+ 3959.21484375,
+ 3981.476806640625,
+ 1.1483906507492065,
+ 0.14467547833919525
+ ],
+ "count": 25000
+ },
+ "FirstOrderCovDep": {
+ "mean": [
+ 20698.447265625,
+ 4150.328125,
+ 14.05736255645752,
+ 0.6495101451873779
+ ],
+ "std": [
+ 3995.544189453125,
+ 1985.6788330078125,
+ 1.1550828218460083,
+ 0.20295052230358124
+ ],
+ "count": 25000
+ },
+ "DiffLimited": {
+ "mean": [
+ 20683.974609375,
+ 14.058959007263184,
+ 4.0007829666137695,
+ 12434.0107421875,
+ 0.6499263048171997
+ ],
+ "std": [
+ 3987.2158203125,
+ 1.150507926940918,
+ 1.1530061960220337,
+ 4364.41845703125,
+ 0.20163801312446594
+ ],
+ "count": 25000
+ }
+}
\ No newline at end of file
diff --git a/demo_data/ec_Ads_11mVs.csv b/demo_data/ec_Ads_11mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..87e7e7de3e2b4fee7becd6e845ec5c02939f57b0
--- /dev/null
+++ b/demo_data/ec_Ads_11mVs.csv
@@ -0,0 +1,613 @@
+Time (s),E (V),I (A)
+0.000000,0.48865084,8.6305661053e-10
+0.121492,0.48736620,-8.0962613013e-09
+0.242985,0.48608160,1.8415062300e-09
+0.364477,0.48479696,-2.0238478375e-09
+0.485970,0.48351233,1.6334221169e-09
+0.607462,0.48222769,-7.3551231405e-09
+0.728955,0.48094306,-9.6052419080e-10
+0.850447,0.47965845,1.8721567114e-09
+0.971940,0.47837382,-1.3129958911e-10
+1.093432,0.47708918,3.2303755498e-09
+1.214924,0.47580455,1.2841098554e-09
+1.336417,0.47451992,6.7288956893e-10
+1.457909,0.47323531,-5.1005728569e-09
+1.579402,0.47195067,-1.9477836790e-09
+1.700894,0.47066604,-2.8932885217e-09
+1.822387,0.46938141,-9.9166240880e-10
+1.943879,0.46809677,1.1036684876e-08
+2.065372,0.46681216,-1.5510896768e-09
+2.186864,0.46552753,2.3345304316e-09
+2.308356,0.46424290,1.7206135979e-09
+2.429849,0.46295826,2.6740970225e-09
+2.551341,0.46167363,2.2517962431e-09
+2.672834,0.46038902,-8.3764686125e-09
+2.794326,0.45910438,-3.7092244777e-10
+2.915819,0.45781975,-6.6841969028e-09
+3.037311,0.45653512,-6.4168181523e-09
+3.158804,0.45525050,3.5267510686e-09
+3.280296,0.45396586,-9.8570888043e-10
+3.401789,0.45268124,-5.1867934963e-09
+3.523281,0.45139661,-5.5397976139e-09
+3.644773,0.45011199,-6.6253644271e-11
+3.766266,0.44882735,-8.0144729836e-09
+3.887758,0.44754272,5.0590431502e-09
+4.009251,0.44625810,2.0416095461e-09
+4.130743,0.44497346,3.0889343439e-09
+4.252235,0.44368884,3.9985418111e-09
+4.373728,0.44240421,2.7368690488e-09
+4.495220,0.44111957,4.2170599035e-09
+4.616713,0.43983495,-2.2453094668e-09
+4.738205,0.43855032,-2.3716968891e-10
+4.859698,0.43726570,-4.1089893881e-09
+4.981190,0.43598106,6.1104780655e-09
+5.102683,0.43469643,-2.6120400881e-10
+5.224175,0.43341181,8.8341800378e-10
+5.345668,0.43212717,-4.2607068946e-09
+5.467160,0.43084255,-2.8118463722e-09
+5.588652,0.42955792,-2.6716573324e-09
+5.710145,0.42827329,-4.8375523211e-09
+5.831637,0.42698866,-5.7382468141e-09
+5.953130,0.42570403,1.9256661721e-09
+6.074622,0.42441941,-4.0109656028e-09
+6.196115,0.42313477,-1.1011179996e-09
+6.317607,0.42185014,-2.1764497946e-09
+6.439100,0.42056552,-4.4058075349e-09
+6.560592,0.41928089,-4.1063678541e-09
+6.682085,0.41799626,5.0750144103e-10
+6.803577,0.41671163,-2.6284259848e-09
+6.925070,0.41542700,-6.8336742846e-09
+7.046562,0.41414238,-6.2662517203e-09
+7.168054,0.41285774,-5.5248477411e-09
+7.289547,0.41157312,-7.1497252037e-09
+7.411039,0.41028849,1.3785648263e-09
+7.532532,0.40900385,-3.7436613620e-09
+7.654024,0.40771923,2.4365868040e-09
+7.775517,0.40643460,-7.1779422377e-09
+7.897009,0.40514998,-6.4892581175e-09
+8.018502,0.40386534,3.9989018743e-09
+8.139994,0.40258071,-1.0164400740e-08
+8.261486,0.40129609,-7.7378163627e-09
+8.382979,0.40001145,-8.8675295836e-09
+8.504471,0.39872683,-6.3737370324e-09
+8.625963,0.39744220,-4.6808249418e-09
+8.747456,0.39615756,-2.3765585479e-09
+8.868948,0.39487294,-2.2277557812e-09
+8.990441,0.39358831,-8.4884651863e-09
+9.111933,0.39230369,-6.4034921888e-09
+9.233426,0.39101905,-1.2653868907e-08
+9.354918,0.38973442,-5.7835261723e-09
+9.476411,0.38844980,-1.4080618971e-08
+9.597903,0.38716516,-2.8248634225e-09
+9.719396,0.38588054,-1.6647737549e-08
+9.840888,0.38459591,-6.7359022213e-09
+9.962380,0.38331128,-9.2173877798e-09
+10.083873,0.38202665,-1.4184665156e-08
+10.205365,0.38074202,-3.0013459476e-09
+10.326858,0.37945740,-1.3446528328e-08
+10.448350,0.37817276,-3.8609215444e-09
+10.569843,0.37688813,-1.3401743553e-08
+10.691335,0.37560351,-1.2462101014e-08
+10.812828,0.37431888,-2.2296434952e-08
+10.934320,0.37303425,-1.7401096110e-08
+11.055813,0.37174962,-1.4831172745e-08
+11.177305,0.37046499,-1.9514133900e-08
+11.298797,0.36918037,-2.0038664640e-08
+11.420290,0.36789573,-2.2545231380e-08
+11.541782,0.36661111,-1.9748772675e-08
+11.663275,0.36532648,-2.2588490517e-08
+11.784767,0.36404184,-1.0869775038e-08
+11.906260,0.36275722,-2.5116261517e-08
+12.027752,0.36147259,-2.2882348816e-08
+12.149245,0.36018797,-2.2347157950e-08
+12.270737,0.35890333,-2.5797328729e-08
+12.392230,0.35761870,-2.5048329591e-08
+12.513722,0.35633408,-3.2702593568e-08
+12.635214,0.35504944,-3.2809207721e-08
+12.756707,0.35376482,-3.5338069381e-08
+12.878199,0.35248019,-3.8993347308e-08
+12.999692,0.35119556,-3.1159274047e-08
+13.121184,0.34991093,-3.5947537984e-08
+13.242677,0.34862630,-4.7968162034e-08
+13.364169,0.34734167,-4.0437627697e-08
+13.485662,0.34605704,-3.6792363878e-08
+13.607154,0.34477242,-4.4528751265e-08
+13.728647,0.34348778,-4.4071272833e-08
+13.850139,0.34220315,-4.6176155635e-08
+13.971631,0.34091853,-4.9123563792e-08
+14.093124,0.33963390,-5.6043466368e-08
+14.214616,0.33834927,-5.7451009033e-08
+14.336109,0.33706464,-5.9253522512e-08
+14.457601,0.33578001,-5.6600396352e-08
+14.579094,0.33449538,-6.4193112880e-08
+14.700586,0.33321076,-7.2989345920e-08
+14.822079,0.33192613,-6.6395874877e-08
+14.943571,0.33064149,-7.4202238576e-08
+15.065064,0.32935687,-7.7308190538e-08
+15.186556,0.32807224,-8.1082800017e-08
+15.308049,0.32678761,-7.8743977624e-08
+15.429541,0.32550298,-8.8002883028e-08
+15.551033,0.32421835,-9.2035893843e-08
+15.672526,0.32293372,-9.2084720670e-08
+15.794018,0.32164909,-9.9757504945e-08
+15.915511,0.32036447,-1.0869640357e-07
+16.037003,0.31907984,-1.1816892392e-07
+16.158496,0.31779521,-1.1269204514e-07
+16.279988,0.31651058,-1.1244969602e-07
+16.401481,0.31522595,-1.3078449483e-07
+16.522972,0.31394132,-1.3541266194e-07
+16.644465,0.31265669,-1.3829115706e-07
+16.765957,0.31137206,-1.3894599201e-07
+16.887449,0.31008743,-1.4573103279e-07
+17.008942,0.30880281,-1.5796740801e-07
+17.130434,0.30751818,-1.5987952247e-07
+17.251927,0.30623355,-1.6078779037e-07
+17.373419,0.30494892,-1.7540198114e-07
+17.494912,0.30366429,-1.7460366220e-07
+17.616404,0.30237966,-1.8927895577e-07
+17.737897,0.30109503,-1.9487419949e-07
+17.859389,0.29981040,-1.9782260004e-07
+17.980882,0.29852578,-2.0769782410e-07
+18.102374,0.29724114,-2.2286223656e-07
+18.223866,0.29595652,-2.1958302250e-07
+18.345359,0.29467189,-2.2979751472e-07
+18.466851,0.29338726,-2.3442965138e-07
+18.588344,0.29210263,-2.5248584666e-07
+18.709836,0.29081800,-2.5155207307e-07
+18.831329,0.28953337,-2.6478925323e-07
+18.952821,0.28824875,-2.6530867220e-07
+19.074314,0.28696411,-2.8647916453e-07
+19.195806,0.28567949,-2.9410393393e-07
+19.317299,0.28439486,-3.0099897523e-07
+19.438791,0.28311023,-3.1314006821e-07
+19.560283,0.28182560,-3.1509422388e-07
+19.681776,0.28054097,-3.2502538260e-07
+19.803268,0.27925634,-3.4367340258e-07
+19.924761,0.27797171,-3.4609060437e-07
+20.046253,0.27668708,-3.5086115996e-07
+20.167746,0.27540246,-3.6030506858e-07
+20.289238,0.27411783,-3.7356663316e-07
+20.410731,0.27283320,-3.7766434903e-07
+20.532223,0.27154857,-3.8593288245e-07
+20.653716,0.27026394,-3.9545682660e-07
+20.775208,0.26897931,-4.0090885699e-07
+20.896701,0.26769468,-4.1200087883e-07
+21.018193,0.26641005,-4.1192452932e-07
+21.139685,0.26512543,-4.2390315405e-07
+21.261178,0.26384080,-4.2352883008e-07
+21.382670,0.26255617,-4.4338996181e-07
+21.504163,0.26127154,-4.3999243437e-07
+21.625655,0.25998691,-4.4353059751e-07
+21.747148,0.25870228,-4.4721635595e-07
+21.868640,0.25741765,-4.5500323274e-07
+21.990133,0.25613302,-4.5214943135e-07
+22.111625,0.25484839,-4.5841694772e-07
+22.233118,0.25356377,-4.6106814710e-07
+22.354610,0.25227914,-4.5829306665e-07
+22.476102,0.25099451,-4.5960028781e-07
+22.597595,0.24970988,-4.6229123430e-07
+22.719087,0.24842525,-4.6419955964e-07
+22.840580,0.24714062,-4.6306674118e-07
+22.962072,0.24585599,-4.5852196052e-07
+23.083565,0.24457136,-4.5831394548e-07
+23.205057,0.24328673,-4.6071810444e-07
+23.326550,0.24200211,-4.5254716023e-07
+23.448042,0.24071748,-4.5615894059e-07
+23.569535,0.23943285,-4.4695060192e-07
+23.691027,0.23814822,-4.4215130571e-07
+23.812519,0.23686359,-4.3647422211e-07
+23.934012,0.23557896,-4.3311216291e-07
+24.055504,0.23429433,-4.2842478756e-07
+24.176997,0.23300970,-4.1276653915e-07
+24.298489,0.23172507,-4.1762390945e-07
+24.419982,0.23044045,-4.0675134734e-07
+24.541474,0.22915582,-3.9572606044e-07
+24.662967,0.22787119,-3.9369266831e-07
+24.784459,0.22658656,-3.8424656870e-07
+24.905952,0.22530193,-3.7163699079e-07
+25.027444,0.22401730,-3.6567033583e-07
+25.148936,0.22273267,-3.6027967889e-07
+25.270429,0.22144804,-3.5262253441e-07
+25.391921,0.22016341,-3.4249075846e-07
+25.513414,0.21887879,-3.2331146240e-07
+25.634906,0.21759416,-3.2598743284e-07
+25.756399,0.21630953,-3.1538302197e-07
+25.877891,0.21502490,-3.0069285545e-07
+25.999384,0.21374027,-3.0038240525e-07
+26.120876,0.21245564,-2.8942741042e-07
+26.242369,0.21117101,-2.7988635078e-07
+26.363861,0.20988638,-2.6920907021e-07
+26.485354,0.20860176,-2.6360782060e-07
+26.606846,0.20731713,-2.4563617171e-07
+26.728338,0.20603250,-2.4339020213e-07
+26.849831,0.20474787,-2.3353758391e-07
+26.971323,0.20346324,-2.2808411004e-07
+27.092816,0.20217861,-2.1312945253e-07
+27.214308,0.20089398,-2.1681485010e-07
+27.335801,0.19960935,-2.0997863041e-07
+27.457293,0.19832473,-1.9720591406e-07
+27.578786,0.19704010,-1.9237191001e-07
+27.700278,0.19575546,-1.8217671138e-07
+27.821771,0.19447084,-1.7559798440e-07
+27.943263,0.19318621,-1.6831540876e-07
+28.064755,0.19190158,-1.6561140656e-07
+28.186248,0.19061695,-1.5659535936e-07
+28.307740,0.18933232,-1.4809936265e-07
+28.429233,0.18804769,-1.4746706910e-07
+28.550725,0.18676307,-1.3777135144e-07
+28.672218,0.18547844,-1.3023896443e-07
+28.793710,0.18419381,-1.1943257018e-07
+28.915203,0.18290918,-1.1755226372e-07
+29.036695,0.18162455,-1.1677455296e-07
+29.158188,0.18033992,-1.1250778299e-07
+29.279680,0.17905529,-1.0472364494e-07
+29.401172,0.17777067,-9.9715199532e-08
+29.522665,0.17648603,-9.2335801526e-08
+29.644157,0.17520140,-9.9743115305e-08
+29.765650,0.17391678,-8.5362226171e-08
+29.887142,0.17263215,-8.3960115869e-08
+30.008635,0.17134752,-8.1886783305e-08
+30.130127,0.17006289,-8.1934011998e-08
+30.251620,0.16877826,-7.5936071004e-08
+30.373112,0.16749363,-7.0981343482e-08
+30.494605,0.16620900,-6.4677314929e-08
+30.616097,0.16492438,-6.1103445119e-08
+30.737589,0.16363974,-6.5194323810e-08
+30.859082,0.16235512,-5.4411199152e-08
+30.980574,0.16107049,-5.8233636625e-08
+31.102067,0.15978586,-5.1806790269e-08
+31.223559,0.15850123,-5.9397567128e-08
+31.345052,0.15721660,-5.0124761834e-08
+31.466544,0.15593197,-5.0369179507e-08
+31.588037,0.15464734,-4.6249244439e-08
+31.709529,0.15336272,-4.3094059673e-08
+31.831022,0.15207809,-3.8745114737e-08
+31.952514,0.15079345,-3.9570866141e-08
+32.074006,0.14950883,-4.1857517228e-08
+32.195499,0.14822420,-3.7139954562e-08
+32.316991,0.14693957,-4.0077461383e-08
+32.438484,0.14565494,-3.8006139372e-08
+32.559976,0.14437032,-2.2868350654e-08
+32.681469,0.14308568,-3.0074470455e-08
+32.802961,0.14180106,-2.4413930437e-08
+32.924452,0.14051643,-2.4242076375e-08
+33.045944,0.13923179,-2.1888677464e-08
+33.167437,0.13794717,-3.1181680128e-08
+33.288929,0.13666254,-2.0239091771e-08
+33.410422,0.13537792,-1.5604646515e-08
+33.531914,0.13409328,-1.5529497215e-08
+33.653406,0.13280865,-1.9175740536e-08
+33.774899,0.13152403,-1.4752724074e-08
+33.896391,0.13023939,-2.0742065437e-08
+34.017884,0.12895477,-1.1227331499e-08
+34.139376,0.12767014,-1.9101712506e-08
+34.260869,0.12638551,-2.2316107130e-08
+34.382361,0.12510088,-1.5347704764e-08
+34.503854,0.12381625,-1.8238548360e-08
+34.625346,0.12253163,-1.1285366116e-08
+34.746839,0.12124699,-1.2448337256e-08
+34.868331,0.11996236,-1.3715820971e-08
+34.989823,0.11867774,-1.1116987027e-08
+35.111316,0.11739311,-1.4383611759e-08
+35.232808,0.11610848,-2.9119399168e-09
+35.354301,0.11482385,-1.0150214894e-08
+35.475793,0.11353922,-5.3251967192e-09
+35.597286,0.11225460,-7.5593160336e-09
+35.718778,0.11096996,-1.5381864855e-08
+35.840271,0.10968534,-6.9165129880e-09
+35.961763,0.10840071,-8.1952939885e-09
+36.083256,0.10711607,-5.2309447370e-09
+36.204748,0.10583145,-9.7639742030e-09
+36.326241,0.10454682,-7.9543061796e-09
+36.447733,0.10326220,-5.9883908612e-09
+36.569225,0.10197756,-4.9430721874e-09
+36.690718,0.10069293,-7.0010545407e-09
+36.812210,0.09940831,-4.1268048646e-09
+36.933703,0.09812367,-6.1658907462e-09
+37.055195,0.09683905,-1.1286623518e-08
+37.176688,0.09557968,-1.3311710029e-09
+37.298180,0.09686431,1.1136339417e-08
+37.419673,0.09814895,6.6893904320e-09
+37.541165,0.09943357,2.4422729029e-09
+37.662658,0.10071820,5.3180651317e-09
+37.784150,0.10200282,8.6054027617e-09
+37.905642,0.10328746,7.3734267564e-09
+38.027135,0.10457209,7.6856539170e-09
+38.148627,0.10585671,9.8310514818e-09
+38.270120,0.10714135,1.2108016304e-08
+38.391612,0.10842597,1.0698956057e-09
+38.513105,0.10971060,5.3681404996e-09
+38.634597,0.11099524,7.3227810870e-09
+38.756090,0.11227986,1.4929802677e-08
+38.877582,0.11356449,1.5024256842e-08
+38.999075,0.11484911,1.4358048077e-08
+39.120567,0.11613375,7.3987753674e-09
+39.242059,0.11741838,1.1890254586e-08
+39.363552,0.11870300,9.0194835074e-09
+39.485044,0.11998764,1.1500316602e-08
+39.606537,0.12127226,7.4378635717e-09
+39.728029,0.12255689,1.8515442607e-08
+39.849522,0.12384152,1.2018252627e-08
+39.971014,0.12512615,9.0503635593e-09
+40.092507,0.12641078,1.7824171187e-08
+40.213999,0.12769540,1.9648483391e-08
+40.335492,0.12898003,9.8773296731e-09
+40.456984,0.13026467,2.2137596329e-08
+40.578476,0.13154929,1.5802423516e-08
+40.699969,0.13283392,1.2455857502e-08
+40.821461,0.13411855,2.0824416001e-08
+40.942954,0.13540318,1.5796253306e-08
+41.064446,0.13668781,2.5199849345e-08
+41.185939,0.13797243,2.1590630511e-08
+41.307431,0.13925707,2.3844197669e-08
+41.428924,0.14054169,2.0647949586e-08
+41.550416,0.14182632,2.2362001898e-08
+41.671909,0.14311096,3.1357735733e-08
+41.793401,0.14439558,3.2829364816e-08
+41.914893,0.14568021,2.7097255187e-08
+42.036386,0.14696483,3.5763404720e-08
+42.157878,0.14824947,3.3971894515e-08
+42.279371,0.14953410,3.3567296239e-08
+42.400863,0.15081872,3.7213442899e-08
+42.522356,0.15210336,4.6458683622e-08
+42.643848,0.15338798,4.6019248627e-08
+42.765341,0.15467261,3.9269630977e-08
+42.886833,0.15595724,4.0967086550e-08
+43.008326,0.15724187,4.6455906222e-08
+43.129818,0.15852650,4.8941946942e-08
+43.251311,0.15981113,5.0759046606e-08
+43.372803,0.16109576,5.8373808346e-08
+43.494295,0.16238038,5.9240576346e-08
+43.615788,0.16366501,5.8094296190e-08
+43.737280,0.16494965,5.8429092145e-08
+43.858773,0.16623427,6.7928349004e-08
+43.980265,0.16751890,7.0331476915e-08
+44.101758,0.16880353,6.8652676966e-08
+44.223250,0.17008816,7.1189203865e-08
+44.344743,0.17137279,8.0969364802e-08
+44.466235,0.17265742,7.6295193377e-08
+44.587728,0.17394204,8.6916088214e-08
+44.709220,0.17522667,9.0408762562e-08
+44.830712,0.17651130,9.5887226590e-08
+44.952205,0.17779593,9.2589904657e-08
+45.073697,0.17908056,1.0125855772e-07
+45.195190,0.18036519,1.1019497537e-07
+45.316682,0.18164982,1.1366092610e-07
+45.438175,0.18293444,1.2037844576e-07
+45.559667,0.18421908,1.1968008746e-07
+45.681160,0.18550371,1.2702366280e-07
+45.802652,0.18678833,1.3619434225e-07
+45.924145,0.18807296,1.3284536454e-07
+46.045637,0.18935759,1.4014651203e-07
+46.167129,0.19064222,1.4869099403e-07
+46.288622,0.19192685,1.5141709944e-07
+46.410114,0.19321148,1.6246613924e-07
+46.531607,0.19449610,1.6514238033e-07
+46.653099,0.19578073,1.7535666633e-07
+46.774592,0.19706537,1.7700523064e-07
+46.896084,0.19834999,1.8512406799e-07
+47.017577,0.19963462,1.9340212576e-07
+47.139069,0.20091925,2.0422964372e-07
+47.260562,0.20220388,2.1131778845e-07
+47.382054,0.20348851,2.1310957897e-07
+47.503546,0.20477314,2.2968211406e-07
+47.625039,0.20605777,2.3463514034e-07
+47.746531,0.20734239,2.4394452226e-07
+47.868024,0.20862702,2.5361090644e-07
+47.989516,0.20991165,2.6457033480e-07
+48.111009,0.21119628,2.6495453111e-07
+48.232501,0.21248091,2.8455202246e-07
+48.353994,0.21376554,2.8946022369e-07
+48.475486,0.21505017,2.9505881834e-07
+48.596979,0.21633480,3.0114193080e-07
+48.718471,0.21761943,3.1491512989e-07
+48.839963,0.21890405,3.2569103073e-07
+48.961456,0.22018868,3.3046184409e-07
+49.082948,0.22147331,3.3467493484e-07
+49.204441,0.22275794,3.4274960443e-07
+49.325933,0.22404257,3.6497594708e-07
+49.447426,0.22532720,3.6495300614e-07
+49.568918,0.22661183,3.7514267575e-07
+49.690411,0.22789646,3.8258752632e-07
+49.811903,0.22918108,3.9702949248e-07
+49.933396,0.23046571,3.9845613541e-07
+50.054888,0.23175034,3.9478174433e-07
+50.176381,0.23303497,4.0863402523e-07
+50.297873,0.23431960,4.1804841994e-07
+50.419365,0.23560423,4.1818802458e-07
+50.540858,0.23688886,4.3174307854e-07
+50.662350,0.23817349,4.4041047500e-07
+50.783843,0.23945812,4.3770261924e-07
+50.905335,0.24074274,4.4807326451e-07
+51.026828,0.24202737,4.5271893375e-07
+51.148320,0.24331200,4.5796462456e-07
+51.269813,0.24459663,4.5566692187e-07
+51.391305,0.24588126,4.5662074945e-07
+51.512798,0.24716589,4.5586627606e-07
+51.634290,0.24845052,4.6666264331e-07
+51.755782,0.24973515,4.5615125924e-07
+51.877275,0.25101978,4.6271319294e-07
+51.998767,0.25230440,4.7470733502e-07
+52.120260,0.25358903,4.6682869448e-07
+52.241752,0.25487366,4.6117099469e-07
+52.363245,0.25615829,4.6292378561e-07
+52.484737,0.25744292,4.5274754548e-07
+52.606230,0.25872755,4.5460668957e-07
+52.727722,0.26001218,4.4445328727e-07
+52.849215,0.26129681,4.4331340609e-07
+52.970707,0.26258144,4.4460464592e-07
+53.092199,0.26386606,4.4315472696e-07
+53.213692,0.26515069,4.2672076546e-07
+53.335184,0.26643532,4.2416718107e-07
+53.456677,0.26771995,4.1791817211e-07
+53.578169,0.26900458,4.0397273553e-07
+53.699662,0.27028921,3.9904605266e-07
+53.821154,0.27157384,3.9145285927e-07
+53.942647,0.27285847,3.9105520772e-07
+54.064139,0.27414309,3.8339780547e-07
+54.185632,0.27542772,3.7795358531e-07
+54.307124,0.27671235,3.6773386049e-07
+54.428616,0.27799698,3.5021994780e-07
+54.550109,0.27928161,3.4083584028e-07
+54.671601,0.28056624,3.4254885832e-07
+54.793094,0.28185087,3.3167810056e-07
+54.914586,0.28313550,3.2091173696e-07
+55.036079,0.28442012,3.1169375794e-07
+55.157571,0.28570476,2.9338273780e-07
+55.279064,0.28698938,2.9049926784e-07
+55.400556,0.28827401,2.7721398903e-07
+55.522049,0.28955864,2.7040027208e-07
+55.643541,0.29084327,2.5990871001e-07
+55.765034,0.29212790,2.5598843845e-07
+55.886526,0.29341253,2.5264844379e-07
+56.008018,0.29469716,2.3924799630e-07
+56.129511,0.29598179,2.3049860531e-07
+56.251003,0.29726641,2.2725256540e-07
+56.372496,0.29855104,2.1293578202e-07
+56.493988,0.29983567,2.0269195633e-07
+56.615481,0.30112030,1.9495423502e-07
+56.736973,0.30240493,1.9190522943e-07
+56.858466,0.30368956,1.8565975182e-07
+56.979958,0.30497418,1.7772981636e-07
+57.101451,0.30625882,1.7407428067e-07
+57.222943,0.30754345,1.6841554983e-07
+57.344435,0.30882807,1.5974423537e-07
+57.465928,0.31011270,1.4789174714e-07
+57.587420,0.31139733,1.4634664905e-07
+57.708913,0.31268196,1.3874230740e-07
+57.830405,0.31396659,1.3020588050e-07
+57.951898,0.31525122,1.2360950962e-07
+58.073390,0.31653585,1.2892721952e-07
+58.194883,0.31782047,1.2159684167e-07
+58.316375,0.31910511,1.1750533790e-07
+58.437868,0.32038973,1.0134709299e-07
+58.559360,0.32167436,1.1039925284e-07
+58.680852,0.32295899,1.0127176165e-07
+58.802345,0.32424362,9.5697396755e-08
+58.923837,0.32552825,9.1371470089e-08
+59.045330,0.32681288,8.1269652685e-08
+59.166822,0.32809751,8.1772329924e-08
+59.288315,0.32938213,7.8419640418e-08
+59.409807,0.33066676,6.9639292046e-08
+59.531300,0.33195140,7.1871651722e-08
+59.652792,0.33323602,7.2157182653e-08
+59.774285,0.33452065,6.2816256944e-08
+59.895777,0.33580528,6.7607962022e-08
+60.017269,0.33708991,5.8817921747e-08
+60.138762,0.33837454,5.9378279983e-08
+60.260254,0.33965917,4.9054537983e-08
+60.381747,0.34094380,5.3910564688e-08
+60.503239,0.34222842,5.0035968797e-08
+60.624732,0.34351305,4.7818327409e-08
+60.746224,0.34479768,4.9773262813e-08
+60.867717,0.34608231,5.0973006314e-08
+60.989209,0.34736694,3.4841568798e-08
+61.110702,0.34865157,4.1514157085e-08
+61.232194,0.34993619,3.1418902981e-08
+61.353686,0.35122083,3.2061903377e-08
+61.475179,0.35250546,3.2101776148e-08
+61.596671,0.35379008,2.1556882841e-08
+61.718164,0.35507472,3.7334865557e-08
+61.839656,0.35635934,2.9503160497e-08
+61.961149,0.35764397,2.8256623278e-08
+62.082641,0.35892859,2.8673494312e-08
+62.204134,0.36021323,2.9107767596e-08
+62.325626,0.36149786,2.8462833975e-08
+62.447119,0.36278248,2.4083878939e-08
+62.568611,0.36406712,2.3883480806e-08
+62.690104,0.36535174,1.9112234085e-08
+62.811596,0.36663637,1.5520541549e-08
+62.933088,0.36792101,1.1963218536e-08
+63.054581,0.36920563,1.8341634376e-08
+63.176073,0.37049026,1.7294580230e-08
+63.297566,0.37177488,1.7494596551e-08
+63.419058,0.37305952,1.4937848116e-08
+63.540551,0.37434415,2.0609633061e-08
+63.662043,0.37562877,1.2408060118e-08
+63.783536,0.37691341,8.1367970079e-09
+63.905028,0.37819803,8.9870037116e-09
+64.026521,0.37948266,8.1400295217e-09
+64.148013,0.38076729,1.4525724761e-08
+64.269505,0.38205192,1.8453137978e-08
+64.390998,0.38333655,1.0006250829e-08
+64.512490,0.38462117,1.1695542552e-08
+64.633983,0.38590580,1.2156615977e-08
+64.755475,0.38719044,8.5589135267e-09
+64.876968,0.38847506,7.8709801423e-09
+64.998460,0.38975969,7.4009872994e-09
+65.119953,0.39104432,3.1779412443e-09
+65.241445,0.39232895,6.4959748671e-09
+65.362938,0.39361358,1.0731893383e-08
+65.484430,0.39489820,1.2065314580e-08
+65.605922,0.39618284,7.7143752006e-09
+65.727415,0.39746746,3.9488857114e-09
+65.848903,0.39875209,8.6279328914e-09
+65.970396,0.40003673,-3.6978717129e-09
+66.091888,0.40132135,3.3981271463e-09
+66.213381,0.40260598,8.8305816208e-09
+66.334873,0.40389060,1.0435398649e-08
+66.456366,0.40517524,4.3836265940e-09
+66.577858,0.40645987,-5.2402367037e-10
+66.699351,0.40774449,4.9018844200e-09
+66.820843,0.40902913,-1.0287267678e-09
+66.942336,0.41031375,-2.1689309579e-09
+67.063828,0.41159838,8.1647151975e-09
+67.185320,0.41288302,6.1384316976e-09
+67.306813,0.41416764,3.0648507872e-09
+67.428305,0.41545227,4.4945043137e-09
+67.549798,0.41673689,-2.2665578278e-09
+67.671290,0.41802153,5.0275758811e-10
+67.792783,0.41930616,6.2408386685e-09
+67.914275,0.42059078,-1.8425145278e-09
+68.035768,0.42187542,3.2838779623e-09
+68.157260,0.42316004,-4.5735969904e-09
+68.278753,0.42444467,4.8104392392e-09
+68.400245,0.42572930,4.3947019611e-09
+68.521737,0.42701393,4.5420556143e-09
+68.643230,0.42829856,8.9654393891e-09
+68.764722,0.42958318,3.0173454006e-09
+68.886215,0.43086781,7.3114757467e-09
+69.007707,0.43215245,2.3948025560e-09
+69.129200,0.43343707,6.0331953710e-09
+69.250692,0.43472170,7.2253602264e-09
+69.372185,0.43600633,8.8562359231e-10
+69.493677,0.43729096,2.0245238622e-10
+69.615170,0.43857559,9.3997289845e-10
+69.736662,0.43986021,9.8966997849e-09
+69.858155,0.44114485,2.2395267067e-09
+69.979647,0.44242947,3.0353680947e-09
+70.101139,0.44371410,4.2234194092e-09
+70.222632,0.44499874,-5.5482719875e-09
+70.344124,0.44628336,1.8606407300e-09
+70.465617,0.44756799,-3.1846718890e-09
+70.587109,0.44885261,2.1900292926e-09
+70.708602,0.45013725,-1.3689566966e-09
+70.830094,0.45142188,1.4938025731e-09
+70.951587,0.45270650,-6.2774326093e-09
+71.073079,0.45399114,-4.3321262780e-09
+71.194572,0.45527576,-3.6159835119e-09
+71.316064,0.45656040,2.5570204965e-09
+71.437556,0.45784501,-9.1695473008e-10
+71.559049,0.45912965,-9.5694430060e-10
+71.680541,0.46041428,1.5056617019e-09
+71.802034,0.46169891,-1.2493665750e-09
+71.923526,0.46298355,5.6857102088e-09
+72.045019,0.46426816,-9.7862038772e-10
+72.166511,0.46555279,2.9664852641e-09
+72.288004,0.46683742,2.4312126391e-09
+72.409496,0.46812206,1.1783901218e-09
+72.530989,0.46940669,-8.2286364861e-09
+72.652481,0.47069130,5.3597752727e-09
+72.773973,0.47197594,1.3184727335e-09
+72.895466,0.47326057,-2.1130506783e-09
+73.016958,0.47454520,5.1577935060e-09
+73.138451,0.47582984,-3.4979250686e-09
+73.259943,0.47711445,1.3732328500e-09
+73.381436,0.47839908,-4.0667834553e-09
+73.502928,0.47968371,3.3410569263e-09
+73.624421,0.48096835,-3.5271083125e-09
+73.745913,0.48225298,9.4170706194e-09
+73.867406,0.48353759,-2.4027329583e-10
+73.988898,0.48482222,-5.2963284299e-10
+74.110390,0.48610686,4.8722537150e-09
+74.231883,0.48739149,-6.7509781565e-09
diff --git a/demo_data/ec_Ads_244mVs.csv b/demo_data/ec_Ads_244mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..14d8166b7dad4413bb7a6a10754156beb1d5a158
--- /dev/null
+++ b/demo_data/ec_Ads_244mVs.csv
@@ -0,0 +1,613 @@
+Time (s),E (V),I (A)
+0.000000,0.48865084,-5.2550196603e-07
+0.005272,0.48736620,-2.6026603204e-07
+0.010544,0.48608160,-8.0272909474e-07
+0.015815,0.48479696,-4.4687265023e-07
+0.021087,0.48351233,7.4117830652e-08
+0.026359,0.48222769,6.0504508376e-07
+0.031631,0.48094306,-9.0829177786e-08
+0.036903,0.47965845,-2.9189129999e-07
+0.042174,0.47837382,2.3395913830e-07
+0.047446,0.47708918,4.6865181771e-07
+0.052718,0.47580455,-3.3260524512e-07
+0.057990,0.47451992,-4.6185183708e-07
+0.063262,0.47323531,7.2993423359e-07
+0.068533,0.47195067,7.7624965858e-07
+0.073805,0.47066604,-4.7696686145e-07
+0.079077,0.46938141,-6.4242437423e-07
+0.084349,0.46809677,1.0870699204e-07
+0.089621,0.46681216,6.1060554324e-07
+0.094892,0.46552753,5.4586558972e-07
+0.100164,0.46424290,4.0533003750e-07
+0.105436,0.46295826,8.0230719723e-08
+0.110708,0.46167363,-1.3674331988e-08
+0.115980,0.46038902,2.6806225754e-07
+0.121251,0.45910438,-7.0586157456e-07
+0.126523,0.45781975,4.3927428780e-07
+0.131795,0.45653512,1.2866311866e-07
+0.137067,0.45525050,-5.0973380175e-07
+0.142339,0.45396586,-4.2160483146e-07
+0.147610,0.45268124,3.3424910019e-08
+0.152882,0.45139661,-2.4783932823e-07
+0.158154,0.45011199,2.8246258046e-07
+0.163426,0.44882735,2.5238986937e-07
+0.168698,0.44754272,6.4460339692e-08
+0.173969,0.44625810,2.3859020439e-07
+0.179241,0.44497346,-9.0585163687e-07
+0.184513,0.44368884,4.4347451604e-08
+0.189785,0.44240421,5.8411002066e-07
+0.195057,0.44111957,-5.0317858231e-07
+0.200328,0.43983495,-3.7295245062e-07
+0.205600,0.43855032,-1.3686611423e-07
+0.210872,0.43726570,1.0743942017e-07
+0.216144,0.43598106,1.5912010976e-07
+0.221416,0.43469643,-4.3521441364e-07
+0.226688,0.43341181,3.1661119026e-07
+0.231959,0.43212717,-1.0440841230e-07
+0.237231,0.43084255,-1.6412871195e-07
+0.242503,0.42955792,1.0558423739e-07
+0.247775,0.42827329,-8.7748940805e-07
+0.253047,0.42698866,1.7909213720e-07
+0.258318,0.42570403,-1.8684936857e-07
+0.263590,0.42441941,-1.9816685130e-07
+0.268862,0.42313477,1.0183748401e-06
+0.274134,0.42185014,-2.8432798741e-07
+0.279406,0.42056552,6.6298035447e-07
+0.284677,0.41928089,-2.7864282718e-07
+0.289949,0.41799626,3.4169819139e-07
+0.295221,0.41671163,8.9448824595e-07
+0.300493,0.41542700,-1.0935901054e-07
+0.305765,0.41414238,-4.2512803763e-07
+0.311036,0.41285774,-1.4637152271e-07
+0.316308,0.41157312,-6.3206954047e-07
+0.321580,0.41028849,-1.3231845008e-08
+0.326852,0.40900385,-7.5603341133e-07
+0.332124,0.40771923,-3.3646725621e-07
+0.337395,0.40643460,7.8829437160e-08
+0.342667,0.40514998,-8.5348740556e-07
+0.347939,0.40386534,-8.6344564699e-07
+0.353211,0.40258071,-5.0332861919e-07
+0.358483,0.40129609,-4.4901786822e-07
+0.363754,0.40001145,-6.6855287876e-08
+0.369026,0.39872683,-6.1340173566e-07
+0.374298,0.39744220,-8.6792336611e-07
+0.379570,0.39615756,3.7836649267e-07
+0.384842,0.39487294,9.6832253784e-09
+0.390113,0.39358831,-3.0717284982e-07
+0.395385,0.39230369,-5.4502686811e-07
+0.400657,0.39101905,2.1733590302e-07
+0.405929,0.38973442,-4.1468584220e-08
+0.411201,0.38844980,-1.5850327259e-07
+0.416472,0.38716516,-7.2528581271e-07
+0.421744,0.38588054,-1.2688583440e-06
+0.427016,0.38459591,-1.0767519926e-06
+0.432288,0.38331128,-1.0951994133e-06
+0.437560,0.38202665,-1.8952021060e-07
+0.442831,0.38074202,-5.6655422112e-07
+0.448103,0.37945740,-1.1976398290e-07
+0.453375,0.37817276,3.0302295354e-07
+0.458647,0.37688813,-1.0500601537e-06
+0.463919,0.37560351,-6.4902166586e-07
+0.469190,0.37431888,-8.8791749692e-07
+0.474462,0.37303425,-3.9683844522e-07
+0.479734,0.37174962,-8.2131040406e-07
+0.485006,0.37046499,-4.6420735418e-07
+0.490278,0.36918037,-1.1120037911e-06
+0.495549,0.36789573,-1.3722453222e-06
+0.500821,0.36661111,-7.6844272943e-07
+0.506093,0.36532648,-5.7395713345e-07
+0.511365,0.36404184,-9.8368037446e-07
+0.516637,0.36275722,-4.3651456825e-07
+0.521908,0.36147259,-5.4238795145e-07
+0.527180,0.36018797,-1.2811179346e-06
+0.532452,0.35890333,-7.0161859354e-07
+0.537724,0.35761870,-1.6472705283e-06
+0.542996,0.35633408,-1.8881034128e-06
+0.548267,0.35504944,-1.5083695428e-06
+0.553539,0.35376482,-1.2334743893e-06
+0.558811,0.35248019,-1.1922484627e-06
+0.564083,0.35119556,-1.3471701694e-06
+0.569355,0.34991093,-1.5267611560e-06
+0.574626,0.34862630,-1.1121782669e-06
+0.579898,0.34734167,-1.4333773374e-06
+0.585170,0.34605704,-7.9189711278e-07
+0.590442,0.34477242,-7.9669829285e-07
+0.595714,0.34348778,-2.7683881470e-06
+0.600986,0.34220315,-1.4940005265e-06
+0.606257,0.34091853,-1.3447137718e-06
+0.611529,0.33963390,-1.1951705005e-06
+0.616801,0.33834927,-2.2161170654e-06
+0.622073,0.33706464,-9.7027846188e-07
+0.627345,0.33578001,-1.8710782797e-06
+0.632616,0.33449538,-1.4295300825e-06
+0.637888,0.33321076,-1.5670976269e-06
+0.643160,0.33192613,-1.6797933261e-06
+0.648432,0.33064149,-1.9166497693e-06
+0.653704,0.32935687,-2.4466543884e-06
+0.658975,0.32807224,-2.0005309636e-06
+0.664247,0.32678761,-2.0340236493e-06
+0.669519,0.32550298,-2.9997627068e-06
+0.674791,0.32421835,-1.7320351150e-06
+0.680063,0.32293372,-2.4100750884e-06
+0.685334,0.32164909,-2.7800126949e-06
+0.690606,0.32036447,-2.6145798686e-06
+0.695878,0.31907984,-2.6678113440e-06
+0.701150,0.31779521,-2.5653487167e-06
+0.706422,0.31651058,-2.6021482770e-06
+0.711693,0.31522595,-2.6190085860e-06
+0.716965,0.31394132,-3.2600126524e-06
+0.722237,0.31265669,-3.3976330345e-06
+0.727509,0.31137206,-3.4662032903e-06
+0.732781,0.31008743,-2.9113640723e-06
+0.738052,0.30880281,-3.5515524330e-06
+0.743324,0.30751818,-3.7379745832e-06
+0.748596,0.30623355,-3.4717446935e-06
+0.753868,0.30494892,-3.1006280756e-06
+0.759140,0.30366429,-3.9349311164e-06
+0.764411,0.30237966,-3.7676379565e-06
+0.769683,0.30109503,-3.4214929196e-06
+0.774955,0.29981040,-4.3455659010e-06
+0.780227,0.29852578,-4.8346769638e-06
+0.785499,0.29724114,-4.2922856714e-06
+0.790770,0.29595652,-4.2494467710e-06
+0.796042,0.29467189,-4.8203135160e-06
+0.801314,0.29338726,-5.0036948363e-06
+0.806586,0.29210263,-5.0820154473e-06
+0.811858,0.29081800,-5.3931269662e-06
+0.817129,0.28953337,-5.6555134370e-06
+0.822401,0.28824875,-5.4144298517e-06
+0.827673,0.28696411,-5.7878765269e-06
+0.832945,0.28567949,-5.3580783517e-06
+0.838217,0.28439486,-6.0365420170e-06
+0.843488,0.28311023,-6.0397880107e-06
+0.848760,0.28182560,-6.9576370293e-06
+0.854032,0.28054097,-5.7834708255e-06
+0.859304,0.27925634,-6.8957780313e-06
+0.864576,0.27797171,-6.4869778419e-06
+0.869847,0.27668708,-7.5644507540e-06
+0.875119,0.27540246,-7.2961905096e-06
+0.880391,0.27411783,-7.3626611153e-06
+0.885663,0.27283320,-7.1487348854e-06
+0.890935,0.27154857,-7.8426954730e-06
+0.896206,0.27026394,-7.5881859074e-06
+0.901478,0.26897931,-7.6802626418e-06
+0.906750,0.26769468,-8.0992141098e-06
+0.912022,0.26641005,-8.7424945294e-06
+0.917294,0.26512543,-9.1169400481e-06
+0.922565,0.26384080,-9.5310195557e-06
+0.927837,0.26255617,-9.7676979345e-06
+0.933109,0.26127154,-9.7698559907e-06
+0.938381,0.25998691,-9.9012014284e-06
+0.943653,0.25870228,-1.0610584198e-05
+0.948924,0.25741765,-1.0227841053e-05
+0.954196,0.25613302,-1.0366396180e-05
+0.959468,0.25484839,-1.0734827849e-05
+0.964740,0.25356377,-1.1388531779e-05
+0.970012,0.25227914,-1.1986754856e-05
+0.975283,0.25099451,-1.2299407703e-05
+0.980555,0.24970988,-1.2165152849e-05
+0.985827,0.24842525,-1.1574213706e-05
+0.991099,0.24714062,-1.2577206951e-05
+0.996371,0.24585599,-1.4142754960e-05
+1.001643,0.24457136,-1.3773292770e-05
+1.006914,0.24328673,-1.4236533391e-05
+1.012186,0.24200211,-1.4657940391e-05
+1.017458,0.24071748,-1.4457698514e-05
+1.022730,0.23943285,-1.4577821069e-05
+1.028002,0.23814822,-1.5926537887e-05
+1.033273,0.23686359,-1.5812677654e-05
+1.038545,0.23557896,-1.6024469091e-05
+1.043817,0.23429433,-1.7176604808e-05
+1.049089,0.23300970,-1.6732453084e-05
+1.054361,0.23172507,-1.7135690835e-05
+1.059632,0.23044045,-1.7339470736e-05
+1.064904,0.22915582,-1.8369265455e-05
+1.070176,0.22787119,-1.8973675619e-05
+1.075448,0.22658656,-1.9446163215e-05
+1.080720,0.22530193,-1.9711984262e-05
+1.085991,0.22401730,-2.0037963600e-05
+1.091263,0.22273267,-2.0780449764e-05
+1.096535,0.22144804,-2.0055311204e-05
+1.101807,0.22016341,-2.0999791428e-05
+1.107079,0.21887879,-2.1203407000e-05
+1.112350,0.21759416,-2.2880602739e-05
+1.117622,0.21630953,-2.2267356423e-05
+1.122894,0.21502490,-2.3210462619e-05
+1.128166,0.21374027,-2.3326987754e-05
+1.133438,0.21245564,-2.4587997406e-05
+1.138709,0.21117101,-2.5277569616e-05
+1.143981,0.20988638,-2.5103568911e-05
+1.149253,0.20860176,-2.6353107207e-05
+1.154525,0.20731713,-2.5156326455e-05
+1.159797,0.20603250,-2.6909081880e-05
+1.165068,0.20474787,-2.7074919589e-05
+1.170340,0.20346324,-2.7319561987e-05
+1.175612,0.20217861,-2.7861148958e-05
+1.180884,0.20089398,-2.8301853732e-05
+1.186156,0.19960935,-2.8838786033e-05
+1.191427,0.19832473,-2.9539382148e-05
+1.196699,0.19704010,-2.9563976069e-05
+1.201971,0.19575546,-3.0323249535e-05
+1.207243,0.19447084,-3.1019129605e-05
+1.212515,0.19318621,-3.0918546367e-05
+1.217786,0.19190158,-3.2122836758e-05
+1.223058,0.19061695,-3.2623858213e-05
+1.228330,0.18933232,-3.3049242767e-05
+1.233602,0.18804769,-3.3374208413e-05
+1.238874,0.18676307,-3.4012945530e-05
+1.244145,0.18547844,-3.4796153621e-05
+1.249417,0.18419381,-3.4692230346e-05
+1.254689,0.18290918,-3.4428535677e-05
+1.259961,0.18162455,-3.6297495498e-05
+1.265233,0.18033992,-3.5641264266e-05
+1.270504,0.17905529,-3.7510148852e-05
+1.275776,0.17777067,-3.6961068080e-05
+1.281048,0.17648603,-3.7866620139e-05
+1.286320,0.17520140,-3.7825585393e-05
+1.291592,0.17391678,-3.8266236710e-05
+1.296863,0.17263215,-3.8513122299e-05
+1.302135,0.17134752,-3.9368813359e-05
+1.307407,0.17006289,-3.9513007151e-05
+1.312679,0.16877826,-3.9321007465e-05
+1.317951,0.16749363,-4.0025571236e-05
+1.323223,0.16620900,-4.0298662358e-05
+1.328494,0.16492438,-3.9985387833e-05
+1.333766,0.16363974,-4.0827207938e-05
+1.339038,0.16235512,-4.0589168400e-05
+1.344310,0.16107049,-4.0496368024e-05
+1.349582,0.15978586,-4.2370154763e-05
+1.354853,0.15850123,-4.1764837819e-05
+1.360125,0.15721660,-4.1742869203e-05
+1.365397,0.15593197,-4.0467648058e-05
+1.370669,0.15464734,-4.1208209790e-05
+1.375940,0.15336272,-4.1948264676e-05
+1.381212,0.15207809,-4.1803140346e-05
+1.386484,0.15079345,-4.0618133870e-05
+1.391756,0.14950883,-4.1172215788e-05
+1.397028,0.14822420,-4.1593523794e-05
+1.402299,0.14693957,-4.1164462625e-05
+1.407571,0.14565494,-4.0965133468e-05
+1.412843,0.14437032,-4.1075328965e-05
+1.418115,0.14308568,-4.0095171518e-05
+1.423387,0.14180106,-4.0095785277e-05
+1.428658,0.14051643,-4.0229663956e-05
+1.433930,0.13923179,-3.9205252498e-05
+1.439202,0.13794717,-3.9893680344e-05
+1.444474,0.13666254,-3.9179700321e-05
+1.449746,0.13537792,-3.8467054728e-05
+1.455017,0.13409328,-3.7756420682e-05
+1.460289,0.13280865,-3.7734075891e-05
+1.465561,0.13152403,-3.6871423614e-05
+1.470833,0.13023939,-3.6761018251e-05
+1.476105,0.12895477,-3.5903006785e-05
+1.481376,0.12767014,-3.4150292938e-05
+1.486648,0.12638551,-3.4834547222e-05
+1.491920,0.12510088,-3.3430939552e-05
+1.497192,0.12381625,-3.3363097393e-05
+1.502464,0.12253163,-3.2185523341e-05
+1.507735,0.12124699,-3.1049550277e-05
+1.513007,0.11996236,-2.9780229139e-05
+1.518279,0.11867774,-3.0160019312e-05
+1.523551,0.11739311,-2.8267740605e-05
+1.528823,0.11610848,-2.7495186184e-05
+1.534095,0.11482385,-2.7387376428e-05
+1.539366,0.11353922,-2.5718692142e-05
+1.544638,0.11225460,-2.5865469661e-05
+1.549910,0.11096996,-2.4416012207e-05
+1.555182,0.10968534,-2.3133000281e-05
+1.560454,0.10840071,-2.2764871531e-05
+1.565725,0.10711607,-2.2321185076e-05
+1.570997,0.10583145,-2.0734590080e-05
+1.576269,0.10454682,-2.0141415667e-05
+1.581541,0.10326220,-1.9278488188e-05
+1.586813,0.10197756,-1.8001481202e-05
+1.592084,0.10069293,-1.7455589998e-05
+1.597356,0.09940831,-1.6682855409e-05
+1.602628,0.09812367,-1.4691895128e-05
+1.607900,0.09683905,-1.4805058447e-05
+1.613172,0.09557968,-1.3336633857e-05
+1.618443,0.09686431,-1.2687312364e-05
+1.623715,0.09814895,-1.1732054729e-05
+1.628987,0.09943357,-9.6193315710e-06
+1.634259,0.10071820,-8.1426880528e-06
+1.639531,0.10200282,-6.6471105614e-06
+1.644802,0.10328746,-6.6771347657e-06
+1.650074,0.10457209,-5.8268433003e-06
+1.655346,0.10585671,-5.1932236469e-06
+1.660618,0.10714135,-4.1809992670e-06
+1.665890,0.10842597,-5.2557053134e-06
+1.671161,0.10971060,-4.1202237518e-06
+1.676433,0.11099524,-3.2159635576e-06
+1.681705,0.11227986,-2.9985067280e-06
+1.686977,0.11356449,-3.3037088357e-06
+1.692249,0.11484911,-2.9689940721e-06
+1.697520,0.11613375,-2.2025779851e-06
+1.702792,0.11741838,-1.9394151586e-06
+1.708064,0.11870300,-1.9345253794e-06
+1.713336,0.11998764,-1.5538409253e-06
+1.718608,0.12127226,-1.1556256056e-06
+1.723879,0.12255689,-9.0883696856e-07
+1.729151,0.12384152,-1.2798363412e-06
+1.734423,0.12512615,-1.0671862600e-06
+1.739695,0.12641078,-7.8469311533e-07
+1.744967,0.12769540,-5.0207019648e-07
+1.750238,0.12898003,-3.9956688903e-07
+1.755510,0.13026467,1.8838846851e-08
+1.760782,0.13154929,-5.7122194571e-07
+1.766054,0.13283392,-6.4537239778e-07
+1.771326,0.13411855,-3.7658133225e-07
+1.776597,0.13540318,-2.7300218305e-07
+1.781869,0.13668781,-3.7509349233e-07
+1.787141,0.13797243,1.6288269435e-07
+1.792413,0.13925707,3.8620621339e-07
+1.797685,0.14054169,-8.7638550786e-08
+1.802956,0.14182632,-1.1486390224e-08
+1.808228,0.14311096,5.3861518910e-07
+1.813500,0.14439558,9.1236849636e-07
+1.818772,0.14568021,7.7665596464e-07
+1.824044,0.14696483,4.8079422484e-07
+1.829315,0.14824947,6.5191555240e-07
+1.834587,0.14953410,5.7445185298e-07
+1.839859,0.15081872,6.8639730594e-07
+1.845131,0.15210336,1.0916332997e-06
+1.850403,0.15338798,1.3006445071e-06
+1.855675,0.15467261,1.5272170206e-06
+1.860946,0.15595724,1.3814895737e-06
+1.866218,0.15724187,6.4821920058e-07
+1.871490,0.15852650,1.8101187606e-06
+1.876762,0.15981113,1.5951501301e-06
+1.882034,0.16109576,1.4032942320e-06
+1.887305,0.16238038,1.7637991283e-06
+1.892577,0.16366501,1.3270090491e-06
+1.897849,0.16494965,1.4526487545e-06
+1.903121,0.16623427,2.4987169992e-06
+1.908393,0.16751890,2.2894234131e-06
+1.913664,0.16880353,9.4350841821e-07
+1.918936,0.17008816,8.0557193780e-07
+1.924208,0.17137279,2.2181961744e-06
+1.929480,0.17265742,1.8053230251e-06
+1.934752,0.17394204,1.7136856977e-06
+1.940023,0.17522667,2.4477539577e-06
+1.945295,0.17651130,2.0050371433e-06
+1.950567,0.17779593,2.1794615405e-06
+1.955839,0.17908056,2.8350112026e-06
+1.961111,0.18036519,2.8537781245e-06
+1.966382,0.18164982,2.4011849858e-06
+1.971654,0.18293444,2.8967172558e-06
+1.976926,0.18421908,3.4510120101e-06
+1.982198,0.18550371,2.3035883792e-06
+1.987470,0.18678833,3.2471103472e-06
+1.992741,0.18807296,3.3322882313e-06
+1.998013,0.18935759,2.8987500853e-06
+2.003285,0.19064222,2.9107911480e-06
+2.008557,0.19192685,3.6424496610e-06
+2.013829,0.19321148,3.4401806468e-06
+2.019100,0.19449610,3.8877741237e-06
+2.024372,0.19578073,3.7468530540e-06
+2.029644,0.19706537,3.7930238249e-06
+2.034916,0.19834999,4.0874915829e-06
+2.040188,0.19963462,4.7711231988e-06
+2.045459,0.20091925,4.2608646701e-06
+2.050731,0.20220388,4.8808950041e-06
+2.056003,0.20348851,4.2698874239e-06
+2.061275,0.20477314,5.0458249439e-06
+2.066547,0.20605777,4.9910801068e-06
+2.071818,0.20734239,4.9139375173e-06
+2.077090,0.20862702,4.7572522431e-06
+2.082362,0.20991165,5.6698501567e-06
+2.087634,0.21119628,5.3906912336e-06
+2.092906,0.21248091,6.5470376348e-06
+2.098177,0.21376554,5.4808539305e-06
+2.103449,0.21505017,5.5893239726e-06
+2.108721,0.21633480,6.0008964722e-06
+2.113993,0.21761943,6.6703715364e-06
+2.119265,0.21890405,7.0285113566e-06
+2.124536,0.22018868,6.9272391249e-06
+2.129808,0.22147331,6.8069507554e-06
+2.135080,0.22275794,7.0704845597e-06
+2.140352,0.22404257,6.5079956264e-06
+2.145624,0.22532720,6.8238811022e-06
+2.150895,0.22661183,7.8135869577e-06
+2.156167,0.22789646,8.3410554895e-06
+2.161439,0.22918108,7.7867463812e-06
+2.166711,0.23046571,8.1992212057e-06
+2.171983,0.23175034,8.2220758128e-06
+2.177254,0.23303497,8.8735429870e-06
+2.182526,0.23431960,8.4497611359e-06
+2.187798,0.23560423,9.5091895303e-06
+2.193070,0.23688886,9.3209456540e-06
+2.198342,0.23817349,8.9760437268e-06
+2.203614,0.23945812,9.8586699025e-06
+2.208885,0.24074274,1.0739080606e-05
+2.214157,0.24202737,1.0404509630e-05
+2.219429,0.24331200,1.1780555557e-05
+2.224701,0.24459663,1.0938725552e-05
+2.229972,0.24588126,1.1261945945e-05
+2.235244,0.24716589,1.1670483801e-05
+2.240516,0.24845052,1.1524942710e-05
+2.245788,0.24973515,1.2573231376e-05
+2.251060,0.25101978,1.2615851996e-05
+2.256332,0.25230440,1.2345616834e-05
+2.261603,0.25358903,1.3701867049e-05
+2.266875,0.25487366,1.2782592525e-05
+2.272147,0.25615829,1.4146901794e-05
+2.277419,0.25744292,1.3243048463e-05
+2.282690,0.25872755,1.4051211800e-05
+2.287962,0.26001218,1.4281384333e-05
+2.293234,0.26129681,1.5133952151e-05
+2.298506,0.26258144,1.5834590834e-05
+2.303778,0.26386606,1.5303782265e-05
+2.309050,0.26515069,1.5737716879e-05
+2.314321,0.26643532,1.5657595578e-05
+2.319593,0.26771995,1.6549906279e-05
+2.324865,0.26900458,1.6531281660e-05
+2.330137,0.27028921,1.7128842471e-05
+2.335408,0.27157384,1.7527550283e-05
+2.340680,0.27285847,1.8171415259e-05
+2.345952,0.27414309,1.8033325400e-05
+2.351224,0.27542772,1.8723077778e-05
+2.356496,0.27671235,1.8724376572e-05
+2.361768,0.27799698,1.9136529668e-05
+2.367039,0.27928161,1.9554275891e-05
+2.372311,0.28056624,1.9690306686e-05
+2.377583,0.28185087,2.1274864399e-05
+2.382855,0.28313550,1.9884003119e-05
+2.388127,0.28442012,2.1130846815e-05
+2.393398,0.28570476,2.1877510501e-05
+2.398670,0.28698938,2.1872804355e-05
+2.403942,0.28827401,2.2125328607e-05
+2.409214,0.28955864,2.2166668253e-05
+2.414486,0.29084327,2.3523824258e-05
+2.419757,0.29212790,2.3253524750e-05
+2.425029,0.29341253,2.3955484994e-05
+2.430301,0.29469716,2.4141222357e-05
+2.435573,0.29598179,2.5048330592e-05
+2.440845,0.29726641,2.5239674941e-05
+2.446116,0.29855104,2.5242636824e-05
+2.451388,0.29983567,2.5864212445e-05
+2.456660,0.30112030,2.6526822812e-05
+2.461932,0.30240493,2.7171628225e-05
+2.467204,0.30368956,2.7291071686e-05
+2.472475,0.30497418,2.7844215147e-05
+2.477747,0.30625882,2.7565229957e-05
+2.483019,0.30754345,2.8275885782e-05
+2.488291,0.30882807,2.9430766586e-05
+2.493563,0.31011270,2.9708029290e-05
+2.498835,0.31139733,2.9264513104e-05
+2.504106,0.31268196,2.9493825384e-05
+2.509378,0.31396659,3.0007708061e-05
+2.514650,0.31525122,3.0897480571e-05
+2.519922,0.31653585,3.1761118822e-05
+2.525193,0.31782047,3.1138052360e-05
+2.530465,0.31910511,3.1694874416e-05
+2.535737,0.32038973,3.1941419467e-05
+2.541009,0.32167436,3.1963156439e-05
+2.546281,0.32295899,3.3229709721e-05
+2.551553,0.32424362,3.3027980964e-05
+2.556824,0.32552825,3.3396054277e-05
+2.562096,0.32681288,3.3466240600e-05
+2.567368,0.32809751,3.4481568423e-05
+2.572640,0.32938213,3.4275095902e-05
+2.577911,0.33066676,3.4405375180e-05
+2.583183,0.33195140,3.4469388275e-05
+2.588455,0.33323602,3.5364395556e-05
+2.593727,0.33452065,3.5711268441e-05
+2.598999,0.33580528,3.5421475152e-05
+2.604271,0.33708991,3.7388905691e-05
+2.609542,0.33837454,3.6431762231e-05
+2.614814,0.33965917,3.6515827429e-05
+2.620086,0.34094380,3.7311152312e-05
+2.625358,0.34222842,3.6824714566e-05
+2.630629,0.34351305,3.6965906878e-05
+2.635901,0.34479768,3.7523287257e-05
+2.641173,0.34608231,3.7709117674e-05
+2.646445,0.34736694,3.7116915375e-05
+2.651717,0.34865157,3.7657656943e-05
+2.656989,0.34993619,3.7424194860e-05
+2.662260,0.35122083,3.7134805463e-05
+2.667532,0.35250546,3.7837634870e-05
+2.672804,0.35379008,3.7020974929e-05
+2.678076,0.35507472,3.7254013320e-05
+2.683348,0.35635934,3.7000867388e-05
+2.688619,0.35764397,3.7779751447e-05
+2.693891,0.35892859,3.5774604421e-05
+2.699163,0.36021323,3.6780135857e-05
+2.704435,0.36149786,3.7599017210e-05
+2.709707,0.36278248,3.6824880875e-05
+2.714978,0.36406712,3.5803775797e-05
+2.720250,0.36535174,3.6210036806e-05
+2.725522,0.36663637,3.6152735464e-05
+2.730794,0.36792101,3.5287750903e-05
+2.736066,0.36920563,3.5561804241e-05
+2.741337,0.37049026,3.5762737092e-05
+2.746609,0.37177488,3.4416458482e-05
+2.751881,0.37305952,3.4569953694e-05
+2.757153,0.37434415,3.4325744887e-05
+2.762424,0.37562877,3.4001121758e-05
+2.767696,0.37691341,3.2379498936e-05
+2.772968,0.37819803,3.3041624235e-05
+2.778240,0.37948266,3.2292212492e-05
+2.783512,0.38076729,3.0758074100e-05
+2.788784,0.38205192,3.0626353477e-05
+2.794055,0.38333655,3.0538801731e-05
+2.799327,0.38462117,2.9575391989e-05
+2.804599,0.38590580,2.9962614586e-05
+2.809871,0.38719044,2.9165836480e-05
+2.815142,0.38847506,2.8492360597e-05
+2.820414,0.38975969,2.7273995323e-05
+2.825686,0.39104432,2.6924303105e-05
+2.830958,0.39232895,2.6125972783e-05
+2.836230,0.39361358,2.5086801408e-05
+2.841502,0.39489820,2.4480080737e-05
+2.846773,0.39618284,2.4198569236e-05
+2.852045,0.39746746,2.3152129766e-05
+2.857317,0.39875209,2.2202028697e-05
+2.862589,0.40003673,2.1447271310e-05
+2.867860,0.40132135,2.1313889578e-05
+2.873132,0.40260598,1.9980713735e-05
+2.878404,0.40389060,2.0305623944e-05
+2.883676,0.40517524,1.8827929611e-05
+2.888948,0.40645987,1.7945551909e-05
+2.894220,0.40774449,1.7240701057e-05
+2.899491,0.40902913,1.6683815645e-05
+2.904763,0.41031375,1.5767761377e-05
+2.910035,0.41159838,1.5506235654e-05
+2.915307,0.41288302,1.4287751588e-05
+2.920579,0.41416764,1.3481366172e-05
+2.925850,0.41545227,1.3597105300e-05
+2.931122,0.41673689,1.2040303358e-05
+2.936394,0.41802153,1.1631060668e-05
+2.941666,0.41930616,1.0583353093e-05
+2.946938,0.42059078,9.9592254220e-06
+2.952209,0.42187542,9.9905786127e-06
+2.957481,0.42316004,8.7583760412e-06
+2.962753,0.42444467,8.4291873368e-06
+2.968025,0.42572930,7.8853720242e-06
+2.973297,0.42701393,7.1553308159e-06
+2.978568,0.42829856,6.8695586385e-06
+2.983840,0.42958318,6.8024876378e-06
+2.989112,0.43086781,6.2895597520e-06
+2.994384,0.43215245,6.3181589463e-06
+2.999656,0.43343707,4.6842683664e-06
+3.004927,0.43472170,4.6616384744e-06
+3.010199,0.43600633,5.0399165226e-06
+3.015471,0.43729096,4.3125605103e-06
+3.020743,0.43857559,4.0118329045e-06
+3.026015,0.43986021,3.4860071681e-06
+3.031287,0.44114485,3.0988637656e-06
+3.036558,0.44242947,2.6667889897e-06
+3.041830,0.44371410,2.4746675418e-06
+3.047102,0.44499874,1.3687105153e-06
+3.052374,0.44628336,2.0734298297e-06
+3.057645,0.44756799,1.6510703901e-06
+3.062917,0.44885261,1.4606641267e-06
+3.068189,0.45013725,1.9861240824e-06
+3.073461,0.45142188,8.3805662317e-07
+3.078733,0.45270650,7.8773945171e-07
+3.084005,0.45399114,1.0035971667e-06
+3.089276,0.45527576,6.1571199422e-07
+3.094548,0.45656040,5.8430992546e-07
+3.099820,0.45784501,4.0366008066e-07
+3.105092,0.45912965,5.4931476738e-07
+3.110363,0.46041428,5.5272682252e-07
+3.115635,0.46169891,5.8426339856e-07
+3.120907,0.46298355,9.1863465506e-07
+3.126179,0.46426816,1.0575834049e-06
+3.131451,0.46555279,4.8573792448e-07
+3.136723,0.46683742,2.6202956859e-07
+3.141994,0.46812206,1.5229702036e-08
+3.147266,0.46940669,4.1938159429e-07
+3.152538,0.47069130,6.4522452639e-07
+3.157810,0.47197594,4.9858623192e-08
+3.163081,0.47326057,-4.2150490999e-07
+3.168353,0.47454520,5.4657116520e-07
+3.173625,0.47582984,8.2678671915e-09
+3.178897,0.47711445,5.7404882609e-07
+3.184169,0.47839908,-2.5099197424e-08
+3.189441,0.47968371,-3.2898929451e-07
+3.194712,0.48096835,-1.4485370635e-07
+3.199984,0.48225298,-5.2940942128e-07
+3.205256,0.48353759,-3.2280078376e-07
+3.210528,0.48482222,-1.9904441236e-08
+3.215800,0.48610686,7.5574290436e-09
+3.221071,0.48739149,-1.0202360707e-07
diff --git a/demo_data/ec_Ads_4025mVs.csv b/demo_data/ec_Ads_4025mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..ab55773774a6bd00d242e7a34e4d2e0d14c3e6c6
--- /dev/null
+++ b/demo_data/ec_Ads_4025mVs.csv
@@ -0,0 +1,613 @@
+Time (s),E (V),I (A)
+0.000000,0.48865084,4.0361379635e-07
+0.000319,0.48736620,-1.2919526451e-07
+0.000638,0.48608160,-9.9154071078e-07
+0.000958,0.48479696,-2.2498925658e-07
+0.001277,0.48351233,5.9803932791e-07
+0.001596,0.48222769,-6.0911879531e-08
+0.001915,0.48094306,7.6515396645e-08
+0.002234,0.47965845,-1.1115554534e-07
+0.002554,0.47837382,6.0108621484e-07
+0.002873,0.47708918,3.4141554983e-08
+0.003192,0.47580455,3.6467542247e-07
+0.003511,0.47451992,-7.2818403768e-08
+0.003830,0.47323531,5.7520016938e-08
+0.004150,0.47195067,3.2367942088e-07
+0.004469,0.47066604,-5.9575820147e-07
+0.004788,0.46938141,-5.3164659879e-07
+0.005107,0.46809677,-2.1500957198e-07
+0.005426,0.46681216,-2.6307432171e-07
+0.005746,0.46552753,-1.2014065120e-07
+0.006065,0.46424290,-5.4273736527e-07
+0.006384,0.46295826,8.7155614095e-08
+0.006703,0.46167363,4.1276470331e-07
+0.007022,0.46038902,2.2528473000e-09
+0.007342,0.45910438,-8.9512108101e-07
+0.007661,0.45781975,-2.8824382606e-07
+0.007980,0.45653512,5.3917056330e-07
+0.008299,0.45525050,-5.0791858417e-07
+0.008618,0.45396586,-4.0959747092e-07
+0.008938,0.45268124,-4.4204919596e-07
+0.009257,0.45139661,1.1907948016e-07
+0.009576,0.45011199,2.7145027491e-07
+0.009895,0.44882735,-4.0471592068e-07
+0.010214,0.44754272,9.1491475126e-07
+0.010534,0.44625810,-2.3491406440e-07
+0.010853,0.44497346,4.0622525208e-07
+0.011172,0.44368884,1.0297622607e-07
+0.011491,0.44240421,1.4859990209e-07
+0.011810,0.44111957,-7.0699009814e-07
+0.012130,0.43983495,-6.8846487978e-07
+0.012449,0.43855032,5.4623772422e-07
+0.012768,0.43726570,-8.1469749762e-07
+0.013087,0.43598106,2.0554167777e-07
+0.013406,0.43469643,7.5559673247e-08
+0.013726,0.43341181,-6.2299015805e-07
+0.014045,0.43212717,3.3751069466e-07
+0.014364,0.43084255,-2.6485399824e-07
+0.014683,0.42955792,1.9107133782e-07
+0.015002,0.42827329,-1.0541328459e-07
+0.015322,0.42698866,9.8269481624e-08
+0.015641,0.42570403,3.5885062655e-07
+0.015960,0.42441941,3.4488448664e-07
+0.016279,0.42313477,-4.5627296756e-07
+0.016598,0.42185014,3.2174908465e-07
+0.016918,0.42056552,3.4311884361e-07
+0.017237,0.41928089,-5.7588872207e-07
+0.017556,0.41799626,3.0505956680e-07
+0.017875,0.41671163,-3.7972467156e-07
+0.018194,0.41542700,-3.2807355470e-07
+0.018514,0.41414238,1.2075299401e-07
+0.018833,0.41285774,-6.7809851191e-07
+0.019152,0.41157312,2.6735513467e-07
+0.019471,0.41028849,-2.7915056172e-07
+0.019790,0.40900385,-9.1091852122e-08
+0.020110,0.40771923,4.7378573137e-07
+0.020429,0.40643460,-8.2080616929e-07
+0.020748,0.40514998,2.5970298290e-07
+0.021067,0.40386534,-9.7359716741e-08
+0.021386,0.40258071,4.3865472467e-07
+0.021706,0.40129609,-2.5155455146e-08
+0.022025,0.40001145,-7.0765352255e-07
+0.022344,0.39872683,1.4403148893e-07
+0.022663,0.39744220,2.9744021224e-07
+0.022982,0.39615756,-2.5573904719e-07
+0.023302,0.39487294,-3.3341118565e-07
+0.023621,0.39358831,6.2524387754e-07
+0.023940,0.39230369,5.9581691271e-09
+0.024259,0.39101905,9.9603991509e-08
+0.024578,0.38973442,-7.0384716113e-07
+0.024898,0.38844980,-5.0874563316e-07
+0.025217,0.38716516,-2.2010891640e-07
+0.025536,0.38588054,-2.2177186191e-07
+0.025855,0.38459591,-2.5668886175e-07
+0.026174,0.38331128,-1.1547958241e-07
+0.026494,0.38202665,-1.0014599555e-06
+0.026813,0.38074202,-6.7023328047e-07
+0.027132,0.37945740,-1.0872493940e-06
+0.027451,0.37817276,7.2283308041e-07
+0.027770,0.37688813,-2.1769513965e-07
+0.028090,0.37560351,-2.4806528730e-07
+0.028409,0.37431888,-1.4076100899e-07
+0.028728,0.37303425,-3.1210862403e-07
+0.029047,0.37174962,-9.8790991734e-08
+0.029366,0.37046499,-3.6279502852e-07
+0.029686,0.36918037,8.1745183412e-08
+0.030005,0.36789573,-2.7663449604e-07
+0.030324,0.36661111,-3.5972535484e-07
+0.030643,0.36532648,9.6143014348e-08
+0.030962,0.36404184,1.4008158671e-07
+0.031282,0.36275722,-5.6338524001e-08
+0.031601,0.36147259,-1.3133754107e-07
+0.031920,0.36018797,-5.3198799143e-07
+0.032239,0.35890333,-2.1812613922e-07
+0.032558,0.35761870,-5.7395156554e-07
+0.032878,0.35633408,1.3206234827e-07
+0.033197,0.35504944,-3.2106853089e-07
+0.033516,0.35376482,-4.6015117795e-07
+0.033835,0.35248019,3.6560285887e-08
+0.034154,0.35119556,6.0234963793e-08
+0.034474,0.34991093,-4.1773862632e-07
+0.034793,0.34862630,2.0464480704e-08
+0.035112,0.34734167,1.1795345331e-07
+0.035431,0.34605704,-1.2203709018e-06
+0.035750,0.34477242,-1.2432130933e-06
+0.036070,0.34348778,-2.9954423063e-07
+0.036389,0.34220315,-5.1095227050e-07
+0.036708,0.34091853,-5.4630291003e-07
+0.037027,0.33963390,-7.8978482349e-07
+0.037346,0.33834927,3.7427093820e-08
+0.037666,0.33706464,9.1404093444e-08
+0.037985,0.33578001,-7.0027790763e-07
+0.038304,0.33449538,-1.2408598664e-06
+0.038623,0.33321076,2.0026956265e-07
+0.038942,0.33192613,-2.3715813487e-07
+0.039262,0.33064149,-7.9602964992e-07
+0.039581,0.32935687,-9.9189234961e-07
+0.039900,0.32807224,-7.4185137259e-07
+0.040219,0.32678761,-3.1156629940e-07
+0.040538,0.32550298,-9.5294636967e-07
+0.040858,0.32421835,-8.6916593670e-07
+0.041177,0.32293372,-4.4046323822e-07
+0.041496,0.32164909,-7.9580718839e-07
+0.041815,0.32036447,-8.7268509079e-07
+0.042134,0.31907984,-1.9824196315e-06
+0.042454,0.31779521,-7.0836742354e-07
+0.042773,0.31651058,-7.7278817169e-07
+0.043092,0.31522595,-1.0490589284e-06
+0.043411,0.31394132,-1.4565775249e-06
+0.043730,0.31265669,-5.5855256342e-07
+0.044050,0.31137206,-1.5593112528e-06
+0.044369,0.31008743,-4.8633981573e-07
+0.044688,0.30880281,-1.1200030984e-06
+0.045007,0.30751818,-9.1044647407e-07
+0.045326,0.30623355,-8.7309380649e-07
+0.045646,0.30494892,-1.2260430108e-06
+0.045965,0.30366429,-1.7231256629e-06
+0.046284,0.30237966,-3.1367509516e-07
+0.046603,0.30109503,-1.0998484232e-06
+0.046922,0.29981040,-1.4963457764e-06
+0.047242,0.29852578,-1.2155720439e-06
+0.047561,0.29724114,-8.3736311541e-07
+0.047880,0.29595652,-2.1125726388e-06
+0.048199,0.29467189,-1.6236252018e-06
+0.048518,0.29338726,-1.4779255343e-06
+0.048838,0.29210263,-1.0800739253e-06
+0.049157,0.29081800,-1.2313946595e-06
+0.049476,0.28953337,-1.8745332696e-06
+0.049795,0.28824875,-1.8488122159e-06
+0.050114,0.28696411,-1.5136452248e-06
+0.050434,0.28567949,-1.7326867942e-06
+0.050753,0.28439486,-1.7063904458e-06
+0.051072,0.28311023,-1.9972589911e-06
+0.051391,0.28182560,-2.2078857440e-06
+0.051710,0.28054097,-1.7405036863e-06
+0.052030,0.27925634,-1.5333753436e-06
+0.052349,0.27797171,-1.9855254183e-06
+0.052668,0.27668708,-2.7341151940e-06
+0.052987,0.27540246,-2.3530817773e-06
+0.053306,0.27411783,-2.6054787470e-06
+0.053626,0.27283320,-2.1938601700e-06
+0.053945,0.27154857,-2.6772510347e-06
+0.054264,0.27026394,-2.5514774834e-06
+0.054583,0.26897931,-2.5798029525e-06
+0.054902,0.26769468,-2.9319650239e-06
+0.055222,0.26641005,-2.9603915719e-06
+0.055541,0.26512543,-2.6092737307e-06
+0.055860,0.26384080,-2.8048809674e-06
+0.056179,0.26255617,-3.0641135846e-06
+0.056498,0.26127154,-3.2490499596e-06
+0.056818,0.25998691,-3.3364771525e-06
+0.057137,0.25870228,-3.3158555532e-06
+0.057456,0.25741765,-3.6389891293e-06
+0.057775,0.25613302,-3.1963604584e-06
+0.058094,0.25484839,-2.5640733697e-06
+0.058414,0.25356377,-2.7453218743e-06
+0.058733,0.25227914,-3.3066822681e-06
+0.059052,0.25099451,-3.2699524173e-06
+0.059371,0.24970988,-4.5573648891e-06
+0.059690,0.24842525,-3.6945314686e-06
+0.060010,0.24714062,-3.7976673747e-06
+0.060329,0.24585599,-4.6524081993e-06
+0.060648,0.24457136,-3.7114853127e-06
+0.060967,0.24328673,-4.4903068498e-06
+0.061286,0.24200211,-4.4496917484e-06
+0.061606,0.24071748,-4.2534448484e-06
+0.061925,0.23943285,-4.2546075069e-06
+0.062244,0.23814822,-4.9459050467e-06
+0.062563,0.23686359,-4.9240352993e-06
+0.062882,0.23557896,-4.9149356861e-06
+0.063202,0.23429433,-4.6060652949e-06
+0.063521,0.23300970,-5.1011239808e-06
+0.063840,0.23172507,-5.5326256778e-06
+0.064159,0.23044045,-5.3230036790e-06
+0.064478,0.22915582,-5.8303341451e-06
+0.064798,0.22787119,-6.9002238708e-06
+0.065117,0.22658656,-6.0317179640e-06
+0.065436,0.22530193,-6.5922878305e-06
+0.065755,0.22401730,-6.6285635806e-06
+0.066074,0.22273267,-6.3786784964e-06
+0.066394,0.22144804,-7.8717155740e-06
+0.066713,0.22016341,-6.8528611258e-06
+0.067032,0.21887879,-7.3588896355e-06
+0.067351,0.21759416,-7.7126812895e-06
+0.067670,0.21630953,-8.0534242138e-06
+0.067990,0.21502490,-7.9810723569e-06
+0.068309,0.21374027,-8.2255112510e-06
+0.068628,0.21245564,-8.8956460927e-06
+0.068947,0.21117101,-8.5226147537e-06
+0.069266,0.20988638,-8.4118529240e-06
+0.069586,0.20860176,-8.9743910627e-06
+0.069905,0.20731713,-9.2949921353e-06
+0.070224,0.20603250,-8.8871413865e-06
+0.070543,0.20474787,-9.6033138845e-06
+0.070862,0.20346324,-9.9767213778e-06
+0.071182,0.20217861,-9.8576544853e-06
+0.071501,0.20089398,-1.0541312775e-05
+0.071820,0.19960935,-1.1220819288e-05
+0.072139,0.19832473,-1.1317396382e-05
+0.072458,0.19704010,-1.1607690890e-05
+0.072778,0.19575546,-1.0678631194e-05
+0.073097,0.19447084,-1.2298094812e-05
+0.073416,0.19318621,-1.1887901649e-05
+0.073735,0.19190158,-1.2705756478e-05
+0.074054,0.19061695,-1.2537353037e-05
+0.074374,0.18933232,-1.3851264769e-05
+0.074693,0.18804769,-1.4157828450e-05
+0.075012,0.18676307,-1.4404614788e-05
+0.075331,0.18547844,-1.4879627169e-05
+0.075650,0.18419381,-1.4538878713e-05
+0.075970,0.18290918,-1.5278415015e-05
+0.076289,0.18162455,-1.5561830124e-05
+0.076608,0.18033992,-1.6321286508e-05
+0.076927,0.17905529,-1.6118069691e-05
+0.077246,0.17777067,-1.5911074235e-05
+0.077566,0.17648603,-1.7292572030e-05
+0.077885,0.17520140,-1.7985230866e-05
+0.078204,0.17391678,-1.8137257518e-05
+0.078523,0.17263215,-1.8162455828e-05
+0.078842,0.17134752,-1.9154905557e-05
+0.079162,0.17006289,-1.9634874324e-05
+0.079481,0.16877826,-2.0232241427e-05
+0.079800,0.16749363,-2.1203708992e-05
+0.080119,0.16620900,-2.1299899874e-05
+0.080438,0.16492438,-2.1550428645e-05
+0.080758,0.16363974,-2.2120783047e-05
+0.081077,0.16235512,-2.3517500002e-05
+0.081396,0.16107049,-2.3910915078e-05
+0.081715,0.15978586,-2.4623612676e-05
+0.082034,0.15850123,-2.5200745900e-05
+0.082354,0.15721660,-2.5966292160e-05
+0.082673,0.15593197,-2.6533039907e-05
+0.082992,0.15464734,-2.7203065121e-05
+0.083311,0.15336272,-2.7885871532e-05
+0.083630,0.15207809,-2.8181182771e-05
+0.083950,0.15079345,-2.9738962125e-05
+0.084269,0.14950883,-3.0242938382e-05
+0.084588,0.14822420,-3.0721008273e-05
+0.084907,0.14693957,-3.2305965274e-05
+0.085226,0.14565494,-3.2280177588e-05
+0.085546,0.14437032,-3.3425535015e-05
+0.085865,0.14308568,-3.3752334586e-05
+0.086184,0.14180106,-3.5225648208e-05
+0.086503,0.14051643,-3.5541195337e-05
+0.086822,0.13923179,-3.7326982485e-05
+0.087142,0.13794717,-3.7776657762e-05
+0.087461,0.13666254,-3.8834749420e-05
+0.087780,0.13537792,-4.0009827054e-05
+0.088099,0.13409328,-4.1025483689e-05
+0.088418,0.13280865,-4.2378802102e-05
+0.088738,0.13152403,-4.3222538152e-05
+0.089057,0.13023939,-4.4497375104e-05
+0.089376,0.12895477,-4.5982085998e-05
+0.089695,0.12767014,-4.7598623861e-05
+0.090014,0.12638551,-4.7651917070e-05
+0.090334,0.12510088,-4.8603784384e-05
+0.090653,0.12381625,-5.0943375149e-05
+0.090972,0.12253163,-5.2535046603e-05
+0.091291,0.12124699,-5.3637693427e-05
+0.091610,0.11996236,-5.5021820279e-05
+0.091930,0.11867774,-5.6322283995e-05
+0.092249,0.11739311,-5.8028390817e-05
+0.092568,0.11610848,-5.9772547549e-05
+0.092887,0.11482385,-6.1412849508e-05
+0.093206,0.11353922,-6.3733310718e-05
+0.093526,0.11225460,-6.4865542978e-05
+0.093845,0.11096996,-6.6002466102e-05
+0.094164,0.10968534,-6.8310725432e-05
+0.094483,0.10840071,-6.9458023976e-05
+0.094802,0.10711607,-7.1432234217e-05
+0.095122,0.10583145,-7.3112384386e-05
+0.095441,0.10454682,-7.5268902700e-05
+0.095760,0.10326220,-7.7291542295e-05
+0.096079,0.10197756,-7.8812444455e-05
+0.096398,0.10069293,-8.1853741873e-05
+0.096718,0.09940831,-8.3604086040e-05
+0.097037,0.09812367,-8.6144056372e-05
+0.097356,0.09683905,-8.8366938752e-05
+0.097675,0.09557968,-9.0810581418e-05
+0.097994,0.09686431,-8.7841006755e-05
+0.098314,0.09814895,-8.5674784869e-05
+0.098633,0.09943357,-8.3731801462e-05
+0.098952,0.10071820,-8.1581229201e-05
+0.099271,0.10200282,-7.9258599572e-05
+0.099590,0.10328746,-7.7115059584e-05
+0.099910,0.10457209,-7.4951058416e-05
+0.100229,0.10585671,-7.3257881644e-05
+0.100548,0.10714135,-7.0951263714e-05
+0.100867,0.10842597,-6.8615993694e-05
+0.101186,0.10971060,-6.8150117636e-05
+0.101506,0.11099524,-6.6031214744e-05
+0.101825,0.11227986,-6.3412465246e-05
+0.102144,0.11356449,-6.2150654897e-05
+0.102463,0.11484911,-6.1500145449e-05
+0.102782,0.11613375,-5.8288424019e-05
+0.103102,0.11741838,-5.7093585214e-05
+0.103421,0.11870300,-5.6490270046e-05
+0.103740,0.11998764,-5.4313371012e-05
+0.104059,0.12127226,-5.2976844767e-05
+0.104378,0.12255689,-5.1599251332e-05
+0.104698,0.12384152,-4.9949446953e-05
+0.105017,0.12512615,-4.9166603633e-05
+0.105336,0.12641078,-4.7547281827e-05
+0.105655,0.12769540,-4.6335139927e-05
+0.105974,0.12898003,-4.5774549443e-05
+0.106294,0.13026467,-4.3841692027e-05
+0.106613,0.13154929,-4.2641735916e-05
+0.106932,0.13283392,-4.1155604889e-05
+0.107251,0.13411855,-4.0464579407e-05
+0.107570,0.13540318,-3.9781519544e-05
+0.107890,0.13668781,-3.8325537178e-05
+0.108209,0.13797243,-3.7799918978e-05
+0.108528,0.13925707,-3.6579807437e-05
+0.108847,0.14054169,-3.5655908295e-05
+0.109166,0.14182632,-3.4632145235e-05
+0.109486,0.14311096,-3.4026030032e-05
+0.109805,0.14439558,-3.3153295910e-05
+0.110124,0.14568021,-3.1927972521e-05
+0.110443,0.14696483,-3.1550687823e-05
+0.110762,0.14824947,-3.0694842422e-05
+0.111082,0.14953410,-2.9648912413e-05
+0.111401,0.15081872,-2.8693426374e-05
+0.111720,0.15210336,-2.8130325513e-05
+0.112039,0.15338798,-2.7574856358e-05
+0.112358,0.15467261,-2.6853507213e-05
+0.112678,0.15595724,-2.5685811858e-05
+0.112997,0.15724187,-2.5260763620e-05
+0.113316,0.15852650,-2.4888853703e-05
+0.113635,0.15981113,-2.3185633412e-05
+0.113954,0.16109576,-2.3425271814e-05
+0.114274,0.16238038,-2.2954153735e-05
+0.114593,0.16366501,-2.2540241271e-05
+0.114912,0.16494965,-2.1504109376e-05
+0.115231,0.16623427,-2.1540167882e-05
+0.115550,0.16751890,-1.9808788324e-05
+0.115870,0.16880353,-1.9699317387e-05
+0.116189,0.17008816,-1.9206313972e-05
+0.116508,0.17137279,-1.8655149470e-05
+0.116827,0.17265742,-1.8501740903e-05
+0.117146,0.17394204,-1.7104177098e-05
+0.117466,0.17522667,-1.7667320202e-05
+0.117785,0.17651130,-1.6444147127e-05
+0.118104,0.17779593,-1.5773003508e-05
+0.118423,0.17908056,-1.5759771730e-05
+0.118742,0.18036519,-1.4882130506e-05
+0.119062,0.18164982,-1.4938013546e-05
+0.119381,0.18293444,-1.5422132078e-05
+0.119700,0.18421908,-1.4511538134e-05
+0.120019,0.18550371,-1.4291841941e-05
+0.120338,0.18678833,-1.3322185750e-05
+0.120658,0.18807296,-1.3355707729e-05
+0.120977,0.18935759,-1.2741140119e-05
+0.121296,0.19064222,-1.2899935536e-05
+0.121615,0.19192685,-1.2705372278e-05
+0.121934,0.19321148,-1.2305230679e-05
+0.122254,0.19449610,-1.1926502716e-05
+0.122573,0.19578073,-1.1323065851e-05
+0.122892,0.19706537,-1.1561558693e-05
+0.123211,0.19834999,-1.0172273298e-05
+0.123530,0.19963462,-1.1149242370e-05
+0.123850,0.20091925,-1.0114984205e-05
+0.124169,0.20220388,-9.4445707675e-06
+0.124488,0.20348851,-9.6781303561e-06
+0.124807,0.20477314,-9.1846150088e-06
+0.125126,0.20605777,-9.4453894561e-06
+0.125446,0.20734239,-8.9933948971e-06
+0.125765,0.20862702,-9.0322071738e-06
+0.126084,0.20991165,-8.5335976524e-06
+0.126403,0.21119628,-7.7547311075e-06
+0.126722,0.21248091,-8.4007744781e-06
+0.127042,0.21376554,-7.9067929611e-06
+0.127361,0.21505017,-7.4812765416e-06
+0.127680,0.21633480,-7.5434083687e-06
+0.127999,0.21761943,-6.5823056629e-06
+0.128318,0.21890405,-7.4607912228e-06
+0.128638,0.22018868,-6.9632312119e-06
+0.128957,0.22147331,-7.3391561223e-06
+0.129276,0.22275794,-6.9849837882e-06
+0.129595,0.22404257,-6.6027064979e-06
+0.129914,0.22532720,-6.0538074700e-06
+0.130234,0.22661183,-6.0817298807e-06
+0.130553,0.22789646,-5.5076159478e-06
+0.130872,0.22918108,-5.1751680288e-06
+0.131191,0.23046571,-5.9181098338e-06
+0.131510,0.23175034,-5.3943462558e-06
+0.131830,0.23303497,-4.8931906530e-06
+0.132149,0.23431960,-5.4869963601e-06
+0.132468,0.23560423,-5.6221594349e-06
+0.132787,0.23688886,-3.8014600955e-06
+0.133106,0.23817349,-4.9779415186e-06
+0.133426,0.23945812,-4.0911192144e-06
+0.133745,0.24074274,-3.8676494097e-06
+0.134064,0.24202737,-4.0879276867e-06
+0.134383,0.24331200,-4.2782509119e-06
+0.134702,0.24459663,-4.4068649808e-06
+0.135022,0.24588126,-4.3593664582e-06
+0.135341,0.24716589,-4.3314852835e-06
+0.135660,0.24845052,-4.6401726265e-06
+0.135979,0.24973515,-4.1956377891e-06
+0.136298,0.25101978,-3.3101176926e-06
+0.136618,0.25230440,-3.1738998271e-06
+0.136937,0.25358903,-3.1947743750e-06
+0.137256,0.25487366,-3.4852114492e-06
+0.137575,0.25615829,-2.4802865250e-06
+0.137894,0.25744292,-2.3513807857e-06
+0.138214,0.25872755,-2.4016139696e-06
+0.138533,0.26001218,-2.6941123489e-06
+0.138852,0.26129681,-3.0144637415e-06
+0.139171,0.26258144,-2.8224820181e-06
+0.139490,0.26386606,-2.6310811210e-06
+0.139810,0.26515069,-2.4827073892e-06
+0.140129,0.26643532,-2.3517423564e-06
+0.140448,0.26771995,-1.8512724305e-06
+0.140767,0.26900458,-2.0957445146e-06
+0.141086,0.27028921,-2.6853313102e-06
+0.141406,0.27157384,-2.5003320752e-06
+0.141725,0.27285847,-1.9101482354e-06
+0.142044,0.27414309,-2.1034979181e-06
+0.142363,0.27542772,-2.1712373599e-06
+0.142682,0.27671235,-2.3183013408e-06
+0.143002,0.27799698,-2.0951266009e-06
+0.143321,0.27928161,-2.0156811190e-06
+0.143640,0.28056624,-2.2080574775e-06
+0.143959,0.28185087,-1.9729273948e-06
+0.144278,0.28313550,-1.2910460311e-06
+0.144598,0.28442012,-1.5835934411e-06
+0.144917,0.28570476,-1.0580164780e-06
+0.145236,0.28698938,-2.3985866322e-06
+0.145555,0.28827401,-2.1357498741e-06
+0.145874,0.28955864,-1.6950367988e-06
+0.146194,0.29084327,-2.4069862365e-06
+0.146513,0.29212790,-1.6537635532e-06
+0.146832,0.29341253,-1.3364247888e-06
+0.147151,0.29469716,-1.5684949727e-06
+0.147470,0.29598179,-2.0465141991e-06
+0.147790,0.29726641,-1.4071419086e-06
+0.148109,0.29855104,-1.4530152488e-06
+0.148428,0.29983567,-9.7293729459e-07
+0.148747,0.30112030,-3.1656162624e-07
+0.149066,0.30240493,-1.1389507360e-06
+0.149386,0.30368956,-8.9310371512e-07
+0.149705,0.30497418,-9.5862545613e-07
+0.150024,0.30625882,-4.4449730998e-07
+0.150343,0.30754345,-1.2229789631e-06
+0.150662,0.30882807,-6.7520091747e-07
+0.150982,0.31011270,-8.5267398781e-07
+0.151301,0.31139733,-5.7327349475e-07
+0.151620,0.31268196,-4.3041497337e-09
+0.151939,0.31396659,-2.5678990919e-07
+0.152258,0.31525122,-1.1115587378e-06
+0.152578,0.31653585,-5.3796981163e-07
+0.152897,0.31782047,-7.2093231981e-07
+0.153216,0.31910511,-1.0089150254e-06
+0.153535,0.32038973,-6.0102964084e-07
+0.153854,0.32167436,-7.3208934073e-07
+0.154174,0.32295899,-3.5072920919e-07
+0.154493,0.32424362,-3.4527487865e-07
+0.154812,0.32552825,-5.4402838389e-07
+0.155131,0.32681288,-6.1174129868e-07
+0.155450,0.32809751,-6.3543191159e-08
+0.155770,0.32938213,-5.1292060560e-08
+0.156089,0.33066676,6.2937817956e-08
+0.156408,0.33195140,-2.1236041597e-07
+0.156727,0.33323602,7.0125120040e-08
+0.157046,0.33452065,-3.1233152558e-08
+0.157366,0.33580528,-2.8646809400e-07
+0.157685,0.33708991,-4.0736345805e-07
+0.158004,0.33837454,-3.9409493839e-08
+0.158323,0.33965917,-3.0417096216e-08
+0.158642,0.34094380,-9.9874352357e-08
+0.158962,0.34222842,-3.0278425490e-07
+0.159281,0.34351305,1.3407712119e-07
+0.159600,0.34479768,-1.1428704968e-07
+0.159919,0.34608231,5.7620616506e-07
+0.160238,0.34736694,3.7624958233e-07
+0.160558,0.34865157,7.3365354890e-07
+0.160877,0.34993619,-1.2616513763e-07
+0.161196,0.35122083,5.4279783658e-07
+0.161515,0.35250546,3.6312969514e-07
+0.161834,0.35379008,1.9871791076e-07
+0.162154,0.35507472,2.1433865152e-07
+0.162473,0.35635934,-9.4947432915e-08
+0.162792,0.35764397,2.7706766428e-07
+0.163111,0.35892859,4.1361406760e-07
+0.163430,0.36021323,2.1691581712e-07
+0.163750,0.36149786,1.1129786823e-07
+0.164069,0.36278248,8.3265923896e-07
+0.164388,0.36406712,6.1219426782e-07
+0.164707,0.36535174,5.9014920392e-07
+0.165026,0.36663637,5.2875051299e-07
+0.165346,0.36792101,7.9781795399e-07
+0.165665,0.36920563,3.5752968656e-07
+0.165984,0.37049026,6.4914984880e-07
+0.166303,0.37177488,1.8941294966e-07
+0.166622,0.37305952,1.0224936649e-06
+0.166942,0.37434415,7.9253249683e-07
+0.167261,0.37562877,4.9643874574e-07
+0.167580,0.37691341,7.5159077485e-07
+0.167899,0.37819803,1.0701514747e-06
+0.168218,0.37948266,4.3112346840e-07
+0.168538,0.38076729,1.0995130023e-06
+0.168857,0.38205192,3.9087427500e-07
+0.169176,0.38333655,1.3042808263e-06
+0.169495,0.38462117,8.2776678251e-07
+0.169814,0.38590580,1.3242720656e-06
+0.170134,0.38719044,1.5202182433e-06
+0.170453,0.38847506,1.0182990801e-06
+0.170772,0.38975969,1.6352560614e-06
+0.171091,0.39104432,9.6812228165e-07
+0.171410,0.39232895,1.6742445975e-06
+0.171730,0.39361358,1.1791398981e-06
+0.172049,0.39489820,1.9152123625e-06
+0.172368,0.39618284,1.1722735749e-06
+0.172687,0.39746746,1.4687250936e-06
+0.173006,0.39875209,9.4881382773e-07
+0.173326,0.40003673,7.0555714164e-07
+0.173645,0.40132135,1.4077434788e-06
+0.173964,0.40260598,1.2812560894e-06
+0.174283,0.40389060,1.5974306866e-06
+0.174602,0.40517524,1.5839551376e-06
+0.174922,0.40645987,6.3740244679e-07
+0.175241,0.40774449,2.4366501206e-06
+0.175560,0.40902913,1.4066862994e-06
+0.175879,0.41031375,1.9213019876e-06
+0.176198,0.41159838,1.5365246295e-06
+0.176518,0.41288302,1.6934133765e-06
+0.176837,0.41416764,2.1835051169e-06
+0.177156,0.41545227,1.3439287639e-06
+0.177475,0.41673689,2.0877141500e-06
+0.177794,0.41802153,1.8545656658e-06
+0.178114,0.41930616,1.1338487672e-06
+0.178433,0.42059078,1.1782950597e-06
+0.178752,0.42187542,2.6281075917e-06
+0.179071,0.42316004,2.5496336740e-06
+0.179390,0.42444467,2.1324064766e-06
+0.179710,0.42572930,2.8271454755e-06
+0.180029,0.42701393,2.4712447430e-06
+0.180348,0.42829856,2.2178186294e-06
+0.180667,0.42958318,2.2722817882e-06
+0.180986,0.43086781,2.0670081926e-06
+0.181306,0.43215245,2.5645164069e-06
+0.181625,0.43343707,2.1270779603e-06
+0.181944,0.43472170,2.6630708250e-06
+0.182263,0.43600633,2.5251866667e-06
+0.182582,0.43729096,2.8410038420e-06
+0.182902,0.43857559,2.9519645606e-06
+0.183221,0.43986021,2.9537960495e-06
+0.183540,0.44114485,3.4570878864e-06
+0.183859,0.44242947,3.0450023854e-06
+0.184178,0.44371410,3.4031250932e-06
+0.184498,0.44499874,2.1945823056e-06
+0.184817,0.44628336,3.3842009653e-06
+0.185136,0.44756799,3.8501167507e-06
+0.185455,0.44885261,3.7678649471e-06
+0.185774,0.45013725,3.8200120922e-06
+0.186094,0.45142188,3.6032134933e-06
+0.186413,0.45270650,4.4925713183e-06
+0.186732,0.45399114,3.7008230000e-06
+0.187051,0.45527576,3.6471277389e-06
+0.187370,0.45656040,3.5819763690e-06
+0.187690,0.45784501,3.9786294892e-06
+0.188009,0.45912965,3.8355744675e-06
+0.188328,0.46041428,4.3517287171e-06
+0.188647,0.46169891,4.0430486659e-06
+0.188966,0.46298355,4.6387042170e-06
+0.189286,0.46426816,4.9825116918e-06
+0.189605,0.46555279,4.9139088052e-06
+0.189924,0.46683742,4.3966776382e-06
+0.190243,0.46812206,4.4960990214e-06
+0.190562,0.46940669,4.9011009551e-06
+0.190882,0.47069130,5.1163169907e-06
+0.191201,0.47197594,5.0134116550e-06
+0.191520,0.47326057,5.2259015783e-06
+0.191839,0.47454520,5.6908030548e-06
+0.192158,0.47582984,5.3287983650e-06
+0.192478,0.47711445,5.3722089763e-06
+0.192797,0.47839908,6.1398416853e-06
+0.193116,0.47968371,5.7157579708e-06
+0.193435,0.48096835,6.0975404273e-06
+0.193754,0.48225298,6.4234353173e-06
+0.194074,0.48353759,6.1989154992e-06
+0.194393,0.48482222,6.0993357088e-06
+0.194712,0.48610686,6.9962920503e-06
+0.195031,0.48739149,6.5164887314e-06
diff --git a/demo_data/ec_Ads_metadata.json b/demo_data/ec_Ads_metadata.json
new file mode 100644
index 0000000000000000000000000000000000000000..f5e2f9633e6d994bd99e41705d9b926d7f4152e0
--- /dev/null
+++ b/demo_data/ec_Ads_metadata.json
@@ -0,0 +1,32 @@
+{
+ "mechanism": "Ads",
+ "n_scans": 3,
+ "scan_rates_Vs": [
+ 0.010573734343051911,
+ 0.24367923736572267,
+ 4.024525451660156
+ ],
+ "physical_params": {
+ "E0_V": 0.25,
+ "T_K": 298.15,
+ "A_cm2": 0.0707,
+ "C_mM": 1.0,
+ "D_cm2s": 1e-05,
+ "n_electrons": 1
+ },
+ "true_params_dimless": {
+ "sigma": 8.719717822841444,
+ "theta_i": 9.288707976005638,
+ "theta_v": -6.010308548417381,
+ "cycles": 1.0,
+ "kinetics": "Ads",
+ "K0": 0.4485674957444803,
+ "alpha": 0.5293986596997461,
+ "Gamma_sat": 1.2656920004857595
+ },
+ "csv_files": [
+ "ec_Ads_11mVs.csv",
+ "ec_Ads_244mVs.csv",
+ "ec_Ads_4025mVs.csv"
+ ]
+}
\ No newline at end of file
diff --git a/demo_data/ec_BV_11mVs.csv b/demo_data/ec_BV_11mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..35e6dabb769524bca832786826e458d3c23da632
--- /dev/null
+++ b/demo_data/ec_BV_11mVs.csv
@@ -0,0 +1,673 @@
+Time (s),E (V),I (A)
+0.000000,0.34475868,-5.2178183467e-07
+0.121492,0.34347405,-3.3534957891e-07
+0.242985,0.34218941,-2.3865323310e-07
+0.364477,0.34090479,-2.3333255892e-07
+0.485970,0.33962016,-2.0713169841e-07
+0.607462,0.33833553,-2.4162594073e-07
+0.728955,0.33705090,-2.1294154303e-07
+0.850447,0.33576627,-2.0202581845e-07
+0.971940,0.33448164,-2.1376153987e-07
+1.093432,0.33319702,-2.0355324686e-07
+1.214924,0.33191239,-2.1742394495e-07
+1.336417,0.33062776,-2.2642566051e-07
+1.457909,0.32934313,-2.5861625869e-07
+1.579402,0.32805850,-2.5286086658e-07
+1.700894,0.32677387,-2.6556437347e-07
+1.822387,0.32548924,-2.6659037479e-07
+1.943879,0.32420462,-2.2436502279e-07
+2.065372,0.32291998,-2.8946249201e-07
+2.186864,0.32163535,-2.8377891278e-07
+2.308356,0.32035073,-2.9821515660e-07
+2.429849,0.31906610,-3.0647533849e-07
+2.551341,0.31778147,-3.2131895154e-07
+2.672834,0.31649684,-3.8102377905e-07
+2.794326,0.31521221,-3.6059422753e-07
+2.915819,0.31392758,-4.0286556452e-07
+3.037311,0.31264296,-4.1725979291e-07
+3.158804,0.31135833,-3.9036788169e-07
+3.280296,0.31007369,-4.2679536218e-07
+3.401789,0.30878907,-4.6254317222e-07
+3.523281,0.30750444,-4.8228949614e-07
+3.644773,0.30621981,-4.7746607328e-07
+3.766266,0.30493518,-5.3150807151e-07
+3.887758,0.30365055,-4.9513059711e-07
+4.009251,0.30236592,-5.2919706823e-07
+4.130743,0.30108129,-5.4634853985e-07
+4.252235,0.29979667,-5.6480135562e-07
+4.373728,0.29851204,-5.9336901229e-07
+4.495220,0.29722741,-6.1075427529e-07
+4.616713,0.29594278,-6.6326263301e-07
+4.738205,0.29465815,-6.7974763166e-07
+4.859698,0.29337352,-7.2240025223e-07
+4.981190,0.29208889,-7.0464664537e-07
+5.102683,0.29080426,-7.5946095422e-07
+5.224175,0.28951963,-7.8233595839e-07
+5.345668,0.28823501,-8.3308760718e-07
+5.467160,0.28695038,-8.5585862961e-07
+5.588652,0.28566575,-8.8487134052e-07
+5.710145,0.28438112,-9.2441914973e-07
+5.831637,0.28309649,-9.5898965134e-07
+5.953130,0.28181186,-9.5690816057e-07
+6.074622,0.28052723,-1.0142064835e-06
+6.196115,0.27924260,-1.0335478096e-06
+6.317607,0.27795798,-1.0705023131e-06
+6.439100,0.27667334,-1.1127488017e-06
+6.560592,0.27538872,-1.1442711999e-06
+6.682085,0.27410409,-1.1572737123e-06
+6.803577,0.27281946,-1.2039873432e-06
+6.925070,0.27153483,-1.2553945358e-06
+7.046562,0.27025020,-1.2861096191e-06
+7.168054,0.26896557,-1.3159977975e-06
+7.289547,0.26768094,-1.3560010231e-06
+7.411039,0.26639631,-1.3517851485e-06
+7.532532,0.26511169,-1.4064519136e-06
+7.654024,0.26382706,-1.4117737992e-06
+7.775517,0.26254243,-1.4851269653e-06
+7.897009,0.26125780,-1.5133202980e-06
+8.018502,0.25997317,-1.4984645700e-06
+8.139994,0.25868854,-1.5898103411e-06
+8.261486,0.25740391,-1.6085322103e-06
+8.382979,0.25611928,-1.6418821508e-06
+8.504471,0.25483466,-1.6586730630e-06
+8.625963,0.25355003,-1.6780176885e-06
+8.747456,0.25226540,-1.6937331088e-06
+8.868948,0.25098077,-1.7177534587e-06
+8.990441,0.24969614,-1.7684627312e-06
+9.111933,0.24841151,-1.7818557036e-06
+9.233426,0.24712688,-1.8301875730e-06
+9.354918,0.24584225,-1.8204175164e-06
+9.476411,0.24455762,-1.8751190279e-06
+9.597903,0.24327300,-1.8437690219e-06
+9.719396,0.24198837,-1.9197879767e-06
+9.840888,0.24070374,-1.8915787658e-06
+9.962380,0.23941911,-1.9157142844e-06
+10.083873,0.23813448,-1.9492383698e-06
+10.205365,0.23684985,-1.9113655070e-06
+10.326858,0.23556522,-1.9658393620e-06
+10.448350,0.23428059,-1.9320942187e-06
+10.569843,0.23299596,-1.9798555031e-06
+10.691335,0.23171134,-1.9808057219e-06
+10.812828,0.23042671,-2.0270806396e-06
+10.934320,0.22914208,-2.0081548281e-06
+11.055813,0.22785745,-1.9979696693e-06
+11.177305,0.22657282,-2.0179046760e-06
+11.298797,0.22528819,-2.0185239267e-06
+11.420290,0.22400356,-2.0264681938e-06
+11.541782,0.22271894,-2.0101909525e-06
+11.663275,0.22143430,-2.0171363350e-06
+11.784767,0.22014968,-1.9598054308e-06
+11.906260,0.21886505,-2.0138742880e-06
+12.027752,0.21758042,-1.9954019337e-06
+12.149245,0.21629579,-1.9832163250e-06
+12.270737,0.21501116,-1.9872625913e-06
+12.392230,0.21372653,-1.9720984753e-06
+12.513722,0.21244190,-1.9923809470e-06
+12.635214,0.21115727,-1.9790050901e-06
+12.756707,0.20987265,-1.9752153500e-06
+12.878199,0.20858802,-1.9754254787e-06
+12.999692,0.20730339,-1.9249836614e-06
+13.121184,0.20601876,-1.9284257304e-06
+13.242677,0.20473413,-1.9624162644e-06
+13.364169,0.20344950,-1.9108906038e-06
+13.485662,0.20216487,-1.8754532955e-06
+13.607154,0.20088024,-1.8886173740e-06
+13.728647,0.19959561,-1.8655555944e-06
+13.850139,0.19831099,-1.8529062179e-06
+13.971631,0.19702636,-1.8432308120e-06
+14.093124,0.19574173,-1.8501095884e-06
+14.214616,0.19445710,-1.8324437242e-06
+14.336109,0.19317247,-1.8158474749e-06
+14.457601,0.19188784,-1.7793050835e-06
+14.579094,0.19060321,-1.7865445224e-06
+14.700586,0.18931859,-1.7983781295e-06
+14.822079,0.18803395,-1.7428878620e-06
+14.943571,0.18674933,-1.7491937851e-06
+15.065064,0.18546470,-1.7345091089e-06
+15.186556,0.18418007,-1.7221041951e-06
+15.308049,0.18289544,-1.6825807188e-06
+15.429541,0.18161081,-1.6927015398e-06
+15.551033,0.18032618,-1.6795429259e-06
+15.672526,0.17904155,-1.6484818210e-06
+15.794018,0.17775693,-1.6498262117e-06
+15.915511,0.17647230,-1.6560126357e-06
+16.037003,0.17518766,-1.6638601900e-06
+16.158496,0.17390304,-1.6062530666e-06
+16.279988,0.17261841,-1.5706692456e-06
+16.401481,0.17133378,-1.6149344338e-06
+16.522972,0.17004915,-1.5991137429e-06
+16.644465,0.16876452,-1.5750283335e-06
+16.765957,0.16747989,-1.5406201197e-06
+16.887449,0.16619526,-1.5320953695e-06
+17.008942,0.16491064,-1.5465111469e-06
+17.130434,0.16362601,-1.5154915935e-06
+17.251927,0.16234138,-1.4794379214e-06
+17.373419,0.16105675,-1.5021132621e-06
+17.494912,0.15977212,-1.4573166689e-06
+17.616404,0.15848749,-1.4789310555e-06
+17.737897,0.15720287,-1.4605469595e-06
+17.859389,0.15591823,-1.4300666470e-06
+17.980882,0.15463360,-1.4290080644e-06
+18.102374,0.15334898,-1.4502998344e-06
+18.223866,0.15206435,-1.3911067445e-06
+18.345359,0.15077972,-1.3898919573e-06
+18.466851,0.14949509,-1.3640142676e-06
+18.588344,0.14821046,-1.3958996998e-06
+18.709836,0.14692583,-1.3451062933e-06
+18.831329,0.14564120,-1.3554217772e-06
+18.952821,0.14435657,-1.3103638120e-06
+19.074314,0.14307195,-1.3546328151e-06
+19.195806,0.14178732,-1.3400822790e-06
+19.317299,0.14050268,-1.3223414572e-06
+19.438791,0.13921806,-1.3273969186e-06
+19.560283,0.13793343,-1.2884483577e-06
+19.681776,0.13664881,-1.2843214630e-06
+19.803268,0.13536417,-1.3183248852e-06
+19.924761,0.13407954,-1.2824335010e-06
+20.046253,0.13279492,-1.2573090990e-06
+20.167746,0.13151028,-1.2531224032e-06
+20.289238,0.13022566,-1.2662831823e-06
+20.410731,0.12894103,-1.2406463467e-06
+20.532223,0.12765639,-1.2341323570e-06
+20.653716,0.12637177,-1.2342297916e-06
+20.775208,0.12508714,-1.2179731713e-06
+20.896701,0.12380252,-1.2275820742e-06
+21.018193,0.12251788,-1.1903268125e-06
+21.139685,0.12123325,-1.2069863685e-06
+21.261178,0.11994863,-1.1718863178e-06
+21.382670,0.11866399,-1.2263892485e-06
+21.504163,0.11737937,-1.1820850864e-06
+21.625655,0.11609474,-1.1699483496e-06
+21.747148,0.11481010,-1.1606514435e-06
+21.868640,0.11352548,-1.1714169822e-06
+21.990133,0.11224085,-1.1384260545e-06
+22.111625,0.11095623,-1.1474009627e-06
+22.233118,0.10967159,-1.1431897279e-06
+22.354610,0.10838696,-1.1179924304e-06
+22.476102,0.10710234,-1.1130567773e-06
+22.597595,0.10581771,-1.1167078408e-06
+22.719087,0.10453308,-1.1195653025e-06
+22.840580,0.10324845,-1.1118369380e-06
+22.962072,0.10196382,-1.0918997660e-06
+23.083565,0.10067919,-1.0933113814e-06
+23.205057,0.09939456,-1.1085572599e-06
+23.326550,0.09810994,-1.0804265122e-06
+23.448042,0.09682531,-1.1057639298e-06
+23.569535,0.09554067,-1.0778574362e-06
+23.691027,0.09425605,-1.0713017919e-06
+23.812519,0.09297142,-1.0630889354e-06
+23.934012,0.09168680,-1.0669574481e-06
+24.055504,0.09040216,-1.0670203423e-06
+24.176997,0.08911753,-1.0213570456e-06
+24.298489,0.08783291,-1.0663211850e-06
+24.419982,0.08654827,-1.0446885487e-06
+24.541474,0.08526365,-1.0238494112e-06
+24.662967,0.08397902,-1.0433111643e-06
+24.784459,0.08269438,-1.0318404881e-06
+24.905952,0.08140976,-1.0077247657e-06
+25.027444,0.08012513,-1.0133392644e-06
+25.148936,0.07884051,-1.0222596298e-06
+25.270429,0.07755587,-1.0220404278e-06
+25.391921,0.07627124,-1.0116567913e-06
+25.513414,0.07498662,-9.6250121330e-07
+25.634906,0.07370198,-1.0084022710e-06
+25.756399,0.07241736,-9.9696067045e-07
+25.877891,0.07113273,-9.6792393600e-07
+25.999384,0.06984810,-1.0012295412e-06
+26.120876,0.06856347,-9.8831992672e-07
+26.242369,0.06727884,-9.8137382250e-07
+26.363861,0.06599422,-9.6925636642e-07
+26.485354,0.06470958,-9.7881876886e-07
+26.606846,0.06342495,-9.3437283697e-07
+26.728338,0.06214033,-9.5763391911e-07
+26.849831,0.06085570,-9.4741473560e-07
+26.971323,0.05957107,-9.5570120936e-07
+27.092816,0.05828644,-9.2219929157e-07
+27.214308,0.05700181,-9.6884270776e-07
+27.335801,0.05571719,-9.6919986469e-07
+27.457293,0.05443255,-9.4311483015e-07
+27.578786,0.05314793,-9.5070214653e-07
+27.700278,0.05186330,-9.3429509553e-07
+27.821771,0.05057866,-9.3278965434e-07
+27.943263,0.04929404,-9.2744756002e-07
+28.064755,0.04800941,-9.4115613784e-07
+28.186248,0.04672479,-9.2670592325e-07
+28.307740,0.04544015,-9.1370753507e-07
+28.429233,0.04415553,-9.3399134718e-07
+28.550725,0.04287090,-9.1419254263e-07
+28.672218,0.04158626,-9.0297715524e-07
+28.793710,0.04030163,-8.7678530356e-07
+28.915203,0.03901702,-8.8850601026e-07
+29.036695,0.03773239,-9.0424060818e-07
+29.158188,0.03644775,-9.0409976628e-07
+29.279680,0.03516312,-8.8797450219e-07
+29.401172,0.03387848,-8.8315607994e-07
+29.522665,0.03259388,-8.6735291697e-07
+29.644157,0.03130924,-9.1494902657e-07
+29.765650,0.03002461,-8.6743292672e-07
+29.887142,0.02873997,-8.7551473635e-07
+30.008635,0.02745534,-8.8004879405e-07
+30.130127,0.02617073,-8.9315399938e-07
+30.251620,0.02488610,-8.7945573209e-07
+30.373112,0.02360146,-8.6969619222e-07
+30.494605,0.02231683,-8.5352416986e-07
+30.616097,0.02103220,-8.4864017261e-07
+30.737589,0.01974759,-8.7645082981e-07
+30.859082,0.01846295,-8.3928377465e-07
+30.980574,0.01717832,-8.6493179717e-07
+31.102067,0.01589369,-8.4568336898e-07
+31.223559,0.01460905,-8.8673713491e-07
+31.345052,0.01332444,-8.5426044516e-07
+31.466544,0.01203981,-8.6261388583e-07
+31.588037,0.01075518,-8.5164631215e-07
+31.709529,0.00947054,-8.4447198424e-07
+31.831022,0.00818591,-8.3175094945e-07
+31.952514,0.00690130,-8.4110157350e-07
+32.074006,0.00561666,-8.5644169036e-07
+32.195499,0.00433203,-8.4109502631e-07
+32.316991,0.00304740,-8.5861396539e-07
+32.438484,0.00176276,-8.5412228399e-07
+32.559976,0.00047815,-7.9270835645e-07
+32.681469,-0.00080648,-8.2786583681e-07
+32.802961,-0.00209111,-8.0699195280e-07
+32.924452,-0.00337575,-8.0965686519e-07
+33.045944,-0.00466038,-8.0262652389e-07
+33.167437,-0.00594499,-8.4584704872e-07
+33.288929,-0.00722962,-8.0114108514e-07
+33.410422,-0.00851426,-7.8356863438e-07
+33.531914,-0.00979889,-7.8555928934e-07
+33.653406,-0.01108352,-8.0349054671e-07
+33.774899,-0.01236813,-7.8626654048e-07
+33.896391,-0.01365277,-8.1400177612e-07
+34.017884,-0.01493740,-7.7437344164e-07
+34.139376,-0.01622204,-8.0996009802e-07
+34.260869,-0.01750667,-8.2520076976e-07
+34.382361,-0.01879128,-7.9616496325e-07
+34.503854,-0.02007591,-8.0972872961e-07
+34.625346,-0.02136055,-7.8049789934e-07
+34.746839,-0.02264518,-7.8632443414e-07
+34.868331,-0.02392981,-7.9248920603e-07
+34.989823,-0.02521442,-7.8178707706e-07
+35.111316,-0.02649906,-7.9640442543e-07
+35.232808,-0.02778369,-7.4704273983e-07
+35.354301,-0.02906832,-7.7868334831e-07
+35.475793,-0.03035296,-7.5794927515e-07
+35.597286,-0.03163757,-7.6772825038e-07
+35.718778,-0.03292220,-8.0165011624e-07
+35.840271,-0.03420683,-7.6489950359e-07
+35.961763,-0.03549147,-7.7031232817e-07
+36.083256,-0.03677610,-7.5726656308e-07
+36.204748,-0.03806071,-7.7665351332e-07
+36.326241,-0.03934534,-7.6848875543e-07
+36.447733,-0.04062998,-7.5958999056e-07
+36.569225,-0.04191461,-7.5462763324e-07
+36.690718,-0.04319925,-7.6306531099e-07
+36.812210,-0.04448386,-7.5007707869e-07
+36.933703,-0.04576849,-7.5833978666e-07
+37.055195,-0.04705312,-7.7991684915e-07
+37.176688,-0.04833776,-7.3649361921e-07
+37.298180,-0.04962239,-7.2056611118e-07
+37.419673,-0.05090700,-7.3920678490e-07
+37.541165,-0.05219163,-7.5704462882e-07
+37.662658,-0.05347627,-7.4407511014e-07
+37.784150,-0.05476090,-7.2939022777e-07
+37.905642,-0.05604553,-7.3436480308e-07
+38.027135,-0.05733014,-7.3272027277e-07
+38.148627,-0.05861478,-7.2320715468e-07
+38.270120,-0.05989941,-7.1320402843e-07
+38.391612,-0.06118405,-7.6099670838e-07
+38.513105,-0.06246868,-7.4240330847e-07
+38.634597,-0.06375329,-7.3405868330e-07
+38.756090,-0.06503792,-7.0130927990e-07
+38.877582,-0.06632256,-7.0122071241e-07
+38.999075,-0.06760719,-7.0453199223e-07
+39.120567,-0.06889182,-7.3522707311e-07
+39.242059,-0.07017643,-7.1640266566e-07
+39.363552,-0.07146107,-7.2960592416e-07
+39.485044,-0.07274570,-7.1973554605e-07
+39.606537,-0.07403033,-7.3835353659e-07
+39.728029,-0.07531497,-6.9148261845e-07
+39.849522,-0.07659958,-7.2092589729e-07
+39.971014,-0.07788421,-7.3521727810e-07
+40.092507,-0.07916884,-6.9876768151e-07
+40.213999,-0.08045348,-6.9259816677e-07
+40.335492,-0.08173811,-7.3685294135e-07
+40.456984,-0.08302272,-6.8578872868e-07
+40.578476,-0.08430735,-7.1550425720e-07
+40.699969,-0.08559199,-7.3245477649e-07
+40.821461,-0.08631944,-6.9882340995e-07
+40.942954,-0.08503480,-7.2345914415e-07
+41.064446,-0.08375017,-6.8576042627e-07
+41.185939,-0.08246554,-7.0468891857e-07
+41.307431,-0.08118093,-6.9844063134e-07
+41.428924,-0.07989629,-7.1605850000e-07
+41.550416,-0.07861166,-7.1264885768e-07
+41.671909,-0.07732703,-6.7794426756e-07
+41.793401,-0.07604239,-6.7612976808e-07
+41.914893,-0.07475778,-7.0582859354e-07
+42.036386,-0.07347315,-6.7342263405e-07
+42.157878,-0.07218852,-6.8665888627e-07
+42.279371,-0.07090388,-6.9421217789e-07
+42.400863,-0.06961925,-6.8455033034e-07
+42.522356,-0.06833464,-6.5097634192e-07
+42.643848,-0.06705001,-6.5974998845e-07
+42.765341,-0.06576537,-6.9626031409e-07
+42.886833,-0.06448074,-6.9655968047e-07
+43.008326,-0.06319610,-6.8084348685e-07
+43.129818,-0.06191150,-6.7857630335e-07
+43.251311,-0.06062686,-6.7965927037e-07
+43.372803,-0.05934223,-6.5608113928e-07
+43.494295,-0.05805759,-6.6223658014e-07
+43.615788,-0.05677296,-6.7762067142e-07
+43.737280,-0.05548835,-6.8710677591e-07
+43.858773,-0.05420372,-6.5741104362e-07
+43.980265,-0.05291908,-6.5903093175e-07
+44.101758,-0.05163445,-6.7892098453e-07
+44.223250,-0.05034982,-6.8113682157e-07
+44.344743,-0.04906521,-6.5257179409e-07
+44.466235,-0.04778057,-6.8729138603e-07
+44.587728,-0.04649594,-6.5637034978e-07
+44.709220,-0.04521131,-6.5701759361e-07
+44.830712,-0.04392667,-6.4974840878e-07
+44.952205,-0.04264206,-6.8122507975e-07
+45.073697,-0.04135743,-6.6156314755e-07
+45.195190,-0.04007280,-6.4148369025e-07
+45.316682,-0.03878816,-6.4587417375e-07
+45.438175,-0.03750353,-6.3694540523e-07
+45.559667,-0.03621892,-6.6094776328e-07
+45.681160,-0.03493428,-6.5089447628e-07
+45.802652,-0.03364965,-6.3373408605e-07
+45.924145,-0.03236502,-6.7165994502e-07
+46.045637,-0.03108038,-6.6425404249e-07
+46.167129,-0.02979577,-6.5229402828e-07
+46.288622,-0.02851114,-6.6639126171e-07
+46.410114,-0.02722651,-6.4525296403e-07
+46.531607,-0.02594187,-6.6124207750e-07
+46.653099,-0.02465724,-6.4539045501e-07
+46.774592,-0.02337263,-6.6748850883e-07
+46.896084,-0.02208800,-6.6235303763e-07
+47.017577,-0.02080336,-6.5732221836e-07
+47.139069,-0.01951873,-6.4201571385e-07
+47.260562,-0.01823409,-6.4366684290e-07
+47.382054,-0.01694949,-6.6899492952e-07
+47.503546,-0.01566485,-6.3094462240e-07
+47.625039,-0.01438022,-6.4390429452e-07
+47.746531,-0.01309558,-6.3858462561e-07
+47.868024,-0.01181095,-6.3226993854e-07
+47.989516,-0.01052634,-6.2084715475e-07
+48.111009,-0.00924171,-6.5569598925e-07
+48.232501,-0.00795707,-6.0763497763e-07
+48.353994,-0.00667244,-6.2353629689e-07
+48.475486,-0.00538781,-6.3665985497e-07
+48.596979,-0.00410320,-6.4781239965e-07
+48.718471,-0.00281856,-6.2567171177e-07
+48.839963,-0.00153393,-6.1646404328e-07
+48.961456,-0.00024930,-6.3312432102e-07
+49.082948,0.00103534,-6.5193491235e-07
+49.204441,0.00231995,-6.5362934565e-07
+49.325933,0.00360458,-5.9349144990e-07
+49.447426,0.00488921,-6.2917610791e-07
+49.568918,0.00617385,-6.1985986948e-07
+49.690411,0.00745848,-6.2158002757e-07
+49.811903,0.00874309,-5.9198533852e-07
+49.933396,0.01002773,-6.1768981121e-07
+50.054888,0.01131236,-6.6426296110e-07
+50.176381,0.01259699,-6.3350251143e-07
+50.297873,0.01388163,-6.2048618292e-07
+50.419365,0.01516624,-6.4605785593e-07
+50.540858,0.01645087,-6.1175269593e-07
+50.662350,0.01773550,-5.9679035707e-07
+50.783843,0.01902014,-6.2918389236e-07
+50.905335,0.02030477,-6.0284264103e-07
+51.026828,0.02158938,-5.9917538999e-07
+51.148320,0.02287401,-5.9068476765e-07
+51.269813,0.02415865,-6.1259352005e-07
+51.391305,0.02544328,-6.1804939112e-07
+51.512798,0.02672791,-6.2849793248e-07
+51.634290,0.02801252,-5.8642785713e-07
+51.755782,0.02929716,-6.3423182712e-07
+51.877275,0.03058179,-6.0553528876e-07
+51.998767,0.03186643,-5.5079150397e-07
+52.120260,0.03315106,-5.7968858223e-07
+52.241752,0.03443567,-5.9648557766e-07
+52.363245,0.03572030,-5.7872171183e-07
+52.484737,0.03700494,-6.1026596836e-07
+52.606230,0.03828957,-5.8730435570e-07
+52.727722,0.03957420,-6.1413592451e-07
+52.849215,0.04085881,-5.9970328938e-07
+52.970707,0.04214345,-5.7262323667e-07
+53.092199,0.04342808,-5.5540933477e-07
+53.213692,0.04471271,-6.0122940319e-07
+53.335184,0.04599734,-5.8508408512e-07
+53.456677,0.04728197,-5.8326814217e-07
+53.578169,0.04856659,-6.1324298064e-07
+53.699662,0.04985122,-6.0268267308e-07
+53.821154,0.05113586,-6.0236108750e-07
+53.942647,0.05242048,-5.6966029828e-07
+54.064139,0.05370511,-5.6736290490e-07
+54.185632,0.05498973,-5.5453752749e-07
+54.307124,0.05627437,-5.6160282150e-07
+54.428616,0.05755900,-5.9960008092e-07
+54.550109,0.05884362,-6.0179875093e-07
+54.671601,0.06012826,-5.5545629926e-07
+54.793094,0.06141288,-5.6332859882e-07
+54.914586,0.06269751,-5.7053086829e-07
+55.036079,0.06398215,-5.7090993510e-07
+55.157571,0.06526677,-6.1068937047e-07
+55.279064,0.06655140,-5.8368288343e-07
+55.400556,0.06783602,-6.0193232391e-07
+55.522049,0.06912066,-5.9238518106e-07
+55.643541,0.07040529,-5.9910950568e-07
+55.765034,0.07168991,-5.7775185137e-07
+55.886526,0.07297455,-5.5434405031e-07
+56.008018,0.07425917,-5.7506502909e-07
+56.129511,0.07554380,-5.7620228108e-07
+56.251003,0.07682844,-5.5410829993e-07
+56.372496,0.07811306,-5.8066230914e-07
+56.493988,0.07939769,-5.9026172641e-07
+56.615481,0.08068231,-5.8972862020e-07
+56.736973,0.08196695,-5.6962849028e-07
+56.858466,0.08325158,-5.6415957638e-07
+56.979958,0.08453620,-5.6678505097e-07
+57.101451,0.08582083,-5.5168986087e-07
+57.222943,0.08710546,-5.4609211685e-07
+57.344435,0.08839009,-5.5437224962e-07
+57.465928,0.08967472,-5.7726308046e-07
+57.587420,0.09095935,-5.5629959790e-07
+57.708913,0.09224398,-5.6241683823e-07
+57.830405,0.09352860,-5.7338575228e-07
+57.951898,0.09481323,-5.7674920341e-07
+58.073390,0.09609787,-5.2926594260e-07
+58.194883,0.09738249,-5.3738476706e-07
+58.316375,0.09866712,-5.3223228348e-07
+58.437868,0.09995174,-5.8013317250e-07
+58.559360,0.10123638,-5.1949892760e-07
+58.680852,0.10252101,-5.3837973367e-07
+58.802345,0.10380563,-5.4255983071e-07
+58.923837,0.10509027,-5.4200935126e-07
+59.045330,0.10637489,-5.6715463210e-07
+59.166822,0.10765952,-5.4697691539e-07
+59.288315,0.10894416,-5.4412976430e-07
+59.409807,0.11022878,-5.6540704799e-07
+59.531300,0.11151341,-5.3952940986e-07
+59.652792,0.11279803,-5.2264657923e-07
+59.774285,0.11408267,-5.4802338313e-07
+59.895777,0.11536730,-5.1265835170e-07
+60.017269,0.11665192,-5.3665390480e-07
+60.138762,0.11793656,-5.2059292690e-07
+60.260254,0.11922118,-5.5215764984e-07
+60.381747,0.12050581,-5.1835724207e-07
+60.503239,0.12179044,-5.2280706270e-07
+60.624732,0.12307507,-5.2046306571e-07
+60.746224,0.12435970,-5.0040149719e-07
+60.867717,0.12564432,-4.8396093695e-07
+60.989209,0.12692896,-5.4296776702e-07
+61.110702,0.12821359,-5.0344243478e-07
+61.232194,0.12949821,-5.3688408749e-07
+61.353686,0.13078284,-5.2405272997e-07
+61.475179,0.13206747,-5.1408713407e-07
+61.596671,0.13335210,-5.5023272454e-07
+61.718164,0.13463673,-4.7250077746e-07
+61.839656,0.13592135,-4.9729843862e-07
+61.961149,0.13720599,-4.9373300411e-07
+62.082641,0.13849061,-4.8311944264e-07
+62.204134,0.13977524,-4.7257501331e-07
+62.325626,0.14105988,-4.6683555098e-07
+62.447119,0.14234450,-4.7739101259e-07
+62.568611,0.14362913,-4.6992876299e-07
+62.690104,0.14491375,-4.8235507114e-07
+62.811596,0.14619839,-4.8972916567e-07
+62.933088,0.14748302,-4.9699814429e-07
+63.054581,0.14876764,-4.6122976474e-07
+63.176073,0.15005227,-4.5765716441e-07
+63.297566,0.15133690,-4.4867431713e-07
+63.419058,0.15262153,-4.5161895433e-07
+63.540551,0.15390616,-4.1886078698e-07
+63.662043,0.15519079,-4.4618076583e-07
+63.783536,0.15647542,-4.5639541271e-07
+63.905028,0.15776005,-4.4432543664e-07
+64.026521,0.15904468,-4.3950881873e-07
+64.148013,0.16032930,-4.0322411337e-07
+64.269505,0.16161393,-3.7745867964e-07
+64.390998,0.16289856,-4.0517530476e-07
+64.512490,0.16418319,-3.8878900371e-07
+64.633983,0.16546782,-3.7754013286e-07
+64.755475,0.16675245,-3.8368028835e-07
+64.876968,0.16803708,-3.7698823571e-07
+64.998460,0.16932170,-3.6911395136e-07
+65.119953,0.17060634,-3.7725172143e-07
+65.241445,0.17189097,-3.5243127399e-07
+65.362938,0.17317559,-3.2334213624e-07
+65.484430,0.17446022,-3.0652534458e-07
+65.605922,0.17574485,-3.1402056211e-07
+65.727415,0.17702948,-3.1863421714e-07
+65.848903,0.17831411,-2.8628416654e-07
+65.970396,0.17959874,-3.2725879911e-07
+66.091888,0.18088336,-2.8365410376e-07
+66.213381,0.18216799,-2.4684314870e-07
+66.334873,0.18345263,-2.2618777069e-07
+66.456366,0.18473725,-2.3826594364e-07
+66.577858,0.18602188,-2.4491443427e-07
+66.699351,0.18730651,-2.0628528083e-07
+66.820843,0.18859114,-2.1637343033e-07
+66.942336,0.18987577,-2.0517533886e-07
+67.063828,0.19116040,-1.4370592776e-07
+67.185320,0.19244503,-1.3525288731e-07
+67.306813,0.19372965,-1.3076762422e-07
+67.428305,0.19501428,-1.0617724348e-07
+67.549798,0.19629891,-1.1648745612e-07
+67.671290,0.19758354,-8.4875556038e-08
+67.792783,0.19886817,-3.9769485707e-08
+67.914275,0.20015280,-5.3932580902e-08
+68.035768,0.20143743,-1.0192292347e-08
+68.157260,0.20272206,-2.2072264592e-08
+68.278753,0.20400669,4.1441918900e-08
+68.400245,0.20529131,6.3149312996e-08
+68.521737,0.20657594,8.7969779767e-08
+68.643230,0.20786057,1.3199809633e-07
+68.764722,0.20914520,1.3174640329e-07
+68.886215,0.21042983,1.7655883603e-07
+69.007707,0.21171446,1.8211402333e-07
+69.129200,0.21299909,2.2540762407e-07
+69.250692,0.21428372,2.5874573323e-07
+69.372185,0.21556834,2.6007184845e-07
+69.493677,0.21685297,2.8653303707e-07
+69.615170,0.21813760,3.1975012633e-07
+69.736662,0.21942223,3.8916752922e-07
+69.858155,0.22070686,3.8712400699e-07
+69.979647,0.22199149,4.2223893062e-07
+70.101139,0.22327612,4.5954131155e-07
+70.222632,0.22456075,4.4979156669e-07
+70.344124,0.22584538,5.1492017373e-07
+70.465617,0.22713000,5.2643647408e-07
+70.587109,0.22841463,5.8343898773e-07
+70.708602,0.22969926,6.0199243433e-07
+70.830094,0.23098389,6.4859981519e-07
+70.951587,0.23226852,6.4927984652e-07
+71.073079,0.23355315,6.9218017769e-07
+71.194572,0.23483778,7.2979728769e-07
+71.316064,0.23612241,7.9104722618e-07
+71.437556,0.23740704,8.1039901748e-07
+71.559049,0.23869166,8.4448296496e-07
+71.680541,0.23997629,8.8919341362e-07
+71.802034,0.24126092,9.1099854515e-07
+71.923526,0.24254555,9.7444339029e-07
+72.045019,0.24383018,9.7851264908e-07
+72.166511,0.24511481,1.0280654920e-06
+72.288004,0.24639944,1.0576279606e-06
+72.409496,0.24768407,1.0834407970e-06
+72.530989,0.24896870,1.0732040856e-06
+72.652481,0.25025332,1.1618660245e-06
+72.773973,0.25153795,1.1732805083e-06
+72.895466,0.25282258,1.1864440712e-06
+73.016958,0.25410721,1.2450449240e-06
+73.138451,0.25539184,1.2336107471e-06
+73.259943,0.25667647,1.2797539992e-06
+73.381436,0.25796110,1.2801071350e-06
+73.502928,0.25924573,1.3350086710e-06
+73.624421,0.26053035,1.3268586056e-06
+73.745913,0.26181498,1.4033765903e-06
+73.867406,0.26309961,1.3806996000e-06
+73.988898,0.26438424,1.3973736938e-06
+74.110390,0.26566887,1.4374464124e-06
+74.231883,0.26695350,1.4024459614e-06
+74.353375,0.26823813,1.4658041981e-06
+74.474868,0.26952276,1.4431839157e-06
+74.596360,0.27080739,1.4638577753e-06
+74.717853,0.27209201,1.4530101647e-06
+74.839345,0.27337664,1.4749865542e-06
+74.960838,0.27466127,1.5020740821e-06
+75.082330,0.27594590,1.5283992490e-06
+75.203823,0.27723053,1.5072721382e-06
+75.325315,0.27851516,1.5036979913e-06
+75.446807,0.27979979,1.5264577752e-06
+75.568300,0.28108442,1.5371413453e-06
+75.689792,0.28236904,1.5076608454e-06
+75.811285,0.28365368,1.5025289829e-06
+75.932777,0.28493830,1.5462844182e-06
+76.054270,0.28622293,1.5458497261e-06
+76.175762,0.28750756,1.4954491510e-06
+76.297255,0.28879219,1.4852504855e-06
+76.418747,0.29007682,1.5088348029e-06
+76.540240,0.29136145,1.5222328274e-06
+76.661732,0.29264608,1.5135056814e-06
+76.783225,0.29393071,1.5012275872e-06
+76.904717,0.29521533,1.4813360909e-06
+77.026209,0.29649996,1.4695699147e-06
+77.147702,0.29778459,1.4714250893e-06
+77.269194,0.29906922,1.4253578258e-06
+77.390687,0.30035385,1.4588123151e-06
+77.512179,0.30163848,1.4368711876e-06
+77.633672,0.30292311,1.4021561323e-06
+77.755164,0.30420773,1.3945072620e-06
+77.876657,0.30549237,1.4003838545e-06
+77.998149,0.30677699,1.3781722817e-06
+78.119642,0.30806162,1.3863411122e-06
+78.241134,0.30934625,1.3731279556e-06
+78.362626,0.31063088,1.3537593066e-06
+78.484119,0.31191551,1.3478917874e-06
+78.605611,0.31320014,1.2921048858e-06
+78.727104,0.31448477,1.3152813185e-06
+78.848596,0.31576939,1.3228728622e-06
+78.970089,0.31705402,1.2689723760e-06
+79.091581,0.31833866,1.2609902693e-06
+79.213074,0.31962328,1.2569793681e-06
+79.334566,0.32090791,1.2532723184e-06
+79.456059,0.32219254,1.2423042807e-06
+79.577551,0.32347717,1.2069750269e-06
+79.699043,0.32476180,1.2225088787e-06
+79.820536,0.32604643,1.1938216713e-06
+79.942028,0.32733105,1.1788438667e-06
+80.063521,0.32861568,1.1763841855e-06
+80.185013,0.32990031,1.1267209168e-06
+80.306506,0.33118494,1.1541616835e-06
+80.427998,0.33246957,1.1280098367e-06
+80.549491,0.33375420,1.1153654092e-06
+80.670983,0.33503883,1.1492022132e-06
+80.792476,0.33632345,1.0880649688e-06
+80.913968,0.33760809,1.1120103612e-06
+81.035460,0.33889272,1.0647887302e-06
+81.156953,0.34017734,1.0766842004e-06
+81.278445,0.34146197,1.0861829869e-06
+81.399938,0.34274660,1.0370719504e-06
+81.521430,0.34403123,1.0140975011e-06
diff --git a/demo_data/ec_BV_244mVs.csv b/demo_data/ec_BV_244mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..c63058e21c264aca4dc32a81dfab57febe564147
--- /dev/null
+++ b/demo_data/ec_BV_244mVs.csv
@@ -0,0 +1,673 @@
+Time (s),E (V),I (A)
+0.000000,0.34475868,-9.8550140761e-06
+0.005272,0.34347405,-6.1060581547e-06
+0.010544,0.34218941,-5.9150335537e-06
+0.015815,0.34090479,-4.9742517232e-06
+0.021087,0.33962016,-4.2691642771e-06
+0.026359,0.33833553,-5.1955059398e-06
+0.031631,0.33705090,-5.1614744825e-06
+0.036903,0.33576627,-4.7618282132e-06
+0.042174,0.33448164,-4.7404604870e-06
+0.047446,0.33319702,-4.3790132972e-06
+0.052718,0.33191239,-5.0805300513e-06
+0.057990,0.33062776,-5.4734467491e-06
+0.063262,0.32934313,-4.2006870751e-06
+0.068533,0.32805850,-4.7525649054e-06
+0.073805,0.32677387,-5.2599011488e-06
+0.079077,0.32548924,-5.6914292337e-06
+0.084349,0.32420462,-5.0141465598e-06
+0.089621,0.32291998,-5.4930835756e-06
+0.094892,0.32163535,-5.8246397072e-06
+0.100164,0.32035073,-6.6715817308e-06
+0.105436,0.31906610,-7.5037608681e-06
+0.110708,0.31778147,-7.5226601937e-06
+0.115980,0.31649684,-7.7887599070e-06
+0.121251,0.31521221,-7.0304328185e-06
+0.126523,0.31392758,-7.7210172361e-06
+0.131795,0.31264296,-7.4997392611e-06
+0.137067,0.31135833,-7.3168821108e-06
+0.142339,0.31007369,-9.1359180735e-06
+0.147610,0.30878907,-9.0007891078e-06
+0.152882,0.30750444,-9.5946921128e-06
+0.158154,0.30621981,-9.3824314469e-06
+0.163426,0.30493518,-1.0208290845e-05
+0.168698,0.30365055,-1.0170336774e-05
+0.173969,0.30236592,-1.1270792985e-05
+0.179241,0.30108129,-1.1949151222e-05
+0.184513,0.29979667,-1.1671435128e-05
+0.189785,0.29851204,-1.1864752416e-05
+0.195057,0.29722741,-1.2747514213e-05
+0.200328,0.29594278,-1.2570120014e-05
+0.205600,0.29465815,-1.3136799833e-05
+0.210872,0.29337352,-1.4424839633e-05
+0.216144,0.29208889,-1.4247475132e-05
+0.221416,0.29080426,-1.5791200045e-05
+0.226688,0.28951963,-1.6556624961e-05
+0.231959,0.28823501,-1.6637930223e-05
+0.237231,0.28695038,-1.6847818017e-05
+0.242503,0.28566575,-1.7330343544e-05
+0.247775,0.28438112,-1.8043090110e-05
+0.253047,0.28309649,-1.8793452189e-05
+0.258318,0.28181186,-1.8887410788e-05
+0.263590,0.28052723,-1.9814971059e-05
+0.268862,0.27924260,-1.9672054283e-05
+0.274134,0.27795798,-2.0261247181e-05
+0.279406,0.27667334,-2.3061926977e-05
+0.284677,0.27538872,-2.2231057522e-05
+0.289949,0.27410409,-2.2666769068e-05
+0.295221,0.27281946,-2.3107026392e-05
+0.300493,0.27153483,-2.4863046618e-05
+0.305765,0.27025020,-2.4081658026e-05
+0.311036,0.26896557,-2.5708155284e-05
+0.316308,0.26768094,-2.5831320897e-05
+0.321580,0.26639631,-2.6603544679e-05
+0.326852,0.26511169,-2.7346838630e-05
+0.332124,0.26382706,-2.8227101833e-05
+0.337395,0.26254243,-2.9432574205e-05
+0.342667,0.26125780,-2.9539560336e-05
+0.347939,0.25997317,-3.0178350910e-05
+0.353211,0.25868854,-3.1855000206e-05
+0.358483,0.25740391,-3.1020369002e-05
+0.363754,0.25611928,-3.2357001695e-05
+0.369026,0.25483466,-3.3337679847e-05
+0.374298,0.25355003,-3.3706454033e-05
+0.379570,0.25226540,-3.4307153925e-05
+0.384842,0.25098077,-3.4719021920e-05
+0.390113,0.24969614,-3.5271413031e-05
+0.395385,0.24841151,-3.5784745305e-05
+0.400657,0.24712688,-3.6979714478e-05
+0.405929,0.24584225,-3.7591576866e-05
+0.411201,0.24455762,-3.8106037665e-05
+0.416472,0.24327300,-3.7900812460e-05
+0.421744,0.24198837,-3.9012908315e-05
+0.427016,0.24070374,-3.9593591741e-05
+0.432288,0.23941911,-3.9643270591e-05
+0.437560,0.23813448,-3.9550929544e-05
+0.442831,0.23684985,-4.0784359633e-05
+0.448103,0.23556522,-4.0869478122e-05
+0.453375,0.23428059,-4.0727802722e-05
+0.458647,0.23299596,-4.1982860891e-05
+0.463919,0.23171134,-4.2723212757e-05
+0.469190,0.23042671,-4.2279971773e-05
+0.474462,0.22914208,-4.2368796574e-05
+0.479734,0.22785745,-4.3117432208e-05
+0.485006,0.22657282,-4.3403740930e-05
+0.490278,0.22528819,-4.3544204650e-05
+0.495549,0.22400356,-4.3917524613e-05
+0.500821,0.22271894,-4.4208307837e-05
+0.506093,0.22143430,-4.3907098628e-05
+0.511365,0.22014968,-4.4267125758e-05
+0.516637,0.21886505,-4.3699743085e-05
+0.521908,0.21758042,-4.4347599475e-05
+0.527180,0.21629579,-4.4212311130e-05
+0.532452,0.21501116,-4.5076095891e-05
+0.537724,0.21372653,-4.3569855821e-05
+0.542996,0.21244190,-4.4601228494e-05
+0.548267,0.21115727,-4.3903526946e-05
+0.553539,0.20987265,-4.4847805224e-05
+0.558811,0.20858802,-4.4260786220e-05
+0.564083,0.20730339,-4.4026460914e-05
+0.569355,0.20601876,-4.3456108440e-05
+0.574626,0.20473413,-4.3882140411e-05
+0.579898,0.20344950,-4.3224776695e-05
+0.585170,0.20216487,-4.2936104011e-05
+0.590442,0.20088024,-4.2994727904e-05
+0.595714,0.19959561,-4.3286413948e-05
+0.600986,0.19831099,-4.3259127406e-05
+0.606257,0.19702636,-4.3259262037e-05
+0.611529,0.19574173,-4.3044248365e-05
+0.616801,0.19445710,-4.2550710812e-05
+0.622073,0.19317247,-4.2186914014e-05
+0.627345,0.19188784,-4.2456512649e-05
+0.632616,0.19060321,-4.1488305686e-05
+0.637888,0.18931859,-4.1091092674e-05
+0.643160,0.18803395,-4.0938836860e-05
+0.648432,0.18674933,-4.1094161470e-05
+0.653704,0.18546470,-4.1175692437e-05
+0.658975,0.18418007,-4.0926074630e-05
+0.664247,0.18289544,-4.0164973747e-05
+0.669519,0.18161081,-3.8881896485e-05
+0.674791,0.18032618,-3.9375457796e-05
+0.680063,0.17904155,-4.0490194795e-05
+0.685334,0.17775693,-3.9427413494e-05
+0.690606,0.17647230,-3.9289349374e-05
+0.695878,0.17518766,-3.9096252841e-05
+0.701150,0.17390304,-3.8198659853e-05
+0.706422,0.17261841,-3.7652639957e-05
+0.711693,0.17133378,-3.8476387826e-05
+0.716965,0.17004915,-3.7654144657e-05
+0.722237,0.16876452,-3.7190317004e-05
+0.727509,0.16747989,-3.7774085065e-05
+0.732781,0.16619526,-3.6562853256e-05
+0.738052,0.16491064,-3.6295578986e-05
+0.743324,0.16362601,-3.5799293376e-05
+0.748596,0.16234138,-3.6223519707e-05
+0.753868,0.16105675,-3.6166024339e-05
+0.759140,0.15977212,-3.5955952417e-05
+0.764411,0.15848749,-3.5509773308e-05
+0.769683,0.15720287,-3.5126775749e-05
+0.774955,0.15591823,-3.5206564433e-05
+0.780227,0.15463360,-3.3637804088e-05
+0.785499,0.15334898,-3.3936736448e-05
+0.790770,0.15206435,-3.3402128512e-05
+0.796042,0.15077972,-3.4516041886e-05
+0.801314,0.14949509,-3.3060304290e-05
+0.806586,0.14821046,-3.3346411065e-05
+0.811858,0.14692583,-3.2704042869e-05
+0.817129,0.14564120,-3.3342546362e-05
+0.822401,0.14435657,-3.3339156828e-05
+0.827673,0.14307195,-3.2366815901e-05
+0.832945,0.14178732,-3.2989110214e-05
+0.838217,0.14050268,-3.0869356545e-05
+0.843488,0.13921806,-3.2055244063e-05
+0.848760,0.13793343,-3.1463047704e-05
+0.854032,0.13664881,-3.0960028563e-05
+0.859304,0.13536417,-3.0791126018e-05
+0.864576,0.13407954,-3.0510956867e-05
+0.869847,0.13279492,-3.0340943616e-05
+0.875119,0.13151028,-3.0357186453e-05
+0.880391,0.13022566,-2.9619206469e-05
+0.885663,0.12894103,-2.9708575734e-05
+0.890935,0.12765639,-2.9731488747e-05
+0.896206,0.12637177,-2.8867001133e-05
+0.901478,0.12508714,-2.9470811398e-05
+0.906750,0.12380252,-2.9293029144e-05
+0.912022,0.12251788,-2.9037776633e-05
+0.917294,0.12123325,-2.8678038564e-05
+0.922565,0.11994863,-2.8678777055e-05
+0.927837,0.11866399,-2.8851067154e-05
+0.933109,0.11737937,-2.8039594467e-05
+0.938381,0.11609474,-2.7060393297e-05
+0.943653,0.11481010,-2.8483546224e-05
+0.948924,0.11352548,-2.7089782459e-05
+0.954196,0.11224085,-2.8540063538e-05
+0.959468,0.11095623,-2.7295508570e-05
+0.964740,0.10967159,-2.7697235681e-05
+0.970012,0.10838696,-2.7055136747e-05
+0.975283,0.10710234,-2.6970950777e-05
+0.980555,0.10581771,-2.6688726523e-05
+0.985827,0.10453308,-2.7108989159e-05
+0.991099,0.10324845,-2.6753105893e-05
+0.996371,0.10196382,-2.6042794565e-05
+1.001643,0.10067919,-2.6360729699e-05
+1.006914,0.09939456,-2.6219634401e-05
+1.012186,0.09810994,-2.5447026524e-05
+1.017458,0.09682531,-2.5995701423e-05
+1.022730,0.09554067,-2.5361983271e-05
+1.028002,0.09425605,-2.4919953966e-05
+1.033273,0.09297142,-2.6711914738e-05
+1.038545,0.09168680,-2.5756517521e-05
+1.043817,0.09040216,-2.5486946604e-05
+1.049089,0.08911753,-2.3845877518e-05
+1.054361,0.08783291,-2.4497982704e-05
+1.059632,0.08654827,-2.5184450481e-05
+1.064904,0.08526365,-2.4914705336e-05
+1.070176,0.08397902,-2.3516176028e-05
+1.075448,0.08269438,-2.4104125569e-05
+1.080720,0.08140976,-2.4581392566e-05
+1.085991,0.08012513,-2.4144398066e-05
+1.091263,0.07884051,-2.4004201628e-05
+1.096535,0.07755587,-2.4250716981e-05
+1.101807,0.07627124,-2.3315449083e-05
+1.107079,0.07498662,-2.3519874421e-05
+1.112350,0.07370198,-2.3914363134e-05
+1.117622,0.07241736,-2.3051540589e-05
+1.122894,0.07113273,-2.4149145789e-05
+1.128166,0.06984810,-2.3715701192e-05
+1.133438,0.06856347,-2.3324176342e-05
+1.138709,0.06727884,-2.2974949393e-05
+1.143981,0.06599422,-2.3436646707e-05
+1.149253,0.06470958,-2.2995494484e-05
+1.154525,0.06342495,-2.3435539961e-05
+1.159797,0.06214033,-2.3074946589e-05
+1.165068,0.06085570,-2.1747801424e-05
+1.170340,0.05957107,-2.3186817055e-05
+1.175612,0.05828644,-2.2319561585e-05
+1.180884,0.05700181,-2.2981530474e-05
+1.186156,0.05571719,-2.2430362921e-05
+1.191427,0.05443255,-2.1954667940e-05
+1.196699,0.05314793,-2.1356498319e-05
+1.201971,0.05186330,-2.2631519497e-05
+1.207243,0.05057866,-2.1383046370e-05
+1.212515,0.04929404,-2.1410128985e-05
+1.217786,0.04800941,-2.2200541816e-05
+1.223058,0.04672479,-2.1257554412e-05
+1.228330,0.04544015,-2.2362623715e-05
+1.233602,0.04415553,-2.1689597263e-05
+1.238874,0.04287090,-2.1211332412e-05
+1.244145,0.04158626,-2.1763959128e-05
+1.249417,0.04030163,-2.2234761855e-05
+1.254689,0.03901702,-2.1424809707e-05
+1.259961,0.03773239,-2.1725638781e-05
+1.265233,0.03644775,-2.1718875552e-05
+1.270504,0.03516312,-2.1240105835e-05
+1.275776,0.03387848,-2.1570173601e-05
+1.281048,0.03259388,-2.1632911660e-05
+1.286320,0.03130924,-2.0314794693e-05
+1.291592,0.03002461,-2.1336909504e-05
+1.296863,0.02873997,-2.0574790968e-05
+1.302135,0.02745534,-2.1493073578e-05
+1.307407,0.02617073,-2.1853847118e-05
+1.312679,0.02488610,-2.0733317025e-05
+1.317951,0.02360146,-2.0167391536e-05
+1.323223,0.02231683,-1.9443864588e-05
+1.328494,0.02103220,-2.0312337677e-05
+1.333766,0.01974759,-2.0092273361e-05
+1.339038,0.01846295,-2.0026626876e-05
+1.344310,0.01717832,-1.9459840144e-05
+1.349582,0.01589369,-2.1165037157e-05
+1.354853,0.01460905,-2.0334872535e-05
+1.360125,0.01332444,-1.9712863323e-05
+1.365397,0.01203981,-1.9815962973e-05
+1.370669,0.01075518,-2.0465720036e-05
+1.375940,0.00947054,-2.0363980556e-05
+1.381212,0.00818591,-1.9748263364e-05
+1.386484,0.00690130,-1.9670016998e-05
+1.391756,0.00561666,-1.9857853022e-05
+1.397028,0.00433203,-1.9603919103e-05
+1.402299,0.00304740,-1.9312159804e-05
+1.407571,0.00176276,-1.9174064007e-05
+1.412843,0.00047815,-1.9714173996e-05
+1.418115,-0.00080648,-1.9587658446e-05
+1.423387,-0.00209111,-1.9371819169e-05
+1.428658,-0.00337575,-1.9146078571e-05
+1.433930,-0.00466038,-1.9113600815e-05
+1.439202,-0.00594499,-1.8719500157e-05
+1.444474,-0.00722962,-1.9448942950e-05
+1.449746,-0.00851426,-1.9594330602e-05
+1.455017,-0.00979889,-1.9350242567e-05
+1.460289,-0.01108352,-1.9286827392e-05
+1.465561,-0.01236813,-1.9450016038e-05
+1.470833,-0.01365277,-1.8892491129e-05
+1.476105,-0.01493740,-1.8684707935e-05
+1.481376,-0.01622204,-1.9255792960e-05
+1.486648,-0.01750667,-1.9208396899e-05
+1.491920,-0.01879128,-1.8628105487e-05
+1.497192,-0.02007591,-1.8244042759e-05
+1.502464,-0.02136055,-1.8429839518e-05
+1.507735,-0.02264518,-1.8794269874e-05
+1.513007,-0.02392981,-1.8634738045e-05
+1.518279,-0.02521442,-1.8753421236e-05
+1.523551,-0.02649906,-1.8659658644e-05
+1.528823,-0.02778369,-1.8237218154e-05
+1.534095,-0.02906832,-1.8034891476e-05
+1.539366,-0.03035296,-1.7813245245e-05
+1.544638,-0.03163757,-1.8009363057e-05
+1.549910,-0.03292220,-1.8864618547e-05
+1.555182,-0.03420683,-1.7596697175e-05
+1.560454,-0.03549147,-1.7872795717e-05
+1.565725,-0.03677610,-1.8124031076e-05
+1.570997,-0.03806071,-1.7757373368e-05
+1.576269,-0.03934534,-1.8285530894e-05
+1.581541,-0.04062998,-1.8184717992e-05
+1.586813,-0.04191461,-1.7053815370e-05
+1.592084,-0.04319925,-1.7331388914e-05
+1.597356,-0.04448386,-1.8884446925e-05
+1.602628,-0.04576849,-1.9085421353e-05
+1.607900,-0.04705312,-1.7550449437e-05
+1.613172,-0.04833776,-1.8063259026e-05
+1.618443,-0.04962239,-1.8218021353e-05
+1.623715,-0.05090700,-1.7449440528e-05
+1.628987,-0.05219163,-1.8001839558e-05
+1.634259,-0.05347627,-1.7864783191e-05
+1.639531,-0.05476090,-1.7190782643e-05
+1.644802,-0.05604553,-1.7232779605e-05
+1.650074,-0.05733014,-1.7805446545e-05
+1.655346,-0.05861478,-1.7317997086e-05
+1.660618,-0.05989941,-1.6767227487e-05
+1.665890,-0.06118405,-1.8126230709e-05
+1.671161,-0.06246868,-1.7144521046e-05
+1.676433,-0.06375329,-1.7127519919e-05
+1.681705,-0.06503792,-1.7694657088e-05
+1.686977,-0.06632256,-1.7765286901e-05
+1.692249,-0.06760719,-1.7032349641e-05
+1.697520,-0.06889182,-1.7349082995e-05
+1.702792,-0.07017643,-1.6940553058e-05
+1.708064,-0.07146107,-1.7194706742e-05
+1.713336,-0.07274570,-1.7242360187e-05
+1.718608,-0.07403033,-1.7014986198e-05
+1.723879,-0.07531497,-1.6354766522e-05
+1.729151,-0.07659958,-1.7035945081e-05
+1.734423,-0.07788421,-1.6453805462e-05
+1.739695,-0.07916884,-1.7254819496e-05
+1.744967,-0.08045348,-1.6504998911e-05
+1.750238,-0.08173811,-1.6689763169e-05
+1.755510,-0.08302272,-1.6903307779e-05
+1.760782,-0.08430735,-1.7209737900e-05
+1.766054,-0.08559199,-1.6321592842e-05
+1.771326,-0.08631944,-1.6772547393e-05
+1.776597,-0.08503480,-1.5617376538e-05
+1.781869,-0.08375017,-1.6957815527e-05
+1.787141,-0.08246554,-1.6986038547e-05
+1.792413,-0.08118093,-1.6678776881e-05
+1.797685,-0.07989629,-1.6086707234e-05
+1.802956,-0.07861166,-1.5847831202e-05
+1.808228,-0.07732703,-1.6128149833e-05
+1.813500,-0.07604239,-1.6434147352e-05
+1.818772,-0.07475778,-1.6314404931e-05
+1.824044,-0.07347315,-1.7124882735e-05
+1.829315,-0.07218852,-1.6955469384e-05
+1.834587,-0.07090388,-1.6035465279e-05
+1.839859,-0.06961925,-1.5638134465e-05
+1.845131,-0.06833464,-1.6457869142e-05
+1.850403,-0.06705001,-1.6198836072e-05
+1.855675,-0.06576537,-1.6381246267e-05
+1.860946,-0.06448074,-1.5863986925e-05
+1.866218,-0.06319610,-1.6556672478e-05
+1.871490,-0.06191150,-1.5592010468e-05
+1.876762,-0.06062686,-1.6030621531e-05
+1.882034,-0.05934223,-1.6649819331e-05
+1.887305,-0.05805759,-1.5898350505e-05
+1.892577,-0.05677296,-1.5154457645e-05
+1.897849,-0.05548835,-1.5777361757e-05
+1.903121,-0.05420372,-1.4488294405e-05
+1.908393,-0.05291908,-1.5690062445e-05
+1.913664,-0.05163445,-1.5591351172e-05
+1.918936,-0.05034982,-1.5402274762e-05
+1.924208,-0.04906521,-1.5839448440e-05
+1.929480,-0.04778057,-1.4943956092e-05
+1.934752,-0.04649594,-1.5180855226e-05
+1.940023,-0.04521131,-1.5773706921e-05
+1.945295,-0.04392667,-1.4549041707e-05
+1.950567,-0.04264206,-1.5879956541e-05
+1.955839,-0.04135743,-1.4656930658e-05
+1.961111,-0.04007280,-1.5981230753e-05
+1.966382,-0.03878816,-1.5392144767e-05
+1.971654,-0.03750353,-1.5456136083e-05
+1.976926,-0.03621892,-1.4827877417e-05
+1.982198,-0.03493428,-1.4375147915e-05
+1.987470,-0.03364965,-1.5307763779e-05
+1.992741,-0.03236502,-1.5164354016e-05
+1.998013,-0.03108038,-1.5602201839e-05
+2.003285,-0.02979577,-1.4955308655e-05
+2.008557,-0.02851114,-1.5334357367e-05
+2.013829,-0.02722651,-1.5027795585e-05
+2.019100,-0.02594187,-1.4948980997e-05
+2.024372,-0.02465724,-1.4600220307e-05
+2.029644,-0.02337263,-1.5132530606e-05
+2.034916,-0.02208800,-1.4741670991e-05
+2.040188,-0.02080336,-1.5126883032e-05
+2.045459,-0.01951873,-1.5056024544e-05
+2.050731,-0.01823409,-1.4983149560e-05
+2.056003,-0.01694949,-1.5230118303e-05
+2.061275,-0.01566485,-1.3857647029e-05
+2.066547,-0.01438022,-1.5823611476e-05
+2.071818,-0.01309558,-1.4837058065e-05
+2.077090,-0.01181095,-1.4414513632e-05
+2.082362,-0.01052634,-1.4837296639e-05
+2.087634,-0.00924171,-1.4974831145e-05
+2.092906,-0.00795707,-1.5351860391e-05
+2.098177,-0.00667244,-1.4256797341e-05
+2.103449,-0.00538781,-1.4987997267e-05
+2.108721,-0.00410320,-1.4631625964e-05
+2.113993,-0.00281856,-1.4855584681e-05
+2.119265,-0.00153393,-1.4272579859e-05
+2.124536,-0.00024930,-1.4492940166e-05
+2.129808,0.00103534,-1.4925287916e-05
+2.135080,0.00231995,-1.4664867949e-05
+2.140352,0.00360458,-1.4358628885e-05
+2.145624,0.00488921,-1.4072148905e-05
+2.150895,0.00617385,-1.4373870900e-05
+2.156167,0.00745848,-1.4188550299e-05
+2.161439,0.00874309,-1.4934415108e-05
+2.166711,0.01002773,-1.4569316546e-05
+2.171983,0.01131236,-1.3704071632e-05
+2.177254,0.01259699,-1.3819636531e-05
+2.182526,0.01388163,-1.4739750519e-05
+2.187798,0.01516624,-1.4902054164e-05
+2.193070,0.01645087,-1.4741165135e-05
+2.198342,0.01773550,-1.4154197608e-05
+2.203614,0.01902014,-1.3591155796e-05
+2.208885,0.02030477,-1.4688385812e-05
+2.214157,0.02158938,-1.4456768966e-05
+2.219429,0.02287401,-1.4565776542e-05
+2.224701,0.02415865,-1.4919009754e-05
+2.229972,0.02544328,-1.3868785766e-05
+2.235244,0.02672791,-1.4455117756e-05
+2.240516,0.02801252,-1.4393199362e-05
+2.245788,0.02929716,-1.4654816159e-05
+2.251060,0.03058179,-1.3846190522e-05
+2.256332,0.03186643,-1.4395180220e-05
+2.261603,0.03315106,-1.4554377452e-05
+2.266875,0.03443567,-1.4774743697e-05
+2.272147,0.03572030,-1.4049984282e-05
+2.277419,0.03700494,-1.3925007090e-05
+2.282690,0.03828957,-1.4498305608e-05
+2.287962,0.03957420,-1.2525881841e-05
+2.293234,0.04085881,-1.3814407700e-05
+2.298506,0.04214345,-1.3918586378e-05
+2.303778,0.04342808,-1.3207473203e-05
+2.309050,0.04471271,-1.3913982195e-05
+2.314321,0.04599734,-1.3897492864e-05
+2.319593,0.04728197,-1.3394276726e-05
+2.324865,0.04856659,-1.3286466970e-05
+2.330137,0.04985122,-1.4028943234e-05
+2.335408,0.05113586,-1.3479360566e-05
+2.340680,0.05242048,-1.3774470791e-05
+2.345952,0.05370511,-1.4108650743e-05
+2.351224,0.05498973,-1.3306618067e-05
+2.356496,0.05627437,-1.4182736416e-05
+2.361768,0.05755900,-1.3857114444e-05
+2.367039,0.05884362,-1.4050540625e-05
+2.372311,0.06012826,-1.3061036221e-05
+2.377583,0.06141288,-1.5164939067e-05
+2.382855,0.06269751,-1.3867555278e-05
+2.388127,0.06398215,-1.2751882792e-05
+2.393398,0.06526677,-1.3393772849e-05
+2.398670,0.06655140,-1.4284425410e-05
+2.403942,0.06783602,-1.3547171047e-05
+2.409214,0.06912066,-1.3301090275e-05
+2.414486,0.07040529,-1.3931771309e-05
+2.419757,0.07168991,-1.3257463882e-05
+2.425029,0.07297455,-1.2636706937e-05
+2.430301,0.07425917,-1.3721689488e-05
+2.435573,0.07554380,-1.3097743965e-05
+2.440845,0.07682844,-1.2891703055e-05
+2.446116,0.07811306,-1.2748300221e-05
+2.451388,0.07939769,-1.4031402230e-05
+2.456660,0.08068231,-1.2728457983e-05
+2.461932,0.08196695,-1.2981445525e-05
+2.467204,0.08325158,-1.4088518454e-05
+2.472475,0.08453620,-1.3599203960e-05
+2.477747,0.08582083,-1.3036533374e-05
+2.483019,0.08710546,-1.3432484220e-05
+2.488291,0.08839009,-1.2292717729e-05
+2.493563,0.08967472,-1.2458904885e-05
+2.498835,0.09095935,-1.2467018384e-05
+2.504106,0.09224398,-1.3067092638e-05
+2.509378,0.09352860,-1.2676151848e-05
+2.514650,0.09481323,-1.2771856691e-05
+2.519922,0.09609787,-1.3122698222e-05
+2.525193,0.09738249,-1.2975524729e-05
+2.530465,0.09866712,-1.2452007024e-05
+2.535737,0.09995174,-1.2775422433e-05
+2.541009,0.10123638,-1.2982095911e-05
+2.546281,0.10252101,-1.2962680335e-05
+2.551553,0.10380563,-1.2241335202e-05
+2.556824,0.10509027,-1.2860763656e-05
+2.562096,0.10637489,-1.1619727904e-05
+2.567368,0.10765952,-1.2398399126e-05
+2.572640,0.10894416,-1.2511039761e-05
+2.577911,0.11022878,-1.2427544764e-05
+2.583183,0.11151341,-1.2182698440e-05
+2.588455,0.11279803,-1.2346483026e-05
+2.593727,0.11408267,-1.1784411350e-05
+2.598999,0.11536730,-1.2304072272e-05
+2.604271,0.11665192,-1.2372620254e-05
+2.609542,0.11793656,-1.1419892890e-05
+2.614814,0.11922118,-1.2355176627e-05
+2.620086,0.12050581,-1.2019196975e-05
+2.625358,0.12179044,-1.2414818172e-05
+2.630629,0.12307507,-1.2352899778e-05
+2.635901,0.12435970,-1.1574573052e-05
+2.641173,0.12564432,-1.2231482389e-05
+2.646445,0.12692896,-1.1896318443e-05
+2.651717,0.12821359,-1.1822362451e-05
+2.656989,0.12949821,-1.1978384964e-05
+2.662260,0.13078284,-1.1658255146e-05
+2.667532,0.13206747,-1.1115138727e-05
+2.672804,0.13335210,-1.1094072931e-05
+2.678076,0.13463673,-1.0488597597e-05
+2.683348,0.13592135,-1.1768828798e-05
+2.688619,0.13720599,-1.1265676016e-05
+2.693891,0.13849061,-1.0335400355e-05
+2.699163,0.13977524,-1.0666100689e-05
+2.704435,0.14105988,-1.0540095945e-05
+2.709707,0.14234450,-1.0687264489e-05
+2.714978,0.14362913,-1.0699285258e-05
+2.720250,0.14491375,-1.0781231007e-05
+2.725522,0.14619839,-1.0613031315e-05
+2.730794,0.14748302,-1.1486909444e-05
+2.736066,0.14876764,-1.0348503122e-05
+2.741337,0.15005227,-1.0489254913e-05
+2.746609,0.15133690,-1.0385031688e-05
+2.751881,0.15262153,-9.4924299471e-06
+2.757153,0.15390616,-1.0488213503e-05
+2.762424,0.15519079,-1.0265411029e-05
+2.767696,0.15647542,-9.7548594800e-06
+2.772968,0.15776005,-9.9303589455e-06
+2.778240,0.15904468,-9.7146176715e-06
+2.783512,0.16032930,-9.6732899054e-06
+2.788784,0.16161393,-9.2722933660e-06
+2.794055,0.16289856,-9.0356456752e-06
+2.799327,0.16418319,-8.7713382374e-06
+2.804599,0.16546782,-8.1704532277e-06
+2.809871,0.16675245,-7.7903913183e-06
+2.815142,0.16803708,-8.2077722559e-06
+2.820414,0.16932170,-8.2348865491e-06
+2.825686,0.17060634,-8.2868882790e-06
+2.830958,0.17189097,-7.6075054600e-06
+2.836230,0.17317559,-7.1253051267e-06
+2.841502,0.17446022,-7.5600366381e-06
+2.846773,0.17574485,-7.8516514062e-06
+2.852045,0.17702948,-6.5252175088e-06
+2.857317,0.17831411,-6.8815551541e-06
+2.862589,0.17959874,-5.9944396275e-06
+2.867860,0.18088336,-6.4062516912e-06
+2.873132,0.18216799,-6.4799869278e-06
+2.878404,0.18345263,-5.9991066715e-06
+2.883676,0.18473725,-6.1474388823e-06
+2.888948,0.18602188,-5.6246636277e-06
+2.894220,0.18730651,-4.9849954773e-06
+2.899491,0.18859114,-4.6446541761e-06
+2.904763,0.18987577,-4.4481839480e-06
+2.910035,0.19116040,-3.4918096665e-06
+2.915307,0.19244503,-3.1442334324e-06
+2.920579,0.19372965,-3.3997554531e-06
+2.925850,0.19501428,-4.0177054407e-06
+2.931122,0.19629891,-2.7772015298e-06
+2.936394,0.19758354,-1.4610480973e-06
+2.941666,0.19886817,-1.8135533367e-06
+2.946938,0.20015280,-1.2511125390e-06
+2.952209,0.20143743,-1.0452491980e-06
+2.957481,0.20272206,1.9320196089e-07
+2.962753,0.20400669,-6.5731001231e-09
+2.968025,0.20529131,8.2363736776e-07
+2.973297,0.20657594,7.9533997962e-07
+2.978568,0.20786057,1.4232960967e-06
+2.983840,0.20914520,2.2176304271e-06
+2.989112,0.21042983,1.6799279571e-06
+2.994384,0.21171446,2.2697306553e-06
+2.999656,0.21299909,3.1580113343e-06
+3.004927,0.21428372,3.6447418533e-06
+3.010199,0.21556834,4.3598511441e-06
+3.015471,0.21685297,4.4452765117e-06
+3.020743,0.21813760,5.7354431858e-06
+3.026015,0.21942223,6.6915808731e-06
+3.031287,0.22070686,6.8236712362e-06
+3.036558,0.22199149,6.4139528830e-06
+3.041830,0.22327612,7.7197268571e-06
+3.047102,0.22456075,9.2848843370e-06
+3.052374,0.22584538,8.7332970523e-06
+3.057645,0.22713000,9.4886929461e-06
+3.062917,0.22841463,1.0103360807e-05
+3.068189,0.22969926,1.1397969810e-05
+3.073461,0.23098389,1.2235231269e-05
+3.078733,0.23226852,1.2138383053e-05
+3.084005,0.23355315,1.4309146043e-05
+3.089276,0.23483778,1.3683462196e-05
+3.094548,0.23612241,1.5091373109e-05
+3.099820,0.23740704,1.5430292865e-05
+3.105092,0.23869166,1.6165686151e-05
+3.110363,0.23997629,1.5879063621e-05
+3.115635,0.24126092,1.6582452340e-05
+3.120907,0.24254555,1.8662658144e-05
+3.126179,0.24383018,1.7796339152e-05
+3.131451,0.24511481,1.9625660034e-05
+3.136723,0.24639944,2.0145217013e-05
+3.141994,0.24768407,2.0013435015e-05
+3.147266,0.24896870,2.1755113077e-05
+3.152538,0.25025332,2.1715765179e-05
+3.157810,0.25153795,2.2866434803e-05
+3.163081,0.25282258,2.3152854398e-05
+3.168353,0.25410721,2.3994252791e-05
+3.173625,0.25539184,2.4886945606e-05
+3.178897,0.25667647,2.5454080794e-05
+3.184169,0.25796110,2.5113373218e-05
+3.189441,0.25924573,2.6547128339e-05
+3.194712,0.26053035,2.7105811470e-05
+3.199984,0.26181498,2.6580241632e-05
+3.205256,0.26309961,2.8076905081e-05
+3.210528,0.26438424,2.7778673594e-05
+3.215800,0.26566887,2.8295312247e-05
+3.221071,0.26695350,2.9241510997e-05
+3.226343,0.26823813,2.8751602542e-05
+3.231615,0.26952276,3.0217750285e-05
+3.236887,0.27080739,2.9969904460e-05
+3.242159,0.27209201,3.0532404778e-05
+3.247430,0.27337664,3.1499338686e-05
+3.252702,0.27466127,3.0334760488e-05
+3.257974,0.27594590,3.1840178913e-05
+3.263246,0.27723053,3.1692314447e-05
+3.268518,0.27851516,3.2533942504e-05
+3.273789,0.27979979,3.2218777205e-05
+3.279061,0.28108442,3.1632716458e-05
+3.284333,0.28236904,3.2763591361e-05
+3.289605,0.28365368,3.3080279179e-05
+3.294877,0.28493830,3.2573704195e-05
+3.300148,0.28622293,3.2584658805e-05
+3.305420,0.28750756,3.3749520124e-05
+3.310692,0.28879219,3.3104441489e-05
+3.315964,0.29007682,3.3247615648e-05
+3.321236,0.29136145,3.2354006154e-05
+3.326508,0.29264608,3.2573725973e-05
+3.331779,0.29393071,3.2881221263e-05
+3.337051,0.29521533,3.2841934741e-05
+3.342323,0.29649996,3.2748037518e-05
+3.347595,0.29778459,3.2837668125e-05
+3.352866,0.29906922,3.1747111255e-05
+3.358138,0.30035385,3.2022055534e-05
+3.363410,0.30163848,3.1434610859e-05
+3.368682,0.30292311,3.3359303966e-05
+3.373954,0.30420773,3.2152613974e-05
+3.379226,0.30549237,3.1966276711e-05
+3.384497,0.30677699,3.1925111294e-05
+3.389769,0.30806162,3.1557782411e-05
+3.395041,0.30934625,3.1617154695e-05
+3.400313,0.31063088,3.1126527548e-05
+3.405584,0.31191551,3.1431264882e-05
+3.410856,0.31320014,3.0818180915e-05
+3.416128,0.31448477,3.0510533175e-05
+3.421400,0.31576939,3.0807937077e-05
+3.426672,0.31705402,3.0632793988e-05
+3.431944,0.31833866,3.0180249604e-05
+3.437215,0.31962328,2.9861104770e-05
+3.442487,0.32090791,2.9168970611e-05
+3.447759,0.32219254,2.9283830677e-05
+3.453031,0.32347717,2.8636633583e-05
+3.458302,0.32476180,2.9191257986e-05
+3.463574,0.32604643,2.8429759149e-05
+3.468846,0.32733105,2.8023046730e-05
+3.474118,0.32861568,2.8336358872e-05
+3.479390,0.32990031,2.8112774351e-05
+3.484662,0.33118494,2.7320209404e-05
+3.489933,0.33246957,2.7566697039e-05
+3.495205,0.33375420,2.7427357884e-05
+3.500477,0.33503883,2.5660753283e-05
+3.505749,0.33632345,2.5386884072e-05
+3.511021,0.33760809,2.6210313182e-05
+3.516292,0.33889272,2.5725591982e-05
+3.521564,0.34017734,2.5442334237e-05
+3.526836,0.34146197,2.4925117462e-05
+3.532108,0.34274660,2.5624204918e-05
+3.537380,0.34403123,2.5448925218e-05
diff --git a/demo_data/ec_BV_4025mVs.csv b/demo_data/ec_BV_4025mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..a40a9e03da2d1d1f6ec8e756667e0348a93977d0
--- /dev/null
+++ b/demo_data/ec_BV_4025mVs.csv
@@ -0,0 +1,673 @@
+Time (s),E (V),I (A)
+0.000000,0.34475868,-3.1937307985e-05
+0.000319,0.34347405,-2.7985834014e-05
+0.000638,0.34218941,-2.8172225472e-05
+0.000958,0.34090479,-2.8947093116e-05
+0.001277,0.33962016,-2.9297292698e-05
+0.001596,0.33833553,-2.9005217995e-05
+0.001915,0.33705090,-2.8510798470e-05
+0.002234,0.33576627,-3.0045079249e-05
+0.002554,0.33448164,-3.0355700165e-05
+0.002873,0.33319702,-3.0116622977e-05
+0.003192,0.33191239,-3.1353587033e-05
+0.003511,0.33062776,-3.2147031062e-05
+0.003830,0.32934313,-3.4854740029e-05
+0.004150,0.32805850,-3.3319312683e-05
+0.004469,0.32677387,-3.4243056938e-05
+0.004788,0.32548924,-3.5594854642e-05
+0.005107,0.32420462,-3.7228160535e-05
+0.005426,0.32291998,-3.6553983544e-05
+0.005746,0.32163535,-3.9343402461e-05
+0.006065,0.32035073,-3.8440475425e-05
+0.006384,0.31906610,-4.0654289873e-05
+0.006703,0.31778147,-4.1391809626e-05
+0.007022,0.31649684,-4.2482073534e-05
+0.007342,0.31521221,-4.4318052127e-05
+0.007661,0.31392758,-4.6456547223e-05
+0.007980,0.31264296,-4.5204106534e-05
+0.008299,0.31135833,-4.7950088689e-05
+0.008618,0.31007369,-5.0038159004e-05
+0.008938,0.30878907,-5.0950769496e-05
+0.009257,0.30750444,-5.1732872577e-05
+0.009576,0.30621981,-5.5538760782e-05
+0.009895,0.30493518,-5.6213138925e-05
+0.010214,0.30365055,-5.7552610035e-05
+0.010534,0.30236592,-5.8485367911e-05
+0.010853,0.30108129,-6.0455498790e-05
+0.011172,0.29979667,-6.3360403088e-05
+0.011491,0.29851204,-6.5110151845e-05
+0.011810,0.29722741,-6.6352888963e-05
+0.012130,0.29594278,-6.8645040042e-05
+0.012449,0.29465815,-7.0547213732e-05
+0.012768,0.29337352,-7.3073393084e-05
+0.013087,0.29208889,-7.5508579321e-05
+0.013406,0.29080426,-7.6776834580e-05
+0.013726,0.28951963,-7.8569034454e-05
+0.014045,0.28823501,-8.1604739846e-05
+0.014364,0.28695038,-8.5231204498e-05
+0.014683,0.28566575,-8.6880586458e-05
+0.015002,0.28438112,-8.9729381419e-05
+0.015322,0.28309649,-9.1441402109e-05
+0.015641,0.28181186,-9.4825655625e-05
+0.015960,0.28052723,-9.7173566036e-05
+0.016279,0.27924260,-9.9860763534e-05
+0.016598,0.27795798,-1.0319378766e-04
+0.016918,0.27667334,-1.0600697067e-04
+0.017237,0.27538872,-1.0820057337e-04
+0.017556,0.27410409,-1.1144377911e-04
+0.017875,0.27281946,-1.1486714462e-04
+0.018194,0.27153483,-1.1822296329e-04
+0.018514,0.27025020,-1.2147011161e-04
+0.018833,0.26896557,-1.2459026865e-04
+0.019152,0.26768094,-1.2839789079e-04
+0.019471,0.26639631,-1.3089508816e-04
+0.019790,0.26511169,-1.3312014298e-04
+0.020110,0.26382706,-1.3688059900e-04
+0.020429,0.26254243,-1.4139626810e-04
+0.020748,0.26125780,-1.4490563011e-04
+0.021067,0.25997317,-1.5087155678e-04
+0.021386,0.25868854,-1.5303617750e-04
+0.021706,0.25740391,-1.5701287191e-04
+0.022025,0.25611928,-1.6241586267e-04
+0.022344,0.25483466,-1.6465708207e-04
+0.022663,0.25355003,-1.7006881087e-04
+0.022982,0.25226540,-1.7407748040e-04
+0.023302,0.25098077,-1.7787881855e-04
+0.023621,0.24969614,-1.8210869089e-04
+0.023940,0.24841151,-1.8765453176e-04
+0.024259,0.24712688,-1.9198848819e-04
+0.024578,0.24584225,-1.9641788722e-04
+0.024898,0.24455762,-2.0037945500e-04
+0.025217,0.24327300,-2.0586076630e-04
+0.025536,0.24198837,-2.1129880579e-04
+0.025855,0.24070374,-2.1565258776e-04
+0.026174,0.23941911,-2.2136766987e-04
+0.026494,0.23813448,-2.2816512669e-04
+0.026813,0.23684985,-2.3153925019e-04
+0.027132,0.23556522,-2.3755462808e-04
+0.027451,0.23428059,-2.4269164763e-04
+0.027770,0.23299596,-2.4737800626e-04
+0.028090,0.23171134,-2.5526721955e-04
+0.028409,0.23042671,-2.5869381958e-04
+0.028728,0.22914208,-2.6492743933e-04
+0.029047,0.22785745,-2.7094539196e-04
+0.029366,0.22657282,-2.7699649444e-04
+0.029686,0.22528819,-2.8235820881e-04
+0.030005,0.22400356,-2.8834307596e-04
+0.030324,0.22271894,-2.9514490986e-04
+0.030643,0.22143430,-3.0011552039e-04
+0.030962,0.22014968,-3.0560371914e-04
+0.031282,0.21886505,-3.1234713850e-04
+0.031601,0.21758042,-3.1869427234e-04
+0.031920,0.21629579,-3.2376578071e-04
+0.032239,0.21501116,-3.3089525097e-04
+0.032558,0.21372653,-3.3743729304e-04
+0.032878,0.21244190,-3.4311862988e-04
+0.033197,0.21115727,-3.5026863374e-04
+0.033516,0.20987265,-3.5743012739e-04
+0.033835,0.20858802,-3.6355657336e-04
+0.034154,0.20730339,-3.7004274346e-04
+0.034474,0.20601876,-3.7433909252e-04
+0.034793,0.20473413,-3.8322807947e-04
+0.035112,0.20344950,-3.8845864275e-04
+0.035431,0.20216487,-3.9589405714e-04
+0.035750,0.20088024,-4.0154082802e-04
+0.036070,0.19959561,-4.0984052011e-04
+0.036389,0.19831099,-4.1630354968e-04
+0.036708,0.19702636,-4.2263130856e-04
+0.037027,0.19574173,-4.2933732974e-04
+0.037346,0.19445710,-4.3453554777e-04
+0.037666,0.19317247,-4.4163553719e-04
+0.037985,0.19188784,-4.4786426493e-04
+0.038304,0.19060321,-4.5489489714e-04
+0.038623,0.18931859,-4.6013006278e-04
+0.038942,0.18803395,-4.6529101137e-04
+0.039262,0.18674933,-4.7323983001e-04
+0.039581,0.18546470,-4.7986831917e-04
+0.039900,0.18418007,-4.8543739710e-04
+0.040219,0.18289544,-4.9068617670e-04
+0.040538,0.18161081,-4.9757928533e-04
+0.040858,0.18032618,-5.0344513487e-04
+0.041177,0.17904155,-5.0941207535e-04
+0.041496,0.17775693,-5.1593635168e-04
+0.041815,0.17647230,-5.2076148910e-04
+0.042134,0.17518766,-5.2573589738e-04
+0.042454,0.17390304,-5.3115168141e-04
+0.042773,0.17261841,-5.3791524815e-04
+0.043092,0.17133378,-5.4272519457e-04
+0.043411,0.17004915,-5.4795791419e-04
+0.043730,0.16876452,-5.5278858731e-04
+0.044050,0.16747989,-5.5779517991e-04
+0.044369,0.16619526,-5.6227497959e-04
+0.044688,0.16491064,-5.6676681620e-04
+0.045007,0.16362601,-5.7110262323e-04
+0.045326,0.16234138,-5.7455670867e-04
+0.045646,0.16105675,-5.8009627359e-04
+0.045965,0.15977212,-5.8354463022e-04
+0.046284,0.15848749,-5.8674915846e-04
+0.046603,0.15720287,-5.9174628887e-04
+0.046922,0.15591823,-5.9363711759e-04
+0.047242,0.15463360,-5.9742894527e-04
+0.047561,0.15334898,-5.9953457213e-04
+0.047880,0.15206435,-6.0349053984e-04
+0.048199,0.15077972,-6.0514359081e-04
+0.048518,0.14949509,-6.0922494862e-04
+0.048838,0.14821046,-6.1067729818e-04
+0.049157,0.14692583,-6.1300145657e-04
+0.049476,0.14564120,-6.1531048832e-04
+0.049795,0.14435657,-6.1710515029e-04
+0.050114,0.14307195,-6.1927971597e-04
+0.050434,0.14178732,-6.2030710378e-04
+0.050753,0.14050268,-6.2188130318e-04
+0.051072,0.13921806,-6.2360342170e-04
+0.051391,0.13793343,-6.2533274950e-04
+0.051710,0.13664881,-6.2401628213e-04
+0.052030,0.13536417,-6.2408869685e-04
+0.052349,0.13407954,-6.2643184398e-04
+0.052668,0.13279492,-6.2719956872e-04
+0.052987,0.13151028,-6.2685938047e-04
+0.053306,0.13022566,-6.2680041880e-04
+0.053626,0.12894103,-6.2636618797e-04
+0.053945,0.12765639,-6.2643982569e-04
+0.054264,0.12637177,-6.2636084538e-04
+0.054583,0.12508714,-6.2587557022e-04
+0.054902,0.12380252,-6.2639805045e-04
+0.055222,0.12251788,-6.2456508914e-04
+0.055541,0.12123325,-6.2252756429e-04
+0.055860,0.11994863,-6.2238904299e-04
+0.056179,0.11866399,-6.1995082338e-04
+0.056498,0.11737937,-6.1879592129e-04
+0.056818,0.11609474,-6.1690753858e-04
+0.057137,0.11481010,-6.1567565160e-04
+0.057456,0.11352548,-6.1400354751e-04
+0.057775,0.11224085,-6.1123080409e-04
+0.058094,0.11095623,-6.1100210233e-04
+0.058414,0.10967159,-6.0825581442e-04
+0.058733,0.10838696,-6.0674154223e-04
+0.059052,0.10710234,-6.0446784886e-04
+0.059371,0.10581771,-6.0249070180e-04
+0.059690,0.10453308,-5.9913284747e-04
+0.060010,0.10324845,-5.9703674716e-04
+0.060329,0.10196382,-5.9516529341e-04
+0.060648,0.10067919,-5.9274966719e-04
+0.060967,0.09939456,-5.8986125333e-04
+0.061286,0.09810994,-5.8713961861e-04
+0.061606,0.09682531,-5.8423221601e-04
+0.061925,0.09554067,-5.8203080861e-04
+0.062244,0.09425605,-5.7858876011e-04
+0.062563,0.09297142,-5.7496583573e-04
+0.062882,0.09168680,-5.7458702630e-04
+0.063202,0.09040216,-5.7111356590e-04
+0.063521,0.08911753,-5.6662848800e-04
+0.063840,0.08783291,-5.6448166521e-04
+0.064159,0.08654827,-5.6333564599e-04
+0.064478,0.08526365,-5.5748099659e-04
+0.064798,0.08397902,-5.5516919699e-04
+0.065117,0.08269438,-5.5383740988e-04
+0.065436,0.08140976,-5.4959056031e-04
+0.065755,0.08012513,-5.4678125550e-04
+0.066074,0.07884051,-5.4382596263e-04
+0.066394,0.07755587,-5.4031252931e-04
+0.066713,0.07627124,-5.3829685762e-04
+0.067032,0.07498662,-5.3471435674e-04
+0.067351,0.07370198,-5.3180878864e-04
+0.067670,0.07241736,-5.3002378197e-04
+0.067990,0.07113273,-5.2571723048e-04
+0.068309,0.06984810,-5.2268430903e-04
+0.068628,0.06856347,-5.1909224941e-04
+0.068947,0.06727884,-5.1689167881e-04
+0.069266,0.06599422,-5.1466751711e-04
+0.069586,0.06470958,-5.1101575558e-04
+0.069905,0.06342495,-5.0900690697e-04
+0.070224,0.06214033,-5.0571657534e-04
+0.070543,0.06085570,-5.0293144096e-04
+0.070862,0.05957107,-4.9994032694e-04
+0.071182,0.05828644,-4.9767725439e-04
+0.071501,0.05700181,-4.9491175245e-04
+0.071820,0.05571719,-4.9149068812e-04
+0.072139,0.05443255,-4.8957845683e-04
+0.072458,0.05314793,-4.8678714306e-04
+0.072778,0.05186330,-4.8363787530e-04
+0.073097,0.05057866,-4.8063746001e-04
+0.073416,0.04929404,-4.7833113174e-04
+0.073735,0.04800941,-4.7602715292e-04
+0.074054,0.04672479,-4.7341423683e-04
+0.074374,0.04544015,-4.6998834486e-04
+0.074693,0.04415553,-4.6789221237e-04
+0.075012,0.04287090,-4.6588497297e-04
+0.075331,0.04158626,-4.6147382245e-04
+0.075650,0.04030163,-4.6055727742e-04
+0.075970,0.03901702,-4.5835638498e-04
+0.076289,0.03773239,-4.5625526392e-04
+0.076608,0.03644775,-4.5303084578e-04
+0.076927,0.03516312,-4.5173597409e-04
+0.077246,0.03387848,-4.4725636752e-04
+0.077566,0.03259388,-4.4569780970e-04
+0.077885,0.03130924,-4.4344851205e-04
+0.078204,0.03002461,-4.4109516249e-04
+0.078523,0.02873997,-4.3945952323e-04
+0.078842,0.02745534,-4.3558456345e-04
+0.079162,0.02617073,-4.3524350623e-04
+0.079481,0.02488610,-4.3168749305e-04
+0.079800,0.02360146,-4.2912883972e-04
+0.080119,0.02231683,-4.2775868891e-04
+0.080438,0.02103220,-4.2483525851e-04
+0.080758,0.01974759,-4.2359744962e-04
+0.081077,0.01846295,-4.2313537936e-04
+0.081396,0.01717832,-4.2016582883e-04
+0.081715,0.01589369,-4.1844570574e-04
+0.082034,0.01460905,-4.1537989192e-04
+0.082354,0.01332444,-4.1412653800e-04
+0.082673,0.01203981,-4.1171142673e-04
+0.082992,0.01075518,-4.1069523905e-04
+0.083311,0.00947054,-4.0904852839e-04
+0.083630,0.00818591,-4.0703778090e-04
+0.083950,0.00690130,-4.0507196272e-04
+0.084269,0.00561666,-4.0270786360e-04
+0.084588,0.00433203,-4.0186695172e-04
+0.084907,0.00304740,-3.9810074276e-04
+0.085226,0.00176276,-3.9860359055e-04
+0.085546,0.00047815,-3.9549069107e-04
+0.085865,-0.00080648,-3.9304020924e-04
+0.086184,-0.00209111,-3.9222514137e-04
+0.086503,-0.00337575,-3.9010767068e-04
+0.086822,-0.00466038,-3.8935607029e-04
+0.087142,-0.00594499,-3.8732794327e-04
+0.087461,-0.00722962,-3.8619125750e-04
+0.087780,-0.00851426,-3.8409396638e-04
+0.088099,-0.00979889,-3.8149926661e-04
+0.088418,-0.01108352,-3.8147873302e-04
+0.088738,-0.01236813,-3.7941221011e-04
+0.089057,-0.01365277,-3.7747654863e-04
+0.089376,-0.01493740,-3.7642682490e-04
+0.089695,-0.01622204,-3.7354153292e-04
+0.090014,-0.01750667,-3.7397737296e-04
+0.090334,-0.01879128,-3.7194216539e-04
+0.090653,-0.02007591,-3.7148788373e-04
+0.090972,-0.02136055,-3.6972608195e-04
+0.091291,-0.02264518,-3.6792124973e-04
+0.091610,-0.02392981,-3.6582382987e-04
+0.091930,-0.02521442,-3.6477291531e-04
+0.092249,-0.02649906,-3.6264511346e-04
+0.092568,-0.02778369,-3.6096007127e-04
+0.092887,-0.02906832,-3.6121960562e-04
+0.093206,-0.03035296,-3.5920493164e-04
+0.093526,-0.03163757,-3.5723834104e-04
+0.093845,-0.03292220,-3.5725153661e-04
+0.094164,-0.03420683,-3.5644593093e-04
+0.094483,-0.03549147,-3.5212467121e-04
+0.094802,-0.03677610,-3.5320941148e-04
+0.095122,-0.03806071,-3.5058487685e-04
+0.095441,-0.03934534,-3.4916245871e-04
+0.095760,-0.04062998,-3.4854654740e-04
+0.096079,-0.04191461,-3.4788384010e-04
+0.096398,-0.04319925,-3.4711708089e-04
+0.096718,-0.04448386,-3.4604022577e-04
+0.097037,-0.04576849,-3.4500572522e-04
+0.097356,-0.04705312,-3.4458449686e-04
+0.097675,-0.04833776,-3.4281349036e-04
+0.097994,-0.04962239,-3.4025509450e-04
+0.098314,-0.05090700,-3.3905323549e-04
+0.098633,-0.05219163,-3.3814119627e-04
+0.098952,-0.05347627,-3.3772151276e-04
+0.099271,-0.05476090,-3.3497528922e-04
+0.099590,-0.05604553,-3.3381369279e-04
+0.099910,-0.05733014,-3.3298147068e-04
+0.100229,-0.05861478,-3.3259220135e-04
+0.100548,-0.05989941,-3.3225970515e-04
+0.100867,-0.06118405,-3.3101088922e-04
+0.101186,-0.06246868,-3.2976957224e-04
+0.101506,-0.06375329,-3.2861219196e-04
+0.101825,-0.06503792,-3.2749259607e-04
+0.102144,-0.06632256,-3.2571373659e-04
+0.102463,-0.06760719,-3.2528304604e-04
+0.102782,-0.06889182,-3.2548020718e-04
+0.103102,-0.07017643,-3.2428832531e-04
+0.103421,-0.07146107,-3.2237281122e-04
+0.103740,-0.07274570,-3.2187472670e-04
+0.104059,-0.07403033,-3.2115646926e-04
+0.104378,-0.07531497,-3.2058709648e-04
+0.104698,-0.07659958,-3.1935685090e-04
+0.105017,-0.07788421,-3.1839138571e-04
+0.105336,-0.07916884,-3.1792146248e-04
+0.105655,-0.08045348,-3.1668735478e-04
+0.105974,-0.08173811,-3.1465430356e-04
+0.106294,-0.08302272,-3.1438221733e-04
+0.106613,-0.08430735,-3.1264217214e-04
+0.106932,-0.08559199,-3.1426921819e-04
+0.107251,-0.08631944,-3.1289816621e-04
+0.107570,-0.08503480,-3.1085301369e-04
+0.107890,-0.08375017,-3.1110823533e-04
+0.108209,-0.08246554,-3.0879173682e-04
+0.108528,-0.08118093,-3.0729774075e-04
+0.108847,-0.07989629,-3.0681890246e-04
+0.109166,-0.07861166,-3.0680252064e-04
+0.109486,-0.07732703,-3.0478919840e-04
+0.109805,-0.07604239,-3.0402350128e-04
+0.110124,-0.07475778,-3.0232204509e-04
+0.110443,-0.07347315,-3.0031338958e-04
+0.110762,-0.07218852,-3.0097770610e-04
+0.111082,-0.07090388,-2.9972637980e-04
+0.111401,-0.06961925,-2.9904381477e-04
+0.111720,-0.06833464,-2.9732452847e-04
+0.112039,-0.06705001,-2.9794047196e-04
+0.112358,-0.06576537,-2.9617397126e-04
+0.112678,-0.06448074,-2.9572001145e-04
+0.112997,-0.06319610,-2.9444892397e-04
+0.113316,-0.06191150,-2.9266182531e-04
+0.113635,-0.06062686,-2.9235964674e-04
+0.113954,-0.05934223,-2.9314748668e-04
+0.114274,-0.05805759,-2.9136730765e-04
+0.114593,-0.05677296,-2.9095460813e-04
+0.114912,-0.05548835,-2.9073549729e-04
+0.115231,-0.05420372,-2.8926731304e-04
+0.115550,-0.05291908,-2.8877402399e-04
+0.115870,-0.05163445,-2.8736180827e-04
+0.116189,-0.05034982,-2.8663048400e-04
+0.116508,-0.04906521,-2.8627072769e-04
+0.116827,-0.04778057,-2.8567853623e-04
+0.117146,-0.04649594,-2.8398039502e-04
+0.117466,-0.04521131,-2.8325093744e-04
+0.117785,-0.04392667,-2.8234102239e-04
+0.118104,-0.04264206,-2.8213581517e-04
+0.118423,-0.04135743,-2.8092887104e-04
+0.118742,-0.04007280,-2.8041620703e-04
+0.119062,-0.03878816,-2.8018345004e-04
+0.119381,-0.03750353,-2.7971140264e-04
+0.119700,-0.03621892,-2.7836133484e-04
+0.120019,-0.03493428,-2.7766029601e-04
+0.120338,-0.03364965,-2.7710292798e-04
+0.120658,-0.03236502,-2.7678816535e-04
+0.120977,-0.03108038,-2.7532313516e-04
+0.121296,-0.02979577,-2.7509443339e-04
+0.121615,-0.02851114,-2.7317656985e-04
+0.121934,-0.02722651,-2.7286447851e-04
+0.122254,-0.02594187,-2.7155016749e-04
+0.122573,-0.02465724,-2.7243002239e-04
+0.122892,-0.02337263,-2.7055776403e-04
+0.123211,-0.02208800,-2.7021558035e-04
+0.123530,-0.02080336,-2.6984724692e-04
+0.123850,-0.01951873,-2.6915591166e-04
+0.124169,-0.01823409,-2.6905102297e-04
+0.124488,-0.01694949,-2.6772000829e-04
+0.124807,-0.01566485,-2.6681414846e-04
+0.125126,-0.01438022,-2.6650944342e-04
+0.125446,-0.01309558,-2.6604146733e-04
+0.125765,-0.01181095,-2.6408462858e-04
+0.126084,-0.01052634,-2.6382488504e-04
+0.126403,-0.00924171,-2.6320823349e-04
+0.126722,-0.00795707,-2.6266290240e-04
+0.127042,-0.00667244,-2.6152266027e-04
+0.127361,-0.00538781,-2.6166036087e-04
+0.127680,-0.00410320,-2.6047985616e-04
+0.127999,-0.00281856,-2.6065279859e-04
+0.128318,-0.00153393,-2.5849696420e-04
+0.128638,-0.00024930,-2.5825579100e-04
+0.128957,0.00103534,-2.5813349059e-04
+0.129276,0.00231995,-2.5701790165e-04
+0.129595,0.00360458,-2.5578767216e-04
+0.129914,0.00488921,-2.5628170145e-04
+0.130234,0.00617385,-2.5442012828e-04
+0.130553,0.00745848,-2.5503814766e-04
+0.130872,0.00874309,-2.5273360562e-04
+0.131191,0.01002773,-2.5293168401e-04
+0.131510,0.01131236,-2.5137607106e-04
+0.131830,0.01259699,-2.5036065581e-04
+0.132149,0.01388163,-2.5060100830e-04
+0.132468,0.01516624,-2.4882457874e-04
+0.132787,0.01645087,-2.4935964304e-04
+0.133106,0.01773550,-2.4741952404e-04
+0.133426,0.01902014,-2.4764143491e-04
+0.133745,0.02030477,-2.4564386690e-04
+0.134064,0.02158938,-2.4630842480e-04
+0.134383,0.02287401,-2.4509874501e-04
+0.134702,0.02415865,-2.4535741037e-04
+0.135022,0.02544328,-2.4511549694e-04
+0.135341,0.02672791,-2.4316823302e-04
+0.135660,0.02801252,-2.4271113524e-04
+0.135979,0.02929716,-2.4145409621e-04
+0.136298,0.03058179,-2.4078813829e-04
+0.136618,0.03186643,-2.4180004545e-04
+0.136937,0.03315106,-2.3786316305e-04
+0.137256,0.03443567,-2.3901930423e-04
+0.137575,0.03572030,-2.3739011793e-04
+0.137894,0.03700494,-2.3737766260e-04
+0.138214,0.03828957,-2.3638614421e-04
+0.138533,0.03957420,-2.3479088018e-04
+0.138852,0.04085881,-2.3558705585e-04
+0.139171,0.04214345,-2.3352745257e-04
+0.139490,0.04342808,-2.3322363260e-04
+0.139810,0.04471271,-2.3379406746e-04
+0.140129,0.04599734,-2.3298212147e-04
+0.140448,0.04728197,-2.2963453394e-04
+0.140767,0.04856659,-2.2903537458e-04
+0.141086,0.04985122,-2.2904194018e-04
+0.141406,0.05113586,-2.2704096063e-04
+0.141725,0.05242048,-2.2692773619e-04
+0.142044,0.05370511,-2.2662505877e-04
+0.142363,0.05498973,-2.2576285697e-04
+0.142682,0.05627437,-2.2536341739e-04
+0.143002,0.05755900,-2.2369289033e-04
+0.143321,0.05884362,-2.2370112952e-04
+0.143640,0.06012826,-2.2195051178e-04
+0.143959,0.06141288,-2.2140817383e-04
+0.144278,0.06269751,-2.2004294722e-04
+0.144598,0.06398215,-2.1904088846e-04
+0.144917,0.06526677,-2.1822953788e-04
+0.145236,0.06655140,-2.1650889984e-04
+0.145555,0.06783602,-2.1643094942e-04
+0.145874,0.06912066,-2.1495940191e-04
+0.146194,0.07040529,-2.1630348342e-04
+0.146513,0.07168991,-2.1332138102e-04
+0.146832,0.07297455,-2.1163630665e-04
+0.147151,0.07425917,-2.1093192065e-04
+0.147470,0.07554380,-2.0997866941e-04
+0.147790,0.07682844,-2.0950296909e-04
+0.148109,0.07811306,-2.0702780188e-04
+0.148428,0.07939769,-2.0757363183e-04
+0.148747,0.08068231,-2.0678286312e-04
+0.149066,0.08196695,-2.0600543482e-04
+0.149386,0.08325158,-2.0438880040e-04
+0.149705,0.08453620,-2.0373684266e-04
+0.150024,0.08582083,-2.0188992944e-04
+0.150343,0.08710546,-2.0152109715e-04
+0.150662,0.08839009,-1.9951557961e-04
+0.150982,0.08967472,-1.9795591144e-04
+0.151301,0.09095935,-1.9713120437e-04
+0.151620,0.09224398,-1.9710658337e-04
+0.151939,0.09352860,-1.9596320326e-04
+0.152258,0.09481323,-1.9426128040e-04
+0.152578,0.09609787,-1.9289302847e-04
+0.152897,0.09738249,-1.9208954695e-04
+0.153216,0.09866712,-1.9070966038e-04
+0.153535,0.09995174,-1.8886675412e-04
+0.153854,0.10123638,-1.8850488973e-04
+0.154174,0.10252101,-1.8740428259e-04
+0.154493,0.10380563,-1.8499070007e-04
+0.154812,0.10509027,-1.8471510575e-04
+0.155131,0.10637489,-1.8297935717e-04
+0.155450,0.10765952,-1.8133563965e-04
+0.155770,0.10894416,-1.8067470249e-04
+0.156089,0.11022878,-1.7978001061e-04
+0.156408,0.11151341,-1.7708158079e-04
+0.156727,0.11279803,-1.7685431122e-04
+0.157046,0.11408267,-1.7326286311e-04
+0.157366,0.11536730,-1.7284507847e-04
+0.157685,0.11665192,-1.7254833905e-04
+0.158004,0.11793656,-1.6907840283e-04
+0.158323,0.11922118,-1.6993616320e-04
+0.158642,0.12050581,-1.6567875717e-04
+0.158962,0.12179044,-1.6683288683e-04
+0.159281,0.12307507,-1.6407898733e-04
+0.159600,0.12435970,-1.6386890420e-04
+0.159919,0.12564432,-1.6116303979e-04
+0.160238,0.12692896,-1.5881554778e-04
+0.160558,0.12821359,-1.5771492454e-04
+0.160877,0.12949821,-1.5629479148e-04
+0.161196,0.13078284,-1.5398155968e-04
+0.161515,0.13206747,-1.5304588107e-04
+0.161834,0.13335210,-1.5174359090e-04
+0.162154,0.13463673,-1.5156033339e-04
+0.162473,0.13592135,-1.4802952053e-04
+0.162792,0.13720599,-1.4765936868e-04
+0.163111,0.13849061,-1.4602268344e-04
+0.163430,0.13977524,-1.4447699935e-04
+0.163750,0.14105988,-1.4187887195e-04
+0.164069,0.14234450,-1.4020208505e-04
+0.164388,0.14362913,-1.4006187406e-04
+0.164707,0.14491375,-1.3541748378e-04
+0.165026,0.14619839,-1.3371714600e-04
+0.165346,0.14748302,-1.3224805255e-04
+0.165665,0.14876764,-1.3196260982e-04
+0.165984,0.15005227,-1.2750335984e-04
+0.166303,0.15133690,-1.2811275382e-04
+0.166622,0.15262153,-1.2645111768e-04
+0.166942,0.15390616,-1.2398010225e-04
+0.167261,0.15519079,-1.1980804903e-04
+0.167580,0.15647542,-1.2148774862e-04
+0.167899,0.15776005,-1.1928374234e-04
+0.168218,0.15904468,-1.1609327060e-04
+0.168538,0.16032930,-1.1369770326e-04
+0.168857,0.16161393,-1.1237693929e-04
+0.169176,0.16289856,-1.1081592742e-04
+0.169495,0.16418319,-1.0857725059e-04
+0.169814,0.16546782,-1.0706486923e-04
+0.170134,0.16675245,-1.0411148328e-04
+0.170453,0.16803708,-1.0203432345e-04
+0.170772,0.16932170,-9.9282644665e-05
+0.171091,0.17060634,-9.5874606937e-05
+0.171410,0.17189097,-9.4641464770e-05
+0.171730,0.17317559,-9.3175959868e-05
+0.172049,0.17446022,-9.0420813228e-05
+0.172368,0.17574485,-8.8570029848e-05
+0.172687,0.17702948,-8.5043320492e-05
+0.173006,0.17831411,-8.3963230851e-05
+0.173326,0.17959874,-8.3227553651e-05
+0.173645,0.18088336,-7.8274829551e-05
+0.173964,0.18216799,-7.7114729695e-05
+0.174283,0.18345263,-7.3616173571e-05
+0.174602,0.18473725,-7.0790317983e-05
+0.174922,0.18602188,-7.0852530271e-05
+0.175241,0.18730651,-6.7753397633e-05
+0.175560,0.18859114,-6.4388080565e-05
+0.175879,0.18987577,-6.3657685616e-05
+0.176198,0.19116040,-6.0131394655e-05
+0.176518,0.19244503,-5.8076969023e-05
+0.176837,0.19372965,-5.5173903254e-05
+0.177156,0.19501428,-5.3418872245e-05
+0.177475,0.19629891,-4.8699882737e-05
+0.177794,0.19758354,-4.6343616472e-05
+0.178114,0.19886817,-4.5205566897e-05
+0.178433,0.20015280,-4.2891602896e-05
+0.178752,0.20143743,-3.9039200304e-05
+0.179071,0.20272206,-3.6478189474e-05
+0.179390,0.20400669,-3.4974634661e-05
+0.179710,0.20529131,-3.2432326943e-05
+0.180029,0.20657594,-2.8089751144e-05
+0.180348,0.20786057,-2.6931425449e-05
+0.180667,0.20914520,-2.2389982745e-05
+0.180986,0.21042983,-1.9966519646e-05
+0.181306,0.21171446,-1.7057461560e-05
+0.181625,0.21299909,-1.4683557283e-05
+0.181944,0.21428372,-1.1937470528e-05
+0.182263,0.21556834,-8.3258891119e-06
+0.182582,0.21685297,-5.8088480951e-06
+0.182902,0.21813760,-3.1917804790e-06
+0.183221,0.21942223,2.1483152104e-07
+0.183540,0.22070686,3.1528804498e-06
+0.183859,0.22199149,6.2838549448e-06
+0.184178,0.22327612,9.0657009919e-06
+0.184498,0.22456075,1.1160762344e-05
+0.184817,0.22584538,1.5166962731e-05
+0.185136,0.22713000,1.9307449170e-05
+0.185455,0.22841463,2.1741871029e-05
+0.185774,0.22969926,2.4911724684e-05
+0.186094,0.23098389,2.9474982321e-05
+0.186413,0.23226852,3.2699006207e-05
+0.186732,0.23355315,3.5433084188e-05
+0.187051,0.23483778,3.8151733811e-05
+0.187370,0.23612241,4.1728103571e-05
+0.187690,0.23740704,4.4991448648e-05
+0.188009,0.23869166,4.8142035965e-05
+0.188328,0.23997629,5.0178414241e-05
+0.188647,0.24126092,5.5776635081e-05
+0.188966,0.24254555,5.8462529114e-05
+0.189286,0.24383018,6.2713317247e-05
+0.189605,0.24511481,6.6590059230e-05
+0.189924,0.24639944,7.0160470868e-05
+0.190243,0.24768407,7.1705591728e-05
+0.190562,0.24896870,7.7185824855e-05
+0.190882,0.25025332,8.0778536203e-05
+0.191201,0.25153795,8.3511266465e-05
+0.191520,0.25282258,8.5456864848e-05
+0.191839,0.25410721,9.0857337187e-05
+0.192158,0.25539184,9.5796592149e-05
+0.192478,0.25667647,9.7492480449e-05
+0.192797,0.25796110,1.0242434106e-04
+0.193116,0.25924573,1.0704371608e-04
+0.193435,0.26053035,1.1157427848e-04
+0.193754,0.26181498,1.1414776073e-04
+0.194074,0.26309961,1.2012648872e-04
+0.194393,0.26438424,1.2154245391e-04
+0.194712,0.26566887,1.2634644623e-04
+0.195031,0.26695350,1.2967067599e-04
+0.195350,0.26823813,1.3513459971e-04
+0.195670,0.26952276,1.3704576892e-04
+0.195989,0.27080739,1.4142026151e-04
+0.196308,0.27209201,1.4525906220e-04
+0.196627,0.27337664,1.5124368797e-04
+0.196946,0.27466127,1.5439915121e-04
+0.197266,0.27594590,1.5840315401e-04
+0.197585,0.27723053,1.6167742566e-04
+0.197904,0.27851516,1.6719867771e-04
+0.198223,0.27979979,1.6981045125e-04
+0.198542,0.28108442,1.7384425673e-04
+0.198862,0.28236904,1.7950906693e-04
+0.199181,0.28365368,1.8393523144e-04
+0.199500,0.28493830,1.8713613894e-04
+0.199819,0.28622293,1.9173580911e-04
+0.200138,0.28750756,1.9584748455e-04
+0.200458,0.28879219,1.9979476249e-04
+0.200777,0.29007682,2.0386548338e-04
+0.201096,0.29136145,2.0876855512e-04
+0.201415,0.29264608,2.1428843933e-04
+0.201734,0.29393071,2.1624220448e-04
+0.202054,0.29521533,2.2175373686e-04
+0.202373,0.29649996,2.2456457042e-04
+0.202692,0.29778459,2.2962676143e-04
+0.203011,0.29906922,2.3378116155e-04
+0.203330,0.30035385,2.3780013006e-04
+0.203650,0.30163848,2.4234713059e-04
+0.203969,0.30292311,2.4525157224e-04
+0.204288,0.30420773,2.5028375138e-04
+0.204607,0.30549237,2.5340450383e-04
+0.204926,0.30677699,2.5842625525e-04
+0.205246,0.30806162,2.6248831856e-04
+0.205565,0.30934625,2.6596800663e-04
+0.205884,0.31063088,2.7075865854e-04
+0.206203,0.31191551,2.7356120464e-04
+0.206522,0.31320014,2.7873274188e-04
+0.206842,0.31448477,2.8183917231e-04
+0.207161,0.31576939,2.8545572419e-04
+0.207480,0.31705402,2.8848710079e-04
+0.207799,0.31833866,2.9294215072e-04
+0.208118,0.31962328,2.9592380255e-04
+0.208438,0.32090791,2.9765419244e-04
+0.208757,0.32219254,3.0241048760e-04
+0.209076,0.32347717,3.0650719733e-04
+0.209395,0.32476180,3.1025840840e-04
+0.209714,0.32604643,3.1367541751e-04
+0.210034,0.32733105,3.1777470199e-04
+0.210353,0.32861568,3.2148478150e-04
+0.210672,0.32990031,3.2291740207e-04
+0.210991,0.33118494,3.2714236631e-04
+0.211310,0.33246957,3.3043713938e-04
+0.211630,0.33375420,3.3088237724e-04
+0.211949,0.33503883,3.3370133734e-04
+0.212268,0.33632345,3.3775504882e-04
+0.212587,0.33760809,3.4073261324e-04
+0.212906,0.33889272,3.4386273133e-04
+0.213226,0.34017734,3.4475922552e-04
+0.213545,0.34146197,3.4710922792e-04
+0.213864,0.34274660,3.4946270621e-04
+0.214183,0.34403123,3.5246508474e-04
diff --git a/demo_data/ec_BV_metadata.json b/demo_data/ec_BV_metadata.json
new file mode 100644
index 0000000000000000000000000000000000000000..bf65cddf3af9f035e0ce0fd9f14ef76586e633d5
--- /dev/null
+++ b/demo_data/ec_BV_metadata.json
@@ -0,0 +1,35 @@
+{
+ "mechanism": "BV",
+ "n_scans": 3,
+ "scan_rates_Vs": [
+ 0.010573734343051911,
+ 0.24367923736572267,
+ 4.024525451660156
+ ],
+ "physical_params": {
+ "E0_V": 0.25,
+ "T_K": 298.15,
+ "A_cm2": 0.0707,
+ "C_mM": 1.0,
+ "D_cm2s": 1e-05,
+ "n_electrons": 1
+ },
+ "true_params_dimless": {
+ "sigma": 8.719717822841444,
+ "C_A_bulk": 1.0,
+ "C_B_bulk": 0.0,
+ "dA": 1.0,
+ "dB": 1.2541572204674802,
+ "theta_i": 3.6881732361108934,
+ "theta_v": -13.090140187264856,
+ "cycles": 1.0,
+ "kinetics": "BV",
+ "K0": 5.810825216518235,
+ "alpha": 0.5204656070504309
+ },
+ "csv_files": [
+ "ec_BV_11mVs.csv",
+ "ec_BV_244mVs.csv",
+ "ec_BV_4025mVs.csv"
+ ]
+}
\ No newline at end of file
diff --git a/demo_data/ec_EC_10mVs.csv b/demo_data/ec_EC_10mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..96a544c43b18936c9db4aade42c36fceec1f3368
--- /dev/null
+++ b/demo_data/ec_EC_10mVs.csv
@@ -0,0 +1,673 @@
+Time (s),E (V),I (A)
+0.000000,0.34475868,-5.4708535927e-07
+0.128463,0.34347405,-5.2043459165e-07
+0.256926,0.34218941,-5.5798761559e-07
+0.385389,0.34090479,-5.6311081374e-07
+0.513852,0.33962016,-6.2627546675e-07
+0.642314,0.33833553,-6.2129936332e-07
+0.770777,0.33705090,-6.3333731730e-07
+0.899240,0.33576627,-6.6808646700e-07
+1.027703,0.33448164,-6.7964052243e-07
+1.156166,0.33319702,-7.1598981614e-07
+1.284629,0.33191239,-7.4724132990e-07
+1.413092,0.33062776,-8.0260635252e-07
+1.541555,0.32934313,-8.1870239642e-07
+1.670018,0.32805850,-8.5409717869e-07
+1.798480,0.32677387,-8.7753296887e-07
+1.926943,0.32548924,-8.5624584465e-07
+2.055406,0.32420462,-9.4648109188e-07
+2.183869,0.32291998,-9.6339367698e-07
+2.312332,0.32163535,-1.0012847581e-06
+2.440795,0.32035073,-1.0328286063e-06
+2.569258,0.31906610,-1.0712207320e-06
+2.697721,0.31778147,-1.1561310898e-06
+2.826183,0.31649684,-1.1577879360e-06
+2.954646,0.31521221,-1.2243507580e-06
+3.083109,0.31392758,-1.2617515234e-06
+3.211572,0.31264296,-1.2559970813e-06
+3.340035,0.31135833,-1.3155562088e-06
+3.468498,0.31007369,-1.3739256438e-06
+3.596961,0.30878907,-1.4151109650e-06
+3.725424,0.30750444,-1.4301211450e-06
+3.853887,0.30621981,-1.5054362539e-06
+3.982349,0.30493518,-1.4860312804e-06
+4.110812,0.30365055,-1.5387294966e-06
+4.239275,0.30236592,-1.5727629257e-06
+4.367738,0.30108129,-1.6069210895e-06
+4.496201,0.29979667,-1.6502354240e-06
+4.624664,0.29851204,-1.6804906141e-06
+4.753127,0.29722741,-1.7456260056e-06
+4.881590,0.29594278,-1.7716995743e-06
+5.010053,0.29465815,-1.8231416195e-06
+5.138515,0.29337352,-1.8100087774e-06
+5.266978,0.29208889,-1.8701962912e-06
+5.395441,0.29080426,-1.8951632905e-06
+5.523904,0.28951963,-1.9469017311e-06
+5.652367,0.28823501,-1.9673740688e-06
+5.780830,0.28695038,-1.9920330414e-06
+5.909293,0.28566575,-2.0252838704e-06
+6.037756,0.28438112,-2.0509920586e-06
+6.166218,0.28309649,-2.0362635344e-06
+6.294681,0.28181186,-2.0807440985e-06
+6.423144,0.28052723,-2.0834293043e-06
+6.551607,0.27924260,-2.1020065565e-06
+6.680070,0.27795798,-2.1237246372e-06
+6.808533,0.27667334,-2.1320144831e-06
+6.936996,0.27538872,-2.1188513597e-06
+7.065459,0.27410409,-2.1385183363e-06
+7.193922,0.27281946,-2.1609970581e-06
+7.322384,0.27153483,-2.1600523229e-06
+7.450847,0.27025020,-2.1564193739e-06
+7.579310,0.26896557,-2.1615846349e-06
+7.707773,0.26768094,-2.1193057792e-06
+7.836236,0.26639631,-2.1367255252e-06
+7.964699,0.26511169,-2.1016903079e-06
+8.093162,0.26382706,-2.1361688313e-06
+8.221625,0.26254243,-2.1228667350e-06
+8.350088,0.26125780,-2.0641441524e-06
+8.478550,0.25997317,-2.1150551726e-06
+8.607013,0.25868854,-2.0901980683e-06
+8.735476,0.25740391,-2.0802848661e-06
+8.863939,0.25611928,-2.0531181640e-06
+8.992402,0.25483466,-2.0286924173e-06
+9.120865,0.25355003,-2.0007470255e-06
+9.249328,0.25226540,-1.9818150213e-06
+9.377791,0.25098077,-1.9911145767e-06
+9.506253,0.24969614,-1.9623582087e-06
+9.634716,0.24841151,-1.9706506616e-06
+9.763179,0.24712688,-1.9195543441e-06
+9.891642,0.24584225,-1.9363716736e-06
+10.020105,0.24455762,-1.8649937301e-06
+10.148568,0.24327300,-1.9062231698e-06
+10.277031,0.24198837,-1.8405515392e-06
+10.405494,0.24070374,-1.8305230276e-06
+10.533957,0.23941911,-1.8316137546e-06
+10.662419,0.23813448,-1.7600334682e-06
+10.790882,0.23684985,-1.7857388488e-06
+10.919345,0.23556522,-1.7213757297e-06
+11.047808,0.23428059,-1.7430906018e-06
+11.176271,0.23299596,-1.7177325532e-06
+11.304734,0.23171134,-1.7409157656e-06
+11.433197,0.23042671,-1.6979376333e-06
+11.561660,0.22914208,-1.6655179347e-06
+11.690123,0.22785745,-1.6658246578e-06
+11.818585,0.22657282,-1.6475328716e-06
+11.947048,0.22528819,-1.6382610907e-06
+12.075511,0.22400356,-1.6052394769e-06
+12.203974,0.22271894,-1.5976664546e-06
+12.332437,0.22143430,-1.5247023547e-06
+12.460900,0.22014968,-1.5686101818e-06
+12.589363,0.21886505,-1.5384639841e-06
+12.717826,0.21758042,-1.5160202562e-06
+12.846289,0.21629579,-1.5115517649e-06
+12.974751,0.21501116,-1.4882313844e-06
+13.103214,0.21372653,-1.5027287884e-06
+13.231677,0.21244190,-1.4832826043e-06
+13.360140,0.21115727,-1.4747196255e-06
+13.488603,0.20987265,-1.4711937638e-06
+13.617066,0.20858802,-1.4159419951e-06
+13.745529,0.20730339,-1.4173973004e-06
+13.873992,0.20601876,-1.4512961684e-06
+14.002454,0.20473413,-1.3971486630e-06
+14.130917,0.20344950,-1.3603483089e-06
+14.259380,0.20216487,-1.3745915307e-06
+14.387843,0.20088024,-1.3518075898e-06
+14.516306,0.19959561,-1.3403543549e-06
+14.644769,0.19831099,-1.3324732057e-06
+14.773232,0.19702636,-1.3422190588e-06
+14.901695,0.19574173,-1.3269062668e-06
+15.030158,0.19445710,-1.3130812673e-06
+15.158620,0.19317247,-1.2789023478e-06
+15.287083,0.19188784,-1.2904707918e-06
+15.415546,0.19060321,-1.3070903907e-06
+15.544009,0.18931859,-1.2541016950e-06
+15.672472,0.18803395,-1.2654705033e-06
+15.800935,0.18674933,-1.2552607052e-06
+15.929398,0.18546470,-1.2475971399e-06
+16.057861,0.18418007,-1.2119502812e-06
+16.186324,0.18289544,-1.2279587401e-06
+16.314786,0.18161081,-1.2199275884e-06
+16.443249,0.18032618,-1.1934185511e-06
+16.571712,0.17904155,-1.2006209789e-06
+16.700175,0.17775693,-1.2129158724e-06
+16.828638,0.17647230,-1.2269871328e-06
+16.957101,0.17518766,-1.1731734231e-06
+17.085564,0.17390304,-1.1422407149e-06
+17.214027,0.17261841,-1.1941852085e-06
+17.342489,0.17133378,-1.1837811892e-06
+17.470952,0.17004915,-1.1647956412e-06
+17.599415,0.16876452,-1.1350835084e-06
+17.727878,0.16747989,-1.1322093957e-06
+17.856341,0.16619526,-1.1531116872e-06
+17.984804,0.16491064,-1.1268277540e-06
+18.113267,0.16362601,-1.0952770875e-06
+18.241730,0.16234138,-1.1246235390e-06
+18.370193,0.16105675,-1.0838989541e-06
+18.498655,0.15977212,-1.1120338544e-06
+18.627118,0.15848749,-1.0985994030e-06
+18.755581,0.15720287,-1.0725473921e-06
+18.884044,0.15591823,-1.0769594319e-06
+19.012507,0.15463360,-1.1044944223e-06
+19.140970,0.15334898,-1.0484345851e-06
+19.269433,0.15206435,-1.0524659032e-06
+19.397896,0.15077972,-1.0308270351e-06
+19.526359,0.14949509,-1.0690529146e-06
+19.654821,0.14821046,-1.0214010403e-06
+19.783284,0.14692583,-1.0370840258e-06
+19.911747,0.14564120,-9.9522359289e-07
+20.040210,0.14435657,-1.0459796974e-06
+20.168673,0.14307195,-1.0356155852e-06
+20.297136,0.14178732,-1.0218594705e-06
+20.425599,0.14050268,-1.0316785201e-06
+20.554062,0.13921806,-9.9575221144e-07
+20.682524,0.13793343,-9.9588055586e-07
+20.810987,0.13664881,-1.0354980699e-06
+20.939450,0.13536417,-1.0025036289e-06
+21.067913,0.13407954,-9.8060355988e-07
+21.196376,0.13279492,-9.8035278693e-07
+21.324839,0.13151028,-9.9802691564e-07
+21.453302,0.13022566,-9.7536289650e-07
+21.581765,0.12894103,-9.7246762702e-07
+21.710228,0.12765639,-9.7635896948e-07
+21.838690,0.12637177,-9.6320547193e-07
+21.967153,0.12508714,-9.7682110963e-07
+22.095616,0.12380252,-9.4173295019e-07
+22.224079,0.12251788,-9.6252364223e-07
+22.352542,0.12123325,-9.2953271072e-07
+22.481005,0.11994863,-9.8945812119e-07
+22.609468,0.11866399,-9.4678129748e-07
+22.737931,0.11737937,-9.3742027709e-07
+22.866394,0.11609474,-9.3094209281e-07
+22.994856,0.11481010,-9.4522020829e-07
+23.123319,0.11352548,-9.1402920691e-07
+23.251782,0.11224085,-9.2632690792e-07
+23.380245,0.11095623,-9.2488162950e-07
+23.508708,0.10967159,-9.0160015341e-07
+23.637171,0.10838696,-8.9928784832e-07
+23.765634,0.10710234,-9.0583050561e-07
+23.894097,0.10581771,-9.1149510662e-07
+24.022559,0.10453308,-9.0612108538e-07
+24.151022,0.10324845,-8.8802502441e-07
+24.279485,0.10196382,-8.9203237819e-07
+24.407948,0.10067919,-9.1034592278e-07
+24.536411,0.09939456,-8.8359714214e-07
+24.664874,0.09810994,-9.1228632988e-07
+24.793337,0.09682531,-8.8567561976e-07
+24.921800,0.09554067,-8.8117584457e-07
+25.050263,0.09425605,-8.7491143396e-07
+25.178725,0.09297142,-8.8114085066e-07
+25.307188,0.09168680,-8.8337835503e-07
+25.435651,0.09040216,-8.3812236009e-07
+25.564114,0.08911753,-8.8687293276e-07
+25.692577,0.08783291,-8.6647399199e-07
+25.821040,0.08654827,-8.4685955645e-07
+25.949503,0.08526365,-8.6902884798e-07
+26.077966,0.08397902,-8.5906140023e-07
+26.206429,0.08269438,-8.3593559188e-07
+26.334891,0.08140976,-8.4362627992e-07
+26.463354,0.08012513,-8.5471333214e-07
+26.591817,0.07884051,-8.5628204179e-07
+26.720280,0.07755587,-8.4726985750e-07
+26.848743,0.07627124,-7.9799046574e-07
+26.977206,0.07498662,-8.4732320064e-07
+27.105669,0.07370198,-8.3711871681e-07
+27.234132,0.07241736,-8.0862535457e-07
+27.362595,0.07113273,-8.4479732242e-07
+27.491057,0.06984810,-8.3298181539e-07
+27.619520,0.06856347,-8.2732673993e-07
+27.747983,0.06727884,-8.1627794036e-07
+27.876446,0.06599422,-8.2770039263e-07
+28.004909,0.06470958,-7.8305062452e-07
+28.133372,0.06342495,-8.0863728659e-07
+28.261835,0.06214033,-7.9945544703e-07
+28.390298,0.06085570,-8.0945342671e-07
+28.518760,0.05957107,-7.7606232133e-07
+28.647223,0.05828644,-8.2581774052e-07
+28.775686,0.05700181,-8.2751775252e-07
+28.904149,0.05571719,-8.0175546916e-07
+29.032612,0.05443255,-8.1091469805e-07
+29.161075,0.05314793,-7.9515300137e-07
+29.289538,0.05186330,-7.9483464706e-07
+29.418001,0.05057866,-7.9051470445e-07
+29.546464,0.04929404,-8.0594451050e-07
+29.674926,0.04800941,-7.9213374918e-07
+29.803389,0.04672479,-7.7981078036e-07
+29.931852,0.04544015,-8.0200754561e-07
+30.060315,0.04415553,-7.8259109135e-07
+30.188778,0.04287090,-7.7206434271e-07
+30.317241,0.04158626,-7.4597899241e-07
+30.445704,0.04030163,-7.5921987445e-07
+30.574167,0.03901702,-7.7660958993e-07
+30.702630,0.03773239,-7.7750870271e-07
+30.831092,0.03644775,-7.6180451035e-07
+30.959555,0.03516312,-7.5781841362e-07
+31.088018,0.03387848,-7.4241798641e-07
+31.216481,0.03259388,-7.9279427170e-07
+31.344944,0.03130924,-7.4445515317e-07
+31.473407,0.03002461,-7.5379767392e-07
+31.601870,0.02873997,-7.5944472785e-07
+31.730333,0.02745534,-7.7397276398e-07
+31.858795,0.02617073,-7.6067267305e-07
+31.987258,0.02488610,-7.5144706604e-07
+32.115721,0.02360146,-7.3555426755e-07
+32.244184,0.02231683,-7.3136297016e-07
+32.372647,0.02103220,-7.6108783715e-07
+32.501110,0.01974759,-7.2337122422e-07
+32.629573,0.01846295,-7.5082830559e-07
+32.758036,0.01717832,-7.3168317944e-07
+32.886499,0.01589369,-7.7510455115e-07
+33.014961,0.01460905,-7.4220997822e-07
+33.143424,0.01332444,-7.5167532858e-07
+33.271887,0.01203981,-7.4108004603e-07
+33.400350,0.01075518,-7.3441089931e-07
+33.528813,0.00947054,-7.2197547873e-07
+33.657276,0.00818591,-7.3243459588e-07
+33.785739,0.00690130,-7.4909961663e-07
+33.914202,0.00561666,-7.3391020569e-07
+34.042665,0.00433203,-7.5281729306e-07
+34.171127,0.00304740,-7.4887396108e-07
+34.299590,0.00176276,-6.8585148962e-07
+34.428053,0.00047815,-7.2303552337e-07
+34.556516,-0.00080648,-7.0206519928e-07
+34.684979,-0.00209111,-7.0551345271e-07
+34.813442,-0.00337575,-6.9889228473e-07
+34.941905,-0.00466038,-7.4440978141e-07
+35.070368,-0.00594499,-6.9867505179e-07
+35.198830,-0.00722962,-6.8108981161e-07
+35.327293,-0.00851426,-6.8379797901e-07
+35.455756,-0.00979889,-7.0304071710e-07
+35.584219,-0.01108352,-6.8579423598e-07
+35.712682,-0.01236813,-7.1519598589e-07
+35.841145,-0.01365277,-6.7468517470e-07
+35.969608,-0.01493740,-7.1222040087e-07
+36.098071,-0.01622204,-7.2863494949e-07
+36.226534,-0.01750667,-6.9909537974e-07
+36.354996,-0.01879128,-7.1375617213e-07
+36.483459,-0.02007591,-6.8400092361e-07
+36.611922,-0.02136055,-6.9061953472e-07
+36.740385,-0.02264518,-6.9758267037e-07
+36.868848,-0.02392981,-6.8703616872e-07
+36.997311,-0.02521442,-7.0275845965e-07
+37.125774,-0.02649906,-6.5208141728e-07
+37.254237,-0.02778369,-6.8545728176e-07
+37.382700,-0.02906832,-6.6447627902e-07
+37.511162,-0.03035296,-6.7515398275e-07
+37.639625,-0.03163757,-7.1088000390e-07
+37.768088,-0.03292220,-6.7326115333e-07
+37.896551,-0.03420683,-6.7939120338e-07
+38.025014,-0.03549147,-6.6636088639e-07
+38.153477,-0.03677610,-6.8698172262e-07
+38.281940,-0.03806071,-6.7900606987e-07
+38.410403,-0.03934534,-6.7026345898e-07
+38.538866,-0.04062998,-6.6560084681e-07
+38.667328,-0.04191461,-6.7483893733e-07
+38.795791,-0.04319925,-6.6183769837e-07
+38.924254,-0.04448386,-6.7088452562e-07
+39.052717,-0.04576849,-6.9374331743e-07
+39.181180,-0.04705312,-6.4914453613e-07
+39.309643,-0.04833776,-6.3307431152e-07
+39.438106,-0.04962239,-6.5287218933e-07
+39.566569,-0.05090700,-6.7183251957e-07
+39.695031,-0.05219163,-6.5881864671e-07
+39.823494,-0.05347627,-6.4402028515e-07
+39.951957,-0.05476090,-6.4961900939e-07
+40.080420,-0.05604553,-6.4834463960e-07
+40.208883,-0.05733014,-6.3890069668e-07
+40.337346,-0.05861478,-6.2894417826e-07
+40.465809,-0.05989941,-6.7896034717e-07
+40.594272,-0.06118405,-6.6008143542e-07
+40.722735,-0.06246868,-6.5183415375e-07
+40.851197,-0.06375329,-6.1825740018e-07
+40.979660,-0.06503792,-6.1857003915e-07
+41.108123,-0.06632256,-6.2240723631e-07
+41.236586,-0.06760719,-6.5465778098e-07
+41.365049,-0.06889182,-6.3551671573e-07
+41.493512,-0.07017643,-6.4960813019e-07
+41.621975,-0.07146107,-6.3975188084e-07
+41.750438,-0.07274570,-6.5945555586e-07
+41.878901,-0.07403033,-6.1119559977e-07
+42.007363,-0.07531497,-6.4212625249e-07
+42.135826,-0.07659958,-6.5732980138e-07
+42.264289,-0.07788421,-6.1987453979e-07
+42.392752,-0.07916884,-6.1383869253e-07
+42.521215,-0.08045348,-6.6012660663e-07
+42.649678,-0.08173811,-6.0749572110e-07
+42.778141,-0.08302272,-6.3868963028e-07
+42.906604,-0.08430735,-6.5663368334e-07
+43.035066,-0.08559199,-6.2208577366e-07
+43.163529,-0.08631944,-6.4800492798e-07
+43.291992,-0.08503480,-6.0922957391e-07
+43.420455,-0.08375017,-6.2921565678e-07
+43.548918,-0.08246554,-6.2307212053e-07
+43.677381,-0.08118093,-6.4169238822e-07
+43.805844,-0.07989629,-6.3848874120e-07
+43.934307,-0.07861166,-6.0280658776e-07
+44.062770,-0.07732703,-6.0125276807e-07
+44.191232,-0.07604239,-6.3239874864e-07
+44.319695,-0.07475778,-5.9909377439e-07
+44.448158,-0.07347315,-6.1315074642e-07
+44.576621,-0.07218852,-6.2130773579e-07
+44.705084,-0.07090388,-6.1159737794e-07
+44.833547,-0.06961925,-5.7707007356e-07
+44.962010,-0.06833464,-5.8648599127e-07
+45.090473,-0.06705001,-6.2468274265e-07
+45.218936,-0.06576537,-6.2529969826e-07
+45.347398,-0.06448074,-6.0929439787e-07
+45.475861,-0.06319610,-6.0724339398e-07
+45.604324,-0.06191150,-6.0866656307e-07
+45.732787,-0.06062686,-5.8449580058e-07
+45.861250,-0.05934223,-5.9117838336e-07
+45.989713,-0.05805759,-6.0743565993e-07
+46.118176,-0.05677296,-6.1757020609e-07
+46.246639,-0.05548835,-5.8704223396e-07
+46.375101,-0.05420372,-5.8900961344e-07
+46.503564,-0.05291908,-6.0993431509e-07
+46.632027,-0.05163445,-6.1251584265e-07
+46.760490,-0.05034982,-5.8315309742e-07
+46.888953,-0.04906521,-6.1946098000e-07
+47.017416,-0.04778057,-5.8764931306e-07
+47.145879,-0.04649594,-5.8859525150e-07
+47.274342,-0.04521131,-5.8132403912e-07
+47.402805,-0.04392667,-6.1425897035e-07
+47.531267,-0.04264206,-5.9412378738e-07
+47.659730,-0.04135743,-5.7355338649e-07
+47.788193,-0.04007280,-5.7837457420e-07
+47.916656,-0.03878816,-5.6937206588e-07
+48.045119,-0.03750353,-5.9454170888e-07
+48.173582,-0.03621892,-5.8436891006e-07
+48.302045,-0.03493428,-5.6681911501e-07
+48.430508,-0.03364965,-6.0643261825e-07
+48.558971,-0.03236502,-5.9900212846e-07
+48.687433,-0.03108038,-5.8684410227e-07
+48.815896,-0.02979577,-6.0172503541e-07
+48.944359,-0.02851114,-5.8003934162e-07
+49.072822,-0.02722651,-5.9688053514e-07
+49.201285,-0.02594187,-5.8067795535e-07
+49.329748,-0.02465724,-6.0385565294e-07
+49.458211,-0.02337263,-5.9877080771e-07
+49.586674,-0.02208800,-5.9379309998e-07
+49.715137,-0.02080336,-5.7815067336e-07
+49.843599,-0.01951873,-5.8010446638e-07
+49.972062,-0.01823409,-6.0662724053e-07
+50.100525,-0.01694949,-5.6737891724e-07
+50.228988,-0.01566485,-5.8106419182e-07
+50.357451,-0.01438022,-5.7577910924e-07
+50.485914,-0.01309558,-5.6946030266e-07
+50.614377,-0.01181095,-5.5783956830e-07
+50.742840,-0.01052634,-5.9423533672e-07
+50.871302,-0.00924171,-5.4459176769e-07
+50.999765,-0.00795707,-5.6132301617e-07
+51.128228,-0.00667244,-5.7517067651e-07
+51.256691,-0.00538781,-5.8697199547e-07
+51.385154,-0.00410320,-5.6422294817e-07
+51.513617,-0.00281856,-5.5489406401e-07
+51.642080,-0.00153393,-5.7240841395e-07
+51.770543,-0.00024930,-5.9215344996e-07
+51.899006,0.00103534,-5.9413566926e-07
+52.027468,0.00231995,-5.3195174806e-07
+52.155931,0.00360458,-5.6920546881e-07
+52.284394,0.00488921,-5.5975967091e-07
+52.412857,0.00617385,-5.6176610520e-07
+52.541320,0.00745848,-5.3127558357e-07
+52.669783,0.00874309,-5.5817055651e-07
+52.798246,0.01002773,-6.0672119265e-07
+52.926709,0.01131236,-5.7501982169e-07
+53.055172,0.01259699,-5.6173191345e-07
+53.183634,0.01388163,-5.8848781318e-07
+53.312097,0.01516624,-5.5310731926e-07
+53.440560,0.01645087,-5.3779964094e-07
+53.569023,0.01773550,-5.7163453724e-07
+53.697486,0.01902014,-5.4451857126e-07
+53.825949,0.02030477,-5.4093229746e-07
+53.954412,0.02158938,-5.3234089234e-07
+54.082875,0.02287401,-5.5529624326e-07
+54.211337,0.02415865,-5.6117822763e-07
+54.339800,0.02544328,-5.7224181688e-07
+54.468263,0.02672791,-5.2880570563e-07
+54.596726,0.02801252,-5.7863552446e-07
+54.725189,0.02929716,-5.4907890898e-07
+54.853652,0.03058179,-4.9249311040e-07
+54.982115,0.03186643,-5.2270533522e-07
+55.110578,0.03315106,-5.4036191684e-07
+55.239041,0.03443567,-5.2215480787e-07
+55.367503,0.03572030,-5.5511766404e-07
+55.495966,0.03700494,-5.3151948809e-07
+55.624429,0.03828957,-5.5959502910e-07
+55.752892,0.03957420,-5.4485111365e-07
+55.881355,0.04085881,-5.1698438298e-07
+56.009818,0.04214345,-4.9935823303e-07
+56.138281,0.04342808,-5.4714682421e-07
+56.266744,0.04471271,-5.3063426258e-07
+56.395207,0.04599734,-5.2899436189e-07
+56.523669,0.04728197,-5.6034769889e-07
+56.652132,0.04856659,-5.4963926269e-07
+56.780595,0.04985122,-5.4955919784e-07
+56.909058,0.05113586,-5.1588152345e-07
+57.037521,0.05242048,-5.1375807515e-07
+57.165984,0.05370511,-5.0071336955e-07
+57.294447,0.05498973,-5.0831406610e-07
+57.422910,0.05627437,-5.4801836299e-07
+57.551372,0.05755900,-5.5057798176e-07
+57.679835,0.05884362,-5.0276973783e-07
+57.808298,0.06012826,-5.1122733388e-07
+57.936761,0.06141288,-5.1899522911e-07
+58.065224,0.06269751,-5.1968843935e-07
+58.193687,0.06398215,-5.6127513768e-07
+58.322150,0.06526677,-5.3356252059e-07
+58.450613,0.06655140,-5.5282064998e-07
+58.579076,0.06783602,-5.4324084247e-07
+58.707538,0.06912066,-5.5055436839e-07
+58.836001,0.07040529,-5.2873471512e-07
+58.964464,0.07168991,-5.0479642647e-07
+59.092927,0.07297455,-5.2666145150e-07
+59.221390,0.07425917,-5.2821371702e-07
+59.349853,0.07554380,-5.0566866714e-07
+59.478316,0.07682844,-5.3361822006e-07
+59.606779,0.07811306,-5.4398508966e-07
+59.735242,0.07939769,-5.4384942560e-07
+59.863704,0.08068231,-5.2342130653e-07
+59.992167,0.08196695,-5.1819016872e-07
+60.120630,0.08325158,-5.2137336085e-07
+60.249093,0.08453620,-5.0618234560e-07
+60.377556,0.08582083,-5.0086307127e-07
+60.506019,0.08710546,-5.0996228912e-07
+60.634482,0.08839009,-5.3424124194e-07
+60.762945,0.08967472,-5.1302982087e-07
+60.891407,0.09095935,-5.1994061607e-07
+61.019870,0.09224398,-5.3190692779e-07
+61.148333,0.09352860,-5.3600256848e-07
+61.276796,0.09481323,-4.8735582444e-07
+61.405259,0.09609787,-4.9643343430e-07
+61.533722,0.09738249,-4.9176435477e-07
+61.662185,0.09866712,-5.4217728841e-07
+61.790648,0.09995174,-4.7998785241e-07
+61.919111,0.10123638,-5.0034337667e-07
+62.047573,0.10252101,-5.0547464648e-07
+62.176036,0.10380563,-5.0572963074e-07
+62.304499,0.10509027,-5.3268431391e-07
+62.432962,0.10637489,-5.1264198010e-07
+62.561425,0.10765952,-5.1062221003e-07
+62.689888,0.10894416,-5.3367712814e-07
+62.818351,0.11022878,-5.0783984352e-07
+62.946814,0.11151341,-4.9138087570e-07
+63.075277,0.11279803,-5.1882261590e-07
+63.203739,0.11408267,-4.8327928500e-07
+63.332202,0.11536730,-5.0938759693e-07
+63.460665,0.11665192,-4.9398165492e-07
+63.589128,0.11793656,-5.2805504121e-07
+63.717591,0.11922118,-4.9435610978e-07
+63.846054,0.12050581,-5.0041306367e-07
+63.974517,0.12179044,-4.9948522381e-07
+64.102980,0.12307507,-4.8023997899e-07
+64.231443,0.12435970,-4.6482441115e-07
+64.359905,0.12564432,-5.2777885005e-07
+64.488368,0.12692896,-4.8856256273e-07
+64.616831,0.12821359,-5.2514989522e-07
+64.745294,0.12949821,-5.1380550242e-07
+64.873757,0.13078284,-5.0552673627e-07
+65.002220,0.13206747,-5.4519523710e-07
+65.130683,0.13335210,-4.6679003593e-07
+65.259146,0.13463673,-4.9488903990e-07
+65.387608,0.13592135,-4.9366550653e-07
+65.516071,0.13720599,-4.8524425803e-07
+65.644534,0.13849061,-4.7701632829e-07
+65.772997,0.13977524,-4.7390237196e-07
+65.901460,0.14105988,-4.8783190200e-07
+66.029923,0.14234450,-4.8320373225e-07
+66.158386,0.14362913,-4.9936129123e-07
+66.286849,0.14491375,-5.1042944273e-07
+66.415312,0.14619839,-5.2154928294e-07
+66.543774,0.14748302,-4.8817582492e-07
+66.672237,0.14876764,-4.8838894683e-07
+66.800700,0.15005227,-4.8317164615e-07
+66.929163,0.15133690,-4.9052432715e-07
+67.057626,0.15262153,-4.6102802351e-07
+67.186089,0.15390616,-4.9408708785e-07
+67.314552,0.15519079,-5.0961485678e-07
+67.443015,0.15647542,-5.0224643354e-07
+67.571478,0.15776005,-5.0264445163e-07
+67.699940,0.15904468,-4.7063680878e-07
+67.828403,0.16032930,-4.4980590885e-07
+67.956866,0.16161393,-4.8474697356e-07
+68.085329,0.16289856,-4.7420418187e-07
+68.213792,0.16418319,-4.6928783881e-07
+68.342255,0.16546782,-4.8272409514e-07
+68.470718,0.16675245,-4.8316382516e-07
+68.599181,0.16803708,-4.8270960626e-07
+68.727643,0.16932170,-4.9921770592e-07
+68.856106,0.17060634,-4.8188363977e-07
+68.984569,0.17189097,-4.6049333868e-07
+69.113032,0.17317559,-4.5222620373e-07
+69.241495,0.17446022,-4.6959060128e-07
+69.369958,0.17574485,-4.8438164319e-07
+69.498421,0.17702948,-4.6124585807e-07
+69.626884,0.17831411,-5.1464846452e-07
+69.755347,0.17959874,-4.8074232705e-07
+69.883809,0.18088336,-4.5436373983e-07
+70.012272,0.18216799,-4.4524321481e-07
+70.140735,0.18345263,-4.7059960896e-07
+70.269198,0.18473725,-4.9084503778e-07
+70.397661,0.18602188,-4.6464327507e-07
+70.526124,0.18730651,-4.8955106539e-07
+70.654587,0.18859114,-4.9293820481e-07
+70.783050,0.18987577,-4.4474026514e-07
+70.911513,0.19116040,-4.5215661700e-07
+71.039975,0.19244503,-4.6430125727e-07
+71.168438,0.19372965,-4.5620583311e-07
+71.296901,0.19501428,-4.8496375529e-07
+71.425364,0.19629891,-4.7086482066e-07
+71.553827,0.19758354,-4.4341987185e-07
+71.682290,0.19886817,-4.7814711276e-07
+71.810753,0.20015280,-4.5346051602e-07
+71.939216,0.20143743,-4.8717388620e-07
+72.067678,0.20272206,-4.4333409166e-07
+72.196141,0.20400669,-4.4356771860e-07
+72.324604,0.20529131,-4.4126132938e-07
+72.453067,0.20657594,-4.1971215194e-07
+72.581530,0.20786057,-4.4480087779e-07
+72.709993,0.20914520,-4.2380678994e-07
+72.838456,0.21042983,-4.4422543358e-07
+72.966919,0.21171446,-4.2614541567e-07
+73.095382,0.21299909,-4.1904711731e-07
+73.223844,0.21428372,-4.4580331785e-07
+73.352307,0.21556834,-4.4709112369e-07
+73.480770,0.21685297,-4.4196105711e-07
+73.609233,0.21813760,-3.9983170254e-07
+73.737696,0.21942223,-4.3239774385e-07
+73.866159,0.22070686,-4.2690851345e-07
+73.994622,0.22199149,-4.1961850062e-07
+74.123085,0.22327612,-4.6158541929e-07
+74.251548,0.22456075,-4.2623470528e-07
+74.380010,0.22584538,-4.4685880025e-07
+74.508473,0.22713000,-4.2056935224e-07
+74.636936,0.22841463,-4.3441540828e-07
+74.765399,0.22969926,-4.1932769524e-07
+74.893862,0.23098389,-4.5201919823e-07
+75.022325,0.23226852,-4.4095325265e-07
+75.150788,0.23355315,-4.3536049443e-07
+75.279251,0.23483778,-4.0516606737e-07
+75.407714,0.23612241,-4.1830364720e-07
+75.536176,0.23740704,-4.1593458981e-07
+75.664639,0.23869166,-4.0224643250e-07
+75.793102,0.23997629,-4.1196238034e-07
+75.921565,0.24126092,-3.7802731524e-07
+76.050028,0.24254555,-4.0519366643e-07
+76.178491,0.24383018,-3.8457110056e-07
+76.306954,0.24511481,-3.8403080066e-07
+76.435417,0.24639944,-3.8664677064e-07
+76.563879,0.24768407,-4.2586726926e-07
+76.692342,0.24896870,-3.6158341286e-07
+76.820805,0.25025332,-3.7652227646e-07
+76.949268,0.25153795,-3.8864377964e-07
+77.077731,0.25282258,-3.5255200197e-07
+77.206194,0.25410721,-3.8802083295e-07
+77.334657,0.25539184,-3.6257151444e-07
+77.463120,0.25667647,-3.8342517546e-07
+77.591583,0.25796110,-3.4641498322e-07
+77.720045,0.25924573,-3.7354177826e-07
+77.848508,0.26053035,-3.1148000985e-07
+77.976971,0.26181498,-3.5100387255e-07
+78.105434,0.26309961,-3.4831859157e-07
+78.233897,0.26438424,-3.1996289878e-07
+78.362360,0.26566887,-3.6811408799e-07
+78.490823,0.26695350,-3.1279115332e-07
+78.619286,0.26823813,-3.4528758283e-07
+78.747749,0.26952276,-3.3145839706e-07
+78.876211,0.27080739,-3.4895301907e-07
+79.004674,0.27209201,-3.3101300184e-07
+79.133137,0.27337664,-3.0641699821e-07
+79.261600,0.27466127,-2.8128420409e-07
+79.390063,0.27594590,-3.0409436540e-07
+79.518526,0.27723053,-3.0742101751e-07
+79.646989,0.27851516,-2.8218702683e-07
+79.775452,0.27979979,-2.6828958289e-07
+79.903914,0.28108442,-2.9491736382e-07
+80.032377,0.28236904,-2.9516605619e-07
+80.160840,0.28365368,-2.4361617154e-07
+80.289303,0.28493830,-2.3690390911e-07
+80.417766,0.28622293,-2.8107065604e-07
+80.546229,0.28750756,-2.8259514702e-07
+80.674692,0.28879219,-2.4818841620e-07
+80.803155,0.29007682,-2.2352854117e-07
+80.931618,0.29136145,-2.2105517888e-07
+81.060080,0.29264608,-2.2154321352e-07
+81.188543,0.29393071,-2.2925831708e-07
+81.317006,0.29521533,-2.2791681716e-07
+81.445469,0.29649996,-2.1186398922e-07
+81.573932,0.29778459,-2.4501337094e-07
+81.702395,0.29906922,-1.9515810882e-07
+81.830858,0.30035385,-2.0235195107e-07
+81.959321,0.30163848,-2.2240888657e-07
+82.087784,0.30292311,-2.1402804649e-07
+82.216246,0.30420773,-1.9130216134e-07
+82.344709,0.30549237,-1.9745450873e-07
+82.473172,0.30677699,-1.7184821899e-07
+82.601635,0.30806162,-1.6823491014e-07
+82.730098,0.30934625,-1.7084838593e-07
+82.858561,0.31063088,-1.5932291972e-07
+82.987024,0.31191551,-1.9950321897e-07
+83.115487,0.31320014,-1.5767296705e-07
+83.243949,0.31448477,-1.3197577086e-07
+83.372412,0.31576939,-1.7007706608e-07
+83.500875,0.31705402,-1.6053782994e-07
+83.629338,0.31833866,-1.4691120024e-07
+83.757801,0.31962328,-1.3302419682e-07
+83.886264,0.32090791,-1.2674691417e-07
+84.014727,0.32219254,-1.4584314660e-07
+84.143190,0.32347717,-1.1226701972e-07
+84.271653,0.32476180,-1.2470630066e-07
+84.400115,0.32604643,-1.2305894246e-07
+84.528578,0.32733105,-1.0857409722e-07
+84.657041,0.32861568,-1.4323874517e-07
+84.785504,0.32990031,-9.8065747957e-08
+84.913967,0.33118494,-1.0869262780e-07
+85.042430,0.33246957,-1.0549645083e-07
+85.170893,0.33375420,-5.4266531052e-08
+85.299356,0.33503883,-1.0180246297e-07
+85.427819,0.33632345,-6.1259415280e-08
+85.556281,0.33760809,-9.4787726352e-08
+85.684744,0.33889272,-6.7191534183e-08
+85.813207,0.34017734,-4.2309415884e-08
+85.941670,0.34146197,-7.8478284796e-08
+86.070133,0.34274660,-8.7756294933e-08
+86.198596,0.34403123,-7.3807500698e-08
diff --git a/demo_data/ec_EC_127mVs.csv b/demo_data/ec_EC_127mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..22a77017f2d017e0b5c51831ca96ec69a601c531
--- /dev/null
+++ b/demo_data/ec_EC_127mVs.csv
@@ -0,0 +1,673 @@
+Time (s),E (V),I (A)
+0.000000,0.34475868,-5.4121337035e-06
+0.010094,0.34347405,-4.6253538355e-06
+0.020188,0.34218941,-4.0456122267e-06
+0.030282,0.34090479,-3.7048511687e-06
+0.040376,0.33962016,-4.6227551127e-06
+0.050470,0.33833553,-4.7689217335e-06
+0.060564,0.33705090,-4.6112123479e-06
+0.070658,0.33576627,-4.7347380660e-06
+0.080752,0.33448164,-4.5817346401e-06
+0.090846,0.33319702,-5.2507828867e-06
+0.100940,0.33191239,-5.6724799407e-06
+0.111034,0.33062776,-4.7882578050e-06
+0.121128,0.32934313,-5.3256633042e-06
+0.131222,0.32805850,-5.8254636929e-06
+0.141316,0.32677387,-6.2638798527e-06
+0.151410,0.32548924,-5.8344771295e-06
+0.161504,0.32420462,-6.3069059741e-06
+0.171598,0.32291998,-6.6631266605e-06
+0.181692,0.32163535,-7.4210129520e-06
+0.191786,0.32035073,-8.1665398396e-06
+0.201880,0.31906610,-8.2759852376e-06
+0.211974,0.31778147,-8.5777067902e-06
+0.222068,0.31649684,-8.0783213387e-06
+0.232162,0.31521221,-8.7097283466e-06
+0.242256,0.31392758,-8.6276866860e-06
+0.252350,0.31264296,-8.5743021593e-06
+0.262444,0.31135833,-1.0083088775e-05
+0.272538,0.31007369,-1.0063558112e-05
+0.282632,0.30878907,-1.0611355283e-05
+0.292726,0.30750444,-1.0526952773e-05
+0.302820,0.30621981,-1.1250626065e-05
+0.312914,0.30493518,-1.1296310646e-05
+0.323008,0.30365055,-1.2227597029e-05
+0.333102,0.30236592,-1.2825063608e-05
+0.343196,0.30108129,-1.2671117631e-05
+0.353290,0.29979667,-1.2880022750e-05
+0.363384,0.29851204,-1.3621860274e-05
+0.373478,0.29722741,-1.3529395106e-05
+0.383572,0.29594278,-1.4011408999e-05
+0.393666,0.29465815,-1.5049568884e-05
+0.403760,0.29337352,-1.4935099170e-05
+0.413854,0.29208889,-1.6156476703e-05
+0.423948,0.29080426,-1.6760702465e-05
+0.434042,0.28951963,-1.6820715255e-05
+0.444136,0.28823501,-1.6970712175e-05
+0.454230,0.28695038,-1.7322591760e-05
+0.464324,0.28566575,-1.7842599589e-05
+0.474418,0.28438112,-1.8379675642e-05
+0.484512,0.28309649,-1.8391110738e-05
+0.494606,0.28181186,-1.9040235562e-05
+0.504700,0.28052723,-1.8839172756e-05
+0.514794,0.27924260,-1.9195496461e-05
+0.524888,0.27795798,-2.1264344502e-05
+0.534982,0.27667334,-2.0481099111e-05
+0.545076,0.27538872,-2.0671520926e-05
+0.555170,0.27410409,-2.0849497488e-05
+0.565264,0.27281946,-2.2039039325e-05
+0.575358,0.27153483,-2.1230140803e-05
+0.585452,0.27025020,-2.2285672247e-05
+0.595546,0.26896557,-2.2150435643e-05
+0.605640,0.26768094,-2.2505829317e-05
+0.615734,0.26639631,-2.2822420643e-05
+0.625828,0.26511169,-2.3230059197e-05
+0.635922,0.26382706,-2.3876133518e-05
+0.646016,0.26254243,-2.3648982611e-05
+0.656109,0.26125780,-2.3822619502e-05
+0.666204,0.25997317,-2.4792967210e-05
+0.676298,0.25868854,-2.3788358571e-05
+0.686392,0.25740391,-2.4467307361e-05
+0.696486,0.25611928,-2.4856572784e-05
+0.706579,0.25483466,-2.4757173873e-05
+0.716673,0.25355003,-2.4829281366e-05
+0.726767,0.25226540,-2.4745292362e-05
+0.736861,0.25098077,-2.4763623999e-05
+0.746955,0.24969614,-2.4745177897e-05
+0.757049,0.24841151,-2.5254145535e-05
+0.767143,0.24712688,-2.5303826390e-05
+0.777237,0.24584225,-2.5274909562e-05
+0.787331,0.24455762,-2.4682579619e-05
+0.797425,0.24327300,-2.5119316714e-05
+0.807519,0.24198837,-2.5142269893e-05
+0.817613,0.24070374,-2.4753030225e-05
+0.827707,0.23941911,-2.4256679538e-05
+0.837801,0.23813448,-2.4800971205e-05
+0.847895,0.23684985,-2.4454455756e-05
+0.857989,0.23556522,-2.3938082205e-05
+0.868083,0.23428059,-2.4521103248e-05
+0.878177,0.23299596,-2.4711410597e-05
+0.888271,0.23171134,-2.3987436833e-05
+0.898365,0.23042671,-2.3690188732e-05
+0.908459,0.22914208,-2.3920249923e-05
+0.918553,0.22785745,-2.3801752456e-05
+0.928647,0.22657282,-2.3582545449e-05
+0.938741,0.22528819,-2.3558979880e-05
+0.948835,0.22400356,-2.3485148252e-05
+0.958929,0.22271894,-2.2963473521e-05
+0.969023,0.22143430,-2.2973187343e-05
+0.979117,0.22014968,-2.2273574683e-05
+0.989211,0.21886505,-2.2538471994e-05
+0.999305,0.21758042,-2.2206950084e-05
+1.009399,0.21629579,-2.2671163173e-05
+1.019493,0.21501116,-2.1299327996e-05
+1.029587,0.21372653,-2.1924865790e-05
+1.039681,0.21244190,-2.1214726603e-05
+1.049775,0.21115727,-2.1801948527e-05
+1.059869,0.20987265,-2.1207486665e-05
+1.069963,0.20858802,-2.0902683846e-05
+1.080057,0.20730339,-2.0349193451e-05
+1.090151,0.20601876,-2.0587433196e-05
+1.100245,0.20473413,-1.9992386130e-05
+1.110339,0.20344950,-1.9697900938e-05
+1.120433,0.20216487,-1.9686797792e-05
+1.130527,0.20088024,-1.9869364417e-05
+1.140621,0.19959561,-1.9813910212e-05
+1.150715,0.19831099,-1.9790510619e-05
+1.160809,0.19702636,-1.9609177358e-05
+1.170903,0.19574173,-1.9219910505e-05
+1.180997,0.19445710,-1.8941107076e-05
+1.191091,0.19317247,-1.9165693957e-05
+1.201185,0.19188784,-1.8431509878e-05
+1.211279,0.19060321,-1.8150983744e-05
+1.221373,0.18931859,-1.8068950669e-05
+1.231467,0.18803395,-1.8233865295e-05
+1.241561,0.18674933,-1.8347366346e-05
+1.251655,0.18546470,-1.8207970355e-05
+1.261749,0.18418007,-1.7674384066e-05
+1.271843,0.18289544,-1.6737992525e-05
+1.281937,0.18161081,-1.7193935488e-05
+1.292031,0.18032618,-1.8139245315e-05
+1.302125,0.17904155,-1.7387392067e-05
+1.312219,0.17775693,-1.7361299674e-05
+1.322313,0.17647230,-1.7295307496e-05
+1.332407,0.17518766,-1.6681777126e-05
+1.342501,0.17390304,-1.6345340357e-05
+1.352595,0.17261841,-1.7081065427e-05
+1.362689,0.17133378,-1.6532950615e-05
+1.372783,0.17004915,-1.6266462234e-05
+1.382877,0.16876452,-1.6819706529e-05
+1.392971,0.16747989,-1.5971992782e-05
+1.403065,0.16619526,-1.5862619640e-05
+1.413159,0.16491064,-1.5575132578e-05
+1.423253,0.16362601,-1.6007282471e-05
+1.433347,0.16234138,-1.6063567981e-05
+1.443441,0.16105675,-1.6000929640e-05
+1.453535,0.15977212,-1.5753967630e-05
+1.463629,0.15848749,-1.5556335925e-05
+1.473723,0.15720287,-1.5720058680e-05
+1.483817,0.15591823,-1.4595762133e-05
+1.493911,0.15463360,-1.4930021197e-05
+1.504005,0.15334898,-1.4612697292e-05
+1.514099,0.15206435,-1.5582532767e-05
+1.524193,0.15077972,-1.4544470177e-05
+1.534287,0.14949509,-1.4866315467e-05
+1.544381,0.14821046,-1.4462108014e-05
+1.554475,0.14692583,-1.5057591480e-05
+1.564569,0.14564120,-1.5150772057e-05
+1.574663,0.14435657,-1.4486119998e-05
+1.584757,0.14307195,-1.5066111999e-05
+1.594851,0.14178732,-1.3503161062e-05
+1.604945,0.14050268,-1.4521309530e-05
+1.615039,0.13921806,-1.4149442851e-05
+1.625133,0.13793343,-1.3846125221e-05
+1.635227,0.13664881,-1.3802666993e-05
+1.645321,0.13536417,-1.3671146223e-05
+1.655415,0.13407954,-1.3624510148e-05
+1.665509,0.13279492,-1.3722194940e-05
+1.675603,0.13151028,-1.3229547209e-05
+1.685697,0.13022566,-1.3381987966e-05
+1.695791,0.12894103,-1.3481329644e-05
+1.705885,0.12765639,-1.2886301178e-05
+1.715979,0.12637177,-1.3437025802e-05
+1.726073,0.12508714,-1.3376037195e-05
+1.736167,0.12380252,-1.3253356017e-05
+1.746261,0.12251788,-1.3047879137e-05
+1.756355,0.12123325,-1.3122821080e-05
+1.766449,0.11994863,-1.3330611592e-05
+1.776543,0.11866399,-1.2768796699e-05
+1.786637,0.11737937,-1.2074830046e-05
+1.796731,0.11609474,-1.3256306363e-05
+1.806825,0.11481010,-1.2236272077e-05
+1.816919,0.11352548,-1.3436728192e-05
+1.827013,0.11224085,-1.2531059171e-05
+1.837107,0.11095623,-1.2910291700e-05
+1.847201,0.10967159,-1.2473093881e-05
+1.857295,0.10838696,-1.2470661491e-05
+1.867389,0.10710234,-1.2312507479e-05
+1.877483,0.10581771,-1.2702080528e-05
+1.887577,0.10453308,-1.2484381603e-05
+1.897671,0.10324845,-1.1988845051e-05
+1.907765,0.10196382,-1.2295545134e-05
+1.917859,0.10067919,-1.2242735081e-05
+1.927953,0.09939456,-1.1695694812e-05
+1.938047,0.09810994,-1.2179840624e-05
+1.948141,0.09682531,-1.1739474259e-05
+1.958235,0.09554067,-1.1447964453e-05
+1.968329,0.09425605,-1.2900639403e-05
+1.978423,0.09297142,-1.2206396602e-05
+1.988517,0.09168680,-1.2047044995e-05
+1.998611,0.09040216,-1.0815542996e-05
+2.008705,0.08911753,-1.1374521292e-05
+2.018799,0.08783291,-1.1959554065e-05
+2.028893,0.08654827,-1.1796877238e-05
+2.038987,0.08526365,-1.0751707060e-05
+2.049081,0.08397902,-1.1257504006e-05
+2.059174,0.08269438,-1.1676115502e-05
+2.069269,0.08140976,-1.1379846796e-05
+2.079363,0.08012513,-1.1314716686e-05
+2.089457,0.07884051,-1.1550974033e-05
+2.099551,0.07755587,-1.0863423882e-05
+2.109645,0.07627124,-1.1065471806e-05
+2.119739,0.07498662,-1.1415337515e-05
+2.129833,0.07370198,-1.0782435303e-05
+2.139927,0.07241736,-1.1680277035e-05
+2.150021,0.07113273,-1.1381549469e-05
+2.160115,0.06984810,-1.1114970947e-05
+2.170208,0.06856347,-1.0880847665e-05
+2.180302,0.06727884,-1.1279598695e-05
+2.190396,0.06599422,-1.0972537330e-05
+2.200490,0.06470958,-1.1353261486e-05
+2.210584,0.06342495,-1.1108040066e-05
+2.220678,0.06214033,-1.0107281042e-05
+2.230772,0.06085570,-1.1266757105e-05
+2.240866,0.05957107,-1.0624213327e-05
+2.250960,0.05828644,-1.1175704870e-05
+2.261054,0.05700181,-1.0779087905e-05
+2.271148,0.05571719,-1.0440946317e-05
+2.281242,0.05443255,-1.0006670228e-05
+2.291336,0.05314793,-1.1035156355e-05
+2.301430,0.05186330,-1.0091996331e-05
+2.311524,0.05057866,-1.0144782776e-05
+2.321618,0.04929404,-1.0793404668e-05
+2.331712,0.04800941,-1.0087579396e-05
+2.341806,0.04672479,-1.0981157292e-05
+2.351900,0.04544015,-1.0485391094e-05
+2.361994,0.04415553,-1.0141363121e-05
+2.372088,0.04287090,-1.0602213788e-05
+2.382182,0.04158626,-1.0998764935e-05
+2.392276,0.04030163,-1.0394498394e-05
+2.402370,0.03901702,-1.0657536358e-05
+2.412464,0.03773239,-1.0679942249e-05
+2.422558,0.03644775,-1.0333294449e-05
+2.432652,0.03516312,-1.0618111605e-05
+2.442746,0.03387848,-1.0693768956e-05
+2.452840,0.03259388,-9.6904552067e-06
+2.462934,0.03130924,-1.0514857355e-05
+2.473028,0.03002461,-9.9452080195e-06
+2.483122,0.02873997,-1.0687869694e-05
+2.493216,0.02745534,-1.0994728598e-05
+2.503310,0.02617073,-1.0144186840e-05
+2.513404,0.02488610,-9.7265683320e-06
+2.523498,0.02360146,-9.1855482293e-06
+2.533592,0.02231683,-9.8878143414e-06
+2.543686,0.02103220,-9.7395022093e-06
+2.553780,0.01974759,-9.7115361604e-06
+2.563874,0.01846295,-9.2918379587e-06
+2.573968,0.01717832,-1.0646609202e-05
+2.584062,0.01589369,-1.0020649318e-05
+2.594156,0.01460905,-9.5570343105e-06
+2.604250,0.01332444,-9.6595760128e-06
+2.614344,0.01203981,-1.0188884157e-05
+2.624438,0.01075518,-1.0130930313e-05
+2.634532,0.00947054,-9.6712479088e-06
+2.644626,0.00818591,-9.6311714183e-06
+2.654720,0.00690130,-9.7987094489e-06
+2.664814,0.00561666,-9.6209403558e-06
+2.674908,0.00433203,-9.4134016679e-06
+2.685002,0.00304740,-9.3256767992e-06
+2.695096,0.00176276,-9.7675083210e-06
+2.705190,0.00047815,-9.6884034140e-06
+2.715284,-0.00080648,-9.5393157786e-06
+2.725378,-0.00209111,-9.3822921124e-06
+2.735472,-0.00337575,-9.3760315692e-06
+2.745566,-0.00466038,-9.0870958043e-06
+2.755660,-0.00594499,-9.6756097568e-06
+2.765754,-0.00722962,-9.8077057157e-06
+2.775848,-0.00851426,-9.6353787379e-06
+2.785942,-0.00979889,-9.6039987579e-06
+2.796036,-0.01108352,-9.7494456774e-06
+2.806130,-0.01236813,-9.3317363125e-06
+2.816224,-0.01365277,-9.1870484418e-06
+2.826318,-0.01493740,-9.6505919080e-06
+2.836412,-0.01622204,-9.6308466226e-06
+2.846506,-0.01750667,-9.1946682618e-06
+2.856600,-0.01879128,-8.9116095809e-06
+2.866694,-0.02007591,-9.0735237822e-06
+2.876788,-0.02136055,-9.3748182358e-06
+2.886882,-0.02264518,-9.2666662970e-06
+2.896976,-0.02392981,-9.3756874576e-06
+2.907070,-0.02521442,-9.3186049823e-06
+2.917164,-0.02649906,-9.0046299063e-06
+2.927258,-0.02778369,-8.8624459667e-06
+2.937352,-0.02906832,-8.7050266794e-06
+2.947446,-0.03035296,-8.8737959287e-06
+2.957540,-0.03163757,-9.5572997272e-06
+2.967634,-0.03292220,-8.5821723725e-06
+2.977728,-0.03420683,-8.8129990505e-06
+2.987822,-0.03549147,-9.0242700265e-06
+2.997916,-0.03677610,-8.7527487447e-06
+3.008010,-0.03806071,-9.1800689126e-06
+3.018104,-0.03934534,-9.1159496756e-06
+3.028198,-0.04062998,-8.2470605408e-06
+3.038292,-0.04191461,-8.4782585160e-06
+3.048386,-0.04319925,-9.7056647996e-06
+3.058480,-0.04448386,-9.8767834517e-06
+3.068574,-0.04576849,-8.6917701527e-06
+3.078668,-0.04705312,-9.1062365691e-06
+3.088762,-0.04833776,-9.2409029921e-06
+3.098856,-0.04962239,-8.6541954470e-06
+3.108950,-0.05090700,-9.0992405856e-06
+3.119044,-0.05219163,-9.0056157397e-06
+3.129138,-0.05347627,-8.4924536592e-06
+3.139232,-0.05476090,-8.5384744822e-06
+3.149326,-0.05604553,-8.9989145046e-06
+3.159420,-0.05733014,-8.6311514113e-06
+3.169514,-0.05861478,-8.2138233593e-06
+3.179608,-0.05989941,-9.2881857964e-06
+3.189702,-0.06118405,-8.5340282159e-06
+3.199796,-0.06246868,-8.5333399926e-06
+3.209890,-0.06375329,-8.9888465554e-06
+3.219984,-0.06503792,-9.0564133479e-06
+3.230078,-0.06632256,-8.4961880936e-06
+3.240172,-0.06760719,-8.7558042561e-06
+3.250266,-0.06889182,-8.4487958318e-06
+3.260360,-0.07017643,-8.6593406677e-06
+3.270454,-0.07146107,-8.7084899738e-06
+3.280548,-0.07274570,-8.5427132799e-06
+3.290642,-0.07403033,-8.0387384803e-06
+3.300736,-0.07531497,-8.5824892987e-06
+3.310830,-0.07659958,-8.1393285471e-06
+3.320924,-0.07788421,-8.7765146280e-06
+3.331018,-0.07916884,-8.2022008265e-06
+3.341112,-0.08045348,-8.3578430381e-06
+3.351206,-0.08173811,-8.5358832712e-06
+3.361300,-0.08302272,-8.7863980018e-06
+3.371394,-0.08430735,-8.1037047615e-06
+3.381488,-0.08559199,-8.4672648276e-06
+3.391582,-0.08631944,-7.5770078602e-06
+3.401676,-0.08503480,-8.6351734401e-06
+3.411770,-0.08375017,-8.6682732631e-06
+3.421864,-0.08246554,-8.4392072064e-06
+3.431958,-0.08118093,-7.9875667133e-06
+3.442052,-0.07989629,-7.8117249317e-06
+3.452146,-0.07861166,-8.0413568768e-06
+3.462240,-0.07732703,-8.2909644689e-06
+3.472333,-0.07604239,-8.2079291054e-06
+3.482427,-0.07475778,-8.8514458396e-06
+3.492521,-0.07347315,-8.7294564621e-06
+3.502615,-0.07218852,-8.0210778965e-06
+3.512709,-0.07090388,-7.7209080657e-06
+3.522803,-0.06961925,-8.3713628353e-06
+3.532897,-0.06833464,-8.1790831036e-06
+3.542991,-0.06705001,-8.3315624926e-06
+3.553085,-0.06576537,-7.9374380125e-06
+3.563179,-0.06448074,-8.4883808364e-06
+3.573273,-0.06319610,-7.7446446173e-06
+3.583367,-0.06191150,-8.0969935107e-06
+3.593461,-0.06062686,-8.5903452037e-06
+3.603555,-0.05934223,-8.0129558594e-06
+3.613649,-0.05805759,-7.4414242830e-06
+3.623743,-0.05677296,-7.9374909527e-06
+3.633837,-0.05548835,-6.9399870388e-06
+3.643931,-0.05420372,-7.8881112850e-06
+3.654025,-0.05291908,-7.8203277236e-06
+3.664119,-0.05163445,-7.6819003961e-06
+3.674213,-0.05034982,-8.0326052799e-06
+3.684307,-0.04906521,-7.3422621724e-06
+3.694401,-0.04778057,-7.5364205677e-06
+3.704495,-0.04649594,-8.0085739799e-06
+3.714589,-0.04521131,-7.0609469429e-06
+3.724683,-0.04392667,-8.1095303361e-06
+3.734777,-0.04264206,-7.1630837237e-06
+3.744871,-0.04135743,-8.2064017075e-06
+3.754965,-0.04007280,-7.7550552474e-06
+3.765059,-0.03878816,-7.8138031945e-06
+3.775153,-0.03750353,-7.3317642623e-06
+3.785247,-0.03621892,-6.9867926653e-06
+3.795341,-0.03493428,-7.7239213680e-06
+3.805435,-0.03364965,-7.6204825430e-06
+3.815529,-0.03236502,-7.9710436296e-06
+3.825623,-0.03108038,-7.4742307884e-06
+3.835717,-0.02979577,-7.7787789216e-06
+3.845811,-0.02851114,-7.5477297514e-06
+3.855905,-0.02722651,-7.4945433930e-06
+3.865999,-0.02594187,-7.2304530634e-06
+3.876093,-0.02465724,-7.6545617608e-06
+3.886187,-0.02337263,-7.3575118282e-06
+3.896281,-0.02208800,-7.6666435861e-06
+3.906375,-0.02080336,-7.6194859784e-06
+3.916469,-0.01951873,-7.5707187007e-06
+3.926563,-0.01823409,-7.7717600450e-06
+3.936657,-0.01694949,-6.7077617364e-06
+3.946751,-0.01566485,-8.2515103841e-06
+3.956845,-0.01438022,-7.4889045401e-06
+3.966939,-0.01309558,-7.1668367587e-06
+3.977033,-0.01181095,-7.5050563266e-06
+3.987127,-0.01052634,-7.6204288873e-06
+3.997221,-0.00924171,-7.9228529714e-06
+4.007315,-0.00795707,-7.0753431160e-06
+4.017409,-0.00667244,-7.6543707466e-06
+4.027503,-0.00538781,-7.3838302904e-06
+4.037597,-0.00410320,-7.5665843527e-06
+4.047691,-0.00281856,-7.1189658884e-06
+4.057785,-0.00153393,-7.2988626075e-06
+4.067879,-0.00024930,-7.6443321291e-06
+4.077973,0.00103534,-7.4486348892e-06
+4.088067,0.00231995,-7.2171264266e-06
+4.098161,0.00360458,-7.0010364563e-06
+4.108255,0.00488921,-7.2443978134e-06
+4.118349,0.00617385,-7.1072954232e-06
+4.128443,0.00745848,-7.6975642737e-06
+4.138537,0.00874309,-7.4200042255e-06
+4.148631,0.01002773,-6.7517515136e-06
+4.158725,0.01131236,-6.8496351886e-06
+4.168819,0.01259699,-7.5759740944e-06
+4.178913,0.01388163,-7.7103514922e-06
+4.189007,0.01516624,-7.5922661010e-06
+4.199101,0.01645087,-7.1413496017e-06
+4.209195,0.01773550,-6.7091210133e-06
+4.219289,0.01902014,-7.5737920973e-06
+4.229383,0.02030477,-7.4004521006e-06
+4.239477,0.02158938,-7.4931884086e-06
+4.249571,0.02287401,-7.7767035204e-06
+4.259665,0.02415865,-6.9639310589e-06
+4.269759,0.02544328,-7.4295427722e-06
+4.279853,0.02672791,-7.3887909357e-06
+4.289947,0.02801252,-7.6007773205e-06
+4.300041,0.02929716,-6.9767726484e-06
+4.310135,0.03058179,-7.4132672200e-06
+4.320229,0.03186643,-7.5453009383e-06
+4.330323,0.03315106,-7.7251354169e-06
+4.340417,0.03443567,-7.1667215779e-06
+4.350511,0.03572030,-7.0768461900e-06
+4.360605,0.03700494,-7.5324493330e-06
+4.370699,0.03828957,-5.9995258949e-06
+4.380793,0.03957420,-7.0138866308e-06
+4.390887,0.04085881,-7.1031489132e-06
+4.400981,0.04214345,-6.5555956966e-06
+4.411075,0.04342808,-7.1154467920e-06
+4.421169,0.04471271,-7.1105827270e-06
+4.431263,0.04599734,-6.7255696945e-06
+4.441357,0.04728197,-6.6494795205e-06
+4.451451,0.04856659,-7.2376393456e-06
+4.461545,0.04985122,-6.8165868750e-06
+4.471639,0.05113586,-7.0554225554e-06
+4.481733,0.05242048,-7.3248498354e-06
+4.491827,0.05370511,-6.7068145351e-06
+4.501921,0.05498973,-7.3997288222e-06
+4.512015,0.05627437,-7.1540037541e-06
+4.522109,0.05755900,-7.3138203766e-06
+4.532203,0.05884362,-6.5497021582e-06
+4.542297,0.06012826,-8.2020641834e-06
+4.552391,0.06141288,-7.1976637278e-06
+4.562485,0.06269751,-6.3353184381e-06
+4.572579,0.06398215,-6.8459944728e-06
+4.582673,0.06526677,-7.5511179279e-06
+4.592767,0.06655140,-6.9847580425e-06
+4.602861,0.06783602,-6.8022164566e-06
+4.612955,0.06912066,-7.3046981978e-06
+4.623049,0.07040529,-6.7879640807e-06
+4.633143,0.07168991,-6.3132301887e-06
+4.643237,0.07297455,-7.1710898646e-06
+4.653331,0.07425917,-6.6942290619e-06
+4.663425,0.07554380,-6.5440067880e-06
+4.673519,0.07682844,-6.4429195120e-06
+4.683613,0.07811306,-7.4563477124e-06
+4.693707,0.07939769,-6.4499469736e-06
+4.703801,0.08068231,-6.6591833267e-06
+4.713895,0.08196695,-7.5358325016e-06
+4.723989,0.08325158,-7.1657507680e-06
+4.734083,0.08453620,-6.7386452228e-06
+4.744177,0.08582083,-7.0606500482e-06
+4.754271,0.08710546,-6.1833577207e-06
+4.764365,0.08839009,-6.3265181934e-06
+4.774458,0.08967472,-6.3465417728e-06
+4.784552,0.09095935,-6.8293240148e-06
+4.794646,0.09224398,-6.5383643581e-06
+4.804740,0.09352860,-6.6279349818e-06
+4.814834,0.09481323,-6.9172134276e-06
+4.824928,0.09609787,-6.8179082352e-06
+4.835022,0.09738249,-6.4250786452e-06
+4.845116,0.09866712,-6.6942970258e-06
+4.855210,0.09995174,-6.8728244523e-06
+4.865304,0.10123638,-6.8752654274e-06
+4.875398,0.10252101,-6.3299550177e-06
+4.885492,0.10380563,-6.8325462165e-06
+4.895586,0.10509027,-5.8824617499e-06
+4.905680,0.10637489,-6.5106787495e-06
+4.915774,0.10765952,-6.6192942733e-06
+4.925868,0.10894416,-6.5753939222e-06
+4.935962,0.11022878,-6.4061832656e-06
+4.946056,0.11151341,-6.5569292188e-06
+4.956150,0.11279803,-6.1414776843e-06
+4.966244,0.11408267,-6.5718419171e-06
+4.976338,0.11536730,-6.6506964310e-06
+4.986432,0.11665192,-5.9327088509e-06
+4.996526,0.11793656,-6.6904745961e-06
+5.006620,0.11922118,-6.4562082322e-06
+5.016714,0.12050581,-6.7944707246e-06
+5.026808,0.12179044,-6.7764273970e-06
+5.036902,0.12307507,-6.1999158594e-06
+5.046996,0.12435970,-6.7457213321e-06
+5.057090,0.12564432,-6.5178342692e-06
+5.067184,0.12692896,-6.4952960276e-06
+5.077278,0.12821359,-6.6537734047e-06
+5.087372,0.12949821,-6.4417433798e-06
+5.097466,0.13078284,-6.0570279574e-06
+5.107560,0.13206747,-6.0816687858e-06
+5.117654,0.13335210,-5.6514404807e-06
+5.127748,0.13463673,-6.6959152807e-06
+5.137842,0.13592135,-6.3491050828e-06
+5.147936,0.13720599,-5.6705139971e-06
+5.158030,0.13849061,-5.9788616668e-06
+5.168124,0.13977524,-5.9324881473e-06
+5.178218,0.14105988,-6.1016179627e-06
+5.188312,0.14234450,-6.1673862172e-06
+5.198406,0.14362913,-6.2900774108e-06
+5.208500,0.14491375,-6.2197727485e-06
+5.218594,0.14619839,-6.9659778437e-06
+5.228688,0.14748302,-6.1429185178e-06
+5.238782,0.14876764,-6.3217764633e-06
+5.248876,0.15005227,-6.3121048505e-06
+5.258970,0.15133690,-5.6895492391e-06
+5.269064,0.15262153,-6.5451500114e-06
+5.279158,0.15390616,-6.4520595760e-06
+5.289252,0.15519079,-6.1375178961e-06
+5.299346,0.15647542,-6.3623294161e-06
+5.309440,0.15776005,-6.2851167656e-06
+5.319534,0.15904468,-6.3478738641e-06
+5.329628,0.16032930,-6.1335531000e-06
+5.339722,0.16161393,-6.0516323436e-06
+5.349816,0.16289856,-5.9522759994e-06
+5.359910,0.16418319,-5.5943340393e-06
+5.370004,0.16546782,-5.4133710032e-06
+5.380098,0.16675245,-5.8599689367e-06
+5.390192,0.16803708,-6.0065293902e-06
+5.400286,0.16932170,-6.1775121146e-06
+5.410380,0.17060634,-5.7823370566e-06
+5.420474,0.17189097,-5.5465171823e-06
+5.430568,0.17317559,-6.0324536621e-06
+5.440662,0.17446022,-6.4122799802e-06
+5.450756,0.17574485,-5.5340529709e-06
+5.460850,0.17702948,-5.9763505816e-06
+5.470944,0.17831411,-5.4535701863e-06
+5.481038,0.17959874,-5.9518463964e-06
+5.491132,0.18088336,-6.1926365739e-06
+5.501226,0.18216799,-6.0069786670e-06
+5.511320,0.18345263,-6.3197854803e-06
+5.521414,0.18473725,-6.1155104879e-06
+5.531508,0.18602188,-5.8272489958e-06
+5.541602,0.18730651,-5.7802992144e-06
+5.551696,0.18859114,-5.8534014831e-06
+5.561790,0.18987577,-5.3407477006e-06
+5.571884,0.19116040,-5.3116420054e-06
+5.581978,0.19244503,-5.7617858631e-06
+5.592072,0.19372965,-6.5033264924e-06
+5.602166,0.19501428,-5.8015854904e-06
+5.612260,0.19629891,-5.0493044275e-06
+5.622354,0.19758354,-5.6091415725e-06
+5.632448,0.19886817,-5.4630486387e-06
+5.642542,0.20015280,-5.6043472598e-06
+5.652636,0.20143743,-4.9479803512e-06
+5.662730,0.20272206,-5.4240491962e-06
+5.672824,0.20400669,-5.1045783491e-06
+5.682918,0.20529131,-5.4647581082e-06
+5.693012,0.20657594,-5.3213486732e-06
+5.703106,0.20786057,-5.0569846997e-06
+5.713200,0.20914520,-5.8420844299e-06
+5.723294,0.21042983,-5.7553321595e-06
+5.733388,0.21171446,-5.4442101341e-06
+5.743482,0.21299909,-5.4554080718e-06
+5.753576,0.21428372,-5.2967049832e-06
+5.763670,0.21556834,-5.6381757268e-06
+5.773764,0.21685297,-5.0466602763e-06
+5.783858,0.21813760,-4.7238960443e-06
+5.793952,0.21942223,-5.0523656622e-06
+5.804046,0.22070686,-5.8112785655e-06
+5.814140,0.22199149,-5.2370148426e-06
+5.824234,0.22327612,-4.4666010260e-06
+5.834328,0.22456075,-5.3556897307e-06
+5.844422,0.22584538,-5.2294132654e-06
+5.854516,0.22713000,-5.2181298364e-06
+5.864610,0.22841463,-4.6802450133e-06
+5.874704,0.22969926,-4.5035636993e-06
+5.884798,0.23098389,-5.0598974869e-06
+5.894892,0.23226852,-3.8476153049e-06
+5.904986,0.23355315,-4.8217750691e-06
+5.915080,0.23483778,-4.2087415501e-06
+5.925174,0.23612241,-4.4313320832e-06
+5.935268,0.23740704,-4.3440554181e-06
+5.945362,0.23869166,-5.0541670618e-06
+5.955456,0.23997629,-4.9891925534e-06
+5.965550,0.24126092,-3.8461594479e-06
+5.975644,0.24254555,-5.0013562930e-06
+5.985738,0.24383018,-4.0466291804e-06
+5.995832,0.24511481,-4.1098902845e-06
+6.005926,0.24639944,-4.6759589986e-06
+6.016020,0.24768407,-3.7717597851e-06
+6.026114,0.24896870,-4.2510919677e-06
+6.036208,0.25025332,-3.7923102631e-06
+6.046302,0.25153795,-3.9992465766e-06
+6.056396,0.25282258,-3.7624648351e-06
+6.066490,0.25410721,-3.4746111261e-06
+6.076583,0.25539184,-3.4292860382e-06
+6.086677,0.25667647,-4.0805874942e-06
+6.096771,0.25796110,-3.3325538138e-06
+6.106865,0.25924573,-3.2541571616e-06
+6.116959,0.26053035,-4.0081627176e-06
+6.127053,0.26181498,-3.1673798519e-06
+6.137147,0.26309961,-3.7129699865e-06
+6.147241,0.26438424,-3.6058464480e-06
+6.157335,0.26566887,-3.1465424949e-06
+6.167429,0.26695350,-3.7920105068e-06
+6.177523,0.26823813,-2.8921681334e-06
+6.187617,0.26952276,-3.3135464728e-06
+6.197711,0.27080739,-3.0840633327e-06
+6.207805,0.27209201,-2.5206294696e-06
+6.217899,0.27337664,-3.6040579258e-06
+6.227993,0.27466127,-2.5836596755e-06
+6.238087,0.27594590,-2.8365145085e-06
+6.248181,0.27723053,-2.2983147266e-06
+6.258275,0.27851516,-2.6457208600e-06
+6.268369,0.27979979,-3.1868897677e-06
+6.278463,0.28108442,-2.3692736303e-06
+6.288557,0.28236904,-2.1702919482e-06
+6.298651,0.28365368,-2.5973459841e-06
+6.308745,0.28493830,-2.6034444871e-06
+6.318839,0.28622293,-1.6918844315e-06
+6.328933,0.28750756,-2.1782651803e-06
+6.339027,0.28879219,-2.0335030859e-06
+6.349121,0.29007682,-2.6837001294e-06
+6.359215,0.29136145,-2.4498347522e-06
+6.369309,0.29264608,-2.1335492631e-06
+6.379403,0.29393071,-2.0748506792e-06
+6.389497,0.29521533,-2.0460915996e-06
+6.399591,0.29649996,-1.8618419750e-06
+6.409685,0.29778459,-2.5879512345e-06
+6.419779,0.29906922,-2.2364894481e-06
+6.429873,0.30035385,-2.5483563930e-06
+6.439967,0.30163848,-8.8819041942e-07
+6.450061,0.30292311,-1.6649678875e-06
+6.460155,0.30420773,-1.6362125638e-06
+6.470249,0.30549237,-1.4861582321e-06
+6.480343,0.30677699,-1.5835733143e-06
+6.490438,0.30806162,-1.3409412271e-06
+6.500531,0.30934625,-1.5217662788e-06
+6.510625,0.31063088,-1.0756849598e-06
+6.520719,0.31191551,-1.3414666950e-06
+6.530813,0.31320014,-1.3641007120e-06
+6.540907,0.31448477,-9.1004392532e-07
+6.551001,0.31576939,-8.2153666751e-07
+6.561095,0.31705402,-9.4660847362e-07
+6.571189,0.31833866,-9.6481232107e-07
+6.581283,0.31962328,-1.2721323954e-06
+6.591377,0.32090791,-9.4724626065e-07
+6.601471,0.32219254,-1.2161867943e-06
+6.611565,0.32347717,-5.4526019698e-07
+6.621659,0.32476180,-9.0167095853e-07
+6.631753,0.32604643,-9.8053915468e-07
+6.641847,0.32733105,-4.9686730168e-07
+6.651941,0.32861568,-4.3277685982e-07
+6.662035,0.32990031,-8.1359348262e-07
+6.672129,0.33118494,-3.8347494809e-07
+6.682223,0.33246957,-2.5568181599e-07
+6.692317,0.33375420,-1.4001684088e-06
+6.702411,0.33503883,-1.3799806431e-06
+6.712505,0.33632345,-5.0419514550e-07
+6.722599,0.33760809,-6.5196642852e-07
+6.732693,0.33889272,-6.4423241130e-07
+6.742787,0.34017734,-8.2126096681e-07
+6.752881,0.34146197,-5.0321145828e-08
+6.762975,0.34274660,3.5369368330e-08
+6.773069,0.34403123,-6.2831340099e-07
diff --git a/demo_data/ec_EC_7638mVs.csv b/demo_data/ec_EC_7638mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..95d855772e043eb2225a8b32956d0b5bb265765f
--- /dev/null
+++ b/demo_data/ec_EC_7638mVs.csv
@@ -0,0 +1,673 @@
+Time (s),E (V),I (A)
+0.000000,0.34475868,-2.6309106913e-05
+0.000168,0.34347405,-2.9163548182e-05
+0.000336,0.34218941,-3.3396650821e-05
+0.000505,0.34090479,-3.5009900304e-05
+0.000673,0.33962016,-3.3277462668e-05
+0.000841,0.33833553,-3.0239999273e-05
+0.001009,0.33705090,-3.5671731253e-05
+0.001177,0.33576627,-3.5499015120e-05
+0.001345,0.33448164,-3.2688023073e-05
+0.001514,0.33319702,-3.6066434974e-05
+0.001682,0.33191239,-3.7315646536e-05
+0.001850,0.33062776,-4.6693262922e-05
+0.002018,0.32934313,-3.7462006041e-05
+0.002186,0.32805850,-3.8746259087e-05
+0.002355,0.32677387,-4.1728977958e-05
+0.002523,0.32548924,-4.5778476525e-05
+0.002691,0.32420462,-3.9651329751e-05
+0.002859,0.32291998,-4.8420529549e-05
+0.003027,0.32163535,-4.1001351047e-05
+0.003195,0.32035073,-4.6974553615e-05
+0.003364,0.31906610,-4.6387835312e-05
+0.003532,0.31778147,-4.7186853183e-05
+0.003700,0.31649684,-5.1078389344e-05
+0.003868,0.31521221,-5.6136484060e-05
+0.004036,0.31392758,-4.6315263832e-05
+0.004205,0.31264296,-5.3714013247e-05
+0.004373,0.31135833,-5.8103523665e-05
+0.004541,0.31007369,-5.7233918473e-05
+0.004709,0.30878907,-5.5642888256e-05
+0.004877,0.30750444,-6.7031245647e-05
+0.005046,0.30621981,-6.4657508683e-05
+0.005214,0.30493518,-6.5012529206e-05
+0.005382,0.30365055,-6.3438070604e-05
+0.005550,0.30236592,-6.6205120160e-05
+0.005718,0.30108129,-7.2865640156e-05
+0.005886,0.29979667,-7.4338252606e-05
+0.006055,0.29851204,-7.3436130470e-05
+0.006223,0.29722741,-7.6918098337e-05
+0.006391,0.29594278,-7.8528637612e-05
+0.006559,0.29465815,-8.2670150210e-05
+0.006727,0.29337352,-8.6233856598e-05
+0.006896,0.29208889,-8.4543213794e-05
+0.007064,0.29080426,-8.4940938094e-05
+0.007232,0.28951963,-9.0550302267e-05
+0.007400,0.28823501,-9.8533081947e-05
+0.007568,0.28695038,-9.7731503511e-05
+0.007736,0.28566575,-1.0194222339e-04
+0.007905,0.28438112,-1.0101389149e-04
+0.008073,0.28309649,-1.0714670809e-04
+0.008241,0.28181186,-1.0857173395e-04
+0.008409,0.28052723,-1.1126242107e-04
+0.008577,0.27924260,-1.1654803463e-04
+0.008746,0.27795798,-1.1936241582e-04
+0.008914,0.27667334,-1.1926998058e-04
+0.009082,0.27538872,-1.2351971857e-04
+0.009250,0.27410409,-1.2833252567e-04
+0.009418,0.27281946,-1.3263024929e-04
+0.009586,0.27153483,-1.3623236414e-04
+0.009755,0.27025020,-1.3905746423e-04
+0.009923,0.26896557,-1.4464195435e-04
+0.010091,0.26768094,-1.4430510164e-04
+0.010259,0.26639631,-1.4255592612e-04
+0.010427,0.26511169,-1.4724536060e-04
+0.010596,0.26382706,-1.5498304110e-04
+0.010764,0.26254243,-1.5811569706e-04
+0.010932,0.26125780,-1.7168562165e-04
+0.011100,0.25997317,-1.6850721916e-04
+0.011268,0.25868854,-1.7296551564e-04
+0.011437,0.25740391,-1.8338417307e-04
+0.011605,0.25611928,-1.7983210561e-04
+0.011773,0.25483466,-1.8981797231e-04
+0.011941,0.25355003,-1.9347392551e-04
+0.012109,0.25226540,-1.9599511659e-04
+0.012277,0.25098077,-2.0014493716e-04
+0.012446,0.24969614,-2.0977981817e-04
+0.012614,0.24841151,-2.1391988422e-04
+0.012782,0.24712688,-2.1824635045e-04
+0.012950,0.24584225,-2.2031439931e-04
+0.013118,0.24455762,-2.2876102348e-04
+0.013287,0.24327300,-2.3679899939e-04
+0.013455,0.24198837,-2.3990949705e-04
+0.013623,0.24070374,-2.4871992082e-04
+0.013791,0.23941911,-2.6202265998e-04
+0.013959,0.23813448,-2.6024846631e-04
+0.014127,0.23684985,-2.6974780370e-04
+0.014296,0.23556522,-2.7523612303e-04
+0.014464,0.23428059,-2.7857696060e-04
+0.014632,0.23299596,-2.9564785222e-04
+0.014800,0.23171134,-2.9315545916e-04
+0.014968,0.23042671,-3.0268698650e-04
+0.015137,0.22914208,-3.1111911189e-04
+0.015305,0.22785745,-3.1954068466e-04
+0.015473,0.22657282,-3.2482107733e-04
+0.015641,0.22528819,-3.3267110120e-04
+0.015809,0.22400356,-3.4394239315e-04
+0.015977,0.22271894,-3.4714052639e-04
+0.016146,0.22143430,-3.5247964577e-04
+0.016314,0.22014968,-3.6317495494e-04
+0.016482,0.21886505,-3.7206376965e-04
+0.016650,0.21758042,-3.7533787737e-04
+0.016818,0.21629579,-3.8749131131e-04
+0.016987,0.21501116,-3.9704498586e-04
+0.017155,0.21372653,-4.0282569720e-04
+0.017323,0.21244190,-4.1496627290e-04
+0.017491,0.21115727,-4.2715092132e-04
+0.017659,0.20987265,-4.3484835331e-04
+0.017827,0.20858802,-4.4413333493e-04
+0.017996,0.20730339,-4.4394595929e-04
+0.018164,0.20601876,-4.6376640882e-04
+0.018332,0.20473413,-4.6776789404e-04
+0.018500,0.20344950,-4.8143806858e-04
+0.018668,0.20216487,-4.8744663686e-04
+0.018837,0.20088024,-5.0510605913e-04
+0.019005,0.19959561,-5.1493077658e-04
+0.019173,0.19831099,-5.2433112767e-04
+0.019341,0.19702636,-5.3555597476e-04
+0.019509,0.19574173,-5.4043124410e-04
+0.019678,0.19445710,-5.5378807657e-04
+0.019846,0.19317247,-5.6359887164e-04
+0.020014,0.19188784,-5.7715172580e-04
+0.020182,0.19060321,-5.8318286251e-04
+0.020350,0.18931859,-5.8918908084e-04
+0.020518,0.18803395,-6.0762301272e-04
+0.020687,0.18674933,-6.2065781270e-04
+0.020855,0.18546470,-6.2944584539e-04
+0.021023,0.18418007,-6.3721732313e-04
+0.021191,0.18289544,-6.5252541614e-04
+0.021359,0.18161081,-6.6378302958e-04
+0.021528,0.18032618,-6.7591021496e-04
+0.021696,0.17904155,-6.9090682812e-04
+0.021864,0.17775693,-6.9898716972e-04
+0.022032,0.17647230,-7.0819832728e-04
+0.022200,0.17518766,-7.1982519400e-04
+0.022368,0.17390304,-7.3782123620e-04
+0.022537,0.17261841,-7.4785873540e-04
+0.022705,0.17133378,-7.6027607368e-04
+0.022873,0.17004915,-7.7150264999e-04
+0.023041,0.16876452,-7.8406222705e-04
+0.023209,0.16747989,-7.9491289927e-04
+0.023378,0.16619526,-8.0640630629e-04
+0.023546,0.16491064,-8.1782194311e-04
+0.023714,0.16362601,-8.2601486084e-04
+0.023882,0.16234138,-8.4388285268e-04
+0.024050,0.16105675,-8.5328816971e-04
+0.024218,0.15977212,-8.6226056300e-04
+0.024387,0.15848749,-8.7965031687e-04
+0.024555,0.15720287,-8.8417801461e-04
+0.024723,0.15591823,-8.9759785246e-04
+0.024891,0.15463360,-9.0432608330e-04
+0.025059,0.15334898,-9.1972476041e-04
+0.025228,0.15206435,-9.2574844821e-04
+0.025396,0.15077972,-9.4294621522e-04
+0.025564,0.14949509,-9.4934376751e-04
+0.025732,0.14821046,-9.6014185396e-04
+0.025900,0.14692583,-9.7147980925e-04
+0.026069,0.14564120,-9.8117980174e-04
+0.026237,0.14435657,-9.9311633042e-04
+0.026405,0.14307195,-1.0006444327e-03
+0.026573,0.14178732,-1.0111099783e-03
+0.026741,0.14050268,-1.0227663747e-03
+0.026909,0.13921806,-1.0349878243e-03
+0.027078,0.13793343,-1.0344959300e-03
+0.027246,0.13664881,-1.0405388608e-03
+0.027414,0.13536417,-1.0569294848e-03
+0.027582,0.13407954,-1.0669417996e-03
+0.027750,0.13279492,-1.0725872777e-03
+0.027919,0.13151028,-1.0798807392e-03
+0.028087,0.13022566,-1.0859507167e-03
+0.028255,0.12894103,-1.0946119405e-03
+0.028423,0.12765639,-1.1029744983e-03
+0.028591,0.12637177,-1.1099143138e-03
+0.028759,0.12508714,-1.1215531520e-03
+0.028928,0.12380252,-1.1232581550e-03
+0.029096,0.12251788,-1.1243510170e-03
+0.029264,0.12123325,-1.1339481435e-03
+0.029432,0.11994863,-1.1337875485e-03
+0.029600,0.11866399,-1.1394122760e-03
+0.029769,0.11737937,-1.1420394368e-03
+0.029937,0.11609474,-1.1476861564e-03
+0.030105,0.11481010,-1.1515664194e-03
+0.030273,0.11352548,-1.1507912004e-03
+0.030441,0.11224085,-1.1611731231e-03
+0.030609,0.11095623,-1.1607036642e-03
+0.030778,0.10967159,-1.1656532010e-03
+0.030946,0.10838696,-1.1673522626e-03
+0.031114,0.10710234,-1.1703695159e-03
+0.031282,0.10581771,-1.1674020994e-03
+0.031450,0.10453308,-1.1699132699e-03
+0.031619,0.10324845,-1.1733811824e-03
+0.031787,0.10196382,-1.1744522297e-03
+0.031955,0.10067919,-1.1734218854e-03
+0.032123,0.09939456,-1.1730555585e-03
+0.032291,0.09810994,-1.1718093731e-03
+0.032459,0.09682531,-1.1735455019e-03
+0.032628,0.09554067,-1.1697971910e-03
+0.032796,0.09425605,-1.1651582030e-03
+0.032964,0.09297142,-1.1744980760e-03
+0.033132,0.09168680,-1.1702721479e-03
+0.033300,0.09040216,-1.1615215372e-03
+0.033469,0.08911753,-1.1627927297e-03
+0.033637,0.08783291,-1.1682690110e-03
+0.033805,0.08654827,-1.1531428400e-03
+0.033973,0.08526365,-1.1532549284e-03
+0.034141,0.08397902,-1.1574687963e-03
+0.034310,0.08269438,-1.1488598923e-03
+0.034478,0.08140976,-1.1463338239e-03
+0.034646,0.08012513,-1.1430101011e-03
+0.034814,0.07884051,-1.1370962848e-03
+0.034982,0.07755587,-1.1375225577e-03
+0.035150,0.07627124,-1.1309754951e-03
+0.035319,0.07498662,-1.1272023545e-03
+0.035487,0.07370198,-1.1281304536e-03
+0.035655,0.07241736,-1.1179388329e-03
+0.035823,0.07113273,-1.1131150408e-03
+0.035991,0.06984810,-1.1056992930e-03
+0.036160,0.06856347,-1.1041666792e-03
+0.036328,0.06727884,-1.1023715798e-03
+0.036496,0.06599422,-1.0942173254e-03
+0.036664,0.06470958,-1.0930449197e-03
+0.036832,0.06342495,-1.0861528128e-03
+0.037000,0.06214033,-1.0813056985e-03
+0.037169,0.06085570,-1.0754161799e-03
+0.037337,0.05957107,-1.0725455993e-03
+0.037505,0.05828644,-1.0673509578e-03
+0.037673,0.05700181,-1.0591705436e-03
+0.037841,0.05571719,-1.0574095850e-03
+0.038010,0.05443255,-1.0516982195e-03
+0.038178,0.05314793,-1.0443033996e-03
+0.038346,0.05186330,-1.0374298263e-03
+0.038514,0.05057866,-1.0334494463e-03
+0.038682,0.04929404,-1.0293604364e-03
+0.038850,0.04800941,-1.0238135677e-03
+0.039019,0.04672479,-1.0146226730e-03
+0.039187,0.04544015,-1.0110990710e-03
+0.039355,0.04415553,-1.0078552467e-03
+0.039523,0.04287090,-9.9406535743e-04
+0.039691,0.04158626,-9.9535605900e-04
+0.039860,0.04030163,-9.9097006797e-04
+0.040028,0.03901702,-9.8692291381e-04
+0.040196,0.03773239,-9.7790423085e-04
+0.040364,0.03644775,-9.7717849388e-04
+0.040532,0.03516312,-9.6253162493e-04
+0.040700,0.03387848,-9.6049000197e-04
+0.040869,0.03259388,-9.5536647986e-04
+0.041037,0.03130924,-9.4971186797e-04
+0.041205,0.03002461,-9.4709845225e-04
+0.041373,0.02873997,-9.3468271016e-04
+0.041541,0.02745534,-9.3754646257e-04
+0.041710,0.02617073,-9.2637397956e-04
+0.041878,0.02488610,-9.1946626539e-04
+0.042046,0.02360146,-9.1765520403e-04
+0.042214,0.02231683,-9.0903255495e-04
+0.042382,0.02103220,-9.0767020193e-04
+0.042551,0.01974759,-9.0961711728e-04
+0.042719,0.01846295,-9.0061244536e-04
+0.042887,0.01717832,-8.9697826250e-04
+0.043055,0.01589369,-8.8744276685e-04
+0.043223,0.01460905,-8.8572667913e-04
+0.043391,0.01332444,-8.7891136695e-04
+0.043560,0.01203981,-8.7812187083e-04
+0.043728,0.01075518,-8.7454382085e-04
+0.043896,0.00947054,-8.6933570037e-04
+0.044064,0.00818591,-8.6427558270e-04
+0.044232,0.00690130,-8.5743951997e-04
+0.044401,0.00561666,-8.5717543826e-04
+0.044569,0.00433203,-8.4415996998e-04
+0.044737,0.00304740,-8.4964742471e-04
+0.044905,0.00176276,-8.3938601473e-04
+0.045073,0.00047815,-8.3196184257e-04
+0.045241,-0.00080648,-8.3160260986e-04
+0.045410,-0.00209111,-8.2554690947e-04
+0.045578,-0.00337575,-8.2538737858e-04
+0.045746,-0.00466038,-8.1964550800e-04
+0.045914,-0.00594499,-8.1774035977e-04
+0.046082,-0.00722962,-8.1162701898e-04
+0.046251,-0.00851426,-8.0331882045e-04
+0.046419,-0.00979889,-8.0615925067e-04
+0.046587,-0.01108352,-8.0007898660e-04
+0.046755,-0.01236813,-7.9453504428e-04
+0.046923,-0.01365277,-7.9280822659e-04
+0.047091,-0.01493740,-7.8307693092e-04
+0.047260,-0.01622204,-7.8774278826e-04
+0.047428,-0.01750667,-7.8164461133e-04
+0.047596,-0.01879128,-7.8238533480e-04
+0.047764,-0.02007591,-7.7741761913e-04
+0.047932,-0.02136055,-7.7223512645e-04
+0.048101,-0.02264518,-7.6575430595e-04
+0.048269,-0.02392981,-7.6379302484e-04
+0.048437,-0.02521442,-7.5712740034e-04
+0.048605,-0.02649906,-7.5235947516e-04
+0.048773,-0.02778369,-7.5601369914e-04
+0.048942,-0.02906832,-7.4976370627e-04
+0.049110,-0.03035296,-7.4369847304e-04
+0.049278,-0.03163757,-7.4620942187e-04
+0.049446,-0.03292220,-7.4514014811e-04
+0.049614,-0.03420683,-7.2877524055e-04
+0.049782,-0.03549147,-7.3587201523e-04
+0.049951,-0.03677610,-7.2683302511e-04
+0.050119,-0.03806071,-7.2299426317e-04
+0.050287,-0.03934534,-7.2263746910e-04
+0.050455,-0.04062998,-7.2205627651e-04
+0.050623,-0.04191461,-7.2100229963e-04
+0.050792,-0.04319925,-7.1858060475e-04
+0.050960,-0.04448386,-7.1632278596e-04
+0.051128,-0.04576849,-7.1670924267e-04
+0.051296,-0.04705312,-7.1121256548e-04
+0.051464,-0.04833776,-7.0227604225e-04
+0.051632,-0.04962239,-6.9921369649e-04
+0.051801,-0.05090700,-6.9739168346e-04
+0.051969,-0.05219163,-6.9769003903e-04
+0.052137,-0.05347627,-6.8786363671e-04
+0.052305,-0.05476090,-6.8490331446e-04
+0.052473,-0.05604553,-6.8335606878e-04
+0.052642,-0.05733014,-6.8371596657e-04
+0.052810,-0.05861478,-6.8430536182e-04
+0.052978,-0.05989941,-6.8089735102e-04
+0.053146,-0.06118405,-6.7750543520e-04
+0.053314,-0.06246868,-6.7446184474e-04
+0.053482,-0.06375329,-6.7156616841e-04
+0.053651,-0.06503792,-6.6579082206e-04
+0.053819,-0.06632256,-6.6585626608e-04
+0.053987,-0.06760719,-6.6863391260e-04
+0.054155,-0.06889182,-6.6536228786e-04
+0.054323,-0.07017643,-6.5893183619e-04
+0.054492,-0.07146107,-6.5864421060e-04
+0.054660,-0.07274570,-6.5738547728e-04
+0.054828,-0.07403033,-6.5675919217e-04
+0.054996,-0.07531497,-6.5324756167e-04
+0.055164,-0.07659958,-6.5087233381e-04
+0.055332,-0.07788421,-6.5063583082e-04
+0.055501,-0.07916884,-6.4706580616e-04
+0.055669,-0.08045348,-6.4001177404e-04
+0.055837,-0.08173811,-6.4059416377e-04
+0.056005,-0.08302272,-6.3478649446e-04
+0.056173,-0.08430735,-6.4359283906e-04
+0.056342,-0.08559199,-6.3986434764e-04
+0.056510,-0.08631944,-6.3432381940e-04
+0.056678,-0.08503480,-6.3646879603e-04
+0.056846,-0.08375017,-6.2795867874e-04
+0.057014,-0.08246554,-6.2310828345e-04
+0.057183,-0.08118093,-6.2269141034e-04
+0.057351,-0.07989629,-6.2428835979e-04
+0.057519,-0.07861166,-6.1720785743e-04
+0.057687,-0.07732703,-6.1554125178e-04
+0.057855,-0.07604239,-6.0980181983e-04
+0.058023,-0.07475778,-6.0271910053e-04
+0.058192,-0.07347315,-6.0723886163e-04
+0.058360,-0.07218852,-6.0342745671e-04
+0.058528,-0.07090388,-6.0207720817e-04
+0.058696,-0.06961925,-5.9621367201e-04
+0.058864,-0.06833464,-6.0048495864e-04
+0.059033,-0.06705001,-5.9439724566e-04
+0.059201,-0.06576537,-5.9400174384e-04
+0.059369,-0.06448074,-5.9004739073e-04
+0.059537,-0.06319610,-5.8384213567e-04
+0.059705,-0.06191150,-5.8407868300e-04
+0.059873,-0.06062686,-5.8904121104e-04
+0.060042,-0.05934223,-5.8283941441e-04
+0.060210,-0.05805759,-5.8256921395e-04
+0.060378,-0.05677296,-5.8313178425e-04
+0.060546,-0.05548835,-5.7825975164e-04
+0.060714,-0.05420372,-5.7761475557e-04
+0.060883,-0.05291908,-5.7296956009e-04
+0.061051,-0.05163445,-5.7127471065e-04
+0.061219,-0.05034982,-5.7118616613e-04
+0.061387,-0.04906521,-5.7008022421e-04
+0.061555,-0.04778057,-5.6416250607e-04
+0.061723,-0.04649594,-5.6244575328e-04
+0.061892,-0.04521131,-5.5993781949e-04
+0.062060,-0.04392667,-5.6048447217e-04
+0.062228,-0.04264206,-5.5667266820e-04
+0.062396,-0.04135743,-5.5587022516e-04
+0.062564,-0.04007280,-5.5627734373e-04
+0.062733,-0.03878816,-5.5563851075e-04
+0.062901,-0.03750353,-5.5117936075e-04
+0.063069,-0.03621892,-5.4953368300e-04
+0.063237,-0.03493428,-5.4850622071e-04
+0.063405,-0.03364965,-5.4852705993e-04
+0.063574,-0.03236502,-5.4354555490e-04
+0.063742,-0.03108038,-5.4392939562e-04
+0.063910,-0.02979577,-5.3696998244e-04
+0.064078,-0.02851114,-5.3698133317e-04
+0.064246,-0.02722651,-5.3263409422e-04
+0.064414,-0.02594187,-5.3781401525e-04
+0.064583,-0.02465724,-5.3103364202e-04
+0.064751,-0.02337263,-5.3089579278e-04
+0.064919,-0.02208800,-5.3064026846e-04
+0.065087,-0.02080336,-5.2897760896e-04
+0.065255,-0.01951873,-5.2985857596e-04
+0.065424,-0.01823409,-5.2540953520e-04
+0.065592,-0.01694949,-5.2280387877e-04
+0.065760,-0.01566485,-5.2280645042e-04
+0.065928,-0.01438022,-5.2209671974e-04
+0.066096,-0.01309558,-5.1491618912e-04
+0.066264,-0.01181095,-5.1510529397e-04
+0.066433,-0.01052634,-5.1374152211e-04
+0.066601,-0.00924171,-5.1268515094e-04
+0.066769,-0.00795707,-5.0904232202e-04
+0.066937,-0.00667244,-5.1094919946e-04
+0.067105,-0.00538781,-5.0712786265e-04
+0.067274,-0.00410320,-5.0918447211e-04
+0.067442,-0.00281856,-5.0112341788e-04
+0.067610,-0.00153393,-5.0137876485e-04
+0.067778,-0.00024930,-5.0214968303e-04
+0.067946,0.00103534,-4.9860502014e-04
+0.068114,0.00231995,-4.9456185647e-04
+0.068283,0.00360458,-4.9800915142e-04
+0.068451,0.00488921,-4.9122332453e-04
+0.068619,0.00617385,-4.9520964589e-04
+0.068787,0.00745848,-4.8650053621e-04
+0.068955,0.00874309,-4.8866409078e-04
+0.069124,0.01002773,-4.8321033352e-04
+0.069292,0.01131236,-4.8010480180e-04
+0.069460,0.01259699,-4.8245608672e-04
+0.069628,0.01388163,-4.7604824782e-04
+0.069796,0.01516624,-4.7968407122e-04
+0.069964,0.01645087,-4.7257000441e-04
+0.070133,0.01773550,-4.7485074635e-04
+0.070301,0.01902014,-4.6749299367e-04
+0.070469,0.02030477,-4.7170349185e-04
+0.070637,0.02158938,-4.6777578634e-04
+0.070805,0.02287401,-4.7023086832e-04
+0.070974,0.02415865,-4.7051587792e-04
+0.071142,0.02544328,-4.6339737724e-04
+0.071310,0.02672791,-4.6275761314e-04
+0.071478,0.02801252,-4.5864829603e-04
+0.071646,0.02929716,-4.5711262277e-04
+0.071815,0.03058179,-4.6287214018e-04
+0.071983,0.03186643,-4.4714007987e-04
+0.072151,0.03315106,-4.5354002646e-04
+0.072319,0.03443567,-4.4784754926e-04
+0.072487,0.03572030,-4.4918631406e-04
+0.072655,0.03700494,-4.4628012944e-04
+0.072824,0.03828957,-4.4076013006e-04
+0.072992,0.03957420,-4.4563801539e-04
+0.073160,0.04085881,-4.3811962335e-04
+0.073328,0.04214345,-4.3823885030e-04
+0.073496,0.04342808,-4.4216651147e-04
+0.073665,0.04471271,-4.4010001447e-04
+0.073833,0.04599734,-4.2702992082e-04
+0.074001,0.04728197,-4.2591165273e-04
+0.074169,0.04856659,-4.2743721675e-04
+0.074337,0.04985122,-4.2025491258e-04
+0.074505,0.05113586,-4.2128694177e-04
+0.074674,0.05242048,-4.2151036483e-04
+0.074842,0.05370511,-4.1931781270e-04
+0.075010,0.05498973,-4.1915101025e-04
+0.075178,0.05627437,-4.1347835249e-04
+0.075346,0.05755900,-4.1511502947e-04
+0.075515,0.05884362,-4.0912827586e-04
+0.075683,0.06012826,-4.0840812557e-04
+0.075851,0.06141288,-4.0413160697e-04
+0.076019,0.06269751,-4.0145194913e-04
+0.076187,0.06398215,-3.9962027024e-04
+0.076355,0.06526677,-3.9385893494e-04
+0.076524,0.06655140,-3.9525467505e-04
+0.076692,0.06783602,-3.9061821431e-04
+0.076860,0.06912066,-3.9823552615e-04
+0.077028,0.07040529,-3.8708255220e-04
+0.077196,0.07168991,-3.8158764855e-04
+0.077365,0.07297455,-3.8037759921e-04
+0.077533,0.07425917,-3.7811166642e-04
+0.077701,0.07554380,-3.7794628281e-04
+0.077869,0.07682844,-3.6912173715e-04
+0.078037,0.07811306,-3.7344829205e-04
+0.078206,0.07939769,-3.7199668510e-04
+0.078374,0.08068231,-3.7063215948e-04
+0.078542,0.08196695,-3.6565180726e-04
+0.078710,0.08325158,-3.6489274970e-04
+0.078878,0.08453620,-3.5897398960e-04
+0.079046,0.08582083,-3.5950849346e-04
+0.079215,0.08710546,-3.5296608640e-04
+0.079383,0.08839009,-3.4839424942e-04
+0.079551,0.08967472,-3.4704987578e-04
+0.079719,0.09095935,-3.4921682226e-04
+0.079887,0.09224398,-3.4655991021e-04
+0.080056,0.09352860,-3.4151380359e-04
+0.080224,0.09481323,-3.3795521833e-04
+0.080392,0.09609787,-3.3688891527e-04
+0.080560,0.09738249,-3.3335835212e-04
+0.080728,0.09866712,-3.2785693068e-04
+0.080896,0.09995174,-3.2883076523e-04
+0.081065,0.10123638,-3.2663779188e-04
+0.081233,0.10252101,-3.1878399923e-04
+0.081401,0.10380563,-3.2026205426e-04
+0.081569,0.10509027,-3.1544180933e-04
+0.081737,0.10637489,-3.1106708035e-04
+0.081906,0.10765952,-3.1100817629e-04
+0.082074,0.10894416,-3.0998129040e-04
+0.082242,0.11022878,-3.0116700916e-04
+0.082410,0.11151341,-3.0313686982e-04
+0.082578,0.11279803,-2.9054230947e-04
+0.082746,0.11408267,-2.9178528035e-04
+0.082915,0.11536730,-2.9360591889e-04
+0.083083,0.11665192,-2.8169417558e-04
+0.083251,0.11793656,-2.8863600844e-04
+0.083419,0.11922118,-2.7341085110e-04
+0.083587,0.12050581,-2.8174920000e-04
+0.083756,0.12179044,-2.7316647797e-04
+0.083924,0.12307507,-2.7569092796e-04
+0.084092,0.12435970,-2.6743085916e-04
+0.084260,0.12564432,-2.6078596304e-04
+0.084428,0.12692896,-2.5961652800e-04
+0.084596,0.12821359,-2.5711901382e-04
+0.084765,0.12949821,-2.5080231327e-04
+0.084933,0.13078284,-2.5053129254e-04
+0.085101,0.13206747,-2.4872978619e-04
+0.085269,0.13335210,-2.5185245484e-04
+0.085437,0.13463673,-2.4049652018e-04
+0.085606,0.13592135,-2.4293535200e-04
+0.085774,0.13720599,-2.3993734179e-04
+0.085942,0.13849061,-2.3740041045e-04
+0.086110,0.13977524,-2.3035817245e-04
+0.086278,0.14105988,-2.2738563487e-04
+0.086447,0.14234450,-2.3115618161e-04
+0.086615,0.14362913,-2.1542855517e-04
+0.086783,0.14491375,-2.1255972597e-04
+0.086951,0.14619839,-2.1076544684e-04
+0.087119,0.14748302,-2.1418383291e-04
+0.087287,0.14876764,-1.9954199641e-04
+0.087456,0.15005227,-2.0699106479e-04
+0.087624,0.15133690,-2.0464714011e-04
+0.087792,0.15262153,-1.9886039869e-04
+0.087960,0.15390616,-1.8575807076e-04
+0.088128,0.15519079,-1.9815117791e-04
+0.088297,0.15647542,-1.9374800561e-04
+0.088465,0.15776005,-1.8513536600e-04
+0.088633,0.15904468,-1.8005228085e-04
+0.088801,0.16032930,-1.7971527295e-04
+0.088969,0.16161393,-1.7841221195e-04
+0.089137,0.16289856,-1.7424343655e-04
+0.089306,0.16418319,-1.7330862012e-04
+0.089474,0.16546782,-1.6619318990e-04
+0.089642,0.16675245,-1.6296421904e-04
+0.089810,0.16803708,-1.5688551792e-04
+0.089978,0.16932170,-1.4803660810e-04
+0.090147,0.17060634,-1.4871741881e-04
+0.090315,0.17189097,-1.4847106153e-04
+0.090483,0.17317559,-1.4270505957e-04
+0.090651,0.17446022,-1.4095113980e-04
+0.090819,0.17574485,-1.3200073854e-04
+0.090987,0.17702948,-1.3376324894e-04
+0.091156,0.17831411,-1.3710700178e-04
+0.091324,0.17959874,-1.2221689035e-04
+0.091492,0.18088336,-1.2388866146e-04
+0.091660,0.18216799,-1.1548854866e-04
+0.091828,0.18345263,-1.1009802957e-04
+0.091997,0.18473725,-1.1734154341e-04
+0.092165,0.18602188,-1.1094003388e-04
+0.092333,0.18730651,-1.0347116824e-04
+0.092501,0.18859114,-1.0753825267e-04
+0.092669,0.18987577,-9.9549603649e-05
+0.092838,0.19116040,-9.8045488504e-05
+0.093006,0.19244503,-9.2945887159e-05
+0.093174,0.19372965,-9.2925153242e-05
+0.093342,0.19501428,-8.0120754129e-05
+0.093510,0.19629891,-7.7673098895e-05
+0.093678,0.19758354,-8.0610775119e-05
+0.093847,0.19886817,-7.8533891756e-05
+0.094015,0.20015280,-6.9868078883e-05
+0.094183,0.20143743,-6.6907019501e-05
+0.094351,0.20272206,-6.8635012175e-05
+0.094519,0.20400669,-6.5946259342e-05
+0.094688,0.20529131,-5.5533138718e-05
+0.094856,0.20657594,-5.9049563351e-05
+0.095024,0.20786057,-4.7966395250e-05
+0.095192,0.20914520,-4.6181632325e-05
+0.095360,0.21042983,-4.2385371865e-05
+0.095528,0.21171446,-4.1012319350e-05
+0.095697,0.21299909,-3.8121234859e-05
+0.095865,0.21428372,-3.1569452923e-05
+0.096033,0.21556834,-2.9871987491e-05
+0.096201,0.21685297,-2.7839767124e-05
+0.096369,0.21813760,-2.2477701050e-05
+0.096538,0.21942223,-1.9251433478e-05
+0.096706,0.22070686,-1.5287569701e-05
+0.096874,0.22199149,-1.2941040114e-05
+0.097042,0.22327612,-1.3678808133e-05
+0.097210,0.22456075,-6.2152021839e-06
+0.097378,0.22584538,1.7308326071e-06
+0.097547,0.22713000,2.1645437070e-06
+0.097715,0.22841463,5.6922229397e-06
+0.097883,0.22969926,1.5172294444e-05
+0.098051,0.23098389,1.8733961248e-05
+0.098219,0.23226852,2.0066887177e-05
+0.098388,0.23355315,2.1232759866e-05
+0.098556,0.23483778,2.6025025649e-05
+0.098724,0.23612241,2.9358286827e-05
+0.098892,0.23740704,3.2102986872e-05
+0.099060,0.23869166,2.9909353988e-05
+0.099228,0.23997629,4.3091508328e-05
+0.099397,0.24126092,4.3525479572e-05
+0.099565,0.24254555,5.0661920830e-05
+0.099733,0.24383018,5.6078716186e-05
+0.099901,0.24511481,6.0071161843e-05
+0.100069,0.24639944,5.5173046948e-05
+0.100238,0.24768407,6.7278500792e-05
+0.100406,0.24896870,7.1094611164e-05
+0.100574,0.25025332,7.1086741033e-05
+0.100742,0.25153795,6.7573043234e-05
+0.100910,0.25282258,7.8983243010e-05
+0.101079,0.25410721,8.8307220571e-05
+0.101247,0.25539184,8.3460948782e-05
+0.101415,0.25667647,9.2593981434e-05
+0.101583,0.25796110,1.0029365253e-04
+0.101751,0.25924573,1.0753422893e-04
+0.101919,0.26053035,1.0620234773e-04
+0.102088,0.26181498,1.1959570426e-04
+0.102256,0.26309961,1.1310314506e-04
+0.102424,0.26438424,1.2126729802e-04
+0.102592,0.26566887,1.2294517680e-04
+0.102760,0.26695350,1.3386383144e-04
+0.102929,0.26823813,1.2929836816e-04
+0.103097,0.26952276,1.3538725612e-04
+0.103265,0.27080739,1.3910671352e-04
+0.103433,0.27209201,1.5210998863e-04
+0.103601,0.27337664,1.5278944702e-04
+0.103769,0.27466127,1.5712664323e-04
+0.103938,0.27594590,1.5827002923e-04
+0.104106,0.27723053,1.6915628332e-04
+0.104274,0.27851516,1.6739029232e-04
+0.104442,0.27979979,1.7179436248e-04
+0.104610,0.28108442,1.8328228258e-04
+0.104779,0.28236904,1.8939384982e-04
+0.104947,0.28365368,1.9019345518e-04
+0.105115,0.28493830,1.9708671491e-04
+0.105283,0.28622293,2.0188394802e-04
+0.105451,0.28750756,2.0599785419e-04
+0.105619,0.28879219,2.1068592526e-04
+0.105788,0.29007682,2.1903493763e-04
+0.105956,0.29136145,2.3011621579e-04
+0.106124,0.29264608,2.2576607265e-04
+0.106292,0.29393071,2.3693955328e-04
+0.106460,0.29521533,2.3645710314e-04
+0.106629,0.29649996,2.4583934184e-04
+0.106797,0.29778459,2.5137091364e-04
+0.106965,0.29906922,2.5641564576e-04
+0.107133,0.30035385,2.6386422641e-04
+0.107301,0.30163848,2.6429632988e-04
+0.107470,0.30292311,2.7409956520e-04
+0.107638,0.30420773,2.7573622001e-04
+0.107806,0.30549237,2.8577726631e-04
+0.107974,0.30677699,2.9180483375e-04
+0.108142,0.30806162,2.9546726041e-04
+0.108310,0.30934625,3.0499874341e-04
+0.108479,0.31063088,3.0607750566e-04
+0.108647,0.31191551,3.1764052454e-04
+0.108815,0.31320014,3.2043490895e-04
+0.108983,0.31448477,3.2565752821e-04
+0.109151,0.31576939,3.2855954498e-04
+0.109320,0.31705402,3.3787707125e-04
+0.109488,0.31833866,3.4103419113e-04
+0.109656,0.31962328,3.3900496085e-04
+0.109824,0.32090791,3.5037918526e-04
+0.109992,0.32219254,3.5915555686e-04
+0.110160,0.32347717,3.6670753551e-04
+0.110329,0.32476180,3.7309242909e-04
+0.110497,0.32604643,3.8273464817e-04
+0.110665,0.32733105,3.9098755626e-04
+0.110833,0.32861568,3.8965628472e-04
+0.111001,0.32990031,4.0077245749e-04
+0.111170,0.33118494,4.0817206597e-04
+0.111338,0.33246957,4.0352421017e-04
+0.111506,0.33375420,4.0952643801e-04
+0.111674,0.33503883,4.2123692764e-04
+0.111842,0.33632345,4.2862248073e-04
+0.112010,0.33760809,4.3702680571e-04
+0.112179,0.33889272,4.3608837566e-04
+0.112347,0.34017734,4.4182944815e-04
+0.112515,0.34146197,4.4795511512e-04
+0.112683,0.34274660,4.5727241969e-04
+0.112851,0.34403123,4.6221220195e-04
diff --git a/demo_data/ec_EC_metadata.json b/demo_data/ec_EC_metadata.json
new file mode 100644
index 0000000000000000000000000000000000000000..63865bdda4fc81b19ebf1abef78b7b9aca85c397
--- /dev/null
+++ b/demo_data/ec_EC_metadata.json
@@ -0,0 +1,36 @@
+{
+ "mechanism": "EC",
+ "n_scans": 3,
+ "scan_rates_Vs": [
+ 0.010000000149011612,
+ 0.12726666927337646,
+ 7.638240051269531
+ ],
+ "physical_params": {
+ "E0_V": 0.25,
+ "T_K": 298.15,
+ "A_cm2": 0.0707,
+ "C_mM": 1.0,
+ "D_cm2s": 1e-05,
+ "n_electrons": 1
+ },
+ "true_params_dimless": {
+ "sigma": 8.719717822841444,
+ "C_A_bulk": 1.0,
+ "C_B_bulk": 0.0,
+ "dA": 1.0,
+ "dB": 1.2541572204674802,
+ "theta_i": 3.6881732361108934,
+ "theta_v": -13.090140187264856,
+ "cycles": 1.0,
+ "kinetics": "EC",
+ "K0": 5.810825216518235,
+ "alpha": 0.5204656070504309,
+ "kc": 11.173370442593823
+ },
+ "csv_files": [
+ "ec_EC_10mVs.csv",
+ "ec_EC_127mVs.csv",
+ "ec_EC_7638mVs.csv"
+ ]
+}
\ No newline at end of file
diff --git a/demo_data/ec_LH_10mVs.csv b/demo_data/ec_LH_10mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..4ded367cd819a4003de8893ca411e8ad3e3b77e1
--- /dev/null
+++ b/demo_data/ec_LH_10mVs.csv
@@ -0,0 +1,673 @@
+Time (s),E (V),I (A)
+0.000000,0.34475868,-1.3447071356e-06
+0.128463,0.34347405,-7.7678892117e-07
+0.256926,0.34218941,-6.2548309040e-07
+0.385389,0.34090479,-5.9198830679e-07
+0.513852,0.33962016,-5.4461132016e-07
+0.642314,0.33833553,-5.2251021160e-07
+0.770777,0.33705090,-5.2312476075e-07
+0.899240,0.33576627,-5.1414797144e-07
+1.027703,0.33448164,-5.2449965028e-07
+1.156166,0.33319702,-5.3411786085e-07
+1.284629,0.33191239,-5.6098876921e-07
+1.413092,0.33062776,-5.6427909885e-07
+1.541555,0.32934313,-5.8103797146e-07
+1.670018,0.32805850,-5.9113175824e-07
+1.798480,0.32677387,-5.7352460927e-07
+1.926943,0.32548924,-6.2772485620e-07
+2.055406,0.32420462,-6.3580609228e-07
+2.183869,0.32291998,-6.5783435535e-07
+2.312332,0.32163535,-6.7634788661e-07
+2.440795,0.32035073,-6.9973208836e-07
+2.569258,0.31906610,-7.5326083330e-07
+2.697721,0.31778147,-7.5418741981e-07
+2.826183,0.31649684,-7.9696792173e-07
+2.954646,0.31521221,-8.2163000268e-07
+3.083109,0.31392758,-8.1925788708e-07
+3.211572,0.31264296,-8.5901527645e-07
+3.340035,0.31135833,-8.9851427242e-07
+3.468498,0.31007369,-9.2757164819e-07
+3.596961,0.30878907,-9.4047076310e-07
+3.725424,0.30750444,-9.9236452054e-07
+3.853887,0.30621981,-9.8443373820e-07
+3.982349,0.30493518,-1.0230558811e-06
+4.110812,0.30365055,-1.0503796046e-06
+4.239275,0.30236592,-1.0784020030e-06
+4.367738,0.30108129,-1.1128986752e-06
+4.496201,0.29979667,-1.1397216549e-06
+4.624664,0.29851204,-1.1894492996e-06
+4.753127,0.29722741,-1.2149516354e-06
+4.881590,0.29594278,-1.2573163215e-06
+5.010053,0.29465815,-1.2592060927e-06
+5.138515,0.29337352,-1.3085400810e-06
+5.266978,0.29208889,-1.3361177860e-06
+5.395441,0.29080426,-1.3814576560e-06
+5.523904,0.28951963,-1.4075495740e-06
+5.652367,0.28823501,-1.4369828585e-06
+5.780830,0.28695038,-1.4725484993e-06
+5.909293,0.28566575,-1.5039365294e-06
+6.037756,0.28438112,-1.5101473963e-06
+6.166218,0.28309649,-1.5546773930e-06
+6.294681,0.28181186,-1.5730925102e-06
+6.423144,0.28052723,-1.6021281275e-06
+6.551607,0.27924260,-1.6336073022e-06
+6.680070,0.27795798,-1.6569134445e-06
+6.808533,0.27667334,-1.6668741742e-06
+6.936996,0.27538872,-1.6980381030e-06
+7.065459,0.27410409,-1.7312035027e-06
+7.193922,0.27281946,-1.7495786125e-06
+7.322384,0.27153483,-1.7663157267e-06
+7.450847,0.27025020,-1.7886693128e-06
+7.579310,0.26896557,-1.7807125607e-06
+7.707773,0.26768094,-1.8106853931e-06
+7.836236,0.26639631,-1.8070155451e-06
+7.964699,0.26511169,-1.8473983126e-06
+8.093162,0.26382706,-1.8569870441e-06
+8.221625,0.26254243,-1.8372250125e-06
+8.350088,0.26125780,-1.8869089398e-06
+8.478550,0.25997317,-1.8877802781e-06
+8.607013,0.25868854,-1.8976230914e-06
+8.735476,0.25740391,-1.8958635697e-06
+8.863939,0.25611928,-1.8952086121e-06
+8.992402,0.25483466,-1.8916310115e-06
+9.120865,0.25355003,-1.8930905282e-06
+9.249328,0.25226540,-1.9118145743e-06
+9.377791,0.25098077,-1.9055208852e-06
+9.506253,0.24969614,-1.9220785177e-06
+9.634716,0.24841151,-1.8999928506e-06
+9.763179,0.24712688,-1.9204210700e-06
+9.891642,0.24584225,-1.8838342890e-06
+10.020105,0.24455762,-1.9182588677e-06
+10.148568,0.24327300,-1.8837536726e-06
+10.277031,0.24198837,-1.8839604275e-06
+10.405494,0.24070374,-1.8905073963e-06
+10.533957,0.23941911,-1.8499902682e-06
+10.662419,0.23813448,-1.8707856729e-06
+10.790882,0.23684985,-1.8334669276e-06
+10.919345,0.23556522,-1.8503608627e-06
+11.047808,0.23428059,-1.8366015394e-06
+11.176271,0.23299596,-1.8531748139e-06
+11.304734,0.23171134,-1.8269787164e-06
+11.433197,0.23042671,-1.8069547820e-06
+11.561660,0.22914208,-1.8072642124e-06
+11.690123,0.22785745,-1.7952132735e-06
+11.818585,0.22657282,-1.7884392955e-06
+11.947048,0.22528819,-1.7660776879e-06
+12.075511,0.22400356,-1.7595237002e-06
+12.203974,0.22271894,-1.7108891890e-06
+12.332437,0.22143430,-1.7364040584e-06
+12.460900,0.22014968,-1.7143687264e-06
+12.589363,0.21886505,-1.6969329372e-06
+12.717826,0.21758042,-1.6906709331e-06
+12.846289,0.21629579,-1.6721270704e-06
+12.974751,0.21501116,-1.6774541657e-06
+13.103214,0.21372653,-1.6609223023e-06
+13.231677,0.21244190,-1.6511317292e-06
+13.360140,0.21115727,-1.6443752983e-06
+13.488603,0.20987265,-1.6044819440e-06
+13.617066,0.20858802,-1.6006018317e-06
+13.745529,0.20730339,-1.6172822939e-06
+13.873992,0.20601876,-1.5777201284e-06
+14.002454,0.20473413,-1.5491247925e-06
+14.130917,0.20344950,-1.5529934742e-06
+14.259380,0.20216487,-1.5331892293e-06
+14.387843,0.20088024,-1.5205552258e-06
+14.516306,0.19959561,-1.5101562200e-06
+14.644769,0.19831099,-1.5109637871e-06
+14.773232,0.19702636,-1.4957732230e-06
+14.901695,0.19574173,-1.4815184703e-06
+15.030158,0.19445710,-1.4542827830e-06
+15.158620,0.19317247,-1.4562170737e-06
+15.287083,0.19188784,-1.4613824350e-06
+15.415546,0.19060321,-1.4221858506e-06
+15.544009,0.18931859,-1.4240438365e-06
+15.672472,0.18803395,-1.4121729809e-06
+15.800935,0.18674933,-1.4019592723e-06
+15.929398,0.18546470,-1.3739424890e-06
+16.057861,0.18418007,-1.3789011957e-06
+16.186324,0.18289544,-1.3685790963e-06
+16.314786,0.18161081,-1.3465254150e-06
+16.443249,0.18032618,-1.3460165494e-06
+16.571712,0.17904155,-1.3488089429e-06
+16.700175,0.17775693,-1.3527906278e-06
+16.828638,0.17647230,-1.3135506268e-06
+16.957101,0.17518766,-1.2889591353e-06
+17.085564,0.17390304,-1.3172681027e-06
+17.214027,0.17261841,-1.3058895683e-06
+17.342489,0.17133378,-1.2891039238e-06
+17.470952,0.17004915,-1.2655443013e-06
+17.599415,0.16876452,-1.2591609716e-06
+17.727878,0.16747989,-1.2680022974e-06
+17.856341,0.16619526,-1.2468259705e-06
+17.984804,0.16491064,-1.2223582110e-06
+18.113267,0.16362601,-1.2367822180e-06
+18.241730,0.16234138,-1.2065984194e-06
+18.370193,0.16105675,-1.2203823087e-06
+18.498655,0.15977212,-1.2077294546e-06
+18.627118,0.15848749,-1.1870976890e-06
+18.755581,0.15720287,-1.1859533181e-06
+18.884044,0.15591823,-1.1996157815e-06
+19.012507,0.15463360,-1.1600457950e-06
+19.140970,0.15334898,-1.1588504874e-06
+19.269433,0.15206435,-1.1413514285e-06
+19.397896,0.15077972,-1.1620815580e-06
+19.526359,0.14949509,-1.1281208240e-06
+19.654821,0.14821046,-1.1345998104e-06
+19.783284,0.14692583,-1.1044511061e-06
+19.911747,0.14564120,-1.1334091152e-06
+20.040210,0.14435657,-1.1234572091e-06
+20.168673,0.14307195,-1.1113996526e-06
+20.297136,0.14178732,-1.1144281796e-06
+20.425599,0.14050268,-1.0883465894e-06
+20.554062,0.13921806,-1.0853058295e-06
+20.682524,0.13793343,-1.1074945732e-06
+20.810987,0.13664881,-1.0834414264e-06
+20.939450,0.13536417,-1.0665126979e-06
+21.067913,0.13407954,-1.0634367436e-06
+21.196376,0.13279492,-1.0718381890e-06
+21.324839,0.13151028,-1.0545702503e-06
+21.453302,0.13022566,-1.0499534611e-06
+21.581765,0.12894103,-1.0497098072e-06
+21.710228,0.12765639,-1.0386448142e-06
+21.838690,0.12637177,-1.0446912398e-06
+21.967153,0.12508714,-1.0197301565e-06
+22.095616,0.12380252,-1.0304378908e-06
+22.224079,0.12251788,-1.0068988235e-06
+22.352542,0.12123325,-1.0426401357e-06
+22.481005,0.11994863,-1.0130073157e-06
+22.609468,0.11866399,-1.0046544006e-06
+22.737931,0.11737937,-9.9817832194e-07
+22.866394,0.11609474,-1.0049732562e-06
+22.994856,0.11481010,-9.8281619751e-07
+23.123319,0.11352548,-9.8842174005e-07
+23.251782,0.11224085,-9.8530086515e-07
+23.380245,0.11095623,-9.6829302443e-07
+23.508708,0.10967159,-9.6468815071e-07
+23.637171,0.10838696,-9.6676201595e-07
+23.765634,0.10710234,-9.6830866640e-07
+23.894097,0.10581771,-9.6284941645e-07
+24.022559,0.10453308,-9.4931028405e-07
+24.151022,0.10324845,-9.4989395032e-07
+24.279485,0.10196382,-9.5962837275e-07
+24.407948,0.10067919,-9.4066227703e-07
+24.536411,0.09939456,-9.5706940573e-07
+24.664874,0.09810994,-9.3824789802e-07
+24.793337,0.09682531,-9.3355069302e-07
+24.921800,0.09554067,-9.2775524086e-07
+25.050263,0.09425605,-9.2995143437e-07
+25.178725,0.09297142,-9.2962826715e-07
+25.307188,0.09168680,-8.9905051142e-07
+25.435651,0.09040216,-9.2843165603e-07
+25.564114,0.08911753,-9.1375015808e-07
+25.692577,0.08783291,-8.9959256603e-07
+25.821040,0.08654827,-9.1209722241e-07
+25.949503,0.08526365,-9.0413565746e-07
+26.077966,0.08397902,-8.8780693918e-07
+26.206429,0.08269438,-8.9114700227e-07
+26.334891,0.08140976,-8.9667363304e-07
+26.463354,0.08012513,-8.9615263494e-07
+26.591817,0.07884051,-8.8890578795e-07
+26.720280,0.07755587,-8.5600650238e-07
+26.848743,0.07627124,-8.8599728295e-07
+26.977206,0.07498662,-8.7804885325e-07
+27.105669,0.07370198,-8.5845888337e-07
+27.234132,0.07241736,-8.8011509804e-07
+27.362595,0.07113273,-8.7119445942e-07
+27.491057,0.06984810,-8.6621900774e-07
+27.619520,0.06856347,-8.5782207448e-07
+27.747983,0.06727884,-8.6376853186e-07
+27.876446,0.06599422,-8.3398240047e-07
+28.004909,0.06470958,-8.4899217937e-07
+28.133372,0.06342495,-8.4185091571e-07
+28.261835,0.06214033,-8.4695340830e-07
+28.390298,0.06085570,-8.2440835843e-07
+28.518760,0.05957107,-8.5488870275e-07
+28.647223,0.05828644,-8.5474571905e-07
+28.775686,0.05700181,-8.3710848936e-07
+28.904149,0.05571719,-8.4174974422e-07
+29.032612,0.05443255,-8.3051634928e-07
+29.161075,0.05314793,-8.2914251258e-07
+29.289538,0.05186330,-8.2523081550e-07
+29.418001,0.05057866,-8.3392374306e-07
+29.546464,0.04929404,-8.2398702778e-07
+29.674926,0.04800941,-8.1501144170e-07
+29.803389,0.04672479,-8.2805649825e-07
+29.931852,0.04544015,-8.1458294182e-07
+30.060315,0.04415553,-8.0678902677e-07
+30.188778,0.04287090,-7.8908732406e-07
+30.317241,0.04158626,-7.9646968470e-07
+30.445704,0.04030163,-8.0650852403e-07
+30.574167,0.03901702,-8.0604477957e-07
+30.702630,0.03773239,-7.9500630772e-07
+30.831092,0.03644775,-7.9144951302e-07
+30.959555,0.03516312,-7.8062601806e-07
+31.088018,0.03387848,-8.1174908714e-07
+31.216481,0.03259388,-7.7994574253e-07
+31.344944,0.03130924,-7.8492761143e-07
+31.473407,0.03002461,-7.8756318402e-07
+31.601870,0.02873997,-7.9587052686e-07
+31.730333,0.02745534,-7.8644543452e-07
+31.858795,0.02617073,-7.7962728796e-07
+31.987258,0.02488610,-7.6856760919e-07
+32.115721,0.02360146,-7.6497727449e-07
+32.244184,0.02231683,-7.8301919016e-07
+32.372647,0.02103220,-7.5807209437e-07
+32.501110,0.01974759,-7.7468547655e-07
+32.629573,0.01846295,-7.6159585041e-07
+32.758036,0.01717832,-7.8840404046e-07
+32.886499,0.01589369,-7.6656468432e-07
+33.014961,0.01460905,-7.7174022294e-07
+33.143424,0.01332444,-7.6413391132e-07
+33.271887,0.01203981,-7.5903843756e-07
+33.400350,0.01075518,-7.5027436909e-07
+33.528813,0.00947054,-7.5611434072e-07
+33.657276,0.00818591,-7.6591824961e-07
+33.785739,0.00690130,-7.5542062914e-07
+33.914202,0.00561666,-7.6666851295e-07
+34.042665,0.00433203,-7.6335507129e-07
+34.171127,0.00304740,-7.2238242076e-07
+34.299590,0.00176276,-7.4530373033e-07
+34.428053,0.00047815,-7.3115531291e-07
+34.556516,-0.00080648,-7.3258174074e-07
+34.684979,-0.00209111,-7.2759485839e-07
+34.813442,-0.00337575,-7.5585574678e-07
+34.941905,-0.00466038,-7.2594468012e-07
+35.070368,-0.00594499,-7.1398669073e-07
+35.198830,-0.00722962,-7.1497318801e-07
+35.327293,-0.00851426,-7.2650739016e-07
+35.455756,-0.00979889,-7.1478377973e-07
+35.584219,-0.01108352,-7.3280689494e-07
+35.712682,-0.01236813,-7.0626276349e-07
+35.841145,-0.01365277,-7.2948297517e-07
+35.969608,-0.01493740,-7.3924336728e-07
+36.098071,-0.01622204,-7.1971105211e-07
+36.226534,-0.01750667,-7.2836447366e-07
+36.354996,-0.01879128,-7.0870561892e-07
+36.483459,-0.02007591,-7.1224246007e-07
+36.611922,-0.02136055,-7.1600435515e-07
+36.740385,-0.02264518,-7.0860805711e-07
+36.868848,-0.02392981,-7.1796476594e-07
+36.997311,-0.02521442,-6.8499333676e-07
+37.125774,-0.02649906,-7.0561532609e-07
+37.254237,-0.02778369,-6.9158673020e-07
+37.382700,-0.02906832,-6.9774721192e-07
+37.511162,-0.03035296,-7.1988226156e-07
+37.639625,-0.03163757,-6.9526063918e-07
+37.768088,-0.03292220,-6.9853612899e-07
+37.896551,-0.03420683,-6.8960039986e-07
+38.025014,-0.03549147,-7.0212375642e-07
+38.153477,-0.03677610,-6.9641984993e-07
+38.281940,-0.03806071,-6.9023149341e-07
+38.410403,-0.03934534,-6.8664867889e-07
+38.538866,-0.04062998,-6.9193270864e-07
+38.667328,-0.04191461,-6.8304235127e-07
+38.795791,-0.04319925,-6.8821302683e-07
+38.924254,-0.04448386,-7.0219384450e-07
+39.052717,-0.04576849,-6.7317086103e-07
+39.181180,-0.04705312,-6.6234059790e-07
+39.309643,-0.04833776,-6.7438221170e-07
+39.438106,-0.04962239,-6.8589385331e-07
+39.566569,-0.05090700,-6.7702415137e-07
+39.695031,-0.05219163,-6.6702065689e-07
+39.823494,-0.05347627,-6.7002531993e-07
+39.951957,-0.05476090,-6.6865183417e-07
+40.080420,-0.05604553,-6.6207358136e-07
+40.208883,-0.05733014,-6.5517226160e-07
+40.337346,-0.05861478,-6.8651045797e-07
+40.465809,-0.05989941,-6.7392799280e-07
+40.594272,-0.06118405,-6.6812737678e-07
+40.722735,-0.06246868,-6.4618138448e-07
+40.851197,-0.06375329,-6.4584528255e-07
+40.979660,-0.06503792,-6.4775977010e-07
+41.108123,-0.06632256,-6.6779277889e-07
+41.236586,-0.06760719,-6.5506422167e-07
+41.365049,-0.06889182,-6.6352653036e-07
+41.493512,-0.07017643,-6.5672427644e-07
+41.621975,-0.07146107,-6.6877140504e-07
+41.750438,-0.07274570,-6.3749121432e-07
+41.878901,-0.07403033,-6.5670261832e-07
+42.007363,-0.07531497,-6.6589037376e-07
+42.135826,-0.07659958,-6.4150839447e-07
+42.264289,-0.07788421,-6.3716112853e-07
+42.392752,-0.07916884,-6.6617624089e-07
+42.521215,-0.08045348,-6.3212817254e-07
+42.649678,-0.08173811,-6.5152612716e-07
+42.778141,-0.08302272,-6.6247957084e-07
+42.906604,-0.08430735,-6.3996941460e-07
+43.035066,-0.08559199,-6.5601366952e-07
+43.163529,-0.08631944,-6.3081519916e-07
+43.291992,-0.08503480,-6.4308056340e-07
+43.420455,-0.08375017,-6.3869063297e-07
+43.548918,-0.08246554,-6.5009207887e-07
+43.677381,-0.08118093,-6.4758244424e-07
+43.805844,-0.07989629,-6.2436875005e-07
+43.934307,-0.07861166,-6.2291650293e-07
+44.062770,-0.07732703,-6.4231490876e-07
+44.191232,-0.07604239,-6.2062500367e-07
+44.319695,-0.07475778,-6.2913358654e-07
+44.448158,-0.07347315,-6.3388318213e-07
+44.576621,-0.07218852,-6.2724406599e-07
+44.705084,-0.07090388,-6.0478529765e-07
+44.833547,-0.06961925,-6.1034526789e-07
+44.962010,-0.06833464,-6.3425713564e-07
+45.090473,-0.06705001,-6.3421236550e-07
+45.218936,-0.06576537,-6.2357241307e-07
+45.347398,-0.06448074,-6.2183149129e-07
+45.475861,-0.06319610,-6.2230802006e-07
+45.604324,-0.06191150,-6.0646936687e-07
+45.732787,-0.06062686,-6.1030385676e-07
+45.861250,-0.05934223,-6.2024503402e-07
+45.989713,-0.05805759,-6.2628494217e-07
+46.118176,-0.05677296,-6.0640258767e-07
+46.246639,-0.05548835,-6.0724003497e-07
+46.375101,-0.05420372,-6.2016617239e-07
+46.503564,-0.05291908,-6.2139968253e-07
+46.632027,-0.05163445,-6.0226914553e-07
+46.760490,-0.05034982,-6.2500941929e-07
+46.888953,-0.04906521,-6.0432200440e-07
+47.017416,-0.04778057,-6.0452138945e-07
+47.145879,-0.04649594,-5.9948412189e-07
+47.274342,-0.04521131,-6.2008254798e-07
+47.402805,-0.04392667,-6.0684793276e-07
+47.531267,-0.04264206,-5.9333787838e-07
+47.659730,-0.04135743,-5.9601842165e-07
+47.788193,-0.04007280,-5.8988766971e-07
+47.916656,-0.03878816,-6.0554543750e-07
+48.045119,-0.03750353,-5.9867244375e-07
+48.173582,-0.03621892,-5.8709828437e-07
+48.302045,-0.03493428,-6.1197067970e-07
+48.430508,-0.03364965,-6.0685194352e-07
+48.558971,-0.03236502,-5.9872102411e-07
+48.687433,-0.03108038,-6.0783077021e-07
+48.815896,-0.02979577,-5.9362921018e-07
+48.944359,-0.02851114,-6.0399247009e-07
+49.072822,-0.02722651,-5.9329030071e-07
+49.201285,-0.02594187,-6.0769711154e-07
+49.329748,-0.02465724,-6.0408672302e-07
+49.458211,-0.02337263,-6.0054642259e-07
+49.586674,-0.02208800,-5.9020848061e-07
+49.715137,-0.02080336,-5.9109084846e-07
+49.843599,-0.01951873,-6.0763905574e-07
+49.972062,-0.01823409,-5.8225619056e-07
+50.100525,-0.01694949,-5.9062309323e-07
+50.228988,-0.01566485,-5.8689704434e-07
+50.357451,-0.01438022,-5.8251353114e-07
+50.485914,-0.01309558,-5.7475135124e-07
+50.614377,-0.01181095,-5.9760392637e-07
+50.742840,-0.01052634,-5.6560330236e-07
+50.871302,-0.00924171,-5.7592179213e-07
+50.999765,-0.00795707,-5.8440345276e-07
+51.128228,-0.00667244,-5.9158186611e-07
+51.256691,-0.00538781,-5.7673407190e-07
+51.385154,-0.00410320,-5.7044379186e-07
+51.513617,-0.00281856,-5.8126904153e-07
+51.642080,-0.00153393,-5.9351791150e-07
+51.770543,-0.00024930,-5.9444344518e-07
+51.899006,0.00103534,-5.5446085148e-07
+52.027468,0.00231995,-5.7787663798e-07
+52.155931,0.00360458,-5.7152028063e-07
+52.284394,0.00488921,-5.7246672041e-07
+52.412857,0.00617385,-5.5269576485e-07
+52.541320,0.00745848,-5.6951249271e-07
+52.669783,0.00874309,-6.0013722450e-07
+52.798246,0.01002773,-5.7959805743e-07
+52.926709,0.01131236,-5.7079969694e-07
+53.055172,0.01259699,-5.8753270013e-07
+53.183634,0.01388163,-5.6465144805e-07
+53.312097,0.01516624,-5.5456879113e-07
+53.440560,0.01645087,-5.7581846485e-07
+53.569023,0.01773550,-5.5820961131e-07
+53.697486,0.01902014,-5.5560326716e-07
+53.825949,0.02030477,-5.4980686245e-07
+53.954412,0.02158938,-5.6412428340e-07
+54.082875,0.02287401,-5.6755744633e-07
+54.211337,0.02415865,-5.7429507683e-07
+54.339800,0.02544328,-5.4628701691e-07
+54.468263,0.02672791,-5.7774197662e-07
+54.596726,0.02801252,-5.5858456751e-07
+54.725189,0.02929716,-5.2219526644e-07
+54.853652,0.03058179,-5.4114531911e-07
+54.982115,0.03186643,-5.5209114234e-07
+55.110578,0.03315106,-5.4017250856e-07
+55.239041,0.03443567,-5.6087827269e-07
+55.367503,0.03572030,-5.4552376872e-07
+55.495966,0.03700494,-5.6311462397e-07
+55.624429,0.03828957,-5.5340622137e-07
+55.752892,0.03957420,-5.3533176838e-07
+55.881355,0.04085881,-5.2378658677e-07
+56.009818,0.04214345,-5.5394727328e-07
+56.138281,0.04342808,-5.4311264846e-07
+56.266744,0.04471271,-5.4176046987e-07
+56.395207,0.04599734,-5.6144343932e-07
+56.523669,0.04728197,-5.5430979612e-07
+56.652132,0.04856659,-5.5395233687e-07
+56.780595,0.04985122,-5.3217454594e-07
+56.909058,0.05113586,-5.3051424050e-07
+57.037521,0.05242048,-5.2189079940e-07
+57.165984,0.05370511,-5.2642967953e-07
+57.294447,0.05498973,-5.5143608448e-07
+57.422910,0.05627437,-5.5276028800e-07
+57.551372,0.05755900,-5.2197166641e-07
+57.679835,0.05884362,-5.2705500761e-07
+57.808298,0.06012826,-5.3169796704e-07
+57.936761,0.06141288,-5.3182967047e-07
+58.065224,0.06269751,-5.5803228546e-07
+58.193687,0.06398215,-5.4005168433e-07
+58.322150,0.06526677,-5.5201644188e-07
+58.450613,0.06655140,-5.4559420775e-07
+58.579076,0.06783602,-5.4994097233e-07
+58.707538,0.06912066,-5.3571223938e-07
+58.836001,0.07040529,-5.2013122757e-07
+58.964464,0.07168991,-5.3375042483e-07
+59.092927,0.07297455,-5.3441716403e-07
+59.221390,0.07425917,-5.1971841980e-07
+59.349853,0.07554380,-5.3721056014e-07
+59.478316,0.07682844,-5.4349036205e-07
+59.606779,0.07811306,-5.4307143787e-07
+59.735242,0.07939769,-5.2971223832e-07
+59.863704,0.08068231,-5.2603893096e-07
+59.992167,0.08196695,-5.2772691067e-07
+60.120630,0.08325158,-5.1769684488e-07
+60.249093,0.08453620,-5.1395685859e-07
+60.377556,0.08582083,-5.1940548002e-07
+60.506019,0.08710546,-5.3452786109e-07
+60.634482,0.08839009,-5.2064310119e-07
+60.762945,0.08967472,-5.2468304242e-07
+60.891407,0.09095935,-5.3194106941e-07
+61.019870,0.09224398,-5.3417581637e-07
+61.148333,0.09352860,-5.0277851138e-07
+61.276796,0.09481323,-5.0817770016e-07
+61.405259,0.09609787,-5.0480620271e-07
+61.533722,0.09738249,-5.3654577619e-07
+61.662185,0.09866712,-4.9648778014e-07
+61.790648,0.09995174,-5.0904918881e-07
+61.919111,0.10123638,-5.1189627900e-07
+62.047573,0.10252101,-5.1162585331e-07
+62.176036,0.10380563,-5.2836898368e-07
+62.304499,0.10509027,-5.1513938190e-07
+62.432962,0.10637489,-5.1339013779e-07
+62.561425,0.10765952,-5.2761676509e-07
+62.689888,0.10894416,-5.1066056295e-07
+62.818351,0.11022878,-4.9967182455e-07
+62.946814,0.11151341,-5.1665971172e-07
+63.075277,0.11279803,-4.9347795323e-07
+63.203739,0.11408267,-5.0958858629e-07
+63.332202,0.11536730,-4.9921690377e-07
+63.460665,0.11665192,-5.2037563344e-07
+63.589128,0.11793656,-4.9830951879e-07
+63.717591,0.11922118,-5.0157272564e-07
+63.846054,0.12050581,-5.0036473398e-07
+63.974517,0.12179044,-4.8745930212e-07
+64.102980,0.12307507,-4.7697551878e-07
+64.231443,0.12435970,-5.1643576075e-07
+64.359905,0.12564432,-4.9073434072e-07
+64.488368,0.12692896,-5.1333849922e-07
+64.616831,0.12821359,-5.0535893597e-07
+64.745294,0.12949821,-4.9930789795e-07
+64.873757,0.13078284,-5.2379871933e-07
+65.002220,0.13206747,-4.7298230294e-07
+65.130683,0.13335210,-4.9003802214e-07
+65.259146,0.13463673,-4.8836728871e-07
+65.387608,0.13592135,-4.8207425128e-07
+65.516071,0.13720599,-4.7586940050e-07
+65.644534,0.13849061,-4.7288805001e-07
+65.772997,0.13977524,-4.8073410498e-07
+65.901460,0.14105988,-4.7670785049e-07
+66.029923,0.14234450,-4.8589079301e-07
+66.158386,0.14362913,-4.9178395738e-07
+66.286849,0.14491375,-4.9766273313e-07
+66.415312,0.14619839,-4.7512485250e-07
+66.543774,0.14748302,-4.7394814479e-07
+66.672237,0.14876764,-4.6925439907e-07
+66.800700,0.15005227,-4.7251710458e-07
+66.929163,0.15133690,-4.5222605333e-07
+67.057626,0.15262153,-4.7175400680e-07
+67.186089,0.15390616,-4.8003813735e-07
+67.314552,0.15519079,-4.7365475748e-07
+67.443015,0.15647542,-4.7214946802e-07
+67.571478,0.15776005,-4.4990662913e-07
+67.699940,0.15904468,-4.3470884572e-07
+67.828403,0.16032930,-4.5498395419e-07
+67.956866,0.16161393,-4.4617160616e-07
+68.085329,0.16289856,-4.4085313398e-07
+68.213792,0.16418319,-4.4713759841e-07
+68.342255,0.16546782,-4.4503360231e-07
+68.470718,0.16675245,-4.4225203796e-07
+68.599181,0.16803708,-4.5017234217e-07
+68.727643,0.16932170,-4.3639827933e-07
+68.856106,0.17060634,-4.1991451999e-07
+68.984569,0.17189097,-4.1166804048e-07
+69.113032,0.17317559,-4.1962744964e-07
+69.241495,0.17446022,-4.2580420001e-07
+69.369958,0.17574485,-4.0765198836e-07
+69.498421,0.17702948,-4.3814175798e-07
+69.626884,0.17831411,-4.1280469069e-07
+69.755347,0.17959874,-3.9209679584e-07
+69.883809,0.18088336,-3.8221405039e-07
+70.012272,0.18216799,-3.9412644242e-07
+70.140735,0.18345263,-4.0258614412e-07
+70.269198,0.18473725,-3.8123033558e-07
+70.397661,0.18602188,-3.9224795147e-07
+70.526124,0.18730651,-3.8932395489e-07
+70.654587,0.18859114,-3.5328103334e-07
+70.783050,0.18987577,-3.5245476604e-07
+70.911513,0.19116040,-3.5439236561e-07
+71.039975,0.19244503,-3.4316456068e-07
+71.168438,0.19372965,-3.5516070245e-07
+71.296901,0.19501428,-3.3954998593e-07
+71.425364,0.19629891,-3.1513577013e-07
+71.553827,0.19758354,-3.3005330148e-07
+71.682290,0.19886817,-3.0677272781e-07
+71.810753,0.20015280,-3.2039455714e-07
+71.939216,0.20143743,-2.8422853022e-07
+72.067678,0.20272206,-2.7580557714e-07
+72.196141,0.20400669,-2.6539396247e-07
+72.324604,0.20529131,-2.4233154924e-07
+72.453067,0.20657594,-2.4860749079e-07
+72.581530,0.20786057,-2.2509376647e-07
+72.709993,0.20914520,-2.2755990939e-07
+72.838456,0.21042983,-2.0504436369e-07
+72.966919,0.21171446,-1.8907998561e-07
+73.095382,0.21299909,-1.9423568348e-07
+73.223844,0.21428372,-1.8267642660e-07
+73.352307,0.21556834,-1.6653450959e-07
+73.480770,0.21685297,-1.2629953863e-07
+73.609233,0.21813760,-1.3317018859e-07
+73.737696,0.21942223,-1.1524922249e-07
+73.866159,0.22070686,-9.5638923047e-08
+73.994622,0.22199149,-1.0688007630e-07
+74.123085,0.22327612,-6.8263586045e-08
+74.251548,0.22456075,-6.4760767445e-08
+74.380010,0.22584538,-3.0765634902e-08
+74.508473,0.22713000,-2.1768624142e-08
+74.636936,0.22841463,6.2727094437e-09
+74.765399,0.22969926,4.4552948928e-09
+74.893862,0.23098389,3.1143166763e-08
+75.022325,0.23226852,5.4951813765e-08
+75.150788,0.23355315,9.5056867345e-08
+75.279251,0.23483778,1.0814616135e-07
+75.407714,0.23612241,1.3173006149e-07
+75.536176,0.23740704,1.6313409705e-07
+75.664639,0.23869166,1.8021345468e-07
+75.793102,0.23997629,2.2571029593e-07
+75.921565,0.24126092,2.3282746994e-07
+76.050028,0.24254555,2.7097431239e-07
+76.178491,0.24383018,2.9686220783e-07
+76.306954,0.24511481,3.2126256143e-07
+76.435417,0.24639944,3.2282763633e-07
+76.563879,0.24768407,3.9085889893e-07
+76.692342,0.24896870,4.0882902194e-07
+76.820805,0.25025332,4.2901135645e-07
+76.949268,0.25153795,4.8031347622e-07
+77.077731,0.25282258,4.8633498500e-07
+77.206194,0.25410721,5.3149747903e-07
+77.334657,0.25539184,5.4739769743e-07
+77.463120,0.25667647,6.0040098230e-07
+77.591583,0.25796110,6.1267557128e-07
+77.720045,0.25924573,6.8192274680e-07
+77.848508,0.26053035,6.8645896980e-07
+77.976971,0.26181498,7.1790455436e-07
+78.105434,0.26309961,7.6565649719e-07
+78.233897,0.26438424,7.6451067236e-07
+78.362360,0.26566887,8.2915309097e-07
+78.490823,0.26695350,8.3756070288e-07
+78.619286,0.26823813,8.7519479436e-07
+78.747749,0.26952276,8.9248549413e-07
+78.876211,0.27080739,9.3193094641e-07
+79.004674,0.27209201,9.7511954346e-07
+79.133137,0.27337664,1.0180872477e-06
+79.261600,0.27466127,1.0298636498e-06
+79.390063,0.27594590,1.0533769480e-06
+79.518526,0.27723053,1.0943560158e-06
+79.646989,0.27851516,1.1273083437e-06
+79.775452,0.27979979,1.1335716513e-06
+79.903914,0.28108442,1.1557506690e-06
+80.032377,0.28236904,1.2100052617e-06
+80.160840,0.28365368,1.2346812801e-06
+80.289303,0.28493830,1.2258876824e-06
+80.417766,0.28622293,1.2432141782e-06
+80.546229,0.28750756,1.2823515036e-06
+80.674692,0.28879219,1.3141506369e-06
+80.803155,0.29007682,1.3306587366e-06
+80.931618,0.29136145,1.3441155481e-06
+81.060080,0.29264608,1.3517886389e-06
+81.188543,0.29393071,1.3640516468e-06
+81.317006,0.29521533,1.3845062369e-06
+81.445469,0.29649996,1.3724045620e-06
+81.573932,0.29778459,1.4120411271e-06
+81.702395,0.29906922,1.4141331410e-06
+81.830858,0.30035385,1.4068648365e-06
+81.959321,0.30163848,1.4165848201e-06
+82.087784,0.30292311,1.4343288364e-06
+82.216246,0.30420773,1.4325635994e-06
+82.344709,0.30549237,1.4499752236e-06
+82.473172,0.30677699,1.4523237259e-06
+82.601635,0.30806162,1.4496928659e-06
+82.730098,0.30934625,1.4551013797e-06
+82.858561,0.31063088,1.4266056110e-06
+82.987024,0.31191551,1.4494949348e-06
+83.115487,0.31320014,1.4612366438e-06
+83.243949,0.31448477,1.4314810944e-06
+83.372412,0.31576939,1.4313180569e-06
+83.500875,0.31705402,1.4330214279e-06
+83.629338,0.31833866,1.4341929718e-06
+83.757801,0.31962328,1.4298568357e-06
+83.886264,0.32090791,1.4087294401e-06
+84.014727,0.32219254,1.4206108240e-06
+84.143190,0.32347717,1.4026226525e-06
+84.271653,0.32476180,1.3931237621e-06
+84.400115,0.32604643,1.3913570211e-06
+84.528578,0.32733105,1.3578408802e-06
+84.657041,0.32861568,1.3748492222e-06
+84.785504,0.32990031,1.3559418842e-06
+84.913967,0.33118494,1.3455423770e-06
+85.042430,0.33246957,1.3654958223e-06
+85.170893,0.33375420,1.3222417495e-06
+85.299356,0.33503883,1.3349352126e-06
+85.427819,0.33632345,1.3002260702e-06
+85.556281,0.33760809,1.3043374030e-06
+85.684744,0.33889272,1.3065955628e-06
+85.813207,0.34017734,1.2698329099e-06
+85.941670,0.34146197,1.2501410666e-06
+86.070133,0.34274660,1.2452068255e-06
+86.198596,0.34403123,1.2211081565e-06
diff --git a/demo_data/ec_LH_242mVs.csv b/demo_data/ec_LH_242mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..c5aa85988fcc02f948d486eb5758eca046e17f03
--- /dev/null
+++ b/demo_data/ec_LH_242mVs.csv
@@ -0,0 +1,673 @@
+Time (s),E (V),I (A)
+0.000000,0.34475868,-1.6526742776e-05
+0.005318,0.34347405,-1.2966296892e-05
+0.010637,0.34218941,-1.0905745276e-05
+0.015955,0.34090479,-1.1745384990e-05
+0.021274,0.33962016,-1.1342399400e-05
+0.026592,0.33833553,-1.0502476824e-05
+0.031911,0.33705090,-1.0304472011e-05
+0.037229,0.33576627,-9.6391988628e-06
+0.042548,0.33448164,-1.0611246860e-05
+0.047866,0.33319702,-1.1140047176e-05
+0.053184,0.33191239,-9.1699347201e-06
+0.058503,0.33062776,-9.9679660340e-06
+0.063821,0.32934313,-1.0708058806e-05
+0.069140,0.32805850,-1.1340648017e-05
+0.074458,0.32677387,-1.0303801814e-05
+0.079777,0.32548924,-1.1016876772e-05
+0.085095,0.32420462,-1.1509886590e-05
+0.090413,0.32291998,-1.2782776221e-05
+0.095732,0.32163535,-1.4034004688e-05
+0.101050,0.32035073,-1.4056817015e-05
+0.106369,0.31906610,-1.4452128847e-05
+0.111687,0.31778147,-1.3298795484e-05
+0.117006,0.31649684,-1.4331627404e-05
+0.122324,0.31521221,-1.3984641712e-05
+0.127643,0.31392758,-1.3692477160e-05
+0.132961,0.31264296,-1.6419977417e-05
+0.138279,0.31135833,-1.6191894551e-05
+0.143598,0.31007369,-1.7060070865e-05
+0.148916,0.30878907,-1.6705434085e-05
+0.154235,0.30750444,-1.7912849399e-05
+0.159553,0.30621981,-1.7809370963e-05
+0.164872,0.30493518,-1.9418399934e-05
+0.170190,0.30365055,-2.0382640135e-05
+0.175509,0.30236592,-1.9895130861e-05
+0.180827,0.30108129,-2.0110691882e-05
+0.186145,0.29979667,-2.1358679748e-05
+0.191464,0.29851204,-2.0996213488e-05
+0.196782,0.29722741,-2.1747675958e-05
+0.202101,0.29594278,-2.3578262243e-05
+0.207419,0.29465815,-2.3184864415e-05
+0.212738,0.29337352,-2.5379478124e-05
+0.218056,0.29208889,-2.6386851424e-05
+0.223375,0.29080426,-2.6348760573e-05
+0.228693,0.28951963,-2.6492149248e-05
+0.234011,0.28823501,-2.7034133721e-05
+0.239330,0.28695038,-2.7910221318e-05
+0.244648,0.28566575,-2.8829124654e-05
+0.249967,0.28438112,-2.8742292732e-05
+0.255285,0.28309649,-2.9899679802e-05
+0.260604,0.28181186,-2.9425270911e-05
+0.265922,0.28052723,-3.0041168271e-05
+0.271241,0.27924260,-3.3981367559e-05
+0.276559,0.27795798,-3.2421046149e-05
+0.281877,0.27667334,-3.2757546213e-05
+0.287196,0.27538872,-3.3084698997e-05
+0.292514,0.27410409,-3.5382706383e-05
+0.297833,0.27281946,-3.3832193506e-05
+0.303151,0.27153483,-3.5901915981e-05
+0.308470,0.27025020,-3.5684949517e-05
+0.313788,0.26896557,-3.6432132581e-05
+0.319106,0.26768094,-3.7119727236e-05
+0.324425,0.26639631,-3.7998564611e-05
+0.329743,0.26511169,-3.9353301081e-05
+0.335062,0.26382706,-3.9034196575e-05
+0.340380,0.26254243,-3.9503953510e-05
+0.345699,0.26125780,-4.1527440268e-05
+0.351017,0.25997317,-3.9745169283e-05
+0.356336,0.25868854,-4.1229821494e-05
+0.361654,0.25740391,-4.2165448220e-05
+0.366972,0.25611928,-4.2166421977e-05
+0.372291,0.25483466,-4.2508171261e-05
+0.377609,0.25355003,-4.2556303242e-05
+0.382928,0.25226540,-4.2809409100e-05
+0.388246,0.25098077,-4.2997482183e-05
+0.393565,0.24969614,-4.4210274844e-05
+0.398883,0.24841151,-4.4539010476e-05
+0.404202,0.24712688,-4.4718646960e-05
+0.409520,0.24584225,-4.3810782164e-05
+0.414838,0.24455762,-4.4893343696e-05
+0.420157,0.24327300,-4.5175701688e-05
+0.425475,0.24198837,-4.4659992884e-05
+0.430794,0.24070374,-4.3935174693e-05
+0.436112,0.23941911,-4.5219516811e-05
+0.441431,0.23813448,-4.4777927867e-05
+0.446749,0.23684985,-4.4003589992e-05
+0.452067,0.23556522,-4.5349878036e-05
+0.457386,0.23428059,-4.5931321351e-05
+0.462704,0.23299596,-4.4738989414e-05
+0.468023,0.23171134,-4.4365200765e-05
+0.473341,0.23042671,-4.5004016896e-05
+0.478660,0.22914208,-4.4961723515e-05
+0.483978,0.22785745,-4.4717255315e-05
+0.489297,0.22657282,-4.4843382472e-05
+0.494615,0.22528819,-4.4864540989e-05
+0.499933,0.22400356,-4.4011935918e-05
+0.505252,0.22271894,-4.4178826829e-05
+0.510570,0.22143430,-4.2966365324e-05
+0.515889,0.22014968,-4.3610850534e-05
+0.521207,0.21886505,-4.3094420283e-05
+0.526526,0.21758042,-4.4108826710e-05
+0.531844,0.21629579,-4.1565838621e-05
+0.537163,0.21501116,-4.2877276415e-05
+0.542481,0.21372653,-4.1599115880e-05
+0.547799,0.21244190,-4.2822359674e-05
+0.553118,0.21115727,-4.1754171898e-05
+0.558436,0.20987265,-4.1239519641e-05
+0.563755,0.20858802,-4.0237803594e-05
+0.569073,0.20730339,-4.0760849084e-05
+0.574392,0.20601876,-3.9667047952e-05
+0.579710,0.20473413,-3.9148883073e-05
+0.585029,0.20344950,-3.9173400461e-05
+0.590347,0.20216487,-3.9567405409e-05
+0.595665,0.20088024,-3.9496510380e-05
+0.600984,0.19959561,-3.9483137976e-05
+0.606302,0.19831099,-3.9160209404e-05
+0.611621,0.19702636,-3.8431303011e-05
+0.616939,0.19574173,-3.7912251106e-05
+0.622258,0.19445710,-3.8362974442e-05
+0.627576,0.19317247,-3.6956719525e-05
+0.632894,0.19188784,-3.6424527815e-05
+0.638213,0.19060321,-3.6273264324e-05
+0.643531,0.18931859,-3.6596811842e-05
+0.648850,0.18803395,-3.6818497282e-05
+0.654168,0.18674933,-3.6548951882e-05
+0.659487,0.18546470,-3.5515168874e-05
+0.664805,0.18418007,-3.3700653522e-05
+0.670124,0.18289544,-3.4576337028e-05
+0.675442,0.18161081,-3.6396552998e-05
+0.680760,0.18032618,-3.4933926618e-05
+0.686079,0.17904155,-3.4873151566e-05
+0.691397,0.17775693,-3.4734002873e-05
+0.696716,0.17647230,-3.3535110889e-05
+0.702034,0.17518766,-3.2870955393e-05
+0.707353,0.17390304,-3.4278844409e-05
+0.712671,0.17261841,-3.3203722064e-05
+0.717990,0.17133378,-3.2672387812e-05
+0.723308,0.17004915,-3.3725320718e-05
+0.728626,0.16876452,-3.2069054677e-05
+0.733945,0.16747989,-3.1839839375e-05
+0.739263,0.16619526,-3.1265845104e-05
+0.744582,0.16491064,-3.2082876507e-05
+0.749900,0.16362601,-3.2172917491e-05
+0.755219,0.16234138,-3.2032797012e-05
+0.760537,0.16105675,-3.1536121807e-05
+0.765856,0.15977212,-3.1134691469e-05
+0.771174,0.15848749,-3.1431819423e-05
+0.776492,0.15720287,-2.9238609185e-05
+0.781811,0.15591823,-2.9865393306e-05
+0.787129,0.15463360,-2.9232411832e-05
+0.792448,0.15334898,-3.1088108827e-05
+0.797766,0.15206435,-2.9061754019e-05
+0.803085,0.15077972,-2.9664787537e-05
+0.808403,0.14949509,-2.8864170050e-05
+0.813721,0.14821046,-2.9996533143e-05
+0.819040,0.14692583,-3.0157890986e-05
+0.824358,0.14564120,-2.8854211710e-05
+0.829677,0.14435657,-2.9957157091e-05
+0.834995,0.14307195,-2.6917081822e-05
+0.840314,0.14178732,-2.8867597912e-05
+0.845632,0.14050268,-2.8130850211e-05
+0.850951,0.13921806,-2.7526876446e-05
+0.856269,0.13793343,-2.7425564324e-05
+0.861587,0.13664881,-2.7154242902e-05
+0.866906,0.13536417,-2.7047299153e-05
+0.872224,0.13407954,-2.7219650199e-05
+0.877543,0.13279492,-2.6250901937e-05
+0.882861,0.13151028,-2.6529656633e-05
+0.888180,0.13022566,-2.6706017036e-05
+0.893498,0.12894103,-2.5540138173e-05
+0.898817,0.12765639,-2.6589763460e-05
+0.904135,0.12637177,-2.6456954043e-05
+0.909453,0.12508714,-2.6205143243e-05
+0.914772,0.12380252,-2.5793523937e-05
+0.920090,0.12251788,-2.5924348387e-05
+0.925409,0.12123325,-2.6312293965e-05
+0.930727,0.11994863,-2.5212535963e-05
+0.936046,0.11866399,-2.3857531414e-05
+0.941364,0.11737937,-2.6128825531e-05
+0.946683,0.11609474,-2.4143918473e-05
+0.952001,0.11481010,-2.6452426270e-05
+0.957319,0.11352548,-2.4689149460e-05
+0.962638,0.11224085,-2.5410389981e-05
+0.967956,0.11095623,-2.4553369493e-05
+0.973275,0.10967159,-2.4537178319e-05
+0.978593,0.10838696,-2.4220151425e-05
+0.983912,0.10710234,-2.4962353347e-05
+0.989230,0.10581771,-2.4530673465e-05
+0.994549,0.10453308,-2.3562037559e-05
+0.999867,0.10324845,-2.4144701026e-05
+1.005185,0.10196382,-2.4032492287e-05
+1.010504,0.10067919,-2.2964945141e-05
+1.015822,0.09939456,-2.3891336945e-05
+1.021141,0.09810994,-2.3030456910e-05
+1.026459,0.09682531,-2.2457586206e-05
+1.031778,0.09554067,-2.5257171091e-05
+1.037096,0.09425605,-2.3906041859e-05
+1.042414,0.09297142,-2.3589281072e-05
+1.047733,0.09168680,-2.1199783894e-05
+1.053051,0.09040216,-2.2272235306e-05
+1.058370,0.08911753,-2.3395243235e-05
+1.063688,0.08783291,-2.3072781830e-05
+1.069007,0.08654827,-2.1044260709e-05
+1.074325,0.08526365,-2.2014587877e-05
+1.079644,0.08397902,-2.2816520132e-05
+1.084962,0.08269438,-2.2236438895e-05
+1.090280,0.08140976,-2.2103408707e-05
+1.095599,0.08012513,-2.2553245018e-05
+1.100917,0.07884051,-2.1217116374e-05
+1.106236,0.07755587,-2.1601109760e-05
+1.111554,0.07627124,-2.2271040778e-05
+1.116873,0.07498662,-2.1041002368e-05
+1.122191,0.07370198,-2.2770688504e-05
+1.127509,0.07241736,-2.2187027626e-05
+1.132828,0.07113273,-2.1665653685e-05
+1.138146,0.06984810,-2.1207163947e-05
+1.143465,0.06856347,-2.1972410795e-05
+1.148783,0.06727884,-2.1373144179e-05
+1.154102,0.06599422,-2.2103783229e-05
+1.159420,0.06470958,-2.1624316321e-05
+1.164739,0.06342495,-1.9684186316e-05
+1.170057,0.06214033,-2.1920827299e-05
+1.175375,0.06085570,-2.0673499774e-05
+1.180694,0.05957107,-2.1734863366e-05
+1.186012,0.05828644,-2.0963225992e-05
+1.191331,0.05700181,-2.0304749431e-05
+1.196649,0.05571719,-1.9460504083e-05
+1.201968,0.05443255,-2.1444498490e-05
+1.207286,0.05314793,-1.9616551599e-05
+1.212605,0.05186330,-1.9714289994e-05
+1.217923,0.05057866,-2.0964118931e-05
+1.223242,0.04929404,-1.9595312263e-05
+1.228560,0.04800941,-2.1318923260e-05
+1.233878,0.04672479,-2.0356417687e-05
+1.239197,0.04544015,-1.9687369752e-05
+1.244515,0.04415553,-2.0574574736e-05
+1.249834,0.04287090,-2.1337540942e-05
+1.255152,0.04158626,-2.0165573142e-05
+1.260471,0.04030163,-2.0670546964e-05
+1.265789,0.03901702,-2.0710354703e-05
+1.271107,0.03773239,-2.0036688321e-05
+1.276426,0.03644775,-2.0583985092e-05
+1.281744,0.03516312,-2.0726955880e-05
+1.287063,0.03387848,-1.8783875036e-05
+1.292381,0.03259388,-2.0374619452e-05
+1.297700,0.03130924,-1.9270124733e-05
+1.303018,0.03002461,-2.0702954938e-05
+1.308336,0.02873997,-2.1293248797e-05
+1.313655,0.02745534,-1.9645845127e-05
+1.318973,0.02617073,-1.8835529494e-05
+1.324292,0.02488610,-1.7786680848e-05
+1.329610,0.02360146,-1.9141693281e-05
+1.334929,0.02231683,-1.8852221345e-05
+1.340247,0.02103220,-1.8795487187e-05
+1.345566,0.01974759,-1.7981412536e-05
+1.350884,0.01846295,-2.0598201156e-05
+1.356203,0.01717832,-1.9385436091e-05
+1.361521,0.01589369,-1.8486601216e-05
+1.366839,0.01460905,-1.8682432816e-05
+1.372158,0.01332444,-1.9703432800e-05
+1.377476,0.01203981,-1.9589049863e-05
+1.382795,0.01075518,-1.8697995188e-05
+1.388113,0.00947054,-1.8618261441e-05
+1.393432,0.00818591,-1.8939979716e-05
+1.398750,0.00690130,-1.8594104777e-05
+1.404068,0.00561666,-1.8190715099e-05
+1.409387,0.00433203,-1.8019016509e-05
+1.414705,0.00304740,-1.8871215520e-05
+1.420024,0.00176276,-1.8716258059e-05
+1.425342,0.00047815,-1.8426029194e-05
+1.430661,-0.00080648,-1.8120490267e-05
+1.435979,-0.00209111,-1.8106479205e-05
+1.441297,-0.00337575,-1.7545965752e-05
+1.446616,-0.00466038,-1.8681975505e-05
+1.451934,-0.00594499,-1.8935562328e-05
+1.457253,-0.00722962,-1.8600603718e-05
+1.462571,-0.00851426,-1.8538184712e-05
+1.467890,-0.00979889,-1.8817678596e-05
+1.473208,-0.01108352,-1.8008384028e-05
+1.478527,-0.01236813,-1.7726982053e-05
+1.483845,-0.01365277,-1.8621578917e-05
+1.489164,-0.01493740,-1.8581802718e-05
+1.494482,-0.01622204,-1.7736910827e-05
+1.499800,-0.01750667,-1.7188086400e-05
+1.505119,-0.01879128,-1.7499615707e-05
+1.510437,-0.02007591,-1.8080652961e-05
+1.515756,-0.02136055,-1.7870078996e-05
+1.521074,-0.02264518,-1.8079417039e-05
+1.526393,-0.02392981,-1.7967632101e-05
+1.531711,-0.02521442,-1.7359183784e-05
+1.537030,-0.02649906,-1.7082906846e-05
+1.542348,-0.02778369,-1.6777194456e-05
+1.547666,-0.02906832,-1.7102167129e-05
+1.552985,-0.03035296,-1.8422366764e-05
+1.558303,-0.03163757,-1.6535742143e-05
+1.563622,-0.03292220,-1.6980760920e-05
+1.568940,-0.03420683,-1.7387992405e-05
+1.574259,-0.03549147,-1.6861800930e-05
+1.579577,-0.03677610,-1.7686789937e-05
+1.584895,-0.03806071,-1.7561630624e-05
+1.590214,-0.03934534,-1.5880530823e-05
+1.595532,-0.04062998,-1.6326385374e-05
+1.600851,-0.04191461,-1.8698357883e-05
+1.606169,-0.04319925,-1.9028090926e-05
+1.611488,-0.04448386,-1.6735855121e-05
+1.616806,-0.04576849,-1.7536119768e-05
+1.622125,-0.04705312,-1.7795426920e-05
+1.627443,-0.04833776,-1.6660024287e-05
+1.632761,-0.04962239,-1.7519459456e-05
+1.638080,-0.05090700,-1.7337431945e-05
+1.643398,-0.05219163,-1.6344272738e-05
+1.648717,-0.05347627,-1.6432268635e-05
+1.654035,-0.05476090,-1.7321532504e-05
+1.659354,-0.05604553,-1.6609534789e-05
+1.664672,-0.05733014,-1.5801724511e-05
+1.669991,-0.05861478,-1.7878005062e-05
+1.675309,-0.05989941,-1.6418987891e-05
+1.680627,-0.06118405,-1.6416761456e-05
+1.685946,-0.06246868,-1.7296569632e-05
+1.691264,-0.06375329,-1.7426337536e-05
+1.696583,-0.06503792,-1.6342326210e-05
+1.701901,-0.06632256,-1.6843435557e-05
+1.707220,-0.06760719,-1.6249024914e-05
+1.712538,-0.06889182,-1.6655281657e-05
+1.717857,-0.07017643,-1.6749505459e-05
+1.723175,-0.07146107,-1.6428193245e-05
+1.728493,-0.07274570,-1.5453013062e-05
+1.733812,-0.07403033,-1.6503546071e-05
+1.739130,-0.07531497,-1.5645968728e-05
+1.744449,-0.07659958,-1.6877174069e-05
+1.749767,-0.07788421,-1.5766042427e-05
+1.755086,-0.07916884,-1.6066239489e-05
+1.760404,-0.08045348,-1.6409752969e-05
+1.765722,-0.08173811,-1.6893400724e-05
+1.771041,-0.08302272,-1.5572767432e-05
+1.776359,-0.08430735,-1.6275000966e-05
+1.781678,-0.08559199,-1.4553270464e-05
+1.786996,-0.08631944,-1.6599071830e-05
+1.792315,-0.08503480,-1.6661954060e-05
+1.797633,-0.08375017,-1.6218279621e-05
+1.802952,-0.08246554,-1.5344342569e-05
+1.808270,-0.08118093,-1.5003677428e-05
+1.813588,-0.07989629,-1.5446988187e-05
+1.818907,-0.07861166,-1.5928935810e-05
+1.824225,-0.07732703,-1.5767758329e-05
+1.829544,-0.07604239,-1.7011329793e-05
+1.834862,-0.07475778,-1.6774856651e-05
+1.840181,-0.07347315,-1.5404657354e-05
+1.845499,-0.07218852,-1.4823709788e-05
+1.850818,-0.07090388,-1.6080735459e-05
+1.856136,-0.06961925,-1.5708401532e-05
+1.861454,-0.06833464,-1.6002644681e-05
+1.866773,-0.06705001,-1.5240075666e-05
+1.872091,-0.06576537,-1.6304738007e-05
+1.877410,-0.06448074,-1.4866233795e-05
+1.882728,-0.06319610,-1.5546943160e-05
+1.888047,-0.06191150,-1.6500276889e-05
+1.893365,-0.06062686,-1.5383416047e-05
+1.898683,-0.05934223,-1.4277890407e-05
+1.904002,-0.05805759,-1.5236493068e-05
+1.909320,-0.05677296,-1.3307391748e-05
+1.914639,-0.05548835,-1.5140031004e-05
+1.919957,-0.05420372,-1.5008489049e-05
+1.925276,-0.05291908,-1.4740368804e-05
+1.930594,-0.05163445,-1.5417957810e-05
+1.935913,-0.05034982,-1.4082760543e-05
+1.941231,-0.04906521,-1.4457688527e-05
+1.946549,-0.04778057,-1.5370107706e-05
+1.951868,-0.04649594,-1.3537487176e-05
+1.957186,-0.04521131,-1.5564399824e-05
+1.962505,-0.04392667,-1.3734071762e-05
+1.967823,-0.04264206,-1.5750816140e-05
+1.973142,-0.04135743,-1.4877737532e-05
+1.978460,-0.04007280,-1.4990897360e-05
+1.983779,-0.03878816,-1.4058483638e-05
+1.989097,-0.03750353,-1.3391087542e-05
+1.994415,-0.03621892,-1.4815860597e-05
+1.999734,-0.03493428,-1.4615458843e-05
+2.005052,-0.03364965,-1.5292837920e-05
+2.010371,-0.03236502,-1.4331883656e-05
+2.015689,-0.03108038,-1.4920306876e-05
+2.021008,-0.02979577,-1.4473195705e-05
+2.026326,-0.02851114,-1.4369972535e-05
+2.031645,-0.02722651,-1.3858984679e-05
+2.036963,-0.02594187,-1.4678584514e-05
+2.042281,-0.02465724,-1.4103875695e-05
+2.047600,-0.02337263,-1.4701182969e-05
+2.052918,-0.02208800,-1.4609630100e-05
+2.058237,-0.02080336,-1.4514969684e-05
+2.063555,-0.01951873,-1.4903296682e-05
+2.068874,-0.01823409,-1.2845761939e-05
+2.074192,-0.01694949,-1.5830124114e-05
+2.079511,-0.01566485,-1.4355312959e-05
+2.084829,-0.01438022,-1.3732255331e-05
+2.090147,-0.01309558,-1.4385817770e-05
+2.095466,-0.01181095,-1.4608521318e-05
+2.100784,-0.01052634,-1.5192877033e-05
+2.106103,-0.00924171,-1.3553918832e-05
+2.111421,-0.00795707,-1.4673071157e-05
+2.116739,-0.00667244,-1.4149642274e-05
+2.122058,-0.00538781,-1.4502627215e-05
+2.127376,-0.00410320,-1.3636833058e-05
+2.132695,-0.00281856,-1.3984293801e-05
+2.138013,-0.00153393,-1.4651877158e-05
+2.143332,-0.00024930,-1.4273153690e-05
+2.148650,0.00103534,-1.3825189989e-05
+2.153969,0.00231995,-1.3407037248e-05
+2.159287,0.00360458,-1.3877198272e-05
+2.164606,0.00488921,-1.3611758815e-05
+2.169924,0.00617385,-1.4752637354e-05
+2.175243,0.00745848,-1.4215630080e-05
+2.180561,0.00874309,-1.2923240669e-05
+2.185879,0.01002773,-1.3112119959e-05
+2.191198,0.01131236,-1.4516070581e-05
+2.196516,0.01259699,-1.4775501917e-05
+2.201835,0.01388163,-1.4546810946e-05
+2.207153,0.01516624,-1.3674610493e-05
+2.212472,0.01645087,-1.2838535637e-05
+2.217790,0.01773550,-1.4509919551e-05
+2.223108,0.01902014,-1.4174377475e-05
+2.228427,0.02030477,-1.4353268858e-05
+2.233745,0.02158938,-1.4901011113e-05
+2.239064,0.02287401,-1.3329153442e-05
+2.244382,0.02415865,-1.4228953204e-05
+2.249700,0.02544328,-1.4149727034e-05
+2.255019,0.02672791,-1.4559141588e-05
+2.260337,0.02801252,-1.3352218079e-05
+2.265656,0.02929716,-1.4195686787e-05
+2.270974,0.03058179,-1.4450488835e-05
+2.276293,0.03186643,-1.4797703182e-05
+2.281611,0.03315106,-1.3717551403e-05
+2.286930,0.03443567,-1.3543273539e-05
+2.292248,0.03572030,-1.4423627729e-05
+2.297567,0.03700494,-1.1459290649e-05
+2.302885,0.03828957,-1.3419934600e-05
+2.308204,0.03957420,-1.3591947591e-05
+2.313522,0.04085881,-1.2532707933e-05
+2.318840,0.04214345,-1.3614535206e-05
+2.324159,0.04342808,-1.3604509845e-05
+2.329477,0.04471271,-1.2859472398e-05
+2.334796,0.04599734,-1.2711694917e-05
+2.340114,0.04728197,-1.3848174794e-05
+2.345433,0.04856659,-1.3033389537e-05
+2.350751,0.04985122,-1.3494427010e-05
+2.356069,0.05113586,-1.4014584740e-05
+2.361388,0.05242048,-1.2818870279e-05
+2.366706,0.05370511,-1.4157751659e-05
+2.372025,0.05498973,-1.3681812156e-05
+2.377343,0.05627437,-1.3989924443e-05
+2.382662,0.05755900,-1.2511641075e-05
+2.387980,0.05884362,-1.5705414227e-05
+2.393298,0.06012826,-1.3762486149e-05
+2.398617,0.06141288,-1.2094173314e-05
+2.403935,0.06269751,-1.3080457087e-05
+2.409254,0.06398215,-1.4442645558e-05
+2.414572,0.06526677,-1.3346465226e-05
+2.419891,0.06655140,-1.2992319266e-05
+2.425209,0.06783602,-1.3962567587e-05
+2.430528,0.06912066,-1.2962179122e-05
+2.435846,0.07040529,-1.2042935758e-05
+2.441165,0.07168991,-1.3700108537e-05
+2.446483,0.07297455,-1.2776630119e-05
+2.451801,0.07425917,-1.2484616362e-05
+2.457120,0.07554380,-1.2287531099e-05
+2.462438,0.07682844,-1.4245207456e-05
+2.467757,0.07811306,-1.2297611652e-05
+2.473075,0.07939769,-1.2700281854e-05
+2.478394,0.08068231,-1.4393260900e-05
+2.483712,0.08196695,-1.3675679852e-05
+2.489030,0.08325158,-1.2847756761e-05
+2.494349,0.08453620,-1.3468081364e-05
+2.499667,0.08582083,-1.1769545596e-05
+2.504986,0.08710546,-1.2043873049e-05
+2.510304,0.08839009,-1.2080006530e-05
+2.515623,0.08967472,-1.3010730961e-05
+2.520941,0.09095935,-1.2445348724e-05
+2.526260,0.09224398,-1.2615560067e-05
+2.531578,0.09352860,-1.3171749763e-05
+2.536896,0.09481323,-1.2976491773e-05
+2.542215,0.09609787,-1.2213569918e-05
+2.547533,0.09738249,-1.2730504788e-05
+2.552852,0.09866712,-1.3071919959e-05
+2.558170,0.09995174,-1.3072705469e-05
+2.563489,0.10123638,-1.2014258221e-05
+2.568807,0.10252101,-1.2981656233e-05
+2.574126,0.10380563,-1.1140196985e-05
+2.579444,0.10509027,-1.2350048663e-05
+2.584762,0.10637489,-1.2555057036e-05
+2.590081,0.10765952,-1.2464942134e-05
+2.595399,0.10894416,-1.2132289790e-05
+2.600718,0.11022878,-1.2417982998e-05
+2.606036,0.11151341,-1.1608689416e-05
+2.611355,0.11279803,-1.2434422539e-05
+2.616673,0.11408267,-1.2580227866e-05
+2.621991,0.11536730,-1.1185065697e-05
+2.627310,0.11665192,-1.2642822307e-05
+2.632628,0.11793656,-1.2182195822e-05
+2.637947,0.11922118,-1.2828132797e-05
+2.643265,0.12050581,-1.2784780899e-05
+2.648584,0.12179044,-1.1661251596e-05
+2.653902,0.12307507,-1.2707203611e-05
+2.659221,0.12435970,-1.2256816359e-05
+2.664539,0.12564432,-1.2202973904e-05
+2.669857,0.12692896,-1.2498603770e-05
+2.675176,0.12821359,-1.2077352352e-05
+2.680494,0.12949821,-1.1321667641e-05
+2.685813,0.13078284,-1.1356860874e-05
+2.691131,0.13206747,-1.0511979825e-05
+2.696450,0.13335210,-1.2517688619e-05
+2.701768,0.13463673,-1.1832770810e-05
+2.707087,0.13592135,-1.0505670116e-05
+2.712405,0.13720599,-1.1086001692e-05
+2.717723,0.13849061,-1.0979726168e-05
+2.723042,0.13977524,-1.1289292192e-05
+2.728360,0.14105988,-1.1398158816e-05
+2.733679,0.14234450,-1.1616183796e-05
+2.738997,0.14362913,-1.1460123468e-05
+2.744316,0.14491375,-1.2881738712e-05
+2.749634,0.14619839,-1.1268259829e-05
+2.754952,0.14748302,-1.1590831619e-05
+2.760271,0.14876764,-1.1547760612e-05
+2.765589,0.15005227,-1.0318531367e-05
+2.770908,0.15133690,-1.1945965133e-05
+2.776226,0.15262153,-1.1737868926e-05
+2.781545,0.15390616,-1.1100245352e-05
+2.786863,0.15519079,-1.1503990826e-05
+2.792182,0.15647542,-1.1322297429e-05
+2.797500,0.15776005,-1.1409658610e-05
+2.802819,0.15904468,-1.0959669533e-05
+2.808137,0.16032930,-1.0763948319e-05
+2.813455,0.16161393,-1.0532724397e-05
+2.818774,0.16289856,-9.7996637664e-06
+2.824092,0.16418319,-9.4068188509e-06
+2.829411,0.16546782,-1.0225264566e-05
+2.834729,0.16675245,-1.0461463716e-05
+2.840048,0.16803708,-1.0742640978e-05
+2.845366,0.16932170,-9.9268523971e-06
+2.850684,0.17060634,-9.4167210134e-06
+2.856003,0.17189097,-1.0299500725e-05
+2.861321,0.17317559,-1.0974459207e-05
+2.866640,0.17446022,-9.2142820581e-06
+2.871958,0.17574485,-1.0004341969e-05
+2.877277,0.17702948,-8.9254704626e-06
+2.882595,0.17831411,-9.8175856260e-06
+2.887913,0.17959874,-1.0208584543e-05
+2.893232,0.18088336,-9.7716514977e-06
+2.898550,0.18216799,-1.0294902976e-05
+2.903869,0.18345263,-9.8147018072e-06
+2.909187,0.18473725,-9.1682592272e-06
+2.914506,0.18602188,-8.9843620639e-06
+2.919824,0.18730651,-9.0284018997e-06
+2.925143,0.18859114,-7.9355902936e-06
+2.930461,0.18987577,-7.7731803400e-06
+2.935780,0.19116040,-8.5326925669e-06
+2.941098,0.19244503,-9.8507505279e-06
+2.946417,0.19372965,-8.3733009643e-06
+2.951735,0.19501428,-6.7929278483e-06
+2.957053,0.19629891,-7.7440499262e-06
+2.962372,0.19758354,-7.3247253252e-06
+2.967690,0.19886817,-7.4552816964e-06
+2.973009,0.20015280,-6.0376462407e-06
+2.978327,0.20143743,-6.8033385722e-06
+2.983645,0.20272206,-6.0245596563e-06
+2.988964,0.20400669,-6.5532904885e-06
+2.994282,0.20529131,-6.1016234555e-06
+2.999601,0.20657594,-5.4091610014e-06
+3.004919,0.20786057,-6.7386290685e-06
+3.010238,0.20914520,-6.3751077412e-06
+3.015556,0.21042983,-5.5702699842e-06
+3.020874,0.21171446,-5.3809136710e-06
+3.026193,0.21299909,-4.8551839420e-06
+3.031511,0.21428372,-5.2884461793e-06
+3.036830,0.21556834,-3.9096200651e-06
+3.042148,0.21685297,-3.0420161296e-06
+3.047467,0.21813760,-3.4249850006e-06
+3.052785,0.21942223,-4.6315022018e-06
+3.058104,0.22070686,-3.2516010618e-06
+3.063422,0.22199149,-1.4835242106e-06
+3.068741,0.22327612,-2.9149396091e-06
+3.074059,0.22456075,-2.3740902823e-06
+3.079378,0.22584538,-2.0463722653e-06
+3.084696,0.22713000,-6.9125191046e-07
+3.090014,0.22841463,-2.5204093450e-08
+3.095333,0.22969926,-7.6708471524e-07
+3.100651,0.23098389,1.9198218003e-06
+3.105970,0.23226852,3.8866286694e-07
+3.111288,0.23355315,1.9354344365e-06
+3.116606,0.23483778,1.8757092776e-06
+3.121925,0.23612241,2.4241030036e-06
+3.127243,0.23740704,1.4396759477e-06
+3.132562,0.23869166,1.9625290033e-06
+3.137880,0.23997629,4.5782372996e-06
+3.143199,0.24126092,2.7587585465e-06
+3.148517,0.24254555,5.0266839369e-06
+3.153836,0.24383018,5.3341250413e-06
+3.159154,0.24511481,4.6768208329e-06
+3.164472,0.24639944,6.8692164857e-06
+3.169791,0.24768407,6.3933060572e-06
+3.175109,0.24896870,7.7374036405e-06
+3.180428,0.25025332,7.8001631661e-06
+3.185746,0.25153795,8.7261193420e-06
+3.191065,0.25282258,9.7556071756e-06
+3.196383,0.25410721,1.0320432558e-05
+3.201702,0.25539184,9.5420646309e-06
+3.207020,0.25667647,1.1472303315e-05
+3.212339,0.25796110,1.2110327036e-05
+3.217657,0.25924573,1.1140804105e-05
+3.222975,0.26053035,1.3255881185e-05
+3.228294,0.26181498,1.2691025249e-05
+3.233612,0.26309961,1.3387978024e-05
+3.238931,0.26438424,1.4764984750e-05
+3.244249,0.26566887,1.4004423369e-05
+3.249567,0.26695350,1.6229327032e-05
+3.254886,0.26823813,1.5896746636e-05
+3.260204,0.26952276,1.6818841294e-05
+3.265523,0.27080739,1.8382172677e-05
+3.270841,0.27209201,1.6756270508e-05
+3.276160,0.27337664,1.9192115759e-05
+3.281478,0.27466127,1.9159668362e-05
+3.286797,0.27594590,2.0649445611e-05
+3.292115,0.27723053,2.0419071262e-05
+3.297434,0.27851516,1.9805523534e-05
+3.302752,0.27979979,2.1809915588e-05
+3.308070,0.28108442,2.2608437723e-05
+3.313389,0.28236904,2.2186193822e-05
+3.318707,0.28365368,2.2566909155e-05
+3.324026,0.28493830,2.4710390766e-05
+3.329344,0.28622293,2.4139089111e-05
+3.334663,0.28750756,2.4775620658e-05
+3.339981,0.28879219,2.3862274044e-05
+3.345300,0.29007682,2.4644914478e-05
+3.350618,0.29136145,2.5573239998e-05
+3.355936,0.29264608,2.5989534914e-05
+3.361255,0.29393071,2.6333631859e-05
+3.366573,0.29521533,2.6963772879e-05
+3.371892,0.29649996,2.5818973688e-05
+3.377210,0.29778459,2.6742556577e-05
+3.382528,0.29906922,2.6368446628e-05
+3.387847,0.30035385,2.9791797777e-05
+3.393165,0.30163848,2.8488067251e-05
+3.398484,0.30292311,2.8726290790e-05
+3.403802,0.30420773,2.9183518981e-05
+3.409121,0.30549237,2.9146766553e-05
+3.414439,0.30677699,2.9751992010e-05
+3.419758,0.30806162,2.9523076326e-05
+3.425076,0.30934625,3.0490919822e-05
+3.430395,0.31063088,3.0067233026e-05
+3.435713,0.31191551,3.0098612050e-05
+3.441031,0.31320014,3.1036775669e-05
+3.446350,0.31448477,3.1253515448e-05
+3.451668,0.31576939,3.1042890232e-05
+3.456987,0.31705402,3.1024710150e-05
+3.462305,0.31833866,3.0433643593e-05
+3.467624,0.31962328,3.1051293322e-05
+3.472942,0.32090791,3.0507526913e-05
+3.478261,0.32219254,3.1767964676e-05
+3.483579,0.32347717,3.1029500088e-05
+3.488897,0.32476180,3.0815389847e-05
+3.494216,0.32604643,3.1677026810e-05
+3.499534,0.32733105,3.1715935696e-05
+3.504853,0.32861568,3.0883548895e-05
+3.510171,0.32990031,3.1608353288e-05
+3.515489,0.33118494,3.1738347876e-05
+3.520808,0.33246957,2.9398612835e-05
+3.526126,0.33375420,2.9301248962e-05
+3.531445,0.33503883,3.0849106676e-05
+3.536763,0.33632345,3.0409400197e-05
+3.542082,0.33760809,3.0262191399e-05
+3.547400,0.33889272,2.9750024784e-05
+3.552719,0.34017734,3.1063384466e-05
+3.558037,0.34146197,3.1044983613e-05
+3.563356,0.34274660,2.9571261528e-05
+3.568674,0.34403123,2.8520906910e-05
diff --git a/demo_data/ec_LH_7443mVs.csv b/demo_data/ec_LH_7443mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..5efc98ef7e79d1d8227ffb368bd1f0e4303f1d63
--- /dev/null
+++ b/demo_data/ec_LH_7443mVs.csv
@@ -0,0 +1,673 @@
+Time (s),E (V),I (A)
+0.000000,0.34475868,-1.0150529355e-05
+0.000173,0.34347405,-3.1244343848e-05
+0.000345,0.34218941,-3.8524112189e-05
+0.000518,0.34090479,-2.8777692826e-05
+0.000690,0.33962016,-1.2159715742e-05
+0.000863,0.33833553,-3.6593934662e-05
+0.001036,0.33705090,-3.3279299346e-05
+0.001208,0.33576627,-1.6770813626e-05
+0.001381,0.33448164,-3.0291502251e-05
+0.001553,0.33319702,-3.3158739846e-05
+0.001726,0.33191239,-7.5578465907e-05
+0.001898,0.33062776,-2.6735050365e-05
+0.002071,0.32934313,-2.9143570431e-05
+0.002244,0.32805850,-3.9667825754e-05
+0.002416,0.32677387,-5.5221207556e-05
+0.002589,0.32548924,-2.0792144923e-05
+0.002761,0.32420462,-5.9065789288e-05
+0.002934,0.32291998,-1.7944301183e-05
+0.003107,0.32163535,-4.2167949264e-05
+0.003279,0.32035073,-3.4108985383e-05
+0.003452,0.31906610,-3.2645152166e-05
+0.003624,0.31778147,-4.6126615390e-05
+0.003797,0.31649684,-6.5127991761e-05
+0.003970,0.31521221,-1.1134258322e-05
+0.004142,0.31392758,-4.1206394863e-05
+0.004315,0.31264296,-5.6359638727e-05
+0.004487,0.31135833,-4.5582517849e-05
+0.004660,0.31007369,-3.1075301764e-05
+0.004833,0.30878907,-7.9873569386e-05
+0.005005,0.30750444,-6.1126831222e-05
+0.005178,0.30621981,-5.5522104327e-05
+0.005350,0.30493518,-4.0262878839e-05
+0.005523,0.30365055,-4.6029650220e-05
+0.005695,0.30236592,-7.0626282928e-05
+0.005868,0.30108129,-6.9613190305e-05
+0.006041,0.29979667,-5.6751241673e-05
+0.006213,0.29851204,-6.5107387415e-05
+0.006386,0.29722741,-6.4068821123e-05
+0.006558,0.29594278,-7.5172156513e-05
+0.006731,0.29465815,-8.3201483181e-05
+0.006904,0.29337352,-6.5269617919e-05
+0.007076,0.29208889,-5.7300025253e-05
+0.007249,0.29080426,-7.4570111299e-05
+0.007421,0.28951963,-1.0318747485e-04
+0.007594,0.28823501,-8.8551522629e-05
+0.007767,0.28695038,-9.8164861768e-05
+0.007939,0.28566575,-8.2351272129e-05
+0.008112,0.28438112,-1.0080161628e-04
+0.008284,0.28309649,-9.5924568585e-05
+0.008457,0.28181186,-9.6943230837e-05
+0.008629,0.28052723,-1.1035611321e-04
+0.008802,0.27924260,-1.1136896510e-04
+0.008975,0.27795798,-9.7844635429e-05
+0.009147,0.27667334,-1.0524727483e-04
+0.009320,0.27538872,-1.1507979366e-04
+0.009492,0.27410409,-1.2206109989e-04
+0.009665,0.27281946,-1.2530201148e-04
+0.009838,0.27153483,-1.2439849502e-04
+0.010010,0.27025020,-1.3664850660e-04
+0.010183,0.26896557,-1.1957090652e-04
+0.010355,0.26768094,-9.5222718675e-05
+0.010528,0.26639631,-1.0201309276e-04
+0.010701,0.26511169,-1.2334677609e-04
+0.010873,0.26382706,-1.2177022079e-04
+0.011046,0.26254243,-1.7088017156e-04
+0.011218,0.26125780,-1.3765040526e-04
+0.011391,0.25997317,-1.4139216769e-04
+0.011564,0.25868854,-1.7389720373e-04
+0.011736,0.25740391,-1.3763621310e-04
+0.011909,0.25611928,-1.6720440212e-04
+0.012081,0.25483466,-1.6538206094e-04
+0.012254,0.25355003,-1.5758361675e-04
+0.012426,0.25226540,-1.5732508308e-04
+0.012599,0.25098077,-1.8347063084e-04
+0.012772,0.24969614,-1.8229024143e-04
+0.012944,0.24841151,-1.8157698965e-04
+0.013117,0.24712688,-1.6936329555e-04
+0.013289,0.24584225,-1.8790559877e-04
+0.013462,0.24455762,-2.0398876285e-04
+0.013635,0.24327300,-1.9549769311e-04
+0.013807,0.24198837,-2.1442813057e-04
+0.013980,0.24070374,-2.5486716398e-04
+0.014152,0.23941911,-2.2105782795e-04
+0.014325,0.23813448,-2.4193023873e-04
+0.014498,0.23684985,-2.4269293876e-04
+0.014670,0.23556522,-2.3246136527e-04
+0.014843,0.23428059,-2.8892189198e-04
+0.015015,0.23299596,-2.4916627071e-04
+0.015188,0.23171134,-2.6774994675e-04
+0.015360,0.23042671,-2.8045778406e-04
+0.015533,0.22914208,-2.9261631804e-04
+0.015706,0.22785745,-2.8890606942e-04
+0.015878,0.22657282,-2.9726959574e-04
+0.016051,0.22528819,-3.2187350508e-04
+0.016223,0.22400356,-3.0647556956e-04
+0.016396,0.22271894,-3.0105416444e-04
+0.016569,0.22143430,-3.2134313191e-04
+0.016741,0.22014968,-3.3229643746e-04
+0.016914,0.21886505,-3.1528274039e-04
+0.017086,0.21758042,-3.4122443315e-04
+0.017259,0.21629579,-3.5395743774e-04
+0.017432,0.21501116,-3.4774516713e-04
+0.017604,0.21372653,-3.7217253344e-04
+0.017777,0.21244190,-3.9634109252e-04
+0.017949,0.21115727,-3.9808555737e-04
+0.018122,0.20987265,-4.0713584418e-04
+0.018294,0.20858802,-3.6938312293e-04
+0.018467,0.20730339,-4.2908342323e-04
+0.018640,0.20601876,-4.1094319474e-04
+0.018812,0.20473413,-4.3968445245e-04
+0.018985,0.20344950,-4.3051970921e-04
+0.019157,0.20216487,-4.7795645137e-04
+0.019330,0.20088024,-4.8666358772e-04
+0.019503,0.19959561,-4.9291247126e-04
+0.019675,0.19831099,-5.0772085767e-04
+0.019848,0.19702636,-4.9110742985e-04
+0.020020,0.19574173,-5.1565686843e-04
+0.020193,0.19445710,-5.2253353347e-04
+0.020366,0.19317247,-5.4741605558e-04
+0.020538,0.19188784,-5.3520812808e-04
+0.020711,0.19060321,-5.2261078609e-04
+0.020883,0.18931859,-5.7057516583e-04
+0.021056,0.18803395,-5.9189408800e-04
+0.021229,0.18674933,-5.9222782808e-04
+0.021401,0.18546470,-5.8740437576e-04
+0.021574,0.18418007,-6.1929754041e-04
+0.021746,0.18289544,-6.3123541201e-04
+0.021919,0.18161081,-6.4731669402e-04
+0.022091,0.18032618,-6.7735159392e-04
+0.022264,0.17904155,-6.7348519872e-04
+0.022437,0.17775693,-6.7511862113e-04
+0.022609,0.17647230,-6.8856661734e-04
+0.022782,0.17518766,-7.3320090577e-04
+0.022954,0.17390304,-7.3894508678e-04
+0.023127,0.17261841,-7.5641293297e-04
+0.023300,0.17133378,-7.6816417274e-04
+0.023472,0.17004915,-7.8657603283e-04
+0.023645,0.16876452,-7.9679543848e-04
+0.023817,0.16747989,-8.1035916042e-04
+0.023990,0.16619526,-8.2377161605e-04
+0.024163,0.16491064,-8.2167550952e-04
+0.024335,0.16362601,-8.6721104935e-04
+0.024508,0.16234138,-8.7165913709e-04
+0.024680,0.16105675,-8.7434017508e-04
+0.024853,0.15977212,-9.1858837548e-04
+0.025025,0.15848749,-9.0031421327e-04
+0.025198,0.15720287,-9.2598913281e-04
+0.025371,0.15591823,-9.1939101489e-04
+0.025543,0.15463360,-9.5571445322e-04
+0.025716,0.15334898,-9.4669082186e-04
+0.025888,0.15206435,-9.9289340415e-04
+0.026061,0.15077972,-9.8682769467e-04
+0.026234,0.14949509,-1.0028965025e-03
+0.026406,0.14821046,-1.0222340809e-03
+0.026579,0.14692583,-1.0342070554e-03
+0.026751,0.14564120,-1.0577956727e-03
+0.026924,0.14435657,-1.0605073491e-03
+0.027097,0.14307195,-1.0783048649e-03
+0.027269,0.14178732,-1.1026629446e-03
+0.027442,0.14050268,-1.1305369158e-03
+0.027614,0.13921806,-1.0969709364e-03
+0.027787,0.13793343,-1.0961640952e-03
+0.027960,0.13664881,-1.1467871906e-03
+0.028132,0.13536417,-1.1670140715e-03
+0.028305,0.13407954,-1.1666984956e-03
+0.028477,0.13279492,-1.1752836472e-03
+0.028650,0.13151028,-1.1787306461e-03
+0.028822,0.13022566,-1.1957162433e-03
+0.028995,0.12894103,-1.2121084179e-03
+0.029168,0.12765639,-1.2224175504e-03
+0.029340,0.12637177,-1.2566056650e-03
+0.029513,0.12508714,-1.2430812478e-03
+0.029685,0.12380252,-1.2274639629e-03
+0.029858,0.12251788,-1.2543686217e-03
+0.030031,0.12123325,-1.2344452363e-03
+0.030203,0.11994863,-1.2437532799e-03
+0.030376,0.11866399,-1.2393240129e-03
+0.030548,0.11737937,-1.2506070099e-03
+0.030721,0.11609474,-1.2541894306e-03
+0.030894,0.11481010,-1.2359413548e-03
+0.031066,0.11352548,-1.2732407585e-03
+0.031239,0.11224085,-1.2584030905e-03
+0.031411,0.11095623,-1.2710462589e-03
+0.031584,0.10967159,-1.2687542415e-03
+0.031756,0.10838696,-1.2738852161e-03
+0.031929,0.10710234,-1.2507100426e-03
+0.032102,0.10581771,-1.2553212143e-03
+0.032274,0.10453308,-1.2655947187e-03
+0.032447,0.10324845,-1.2651214862e-03
+0.032619,0.10196382,-1.2553479135e-03
+0.032792,0.10067919,-1.2498025322e-03
+0.032965,0.09939456,-1.2409295544e-03
+0.033137,0.09810994,-1.2476209006e-03
+0.033310,0.09682531,-1.2284435174e-03
+0.033482,0.09554067,-1.2058671939e-03
+0.033655,0.09425605,-1.2526412268e-03
+0.033828,0.09297142,-1.2339767309e-03
+0.034000,0.09168680,-1.1941008100e-03
+0.034173,0.09040216,-1.2041769153e-03
+0.034345,0.08911753,-1.2357271484e-03
+0.034518,0.08783291,-1.1673517946e-03
+0.034691,0.08654827,-1.1744009977e-03
+0.034863,0.08526365,-1.2023648709e-03
+0.035036,0.08397902,-1.1684090831e-03
+0.035208,0.08269438,-1.1650178463e-03
+0.035381,0.08140976,-1.1585001761e-03
+0.035553,0.08012513,-1.1400616168e-03
+0.035726,0.07884051,-1.1533719152e-03
+0.035899,0.07755587,-1.1332618105e-03
+0.036071,0.07627124,-1.1273974393e-03
+0.036244,0.07498662,-1.1451819993e-03
+0.036416,0.07370198,-1.1091745745e-03
+0.036589,0.07241736,-1.1000203359e-03
+0.036762,0.07113273,-1.0787429945e-03
+0.036934,0.06984810,-1.0867831321e-03
+0.037107,0.06856347,-1.0940407642e-03
+0.037279,0.06727884,-1.0706552359e-03
+0.037452,0.06599422,-1.0818766934e-03
+0.037625,0.06470958,-1.0655270625e-03
+0.037797,0.06342495,-1.0595711262e-03
+0.037970,0.06214033,-1.0488753366e-03
+0.038142,0.06085570,-1.0532836820e-03
+0.038315,0.05957107,-1.0466270884e-03
+0.038487,0.05828644,-1.0256411622e-03
+0.038660,0.05700181,-1.0363217201e-03
+0.038833,0.05571719,-1.0279024537e-03
+0.039005,0.05443255,-1.0114531166e-03
+0.039178,0.05314793,-9.9773804076e-04
+0.039350,0.05186330,-9.9834083005e-04
+0.039523,0.05057866,-9.9855223524e-04
+0.039696,0.04929404,-9.9174997782e-04
+0.039868,0.04800941,-9.6721655877e-04
+0.040041,0.04672479,-9.7049469605e-04
+0.040213,0.04544015,-9.7520452355e-04
+0.040386,0.04415553,-9.2835669585e-04
+0.040559,0.04287090,-9.5532902173e-04
+0.040731,0.04158626,-9.5453820000e-04
+0.040904,0.04030163,-9.5540395459e-04
+0.041076,0.03901702,-9.3192896209e-04
+0.041249,0.03773239,-9.4900323572e-04
+0.041422,0.03644775,-8.9791960086e-04
+0.041594,0.03516312,-9.0846176052e-04
+0.041767,0.03387848,-9.0386048061e-04
+0.041939,0.03259388,-8.9658691655e-04
+0.042112,0.03130924,-9.0411014007e-04
+0.042284,0.03002461,-8.6357794393e-04
+0.042457,0.02873997,-8.9770889598e-04
+0.042630,0.02745534,-8.6305078780e-04
+0.042802,0.02617073,-8.4914417802e-04
+0.042975,0.02488610,-8.6005452411e-04
+0.043147,0.02360146,-8.3750665060e-04
+0.043320,0.02231683,-8.5034931891e-04
+0.043493,0.02103220,-8.7924643871e-04
+0.043665,0.01974759,-8.5441206270e-04
+0.043838,0.01846295,-8.5570806843e-04
+0.044010,0.01717832,-8.2797739755e-04
+0.044183,0.01589369,-8.3835174613e-04
+0.044356,0.01460905,-8.2361754850e-04
+0.044528,0.01332444,-8.3820669504e-04
+0.044701,0.01203981,-8.3898815016e-04
+0.044873,0.01075518,-8.3162818572e-04
+0.045046,0.00947054,-8.2482540307e-04
+0.045218,0.00818591,-8.0916408645e-04
+0.045391,0.00690130,-8.2549016954e-04
+0.045564,0.00561666,-7.7925213420e-04
+0.045736,0.00433203,-8.2337821856e-04
+0.045909,0.00304740,-7.9027242850e-04
+0.046081,0.00176276,-7.7087672455e-04
+0.046254,0.00047815,-7.8587765163e-04
+0.046427,-0.00080648,-7.7283276966e-04
+0.046599,-0.00209111,-7.8846554878e-04
+0.046772,-0.00337575,-7.7661206418e-04
+0.046944,-0.00466038,-7.8335961011e-04
+0.047117,-0.00594499,-7.6934559073e-04
+0.047290,-0.00722962,-7.4442148788e-04
+0.047462,-0.00851426,-7.7387894085e-04
+0.047635,-0.00979889,-7.5951835703e-04
+0.047807,-0.01108352,-7.4761445032e-04
+0.047980,-0.01236813,-7.5422140961e-04
+0.048152,-0.01365277,-7.2149628019e-04
+0.048325,-0.01493740,-7.5905352823e-04
+0.048498,-0.01622204,-7.4377930632e-04
+0.048670,-0.01750667,-7.6180652276e-04
+0.048843,-0.01879128,-7.5174232266e-04
+0.049015,-0.02007591,-7.4046816707e-04
+0.049188,-0.02136055,-7.2268470124e-04
+0.049361,-0.02264518,-7.2686010693e-04
+0.049533,-0.02392981,-7.0786274638e-04
+0.049706,-0.02521442,-6.9799935933e-04
+0.049878,-0.02649906,-7.2919475555e-04
+0.050051,-0.02778369,-7.1177938861e-04
+0.050224,-0.02906832,-6.9512114114e-04
+0.050396,-0.03035296,-7.2028089731e-04
+0.050569,-0.03163757,-7.2777838454e-04
+0.050741,-0.03292220,-6.6029176412e-04
+0.050914,-0.03420683,-7.0746357137e-04
+0.051087,-0.03549147,-6.7554357620e-04
+0.051259,-0.03677610,-6.6893136461e-04
+0.051432,-0.03806071,-6.7922150127e-04
+0.051604,-0.03934534,-6.8827992914e-04
+0.051777,-0.04062998,-6.9489327873e-04
+0.051949,-0.04191461,-6.9468401824e-04
+0.052122,-0.04319925,-6.9514854065e-04
+0.052295,-0.04448386,-7.0842456771e-04
+0.052467,-0.04576849,-6.9278898737e-04
+0.052640,-0.04705312,-6.6019892967e-04
+0.052812,-0.04833776,-6.5622967687e-04
+0.052985,-0.04962239,-6.5820913851e-04
+0.053158,-0.05090700,-6.7044564729e-04
+0.053330,-0.05219163,-6.3302421505e-04
+0.053503,-0.05347627,-6.2908358730e-04
+0.053675,-0.05476090,-6.3194381636e-04
+0.053848,-0.05604553,-6.4402380652e-04
+0.054021,-0.05733014,-6.5711604675e-04
+0.054193,-0.05861478,-6.5053998851e-04
+0.054366,-0.05989941,-6.4393556783e-04
+0.054538,-0.06118405,-6.3892955422e-04
+0.054711,-0.06246868,-6.3454283088e-04
+0.054883,-0.06375329,-6.1596298464e-04
+0.055056,-0.06503792,-6.2586103689e-04
+0.055229,-0.06632256,-6.4893002638e-04
+0.055401,-0.06760719,-6.4230100742e-04
+0.055574,-0.06889182,-6.2011882550e-04
+0.055746,-0.07017643,-6.2789792371e-04
+0.055919,-0.07146107,-6.3083085338e-04
+0.056092,-0.07274570,-6.3676538660e-04
+0.056264,-0.07403033,-6.2849020839e-04
+0.056437,-0.07531497,-6.2568517229e-04
+0.056609,-0.07659958,-6.3325579784e-04
+0.056782,-0.07788421,-6.2442777098e-04
+0.056955,-0.07916884,-5.9846550671e-04
+0.057127,-0.08045348,-6.0978347527e-04
+0.057300,-0.08173811,-5.8975053567e-04
+0.057472,-0.08302272,-6.4114169287e-04
+0.057645,-0.08430735,-6.3111762912e-04
+0.057818,-0.08559199,-6.1425935644e-04
+0.057990,-0.08631944,-6.4127418221e-04
+0.058163,-0.08503480,-6.1143366128e-04
+0.058335,-0.08375017,-5.9870702510e-04
+0.058508,-0.08246554,-6.0712401549e-04
+0.058680,-0.08118093,-6.2500469268e-04
+0.058853,-0.07989629,-6.0012676633e-04
+0.059026,-0.07861166,-6.0149713591e-04
+0.059198,-0.07732703,-5.8273538492e-04
+0.059371,-0.07604239,-5.5722490622e-04
+0.059543,-0.07475778,-5.8833114460e-04
+0.059716,-0.07347315,-5.7853415541e-04
+0.059889,-0.07218852,-5.8065433499e-04
+0.060061,-0.07090388,-5.6057609429e-04
+0.060234,-0.06961925,-5.8998303761e-04
+0.060406,-0.06833464,-5.6860498326e-04
+0.060579,-0.06705001,-5.7498889476e-04
+0.060752,-0.06576537,-5.6387423409e-04
+0.060924,-0.06448074,-5.4166675358e-04
+0.061097,-0.06319610,-5.5090485398e-04
+0.061269,-0.06191150,-5.8319719364e-04
+0.061442,-0.06062686,-5.6079585939e-04
+0.061614,-0.05934223,-5.6735572303e-04
+0.061787,-0.05805759,-5.7793171627e-04
+0.061960,-0.05677296,-5.6186001972e-04
+0.062132,-0.05548835,-5.6641888728e-04
+0.062305,-0.05420372,-5.5135453864e-04
+0.062477,-0.05291908,-5.5067900496e-04
+0.062650,-0.05163445,-5.5781885414e-04
+0.062823,-0.05034982,-5.5993855226e-04
+0.062995,-0.04906521,-5.3847405376e-04
+0.063168,-0.04778057,-5.3752736994e-04
+0.063340,-0.04649594,-5.3267441719e-04
+0.063513,-0.04521131,-5.4273393398e-04
+0.063686,-0.04392667,-5.3143631810e-04
+0.063858,-0.04264206,-5.3483433919e-04
+0.064031,-0.04135743,-5.4412356201e-04
+0.064203,-0.04007280,-5.4826929218e-04
+0.064376,-0.03878816,-5.3369857247e-04
+0.064549,-0.03750353,-5.3287229770e-04
+0.064721,-0.03621892,-5.3505082161e-04
+0.064894,-0.03493428,-5.4234036142e-04
+0.065066,-0.03364965,-5.2513648722e-04
+0.065239,-0.03236502,-5.3417036057e-04
+0.065411,-0.03108038,-5.0726036202e-04
+0.065584,-0.02979577,-5.1444634393e-04
+0.065757,-0.02851114,-5.0029567714e-04
+0.065929,-0.02722651,-5.3275298288e-04
+0.066102,-0.02594187,-5.0668112055e-04
+0.066274,-0.02465724,-5.1310556232e-04
+0.066447,-0.02337263,-5.1895054377e-04
+0.066620,-0.02208800,-5.1790765527e-04
+0.066792,-0.02080336,-5.2931001083e-04
+0.066965,-0.01951873,-5.1463280068e-04
+0.067137,-0.01823409,-5.0897733982e-04
+0.067310,-0.01694949,-5.1608733841e-04
+0.067483,-0.01566485,-5.1971702983e-04
+0.067655,-0.01438022,-4.9169091692e-04
+0.067828,-0.01309558,-4.9973254274e-04
+0.068000,-0.01181095,-5.0018511616e-04
+0.068173,-0.01052634,-5.0215267258e-04
+0.068345,-0.00924171,-4.9147622905e-04
+0.068518,-0.00795707,-5.0796819737e-04
+0.068691,-0.00667244,-4.9644661454e-04
+0.068863,-0.00538781,-5.1370235523e-04
+0.069036,-0.00410320,-4.8146949789e-04
+0.069208,-0.00281856,-4.8994837792e-04
+0.069381,-0.00153393,-5.0097011659e-04
+0.069554,-0.00024930,-4.9089729396e-04
+0.069726,0.00103534,-4.7840841203e-04
+0.069899,0.00231995,-5.0259517909e-04
+0.070071,0.00360458,-4.7673664780e-04
+0.070244,0.00488921,-5.0361390700e-04
+0.070417,0.00617385,-4.6840032403e-04
+0.070589,0.00745848,-4.8641699210e-04
+0.070762,0.00874309,-4.6719325730e-04
+0.070934,0.01002773,-4.5949158679e-04
+0.071107,0.01131236,-4.7852435661e-04
+0.071279,0.01259699,-4.5473352564e-04
+0.071452,0.01388163,-4.8012302629e-04
+0.071625,0.01516624,-4.5295023752e-04
+0.071797,0.01645087,-4.7178604598e-04
+0.071970,0.01773550,-4.4350033801e-04
+0.072142,0.01902014,-4.7185988461e-04
+0.072315,0.02030477,-4.6044181591e-04
+0.072488,0.02158938,-4.8029875959e-04
+0.072660,0.02287401,-4.8958242372e-04
+0.072833,0.02415865,-4.6268700030e-04
+0.073005,0.02544328,-4.6753947159e-04
+0.073178,0.02672791,-4.5546416474e-04
+0.073351,0.02801252,-4.5603145721e-04
+0.073523,0.02929716,-4.9234561647e-04
+0.073696,0.03058179,-4.2355226687e-04
+0.073868,0.03186643,-4.6310508361e-04
+0.074041,0.03315106,-4.4354327558e-04
+0.074214,0.03443567,-4.5844099491e-04
+0.074386,0.03572030,-4.5262428836e-04
+0.074559,0.03700494,-4.3407534316e-04
+0.074731,0.03828957,-4.6646187413e-04
+0.074904,0.03957420,-4.3825206193e-04
+0.075076,0.04085881,-4.4747374888e-04
+0.075249,0.04214345,-4.7539118289e-04
+0.075422,0.04342808,-4.7404099090e-04
+0.075594,0.04471271,-4.1891225123e-04
+0.075767,0.04599734,-4.2232773623e-04
+0.075939,0.04728197,-4.3874411516e-04
+0.076112,0.04856659,-4.1261767266e-04
+0.076285,0.04985122,-4.2674995639e-04
+0.076457,0.05113586,-4.3699203447e-04
+0.076630,0.05242048,-4.3547976518e-04
+0.076802,0.05370511,-4.4394704636e-04
+0.076975,0.05498973,-4.2554245196e-04
+0.077148,0.05627437,-4.4297125603e-04
+0.077320,0.05755900,-4.2316740438e-04
+0.077493,0.05884362,-4.2920321951e-04
+0.077665,0.06012826,-4.1790748570e-04
+0.077838,0.06141288,-4.1449567731e-04
+0.078010,0.06269751,-4.1530370033e-04
+0.078183,0.06398215,-3.9695469280e-04
+0.078356,0.06526677,-4.1369688958e-04
+0.078528,0.06655140,-4.0099450153e-04
+0.078701,0.06783602,-4.4832173317e-04
+0.078873,0.06912066,-4.0387652764e-04
+0.079046,0.07040529,-3.8718834204e-04
+0.079219,0.07168991,-3.9153768649e-04
+0.079391,0.07297455,-3.9079194703e-04
+0.079564,0.07425917,-4.0039556393e-04
+0.079736,0.07554380,-3.6770063526e-04
+0.079909,0.07682844,-3.9942581375e-04
+0.080082,0.07811306,-4.0294888342e-04
+0.080254,0.07939769,-4.0696812064e-04
+0.080427,0.08068231,-3.9336513773e-04
+0.080599,0.08196695,-4.0048677893e-04
+0.080772,0.08325158,-3.8243098120e-04
+0.080945,0.08453620,-3.9601965159e-04
+0.081117,0.08582083,-3.7504891332e-04
+0.081290,0.08710546,-3.6378773529e-04
+0.081462,0.08839009,-3.6838527293e-04
+0.081635,0.08967472,-3.9023012570e-04
+0.081807,0.09095935,-3.8853700211e-04
+0.081980,0.09224398,-3.7521794993e-04
+0.082153,0.09352860,-3.6924113568e-04
+0.082325,0.09481323,-3.7552214581e-04
+0.082498,0.09609787,-3.6980715885e-04
+0.082670,0.09738249,-3.5450962985e-04
+0.082843,0.09866712,-3.7095601256e-04
+0.083016,0.09995174,-3.7196589909e-04
+0.083188,0.10123638,-3.4533508232e-04
+0.083361,0.10252101,-3.6442221347e-04
+0.083533,0.10380563,-3.5274713209e-04
+0.083706,0.10509027,-3.4330646788e-04
+0.083879,0.10637489,-3.5503674221e-04
+0.084051,0.10765952,-3.6208266271e-04
+0.084224,0.10894416,-3.3107547401e-04
+0.084396,0.11022878,-3.5288509258e-04
+0.084569,0.11151341,-3.0347871498e-04
+0.084741,0.11279803,-3.2182708785e-04
+0.084914,0.11408267,-3.4304777008e-04
+0.085087,0.11536730,-2.9711979569e-04
+0.085259,0.11665192,-3.4348609664e-04
+0.085432,0.11793656,-2.8143018228e-04
+0.085604,0.11922118,-3.3471219039e-04
+0.085777,0.12050581,-3.0523749235e-04
+0.085950,0.12179044,-3.3014848633e-04
+0.086122,0.12307507,-3.0232684119e-04
+0.086295,0.12435970,-2.8244324208e-04
+0.086467,0.12564432,-2.8938527640e-04
+0.086640,0.12692896,-2.8986131012e-04
+0.086813,0.12821359,-2.7168090151e-04
+0.086985,0.12949821,-2.8311236358e-04
+0.087158,0.13078284,-2.8708362976e-04
+0.087330,0.13206747,-3.1517646880e-04
+0.087503,0.13335210,-2.7245086722e-04
+0.087676,0.13463673,-2.9724880538e-04
+0.087848,0.13592135,-2.9546768383e-04
+0.088021,0.13720599,-2.9596536141e-04
+0.088193,0.13849061,-2.7444008939e-04
+0.088366,0.13977524,-2.7284840089e-04
+0.088538,0.14105988,-3.0427043398e-04
+0.088711,0.14234450,-2.4030563580e-04
+0.088884,0.14362913,-2.3927699418e-04
+0.089056,0.14491375,-2.4352295580e-04
+0.089229,0.14619839,-2.7329060102e-04
+0.089401,0.14748302,-2.1470370139e-04
+0.089574,0.14876764,-2.6422300351e-04
+0.089747,0.15005227,-2.6583837113e-04
+0.089919,0.15133690,-2.5062096163e-04
+0.090092,0.15262153,-1.9962042258e-04
+0.090264,0.15390616,-2.7338214428e-04
+0.090437,0.15519079,-2.6497051562e-04
+0.090610,0.15647542,-2.3597263915e-04
+0.090782,0.15776005,-2.2425591138e-04
+0.090955,0.15904468,-2.3577237322e-04
+0.091127,0.16032930,-2.4257226710e-04
+0.091300,0.16161393,-2.3536019875e-04
+0.091472,0.16289856,-2.4398216026e-04
+0.091645,0.16418319,-2.2237219485e-04
+0.091818,0.16546782,-2.1978902477e-04
+0.091990,0.16675245,-2.0327230498e-04
+0.092163,0.16803708,-1.7321142806e-04
+0.092335,0.16932170,-1.8979069403e-04
+0.092508,0.17060634,-2.0184455399e-04
+0.092681,0.17189097,-1.8690210254e-04
+0.092853,0.17317559,-1.9160313244e-04
+0.093026,0.17446022,-1.6110413687e-04
+0.093198,0.17574485,-1.8303732680e-04
+0.093371,0.17702948,-2.1272172303e-04
+0.093544,0.17831411,-1.5320190498e-04
+0.093716,0.17959874,-1.7473586519e-04
+0.093889,0.18088336,-1.4700443930e-04
+0.094061,0.18216799,-1.3401690592e-04
+0.094234,0.18345263,-1.8286705371e-04
+0.094407,0.18473725,-1.6497163724e-04
+0.094579,0.18602188,-1.4187477772e-04
+0.094752,0.18730651,-1.7524650939e-04
+0.094924,0.18859114,-1.4965292395e-04
+0.095097,0.18987577,-1.5581397367e-04
+0.095269,0.19116040,-1.4440911233e-04
+0.095442,0.19244503,-1.5788392811e-04
+0.095615,0.19372965,-1.0883798979e-04
+0.095787,0.19501428,-1.1050001537e-04
+0.095960,0.19629891,-1.3854645906e-04
+0.096132,0.19758354,-1.4209213552e-04
+0.096305,0.19886817,-1.1343547272e-04
+0.096478,0.20015280,-1.1273197052e-04
+0.096650,0.20143743,-1.3501386959e-04
+0.096823,0.20272206,-1.3572821561e-04
+0.096995,0.20400669,-9.8692805742e-05
+0.097168,0.20529131,-1.2986342860e-04
+0.097341,0.20657594,-8.9648126867e-05
+0.097513,0.20786057,-9.4983137069e-05
+0.097686,0.20914520,-9.0531071802e-05
+0.097858,0.21042983,-9.7993516330e-05
+0.098031,0.21171446,-9.8088386050e-05
+0.098203,0.21299909,-8.0334043153e-05
+0.098376,0.21428372,-8.6397449280e-05
+0.098549,0.21556834,-9.0890881903e-05
+0.098721,0.21685297,-7.9161953475e-05
+0.098894,0.21813760,-7.7956993135e-05
+0.099066,0.21942223,-7.3219153353e-05
+0.099239,0.22070686,-7.6474016369e-05
+0.099412,0.22199149,-9.4902328201e-05
+0.099584,0.22327612,-7.3285671580e-05
+0.099757,0.22456075,-4.9396097316e-05
+0.099929,0.22584538,-6.2355208079e-05
+0.100102,0.22713000,-6.0268900379e-05
+0.100275,0.22841463,-2.9153754974e-05
+0.100447,0.22969926,-2.7097089959e-05
+0.100620,0.23098389,-3.6048214925e-05
+0.100792,0.23226852,-4.5922240627e-05
+0.100965,0.23355315,-3.8160680188e-05
+0.101138,0.23483778,-3.7649631121e-05
+0.101310,0.23612241,-4.0133021122e-05
+0.101483,0.23740704,-6.6897498061e-05
+0.101655,0.23869166,-1.8548207955e-05
+0.101828,0.23997629,-3.2699964871e-05
+0.102000,0.24126092,-1.4182915108e-05
+0.102173,0.24254555,-4.2097727069e-06
+0.102346,0.24383018,-1.3386588033e-06
+0.102518,0.24511481,-4.2104970870e-05
+0.102691,0.24639944,1.8951101985e-07
+0.102863,0.24768407,1.7825755066e-06
+0.103036,0.24896870,-1.5479387251e-05
+0.103209,0.25025332,-5.0042426008e-05
+0.103381,0.25153795,-1.1731836343e-05
+0.103554,0.25282258,1.6218482006e-05
+0.103726,0.25410721,-2.5321751414e-05
+0.103899,0.25539184,1.3819013956e-06
+0.104072,0.25667647,2.0912106699e-05
+0.104244,0.25796110,3.8033612757e-05
+0.104417,0.25924573,1.3045109016e-05
+0.104589,0.26053035,5.9941030845e-05
+0.104762,0.26181498,9.3653046085e-06
+0.104934,0.26309961,3.0334557457e-05
+0.105107,0.26438424,1.9393318529e-05
+0.105280,0.26566887,5.3493079555e-05
+0.105452,0.26695350,1.1652073833e-05
+0.105625,0.26823813,2.1765492385e-05
+0.105797,0.26952276,2.0106045082e-05
+0.105970,0.27080739,6.3692356845e-05
+0.106143,0.27209201,4.6796338715e-05
+0.106315,0.27337664,4.7615495526e-05
+0.106488,0.27466127,3.2624197666e-05
+0.106660,0.27594590,6.5121574104e-05
+0.106833,0.27723053,3.5527142714e-05
+0.107006,0.27851516,3.5939106540e-05
+0.107178,0.27979979,7.0828666193e-05
+0.107351,0.28108442,7.9227886289e-05
+0.107523,0.28236904,6.1452391932e-05
+0.107696,0.28365368,7.3310986586e-05
+0.107868,0.28493830,7.4732347274e-05
+0.108041,0.28622293,7.2630102118e-05
+0.108214,0.28750756,7.3158604149e-05
+0.108386,0.28879219,9.1423635017e-05
+0.108559,0.29007682,1.2288304152e-04
+0.108731,0.29136145,7.8663657656e-05
+0.108904,0.29264608,1.1023253090e-04
+0.109077,0.29393071,8.4601823715e-05
+0.109249,0.29521533,1.0707636741e-04
+0.109422,0.29649996,1.1054981376e-04
+0.109594,0.29778459,1.1148564282e-04
+0.109767,0.29906922,1.2403247517e-04
+0.109940,0.30035385,1.0210081716e-04
+0.110112,0.30163848,1.2588134048e-04
+0.110285,0.30292311,1.0956650607e-04
+0.110457,0.30420773,1.3424457136e-04
+0.110630,0.30549237,1.3916084719e-04
+0.110803,0.30677699,1.3238713823e-04
+0.110975,0.30806162,1.5422101587e-04
+0.111148,0.30934625,1.3459273339e-04
+0.111320,0.31063088,1.6616938113e-04
+0.111493,0.31191551,1.5475452947e-04
+0.111665,0.31320014,1.5514334214e-04
+0.111838,0.31448477,1.4410873532e-04
+0.112011,0.31576939,1.6440662076e-04
+0.112183,0.31705402,1.5451251868e-04
+0.112356,0.31833866,1.1920297176e-04
+0.112528,0.31962328,1.4944961606e-04
+0.112701,0.32090791,1.6696874880e-04
+0.112874,0.32219254,1.7849242161e-04
+0.113046,0.32347717,1.8431368016e-04
+0.113219,0.32476180,2.0609336060e-04
+0.113391,0.32604643,2.2110914733e-04
+0.113564,0.32733105,1.8927616531e-04
+0.113737,0.32861568,2.1841044847e-04
+0.113909,0.32990031,2.2943468199e-04
+0.114082,0.33118494,1.8160083291e-04
+0.114254,0.33246957,1.8598336535e-04
+0.114427,0.33375420,2.1841797677e-04
+0.114599,0.33503883,2.2982746670e-04
+0.114772,0.33632345,2.4637449667e-04
+0.114945,0.33760809,2.1737712354e-04
+0.115117,0.33889272,2.2124931816e-04
+0.115290,0.34017734,2.2720685208e-04
+0.115462,0.34146197,2.4900253016e-04
+0.115635,0.34274660,2.4961785933e-04
+0.115808,0.34403123,2.1912638112e-04
diff --git a/demo_data/ec_LH_metadata.json b/demo_data/ec_LH_metadata.json
new file mode 100644
index 0000000000000000000000000000000000000000..d29cc7f20bc9db1457046e8add8e600dafba834b
--- /dev/null
+++ b/demo_data/ec_LH_metadata.json
@@ -0,0 +1,37 @@
+{
+ "mechanism": "LH",
+ "n_scans": 3,
+ "scan_rates_Vs": [
+ 0.010000000149011612,
+ 0.2415423631668091,
+ 7.443257904052735
+ ],
+ "physical_params": {
+ "E0_V": 0.25,
+ "T_K": 298.15,
+ "A_cm2": 0.0707,
+ "C_mM": 1.0,
+ "D_cm2s": 1e-05,
+ "n_electrons": 1
+ },
+ "true_params_dimless": {
+ "sigma": 8.719717822841444,
+ "C_A_bulk": 1.0,
+ "C_B_bulk": 0.0,
+ "dA": 1.0,
+ "dB": 1.2541572204674802,
+ "theta_i": 3.6881732361108934,
+ "theta_v": -13.090140187264856,
+ "cycles": 1.0,
+ "kinetics": "LH",
+ "K0": 5.810825216518235,
+ "alpha": 0.5204656070504309,
+ "KA_eq": 3.808564587276162,
+ "KB_eq": 1.3265647159051492
+ },
+ "csv_files": [
+ "ec_LH_10mVs.csv",
+ "ec_LH_242mVs.csv",
+ "ec_LH_7443mVs.csv"
+ ]
+}
\ No newline at end of file
diff --git a/demo_data/ec_MHC_11mVs.csv b/demo_data/ec_MHC_11mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..cc26246e3fb722b056db60e5612aee3470470ebd
--- /dev/null
+++ b/demo_data/ec_MHC_11mVs.csv
@@ -0,0 +1,673 @@
+Time (s),E (V),I (A)
+0.000000,0.34475868,-5.2718476114e-07
+0.121492,0.34347405,-3.3837822120e-07
+0.242985,0.34218941,-2.4093789297e-07
+0.364477,0.34090479,-2.3513899040e-07
+0.485970,0.33962016,-2.0858477498e-07
+0.607462,0.33833553,-2.4271063477e-07
+0.728955,0.33705090,-2.1371989819e-07
+0.850447,0.33576627,-2.0247741987e-07
+0.971940,0.33448164,-2.1385519819e-07
+1.093432,0.33319702,-2.0329281564e-07
+1.214924,0.33191239,-2.1677327287e-07
+1.336417,0.33062776,-2.2537396018e-07
+1.457909,0.32934313,-2.5713076838e-07
+1.579402,0.32805850,-2.5096383128e-07
+1.700894,0.32677387,-2.6323354818e-07
+1.822387,0.32548924,-2.6383359553e-07
+1.943879,0.32420462,-2.2122206245e-07
+2.065372,0.32291998,-2.8585037656e-07
+2.186864,0.32163535,-2.7977259981e-07
+2.308356,0.32035073,-2.9381869299e-07
+2.429849,0.31906610,-3.0172202726e-07
+2.551341,0.31778147,-3.1623848704e-07
+2.672834,0.31649684,-3.7562056904e-07
+2.794326,0.31521221,-3.5498668850e-07
+2.915819,0.31392758,-3.9705771757e-07
+3.037311,0.31264296,-4.1134025709e-07
+3.158804,0.31135833,-3.8444352569e-07
+3.280296,0.31007369,-4.2089044155e-07
+3.401789,0.30878907,-4.5674241376e-07
+3.523281,0.30750444,-4.7669587633e-07
+3.644773,0.30621981,-4.7219403905e-07
+3.766266,0.30493518,-5.2660422648e-07
+3.887758,0.30365055,-4.9077068435e-07
+4.009251,0.30236592,-5.2542037087e-07
+4.130743,0.30108129,-5.4326780359e-07
+4.252235,0.29979667,-5.6251123117e-07
+4.373728,0.29851204,-5.9195249946e-07
+4.495220,0.29722741,-6.1030617944e-07
+4.616713,0.29594278,-6.6383048572e-07
+4.738205,0.29465815,-6.8142964076e-07
+4.859698,0.29337352,-7.2522997851e-07
+4.981190,0.29208889,-7.0871786316e-07
+5.102683,0.29080426,-7.6473896856e-07
+5.224175,0.28951963,-7.8885840273e-07
+5.345668,0.28823501,-8.4082298285e-07
+5.467160,0.28695038,-8.6480410120e-07
+5.588652,0.28566575,-8.9497473672e-07
+5.710145,0.28438112,-9.3560432725e-07
+5.831637,0.28309649,-9.7117340416e-07
+5.953130,0.28181186,-9.7001408762e-07
+6.074622,0.28052723,-1.0280565218e-06
+6.196115,0.27924260,-1.0480289558e-06
+6.317607,0.27795798,-1.0854375352e-06
+6.439100,0.27667334,-1.1279565312e-06
+6.560592,0.27538872,-1.1595716212e-06
+6.682085,0.27410409,-1.1724839164e-06
+6.803577,0.27281946,-1.2188737965e-06
+6.925070,0.27153483,-1.2697452537e-06
+7.046562,0.27025020,-1.2997347847e-06
+7.168054,0.26896557,-1.3286950150e-06
+7.289547,0.26768094,-1.3675663500e-06
+7.411039,0.26639631,-1.3620725877e-06
+7.532532,0.26511169,-1.4152430880e-06
+7.654024,0.26382706,-1.4189610669e-06
+7.775517,0.26254243,-1.4905241178e-06
+7.897009,0.26125780,-1.5168622760e-06
+8.018502,0.25997317,-1.5001109562e-06
+8.139994,0.25868854,-1.5894218402e-06
+8.261486,0.25740391,-1.6061519202e-06
+8.382979,0.25611928,-1.6375087312e-06
+8.504471,0.25483466,-1.6523625001e-06
+8.625963,0.25355003,-1.6698389598e-06
+8.747456,0.25226540,-1.6837894228e-06
+8.868948,0.25098077,-1.7061648300e-06
+8.990441,0.24969614,-1.7553578352e-06
+9.111933,0.24841151,-1.7674403386e-06
+9.233426,0.24712688,-1.8146238206e-06
+9.354918,0.24584225,-1.8039629338e-06
+9.476411,0.24455762,-1.8579375527e-06
+9.597903,0.24327300,-1.8261608967e-06
+9.719396,0.24198837,-1.9018921876e-06
+9.840888,0.24070374,-1.8737132896e-06
+9.962380,0.23941911,-1.8980595556e-06
+10.083873,0.23813448,-1.9320034860e-06
+10.205365,0.23684985,-1.8948160675e-06
+10.326858,0.23556522,-1.9500865144e-06
+10.448350,0.23428059,-1.9173850035e-06
+10.569843,0.23299596,-1.9662719920e-06
+10.691335,0.23171134,-1.9685165955e-06
+10.812828,0.23042671,-2.0161529162e-06
+10.934320,0.22914208,-1.9987248129e-06
+11.055813,0.22785745,-1.9900852033e-06
+11.177305,0.22657282,-2.0115707083e-06
+11.298797,0.22528819,-2.0137627280e-06
+11.420290,0.22400356,-2.0232562560e-06
+11.541782,0.22271894,-2.0085093042e-06
+11.663275,0.22143430,-2.0169051728e-06
+11.784767,0.22014968,-1.9610012466e-06
+11.906260,0.21886505,-2.0163079866e-06
+12.027752,0.21758042,-1.9990269116e-06
+12.149245,0.21629579,-1.9879086494e-06
+12.270737,0.21501116,-1.9928801831e-06
+12.392230,0.21372653,-1.9785252379e-06
+12.513722,0.21244190,-1.9994492311e-06
+12.635214,0.21115727,-1.9866060164e-06
+12.756707,0.20987265,-1.9832043648e-06
+12.878199,0.20858802,-1.9836656581e-06
+12.999692,0.20730339,-1.9333902529e-06
+13.121184,0.20601876,-1.9368317032e-06
+13.242677,0.20473413,-1.9706826326e-06
+13.364169,0.20344950,-1.9189866419e-06
+13.485662,0.20216487,-1.8832719803e-06
+13.607154,0.20088024,-1.8960351852e-06
+13.728647,0.19959561,-1.8725314961e-06
+13.850139,0.19831099,-1.8593721605e-06
+13.971631,0.19702636,-1.8491354491e-06
+14.093124,0.19574173,-1.8554021922e-06
+14.214616,0.19445710,-1.8371187269e-06
+14.336109,0.19317247,-1.8198883797e-06
+14.457601,0.19188784,-1.7827230258e-06
+14.579094,0.19060321,-1.7893052712e-06
+14.700586,0.18931859,-1.8004886960e-06
+14.822079,0.18803395,-1.7444245441e-06
+14.943571,0.18674933,-1.7501293630e-06
+15.065064,0.18546470,-1.7348924546e-06
+15.186556,0.18418007,-1.7219689209e-06
+15.308049,0.18289544,-1.6819894096e-06
+15.429541,0.18161081,-1.6916547112e-06
+15.551033,0.18032618,-1.6781053280e-06
+15.672526,0.17904155,-1.6467148016e-06
+15.794018,0.17775693,-1.6477489482e-06
+15.915511,0.17647230,-1.6536682263e-06
+16.037003,0.17518766,-1.6612931761e-06
+16.158496,0.17390304,-1.6035645946e-06
+16.279988,0.17261841,-1.5678839577e-06
+16.401481,0.17133378,-1.6120255226e-06
+16.522972,0.17004915,-1.5961716318e-06
+16.644465,0.16876452,-1.5720961205e-06
+16.765957,0.16747989,-1.5377397687e-06
+16.887449,0.16619526,-1.5292751289e-06
+17.008942,0.16491064,-1.5437581310e-06
+17.130434,0.16362601,-1.5128679748e-06
+17.251927,0.16234138,-1.4769682390e-06
+17.373419,0.16105675,-1.4997642129e-06
+17.494912,0.15977212,-1.4551593957e-06
+17.616404,0.15848749,-1.4769192640e-06
+17.737897,0.15720287,-1.4587222010e-06
+17.859389,0.15591823,-1.4284437689e-06
+17.980882,0.15463360,-1.4275640740e-06
+18.102374,0.15334898,-1.4490150387e-06
+18.223866,0.15206435,-1.3900470278e-06
+18.345359,0.15077972,-1.3890031892e-06
+18.466851,0.14949509,-1.3633110892e-06
+18.588344,0.14821046,-1.3953249906e-06
+18.709836,0.14692583,-1.3447210917e-06
+18.831329,0.14564120,-1.3551639107e-06
+18.952821,0.14435657,-1.3102694706e-06
+19.074314,0.14307195,-1.3546141530e-06
+19.195806,0.14178732,-1.3401774452e-06
+19.317299,0.14050268,-1.3225411723e-06
+19.438791,0.13921806,-1.3276693230e-06
+19.560283,0.13793343,-1.2888190214e-06
+19.681776,0.13664881,-1.2847488347e-06
+19.803268,0.13536417,-1.3187651451e-06
+19.924761,0.13407954,-1.2829355209e-06
+20.046253,0.13279492,-1.2578533921e-06
+20.167746,0.13151028,-1.2536816466e-06
+20.289238,0.13022566,-1.2668337649e-06
+20.410731,0.12894103,-1.2412132199e-06
+20.532223,0.12765639,-1.2346921160e-06
+20.653716,0.12637177,-1.2347705791e-06
+20.775208,0.12508714,-1.2185032359e-06
+20.896701,0.12380252,-1.2280746085e-06
+21.018193,0.12251788,-1.1908179032e-06
+21.139685,0.12123325,-1.2074266283e-06
+21.261178,0.11994863,-1.1723176074e-06
+21.382670,0.11866399,-1.2267334141e-06
+21.504163,0.11737937,-1.1824251279e-06
+21.625655,0.11609474,-1.1702564284e-06
+21.747148,0.11481010,-1.1609251882e-06
+21.868640,0.11352548,-1.1716395867e-06
+21.990133,0.11224085,-1.1386359770e-06
+22.111625,0.11095623,-1.1475636630e-06
+22.233118,0.10967159,-1.1433181971e-06
+22.354610,0.10838696,-1.1181064649e-06
+22.476102,0.10710234,-1.1131411175e-06
+22.597595,0.10581771,-1.1167577438e-06
+22.719087,0.10453308,-1.1195837583e-06
+22.840580,0.10324845,-1.1118355976e-06
+22.962072,0.10196382,-1.0918915176e-06
+23.083565,0.10067919,-1.0932808622e-06
+23.205057,0.09939456,-1.1084950874e-06
+23.326550,0.09810994,-1.0803724850e-06
+23.448042,0.09682531,-1.1056748468e-06
+23.569535,0.09554067,-1.0777811382e-06
+23.691027,0.09425605,-1.0712224008e-06
+23.812519,0.09297142,-1.0630098536e-06
+23.934012,0.09168680,-1.0668704272e-06
+24.055504,0.09040216,-1.0669306407e-06
+24.176997,0.08911753,-1.0213051836e-06
+24.298489,0.08783291,-1.0662314833e-06
+24.419982,0.08654827,-1.0446190557e-06
+24.541474,0.08526365,-1.0238006424e-06
+24.662967,0.08397902,-1.0432498167e-06
+24.784459,0.08269438,-1.0317937814e-06
+24.905952,0.08140976,-1.0077041447e-06
+25.027444,0.08012513,-1.0133197775e-06
+25.148936,0.07884051,-1.0222391119e-06
+25.270429,0.07755587,-1.0220267148e-06
+25.391921,0.07627124,-1.0116586472e-06
+25.513414,0.07498662,-9.6255163182e-07
+25.634906,0.07370198,-1.0084201082e-06
+25.756399,0.07241736,-9.9699459211e-07
+25.877891,0.07113273,-9.6798868616e-07
+25.999384,0.06984810,-1.0012715051e-06
+26.120876,0.06856347,-9.8837828435e-07
+26.242369,0.06727884,-9.8144279998e-07
+26.363861,0.06599422,-9.6933977865e-07
+26.485354,0.06470958,-9.7889764445e-07
+26.606846,0.06342495,-9.3449264538e-07
+26.728338,0.06214033,-9.5773640583e-07
+26.849831,0.06085570,-9.4752763596e-07
+26.971323,0.05957107,-9.5580843892e-07
+27.092816,0.05828644,-9.2233569995e-07
+27.214308,0.05700181,-9.6893962679e-07
+27.335801,0.05571719,-9.6929606198e-07
+27.457293,0.05443255,-9.4323216404e-07
+27.578786,0.05314793,-9.5081174752e-07
+27.700278,0.05186330,-9.3441665674e-07
+27.821771,0.05057866,-9.3291028760e-07
+27.943263,0.04929404,-9.2757015228e-07
+28.064755,0.04800941,-9.4126408914e-07
+28.186248,0.04672479,-9.2682284472e-07
+28.307740,0.04544015,-9.1383208633e-07
+28.429233,0.04415553,-9.3409486495e-07
+28.550725,0.04287090,-9.1430894857e-07
+28.672218,0.04158626,-9.0309902576e-07
+28.793710,0.04030163,-8.7692552684e-07
+28.915203,0.03901702,-8.8863190190e-07
+29.036695,0.03773239,-9.0434866259e-07
+29.158188,0.03644775,-9.0420369647e-07
+29.279680,0.03516312,-8.8808791808e-07
+29.401172,0.03387848,-8.8326918651e-07
+29.522665,0.03259388,-8.6747530302e-07
+29.644157,0.03130924,-9.1502656180e-07
+29.765650,0.03002461,-8.6754685813e-07
+29.887142,0.02873997,-8.7561784170e-07
+30.008635,0.02745534,-8.8014416650e-07
+30.130127,0.02617073,-8.9323431844e-07
+30.251620,0.02488610,-8.7954409337e-07
+30.373112,0.02360146,-8.6978939946e-07
+30.494605,0.02231683,-8.5362768763e-07
+30.616097,0.02103220,-8.4874461833e-07
+30.737589,0.01974759,-8.7652846814e-07
+30.859082,0.01846295,-8.3939007627e-07
+30.980574,0.01717832,-8.6501345661e-07
+31.102067,0.01589369,-8.4577863832e-07
+31.223559,0.01460905,-8.8679477080e-07
+31.345052,0.01332444,-8.5434334186e-07
+31.466544,0.01203981,-8.6268724529e-07
+31.588037,0.01075518,-8.5172678588e-07
+31.709529,0.00947054,-8.4455642752e-07
+31.831022,0.00818591,-8.3184415668e-07
+31.952514,0.00690130,-8.4118477952e-07
+32.074006,0.00561666,-8.5650989454e-07
+32.195499,0.00433203,-8.4117446898e-07
+32.316991,0.00304740,-8.5867670500e-07
+32.438484,0.00176276,-8.5418708570e-07
+32.559976,0.00047815,-7.9282388599e-07
+32.681469,-0.00080648,-8.2794966146e-07
+32.802961,-0.00209111,-8.0709191343e-07
+32.924452,-0.00337575,-8.0975301092e-07
+33.045944,-0.00466038,-8.0272705161e-07
+33.167437,-0.00594499,-8.4590906659e-07
+33.288929,-0.00722962,-8.0123970540e-07
+33.410422,-0.00851426,-7.8368060679e-07
+33.531914,-0.00979889,-7.8566796238e-07
+33.653406,-0.01108352,-8.0358236203e-07
+33.774899,-0.01236813,-7.8637145017e-07
+33.896391,-0.01365277,-8.1408137345e-07
+34.017884,-0.01493740,-7.7448520784e-07
+34.139376,-0.01622204,-8.1003985000e-07
+34.260869,-0.01750667,-8.2526582924e-07
+34.382361,-0.01879128,-7.9625306677e-07
+34.503854,-0.02007591,-8.0980353254e-07
+34.625346,-0.02136055,-7.8059579787e-07
+34.746839,-0.02264518,-7.8641563082e-07
+34.868331,-0.02392981,-7.9257328844e-07
+34.989823,-0.02521442,-7.8187842840e-07
+35.111316,-0.02649906,-7.9648144512e-07
+35.232808,-0.02778369,-7.4715991906e-07
+35.354301,-0.02906832,-7.7877170959e-07
+35.475793,-0.03035296,-7.5805336000e-07
+35.597286,-0.03163757,-7.6782202469e-07
+35.718778,-0.03292220,-8.0171306206e-07
+35.840271,-0.03420683,-7.6499183443e-07
+35.961763,-0.03549147,-7.7039800872e-07
+36.083256,-0.03677610,-7.5736147156e-07
+36.204748,-0.03806071,-7.7672986283e-07
+36.326241,-0.03934534,-7.6857010555e-07
+36.447733,-0.04062998,-7.5967685682e-07
+36.569225,-0.04191461,-7.5471671626e-07
+36.690718,-0.04319925,-7.6314521763e-07
+36.812210,-0.04448386,-7.5016611015e-07
+36.933703,-0.04576849,-7.5841979641e-07
+37.055195,-0.04705312,-7.7997644404e-07
+37.176688,-0.04833776,-7.3658826992e-07
+37.298180,-0.04962239,-7.2067241280e-07
+37.419673,-0.05090700,-7.3929519774e-07
+37.541165,-0.05219163,-7.5711592617e-07
+37.662658,-0.05347627,-7.4415558386e-07
+37.784150,-0.05476090,-7.2948132135e-07
+37.905642,-0.05604553,-7.3444976188e-07
+38.027135,-0.05733014,-7.3280471605e-07
+38.148627,-0.05861478,-7.2329788739e-07
+38.270120,-0.05989941,-7.1330146298e-07
+38.391612,-0.06118405,-7.6105161198e-07
+38.513105,-0.06246868,-7.4247228594e-07
+38.634597,-0.06375329,-7.3413297070e-07
+38.756090,-0.06503792,-7.0140980761e-07
+38.877582,-0.06632256,-7.0131948733e-07
+38.999075,-0.06760719,-7.0462628207e-07
+39.120567,-0.06889182,-7.3529347295e-07
+39.242059,-0.07017643,-7.1648344870e-07
+39.363552,-0.07146107,-7.2967376748e-07
+39.485044,-0.07274570,-7.1981019432e-07
+39.606537,-0.07403033,-7.3841070850e-07
+39.728029,-0.07531497,-6.9157809400e-07
+39.849522,-0.07659958,-7.2099472011e-07
+39.971014,-0.07788421,-7.3527228480e-07
+40.092507,-0.07916884,-6.9885222789e-07
+40.213999,-0.08045348,-6.9268642495e-07
+40.335492,-0.08173811,-7.3690191639e-07
+40.456984,-0.08302272,-6.8587977071e-07
+40.578476,-0.08430735,-7.1556844028e-07
+40.699969,-0.08559199,-7.3250302980e-07
+40.821461,-0.08631944,-6.9889718182e-07
+40.942954,-0.08503480,-7.2350358256e-07
+41.064446,-0.08375017,-6.8583187827e-07
+41.185939,-0.08246554,-7.0474005882e-07
+41.307431,-0.08118093,-6.9849331817e-07
+41.428924,-0.07989629,-7.1609278253e-07
+41.550416,-0.07861166,-7.1268283089e-07
+41.671909,-0.07732703,-6.7800479040e-07
+41.793401,-0.07604239,-6.7618884745e-07
+41.914893,-0.07475778,-7.0585957669e-07
+42.036386,-0.07347315,-6.7347851715e-07
+42.157878,-0.07218852,-6.8670090170e-07
+42.279371,-0.07090388,-6.9424522316e-07
+42.400863,-0.06961925,-6.8458899485e-07
+42.522356,-0.06833464,-6.5104124674e-07
+42.643848,-0.06705001,-6.5980504670e-07
+42.765341,-0.06576537,-6.9628191466e-07
+42.886833,-0.06448074,-6.9657870341e-07
+43.008326,-0.06319610,-6.8087359362e-07
+43.129818,-0.06191150,-6.7860615235e-07
+43.251311,-0.06062686,-6.7968597466e-07
+43.372803,-0.05934223,-6.5612573234e-07
+43.494295,-0.05805759,-6.6227380117e-07
+43.615788,-0.05677296,-6.7764258131e-07
+43.737280,-0.05548835,-6.8711847836e-07
+43.858773,-0.05420372,-6.5744589323e-07
+43.980265,-0.05291908,-6.5906237888e-07
+44.101758,-0.05163445,-6.7893330562e-07
+44.223250,-0.05034982,-6.8114517310e-07
+44.344743,-0.04906521,-6.5260241637e-07
+44.466235,-0.04778057,-6.8729025188e-07
+44.587728,-0.04649594,-6.5639349693e-07
+44.709220,-0.04521131,-6.5703811157e-07
+44.830712,-0.04392667,-6.4977305095e-07
+44.952205,-0.04264206,-6.8122080088e-07
+45.073697,-0.04135743,-6.6157361275e-07
+45.195190,-0.04007280,-6.4150910572e-07
+45.316682,-0.03878816,-6.4589376377e-07
+45.438175,-0.03750353,-6.3697045983e-07
+45.559667,-0.03621892,-6.6095028936e-07
+45.681160,-0.03493428,-6.5090339489e-07
+45.802652,-0.03364965,-6.3375558351e-07
+45.924145,-0.03236502,-6.7164705685e-07
+46.045637,-0.03108038,-6.6424527854e-07
+46.167129,-0.02979577,-6.5229335809e-07
+46.288622,-0.02851114,-6.6637646609e-07
+46.410114,-0.02722651,-6.4525409819e-07
+46.531607,-0.02594187,-6.6122748809e-07
+46.653099,-0.02465724,-6.4538720719e-07
+46.774592,-0.02337263,-6.6746438218e-07
+46.896084,-0.02208800,-6.6233123085e-07
+47.017577,-0.02080336,-6.5730262834e-07
+47.139069,-0.01951873,-6.4200705300e-07
+47.260562,-0.01823409,-6.4365477957e-07
+47.382054,-0.01694949,-6.6895925507e-07
+47.503546,-0.01566485,-6.3093941558e-07
+47.625039,-0.01438022,-6.4388604487e-07
+47.746531,-0.01309558,-6.3856895360e-07
+47.868024,-0.01181095,-6.3225782367e-07
+47.989516,-0.01052634,-6.2084292743e-07
+48.111009,-0.00924171,-6.5566021169e-07
+48.232501,-0.00795707,-6.0763848321e-07
+48.353994,-0.00667244,-6.2352459444e-07
+48.475486,-0.00538781,-6.3663526434e-07
+48.596979,-0.00410320,-6.4777667364e-07
+48.718471,-0.00281856,-6.2565335902e-07
+48.839963,-0.00153393,-6.1645208306e-07
+48.961456,-0.00024930,-6.3309674033e-07
+49.082948,0.00103534,-6.5188995842e-07
+49.204441,0.00231995,-6.5358165942e-07
+49.325933,0.00360458,-5.9349376977e-07
+49.447426,0.00488921,-6.2914692909e-07
+49.568918,0.00617385,-6.1983749562e-07
+49.690411,0.00745848,-6.2155517918e-07
+49.811903,0.00874309,-5.9198471988e-07
+49.933396,0.01002773,-6.1766635475e-07
+50.054888,0.01131236,-6.6419898424e-07
+50.176381,0.01259699,-6.3346389848e-07
+50.297873,0.01388163,-6.2045788050e-07
+50.419365,0.01516624,-6.4600692189e-07
+50.540858,0.01645087,-6.1173021897e-07
+50.662350,0.01773550,-5.9677999499e-07
+50.783843,0.01902014,-6.2914502164e-07
+50.905335,0.02030477,-6.0282552554e-07
+51.026828,0.02158938,-5.9916059438e-07
+51.148320,0.02287401,-5.9067636457e-07
+51.269813,0.02415865,-6.1256557850e-07
+51.391305,0.02544328,-6.1801572722e-07
+51.512798,0.02672791,-6.2845437047e-07
+51.634290,0.02801252,-5.8641899007e-07
+51.755782,0.02929716,-6.3418094463e-07
+51.877275,0.03058179,-6.0550739876e-07
+51.998767,0.03186643,-5.5080867101e-07
+52.120260,0.03315106,-5.7967940586e-07
+52.241752,0.03443567,-5.9646016219e-07
+52.363245,0.03572030,-5.7870928763e-07
+52.484737,0.03700494,-6.1022426224e-07
+52.606230,0.03828957,-5.8727966196e-07
+52.727722,0.03957420,-6.1408550599e-07
+52.849215,0.04085881,-5.9966215034e-07
+52.970707,0.04214345,-5.7260179076e-07
+53.092199,0.04342808,-5.5539897268e-07
+53.213692,0.04471271,-6.0117614928e-07
+53.335184,0.04599734,-5.8504047156e-07
+53.456677,0.04728197,-5.8322169321e-07
+53.578169,0.04856659,-6.1316637336e-07
+53.699662,0.04985122,-6.0261024157e-07
+53.821154,0.05113586,-6.0228386159e-07
+53.942647,0.05242048,-5.6960575555e-07
+54.064139,0.05370511,-5.6730485659e-07
+54.185632,0.05498973,-5.5448484066e-07
+54.307124,0.05627437,-5.6153848376e-07
+54.428616,0.05755900,-5.9949769731e-07
+54.550109,0.05884362,-6.0168884063e-07
+54.671601,0.06012826,-5.5538025906e-07
+54.793094,0.06141288,-5.6324028909e-07
+54.914586,0.06269751,-5.7043111386e-07
+55.036079,0.06398215,-5.7080476764e-07
+55.157571,0.06526677,-6.1054559006e-07
+55.279064,0.06655140,-5.8355776509e-07
+55.400556,0.06783602,-6.0178787331e-07
+55.522049,0.06912066,-5.9224562797e-07
+55.643541,0.07040529,-5.9896160105e-07
+55.765034,0.07168991,-5.7762023739e-07
+55.886526,0.07297455,-5.5423135616e-07
+56.008018,0.07425917,-5.7493439461e-07
+56.129511,0.07554380,-5.7607149195e-07
+56.251003,0.07682844,-5.5399813186e-07
+56.372496,0.07811306,-5.8053239641e-07
+56.493988,0.07939769,-5.9012768945e-07
+56.615481,0.08068231,-5.8960030560e-07
+56.736973,0.08196695,-5.6952373524e-07
+56.858466,0.08325158,-5.6406714244e-07
+56.979958,0.08453620,-5.6669937043e-07
+57.101451,0.08582083,-5.5162722438e-07
+57.222943,0.08710546,-5.4604561633e-07
+57.344435,0.08839009,-5.5433121369e-07
+57.465928,0.08967472,-5.7721616753e-07
+57.587420,0.09095935,-5.5628521470e-07
+57.708913,0.09224398,-5.6241271401e-07
+57.830405,0.09352860,-5.7338858768e-07
+57.951898,0.09481323,-5.7676600958e-07
+58.073390,0.09609787,-5.2934048777e-07
+58.194883,0.09738249,-5.3746988053e-07
+58.316375,0.09866712,-5.3233915217e-07
+58.437868,0.09995174,-5.8021637851e-07
+58.559360,0.10123638,-5.1965044091e-07
+58.680852,0.10252101,-5.3853088611e-07
+58.802345,0.10380563,-5.4272201543e-07
+58.923837,0.10509027,-5.4218519743e-07
+59.045330,0.10637489,-5.6732037394e-07
+59.166822,0.10765952,-5.4716889755e-07
+59.288315,0.10894416,-5.4433076818e-07
+59.409807,0.11022878,-5.6559356557e-07
+59.531300,0.11151341,-5.3973824975e-07
+59.652792,0.11279803,-5.2286650294e-07
+59.774285,0.11408267,-5.4821438579e-07
+59.895777,0.11536730,-5.1286781021e-07
+60.017269,0.11665192,-5.3682660626e-07
+60.138762,0.11793656,-5.2075794701e-07
+60.260254,0.11922118,-5.5226931293e-07
+60.381747,0.12050581,-5.1846591511e-07
+60.503239,0.12179044,-5.2287444205e-07
+60.624732,0.12307507,-5.2048946068e-07
+60.746224,0.12435970,-5.0039629037e-07
+60.867717,0.12564432,-4.8391546749e-07
+60.989209,0.12692896,-5.4281228416e-07
+61.110702,0.12821359,-5.0325576255e-07
+61.232194,0.12949821,-5.3659905275e-07
+61.353686,0.13078284,-5.2370438855e-07
+61.475179,0.13206747,-5.1366909343e-07
+61.596671,0.13335210,-5.4970255683e-07
+61.718164,0.13463673,-4.7195303030e-07
+61.839656,0.13592135,-4.9664418363e-07
+61.961149,0.13720599,-4.9299580087e-07
+62.082641,0.13849061,-4.8230604455e-07
+62.204134,0.13977524,-4.7168707005e-07
+62.325626,0.14105988,-4.6587213461e-07
+62.447119,0.14234450,-4.7634289517e-07
+62.568611,0.14362913,-4.6881744199e-07
+62.690104,0.14491375,-4.8117131864e-07
+62.811596,0.14619839,-4.8848669467e-07
+62.933088,0.14748302,-4.9570819327e-07
+63.054581,0.14876764,-4.5994166962e-07
+63.176073,0.15005227,-4.5635798547e-07
+63.297566,0.15133690,-4.4738472699e-07
+63.419058,0.15262153,-4.5034642812e-07
+63.540551,0.15390616,-4.1765491838e-07
+63.662043,0.15519079,-4.4501082944e-07
+63.783536,0.15647542,-4.5529765006e-07
+63.905028,0.15776005,-4.4334145075e-07
+64.026521,0.15904468,-4.3865598284e-07
+64.148013,0.16032930,-4.0255310376e-07
+64.269505,0.16161393,-3.7698473013e-07
+64.390998,0.16289856,-4.0487686633e-07
+64.512490,0.16418319,-3.8872726938e-07
+64.633983,0.16546782,-3.7773348117e-07
+64.755475,0.16675245,-3.8413542114e-07
+64.876968,0.16803708,-3.7773592992e-07
+64.998460,0.16932170,-3.7017302372e-07
+65.119953,0.17060634,-3.7862366697e-07
+65.241445,0.17189097,-3.5415640690e-07
+65.362938,0.17317559,-3.2543285494e-07
+65.484430,0.17446022,-3.0897602983e-07
+65.605922,0.17574485,-3.1681095371e-07
+65.727415,0.17702948,-3.2176245919e-07
+65.848903,0.17831411,-2.8977237514e-07
+65.970396,0.17959874,-3.3102954214e-07
+66.091888,0.18088336,-2.8775875346e-07
+66.213381,0.18216799,-2.5124917533e-07
+66.334873,0.18345263,-2.3084844176e-07
+66.456366,0.18473725,-2.4311406023e-07
+66.577858,0.18602188,-2.4990896046e-07
+66.699351,0.18730651,-2.1141301913e-07
+66.820843,0.18859114,-2.2153490985e-07
+66.942336,0.18987577,-2.1032499994e-07
+67.063828,0.19116040,-1.4881758162e-07
+67.185320,0.19244503,-1.4020747306e-07
+67.306813,0.19372965,-1.3548376596e-07
+67.428305,0.19501428,-1.1059073236e-07
+67.549798,0.19629891,-1.2048483759e-07
+67.671290,0.19758354,-8.8407519968e-08
+67.792783,0.19886817,-4.2762360100e-08
+67.914275,0.20015280,-5.6251868053e-08
+68.035768,0.20143743,-1.1805957103e-08
+68.157260,0.20272206,-2.2855615532e-08
+68.278753,0.20400669,4.1496223199e-08
+68.400245,0.20529131,6.4141244445e-08
+68.521737,0.20657594,8.9952102530e-08
+68.643230,0.20786057,1.3499935126e-07
+68.764722,0.20914520,1.3583714666e-07
+68.886215,0.21042983,1.8171998046e-07
+69.007707,0.21171446,1.8838342137e-07
+69.129200,0.21299909,2.3274148173e-07
+69.250692,0.21428372,2.6712389342e-07
+69.372185,0.21556834,2.6947526244e-07
+69.493677,0.21685297,2.9687584390e-07
+69.615170,0.21813760,3.3094381004e-07
+69.736662,0.21942223,4.0108052740e-07
+69.858155,0.22070686,3.9969912194e-07
+69.979647,0.22199149,4.3531000807e-07
+70.101139,0.22327612,4.7295686397e-07
+70.222632,0.22456075,4.6342895027e-07
+70.344124,0.22584538,5.2854162753e-07
+70.465617,0.22713000,5.3990497109e-07
+70.587109,0.22841463,5.9652718067e-07
+70.708602,0.22969926,6.1454159250e-07
+70.830094,0.23098389,6.6039480930e-07
+70.951587,0.23226852,6.6017235951e-07
+71.073079,0.23355315,7.0195394609e-07
+71.194572,0.23483778,7.3828713674e-07
+71.316064,0.23612241,7.9807715505e-07
+71.437556,0.23740704,8.1586638480e-07
+71.559049,0.23869166,8.4825687848e-07
+71.680541,0.23997629,8.9116932452e-07
+71.802034,0.24126092,9.1112577715e-07
+71.923526,0.24254555,9.7264317091e-07
+72.045019,0.24383018,9.7482065276e-07
+72.166511,0.24511481,1.0224573859e-06
+72.288004,0.24639944,1.0501644738e-06
+72.409496,0.24768407,1.0741982274e-06
+72.530989,0.24896870,1.0623142018e-06
+72.652481,0.25025332,1.1493726463e-06
+72.773973,0.25153795,1.1594023222e-06
+72.895466,0.25282258,1.1713545004e-06
+73.016958,0.25410721,1.2288992451e-06
+73.138451,0.25539184,1.2166787867e-06
+73.259943,0.25667647,1.2622087683e-06
+73.381436,0.25796110,1.2622178415e-06
+73.502928,0.25924573,1.3169633791e-06
+73.624421,0.26053035,1.3089452886e-06
+73.745913,0.26181498,1.3857531024e-06
+73.867406,0.26309961,1.3636726796e-06
+73.988898,0.26438424,1.3811197543e-06
+74.110390,0.26566887,1.4221399079e-06
+74.231883,0.26695350,1.3883269212e-06
+74.353375,0.26823813,1.4529438680e-06
+74.474868,0.26952276,1.4317868567e-06
+74.596360,0.27080739,1.4539932742e-06
+74.717853,0.27209201,1.4447850386e-06
+74.839345,0.27337664,1.4684260640e-06
+74.960838,0.27466127,1.4971999829e-06
+75.082330,0.27594590,1.5252120564e-06
+75.203823,0.27723053,1.5057864932e-06
+75.325315,0.27851516,1.5038494531e-06
+75.446807,0.27979979,1.5281517961e-06
+75.568300,0.28108442,1.5402964720e-06
+75.689792,0.28236904,1.5122021205e-06
+75.811285,0.28365368,1.5083113370e-06
+75.932777,0.28493830,1.5531299947e-06
+76.054270,0.28622293,1.5536507799e-06
+76.175762,0.28750756,1.5040966997e-06
+76.297255,0.28879219,1.4945553307e-06
+76.418747,0.29007682,1.5186120769e-06
+76.540240,0.29136145,1.5323375640e-06
+76.661732,0.29264608,1.5238071430e-06
+76.783225,0.29393071,1.5115852412e-06
+76.904717,0.29521533,1.4916213649e-06
+77.026209,0.29649996,1.4796504216e-06
+77.147702,0.29778459,1.4811747310e-06
+77.269194,0.29906922,1.4347150486e-06
+77.390687,0.30035385,1.4676197802e-06
+77.512179,0.30163848,1.4450996131e-06
+77.633672,0.30292311,1.4097532437e-06
+77.755164,0.30420773,1.4014001639e-06
+77.876657,0.30549237,1.4065241904e-06
+77.998149,0.30677699,1.3835598454e-06
+78.119642,0.30806162,1.3909377549e-06
+78.241134,0.30934625,1.3769508957e-06
+78.362626,0.31063088,1.3568229789e-06
+78.484119,0.31191551,1.3502034093e-06
+78.605611,0.31320014,1.2937340534e-06
+78.727104,0.31448477,1.3161950381e-06
+78.848596,0.31576939,1.3231250578e-06
+78.970089,0.31705402,1.2686611010e-06
+79.091581,0.31833866,1.2601265558e-06
+79.213074,0.31962328,1.2556126036e-06
+79.334566,0.32090791,1.2514573549e-06
+79.456059,0.32219254,1.2401037033e-06
+79.577551,0.32347717,1.2044662675e-06
+79.699043,0.32476180,1.2197050318e-06
+79.820536,0.32604643,1.1908154287e-06
+79.942028,0.32733105,1.1756767797e-06
+80.063521,0.32861568,1.1730967746e-06
+80.185013,0.32990031,1.1234016463e-06
+80.306506,0.33118494,1.1507897262e-06
+80.427998,0.33246957,1.1246724197e-06
+80.549491,0.33375420,1.1120886181e-06
+80.670983,0.33503883,1.1459800679e-06
+80.792476,0.33632345,1.0850084108e-06
+80.913968,0.33760809,1.1090721680e-06
+81.035460,0.33889272,1.0620512832e-06
+81.156953,0.34017734,1.0741147121e-06
+81.278445,0.34146197,1.0837969229e-06
+81.399938,0.34274660,1.0349292150e-06
+81.521430,0.34403123,1.0121824224e-06
diff --git a/demo_data/ec_MHC_244mVs.csv b/demo_data/ec_MHC_244mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..cc1f5a74644a769ac4dd2b142ce34bb1c9ad17d1
--- /dev/null
+++ b/demo_data/ec_MHC_244mVs.csv
@@ -0,0 +1,673 @@
+Time (s),E (V),I (A)
+0.000000,0.34475868,-9.7947251135e-06
+0.005272,0.34347405,-6.1258919781e-06
+0.010544,0.34218941,-5.9378327245e-06
+0.015815,0.34090479,-4.9973533188e-06
+0.021087,0.33962016,-4.2904929008e-06
+0.026359,0.33833553,-5.2069921444e-06
+0.031631,0.33705090,-5.1675922749e-06
+0.036903,0.33576627,-4.7641406991e-06
+0.042174,0.33448164,-4.7369095936e-06
+0.047446,0.33319702,-4.3709819624e-06
+0.052718,0.33191239,-5.0626463980e-06
+0.057990,0.33062776,-5.4469660137e-06
+0.063262,0.32934313,-4.1734421106e-06
+0.068533,0.32805850,-4.7156309615e-06
+0.073805,0.32677387,-5.2134262207e-06
+0.079077,0.32548924,-5.6357919711e-06
+0.084349,0.32420462,-4.9547955597e-06
+0.089621,0.32291998,-5.4246593351e-06
+0.094892,0.32163535,-5.7481732426e-06
+0.100164,0.32035073,-6.5850308081e-06
+0.105436,0.31906610,-7.4077630049e-06
+0.110708,0.31778147,-7.4218284827e-06
+0.115980,0.31649684,-7.6827325272e-06
+0.121251,0.31521221,-6.9251082919e-06
+0.126523,0.31392758,-7.6105113947e-06
+0.131795,0.31264296,-7.3896719605e-06
+0.137067,0.31135833,-7.2084189983e-06
+0.142339,0.31007369,-9.0208847688e-06
+0.147610,0.30878907,-8.8901748687e-06
+0.152882,0.30750444,-9.4866556619e-06
+0.158154,0.30621981,-9.2826055089e-06
+0.163426,0.30493518,-1.0113485853e-05
+0.168698,0.30365055,-1.0086564597e-05
+0.173969,0.30236592,-1.1194442343e-05
+0.179241,0.30108129,-1.1884120476e-05
+0.184513,0.29979667,-1.1624161818e-05
+0.189785,0.29851204,-1.1834737616e-05
+0.195057,0.29722741,-1.2733117602e-05
+0.200328,0.29594278,-1.2578005828e-05
+0.205600,0.29465815,-1.3164788238e-05
+0.210872,0.29337352,-1.4470678529e-05
+0.216144,0.29208889,-1.4319230501e-05
+0.221416,0.29080426,-1.5881345418e-05
+0.226688,0.28951963,-1.6669400226e-05
+0.231959,0.28823501,-1.6776827868e-05
+0.237231,0.28695038,-1.7012099550e-05
+0.242503,0.28566575,-1.7518238963e-05
+0.247775,0.28438112,-1.8252684883e-05
+0.253047,0.28309649,-1.9023401986e-05
+0.258318,0.28181186,-1.9139356919e-05
+0.263590,0.28052723,-2.0083013518e-05
+0.268862,0.27924260,-1.9959119314e-05
+0.274134,0.27795798,-2.0561250651e-05
+0.279406,0.27667334,-2.3361340445e-05
+0.284677,0.27538872,-2.2544215235e-05
+0.289949,0.27410409,-2.2984167658e-05
+0.295221,0.27281946,-2.3425026861e-05
+0.300493,0.27153483,-2.5171533822e-05
+0.305765,0.27025020,-2.4388965229e-05
+0.311036,0.26896557,-2.5998730621e-05
+0.316308,0.26768094,-2.6108454910e-05
+0.321580,0.26639631,-2.6860212796e-05
+0.326852,0.26511169,-2.7579397893e-05
+0.332124,0.26382706,-2.8431289587e-05
+0.337395,0.26254243,-2.9603448699e-05
+0.342667,0.26125780,-2.9679329123e-05
+0.347939,0.25997317,-3.0281707943e-05
+0.353211,0.25868854,-3.1914588295e-05
+0.358483,0.25740391,-3.1046356750e-05
+0.363754,0.25611928,-3.2337466336e-05
+0.369026,0.25483466,-3.3273353933e-05
+0.374298,0.25355003,-3.3599814379e-05
+0.379570,0.25226540,-3.4157131402e-05
+0.384842,0.25098077,-3.4527089550e-05
+0.390113,0.24969614,-3.5037970747e-05
+0.395385,0.24841151,-3.5511547270e-05
+0.400657,0.24712688,-3.6665513375e-05
+0.405929,0.24584225,-3.7241651024e-05
+0.411201,0.24455762,-3.7723721181e-05
+0.416472,0.24327300,-3.7492769570e-05
+0.421744,0.24198837,-3.8576295929e-05
+0.427016,0.24070374,-3.9134690000e-05
+0.432288,0.23941911,-3.9168529905e-05
+0.437560,0.23813448,-3.9065034282e-05
+0.442831,0.23684985,-4.0284961671e-05
+0.448103,0.23556522,-4.0366116463e-05
+0.453375,0.23428059,-4.0225478515e-05
+0.458647,0.23299596,-4.1478620171e-05
+0.463919,0.23171134,-4.2223090163e-05
+0.469190,0.23042671,-4.1792959865e-05
+0.474462,0.22914208,-4.1895315084e-05
+0.479734,0.22785745,-4.2656958452e-05
+0.485006,0.22657282,-4.2960749409e-05
+0.490278,0.22528819,-4.3121265233e-05
+0.495549,0.22400356,-4.3514954079e-05
+0.500821,0.22271894,-4.3827527730e-05
+0.506093,0.22143430,-4.3551557880e-05
+0.511365,0.22014968,-4.3933807048e-05
+0.516637,0.21886505,-4.3392903132e-05
+0.521908,0.21758042,-4.4060787867e-05
+0.527180,0.21629579,-4.3948351159e-05
+0.532452,0.21501116,-4.4828917282e-05
+0.537724,0.21372653,-4.3349330195e-05
+0.542996,0.21244190,-4.4393366105e-05
+0.548267,0.21115727,-4.3714691089e-05
+0.553539,0.20987265,-4.4667977767e-05
+0.558811,0.20858802,-4.4095130659e-05
+0.564083,0.20730339,-4.3871005633e-05
+0.569355,0.20601876,-4.3310184244e-05
+0.574626,0.20473413,-4.3738687090e-05
+0.579898,0.20344950,-4.3086811568e-05
+0.585170,0.20216487,-4.2799754457e-05
+0.590442,0.20088024,-4.2856343046e-05
+0.595714,0.19959561,-4.3143043781e-05
+0.600986,0.19831099,-4.3110665019e-05
+0.606257,0.19702636,-4.3104123535e-05
+0.611529,0.19574173,-4.2882200123e-05
+0.616801,0.19445710,-4.2382069609e-05
+0.622073,0.19317247,-4.2010222667e-05
+0.627345,0.19188784,-4.2268108403e-05
+0.632616,0.19060321,-4.1293767809e-05
+0.637888,0.18931859,-4.0887471163e-05
+0.643160,0.18803395,-4.0724963591e-05
+0.648432,0.18674933,-4.0868749530e-05
+0.653704,0.18546470,-4.0939470418e-05
+0.658975,0.18418007,-4.0681157030e-05
+0.664247,0.18289544,-3.9914480838e-05
+0.669519,0.18161081,-3.8629118809e-05
+0.674791,0.18032618,-3.9112729303e-05
+0.680063,0.17904155,-4.0215488101e-05
+0.685334,0.17775693,-3.9152259349e-05
+0.690606,0.17647230,-3.9010374084e-05
+0.695878,0.17518766,-3.8814834394e-05
+0.701150,0.17390304,-3.7919320267e-05
+0.706422,0.17261841,-3.7374812990e-05
+0.711693,0.17133378,-3.8194593204e-05
+0.716965,0.17004915,-3.7377394738e-05
+0.722237,0.16876452,-3.6917926755e-05
+0.727509,0.16747989,-3.7502007635e-05
+0.732781,0.16619526,-3.6300667247e-05
+0.738052,0.16491064,-3.6039605803e-05
+0.743324,0.16362601,-3.5551421813e-05
+0.748596,0.16234138,-3.5980035532e-05
+0.753868,0.16105675,-3.5929885474e-05
+0.759140,0.15977212,-3.5728437857e-05
+0.764411,0.15848749,-3.5292482787e-05
+0.769683,0.15720287,-3.4919780543e-05
+0.774955,0.15591823,-3.5007936148e-05
+0.780227,0.15463360,-3.3455683943e-05
+0.785499,0.15334898,-3.3762266514e-05
+0.790770,0.15206435,-3.3239383357e-05
+0.796042,0.15077972,-3.4357066399e-05
+0.801314,0.14949509,-3.2917389493e-05
+0.806586,0.14821046,-3.3211031646e-05
+0.811858,0.14692583,-3.2580473364e-05
+0.817129,0.14564120,-3.3224368037e-05
+0.822401,0.14435657,-3.3229171197e-05
+0.827673,0.14307195,-3.2269358875e-05
+0.832945,0.14178732,-3.2896145509e-05
+0.838217,0.14050268,-3.0793707766e-05
+0.843488,0.13921806,-3.1980579278e-05
+0.848760,0.13793343,-3.1397512091e-05
+0.854032,0.13664881,-3.0902764839e-05
+0.859304,0.13536417,-3.0740088979e-05
+0.864576,0.13407954,-3.0466249466e-05
+0.869847,0.13279492,-3.0301607597e-05
+0.875119,0.13151028,-3.0321903225e-05
+0.880391,0.13022566,-2.9591201235e-05
+0.885663,0.12894103,-2.9683469027e-05
+0.890935,0.12765639,-2.9709221171e-05
+0.896206,0.12637177,-2.8851490846e-05
+0.901478,0.12508714,-2.9454647755e-05
+0.906750,0.12380252,-2.9279661075e-05
+0.912022,0.12251788,-2.9027287292e-05
+0.917294,0.12123325,-2.8670661576e-05
+0.922565,0.11994863,-2.8672536511e-05
+0.927837,0.11866399,-2.8844917684e-05
+0.933109,0.11737937,-2.8038075909e-05
+0.938381,0.11609474,-2.7064147127e-05
+0.943653,0.11481010,-2.8480849644e-05
+0.948924,0.11352548,-2.7094082732e-05
+0.954196,0.11224085,-2.8537555046e-05
+0.959468,0.11095623,-2.7299088171e-05
+0.964740,0.10967159,-2.7698910649e-05
+0.970012,0.10838696,-2.7059886451e-05
+0.975283,0.10710234,-2.6976054877e-05
+0.980555,0.10581771,-2.6695125457e-05
+0.985827,0.10453308,-2.7113295372e-05
+0.991099,0.10324845,-2.6759069256e-05
+0.996371,0.10196382,-2.6052139542e-05
+1.001643,0.10067919,-2.6368532359e-05
+1.006914,0.09939456,-2.6228143874e-05
+1.012186,0.09810994,-2.5459329425e-05
+1.017458,0.09682531,-2.6005478012e-05
+1.022730,0.09554067,-2.5374983085e-05
+1.028002,0.09425605,-2.4935307843e-05
+1.033273,0.09297142,-2.6718917531e-05
+1.038545,0.09168680,-2.5768458106e-05
+1.043817,0.09040216,-2.5500579976e-05
+1.049089,0.08911753,-2.3867863953e-05
+1.054361,0.08783291,-2.4517326016e-05
+1.059632,0.08654827,-2.5201037816e-05
+1.064904,0.08526365,-2.4933185425e-05
+1.070176,0.08397902,-2.3542029145e-05
+1.075448,0.08269438,-2.4127816671e-05
+1.080720,0.08140976,-2.4603491854e-05
+1.085991,0.08012513,-2.4169332524e-05
+1.091263,0.07884051,-2.4030563571e-05
+1.096535,0.07755587,-2.4276659192e-05
+1.101807,0.07627124,-2.3346673583e-05
+1.107079,0.07498662,-2.3550896974e-05
+1.112350,0.07370198,-2.3944265082e-05
+1.117622,0.07241736,-2.3086368448e-05
+1.122894,0.07113273,-2.4179447670e-05
+1.128166,0.06984810,-2.3748832304e-05
+1.133438,0.06856347,-2.3359910980e-05
+1.138709,0.06727884,-2.3013057893e-05
+1.143981,0.06599422,-2.3473193092e-05
+1.149253,0.06470958,-2.3034790905e-05
+1.154525,0.06342495,-2.3473300005e-05
+1.159797,0.06214033,-2.3114987441e-05
+1.165068,0.06085570,-2.1794732217e-05
+1.170340,0.05957107,-2.3227267739e-05
+1.175612,0.05828644,-2.2364593684e-05
+1.180884,0.05700181,-2.3023723442e-05
+1.186156,0.05571719,-2.2475511833e-05
+1.191427,0.05443255,-2.2002359002e-05
+1.196699,0.05314793,-2.1407270056e-05
+1.201971,0.05186330,-2.2676296193e-05
+1.207243,0.05057866,-2.1433932939e-05
+1.212515,0.04929404,-2.1460930420e-05
+1.217786,0.04800941,-2.2247533984e-05
+1.223058,0.04672479,-2.1309040881e-05
+1.228330,0.04544015,-2.2408697225e-05
+1.233602,0.04415553,-2.1738777186e-05
+1.238874,0.04287090,-2.1262640693e-05
+1.244145,0.04158626,-2.1812392640e-05
+1.249417,0.04030163,-2.2280676976e-05
+1.254689,0.03901702,-2.1474346006e-05
+1.259961,0.03773239,-2.1773414977e-05
+1.265233,0.03644775,-2.1766346848e-05
+1.270504,0.03516312,-2.1289523342e-05
+1.275776,0.03387848,-2.1617617179e-05
+1.281048,0.03259388,-2.1679652385e-05
+1.286320,0.03130924,-2.0367469083e-05
+1.291592,0.03002461,-2.1384230331e-05
+1.296863,0.02873997,-2.0625344920e-05
+1.302135,0.02745534,-2.1538759034e-05
+1.307407,0.02617073,-2.1897340860e-05
+1.312679,0.02488610,-2.0781756477e-05
+1.317951,0.02360146,-2.0218103876e-05
+1.323223,0.02231683,-1.9497606127e-05
+1.328494,0.02103220,-2.0361444345e-05
+1.333766,0.01974759,-2.0141991808e-05
+1.339038,0.01846295,-2.0076222571e-05
+1.344310,0.01717832,-1.9511730506e-05
+1.349582,0.01589369,-2.1208291335e-05
+1.354853,0.01460905,-2.0381706315e-05
+1.360125,0.01332444,-1.9762288750e-05
+1.365397,0.01203981,-1.9864493499e-05
+1.370669,0.01075518,-2.0510734317e-05
+1.375940,0.00947054,-2.0409111648e-05
+1.381212,0.00818591,-1.9795996004e-05
+1.386484,0.00690130,-1.9717773396e-05
+1.391756,0.00561666,-1.9904362103e-05
+1.397028,0.00433203,-1.9651317144e-05
+1.402299,0.00304740,-1.9360638854e-05
+1.407571,0.00176276,-1.9222893493e-05
+1.412843,0.00047815,-1.9760093076e-05
+1.418115,-0.00080648,-1.9633886386e-05
+1.423387,-0.00209111,-1.9418791539e-05
+1.428658,-0.00337575,-1.9193852788e-05
+1.433930,-0.00466038,-1.9161244361e-05
+1.439202,-0.00594499,-1.8768761254e-05
+1.444474,-0.00722962,-1.9494412600e-05
+1.449746,-0.00851426,-1.9638822197e-05
+1.455017,-0.00979889,-1.9395631042e-05
+1.460289,-0.01108352,-1.9332243586e-05
+1.465561,-0.01236813,-1.9494365083e-05
+1.470833,-0.01365277,-1.8939243734e-05
+1.476105,-0.01493740,-1.8732173292e-05
+1.481376,-0.01622204,-1.9300215260e-05
+1.486648,-0.01750667,-1.9252751883e-05
+1.491920,-0.01879128,-1.8674953125e-05
+1.497192,-0.02007591,-1.8292432714e-05
+1.502464,-0.02136055,-1.8477017795e-05
+1.507735,-0.02264518,-1.8839369289e-05
+1.513007,-0.02392981,-1.8680273031e-05
+1.518279,-0.02521442,-1.8798045483e-05
+1.523551,-0.02649906,-1.8704387824e-05
+1.528823,-0.02778369,-1.8283626261e-05
+1.534095,-0.02906832,-1.8081909383e-05
+1.539366,-0.03035296,-1.7860958086e-05
+1.544638,-0.03163757,-1.8055751366e-05
+1.549910,-0.03292220,-1.8906498696e-05
+1.555182,-0.03420683,-1.7644291224e-05
+1.560454,-0.03549147,-1.7918657381e-05
+1.565725,-0.03677610,-1.8168273208e-05
+1.570997,-0.03806071,-1.7802969730e-05
+1.576269,-0.03934534,-1.8328161414e-05
+1.581541,-0.04062998,-1.8227409887e-05
+1.586813,-0.04191461,-1.7101528211e-05
+1.592084,-0.04319925,-1.7377329773e-05
+1.597356,-0.04448386,-1.8922474251e-05
+1.602628,-0.04576849,-1.9122040993e-05
+1.607900,-0.04705312,-1.7594026333e-05
+1.613172,-0.04833776,-1.8103925516e-05
+1.618443,-0.04962239,-1.8257501902e-05
+1.623715,-0.05090700,-1.7492183899e-05
+1.628987,-0.05219163,-1.8041480477e-05
+1.634259,-0.05347627,-1.7904649815e-05
+1.639531,-0.05476090,-1.7233460680e-05
+1.644802,-0.05604553,-1.7274822103e-05
+1.650074,-0.05733014,-1.7844303436e-05
+1.655346,-0.05861478,-1.7358776429e-05
+1.660618,-0.05989941,-1.6810238141e-05
+1.665890,-0.06118405,-1.8162276187e-05
+1.671161,-0.06246868,-1.7184884616e-05
+1.676433,-0.06375329,-1.7167556811e-05
+1.681705,-0.06503792,-1.7731561828e-05
+1.686977,-0.06632256,-1.7801453151e-05
+1.692249,-0.06760719,-1.7071653982e-05
+1.697520,-0.06889182,-1.7386474783e-05
+1.702792,-0.07017643,-1.6979530720e-05
+1.708064,-0.07146107,-1.7232084671e-05
+1.713336,-0.07274570,-1.7279138216e-05
+1.718608,-0.07403033,-1.7052490839e-05
+1.723879,-0.07531497,-1.6395093465e-05
+1.729151,-0.07659958,-1.7072634016e-05
+1.734423,-0.07788421,-1.6492946464e-05
+1.739695,-0.07916884,-1.7289756248e-05
+1.744967,-0.08045348,-1.6543203435e-05
+1.750238,-0.08173811,-1.6726739185e-05
+1.755510,-0.08302272,-1.6938919666e-05
+1.760782,-0.08430735,-1.7243540188e-05
+1.766054,-0.08559199,-1.6359343977e-05
+1.771326,-0.08631944,-1.6806911963e-05
+1.776597,-0.08503480,-1.5653341832e-05
+1.781869,-0.08375017,-1.6985054552e-05
+1.787141,-0.08246554,-1.7011347200e-05
+1.792413,-0.08118093,-1.6704016239e-05
+1.797685,-0.07989629,-1.6113410705e-05
+1.802956,-0.07861166,-1.5874408951e-05
+1.808228,-0.07732703,-1.6152187411e-05
+1.813500,-0.07604239,-1.6455591303e-05
+1.818772,-0.07475778,-1.6335362825e-05
+1.824044,-0.07347315,-1.7140921646e-05
+1.829315,-0.07218852,-1.6971345946e-05
+1.834587,-0.07090388,-1.6054833338e-05
+1.839859,-0.06961925,-1.5658507307e-05
+1.845131,-0.06833464,-1.6473409126e-05
+1.850403,-0.06705001,-1.6214764111e-05
+1.855675,-0.06576537,-1.6395453801e-05
+1.860946,-0.06448074,-1.5879864477e-05
+1.866218,-0.06319610,-1.6568406166e-05
+1.871490,-0.06191150,-1.5607597970e-05
+1.876762,-0.06062686,-1.6043317435e-05
+1.882034,-0.05934223,-1.6658764375e-05
+1.887305,-0.05805759,-1.5910153489e-05
+1.892577,-0.05677296,-1.5169092830e-05
+1.897849,-0.05548835,-1.5788252022e-05
+1.903121,-0.05420372,-1.4504656035e-05
+1.908393,-0.05291908,-1.5699902389e-05
+1.913664,-0.05163445,-1.5600938684e-05
+1.918936,-0.05034982,-1.5412048380e-05
+1.924208,-0.04906521,-1.5846392828e-05
+1.929480,-0.04778057,-1.4954495920e-05
+1.934752,-0.04649594,-1.5189536947e-05
+1.940023,-0.04521131,-1.5778816961e-05
+1.945295,-0.04392667,-1.4559338011e-05
+1.950567,-0.04264206,-1.5883130270e-05
+1.955839,-0.04135743,-1.4665284711e-05
+1.961111,-0.04007280,-1.5982495888e-05
+1.966382,-0.03878816,-1.5395540240e-05
+1.971654,-0.03750353,-1.5458515884e-05
+1.976926,-0.03621892,-1.4832578614e-05
+1.982198,-0.03493428,-1.4381327083e-05
+1.987470,-0.03364965,-1.5308749754e-05
+1.992741,-0.03236502,-1.5165332070e-05
+1.998013,-0.03108038,-1.5600375411e-05
+2.003285,-0.02979577,-1.4955906576e-05
+2.008557,-0.02851114,-1.5332441845e-05
+2.013829,-0.02722651,-1.5026673000e-05
+2.019100,-0.02594187,-1.4947559452e-05
+2.024372,-0.02465724,-1.4599804535e-05
+2.029644,-0.02337263,-1.5128883689e-05
+2.034916,-0.02208800,-1.4739244663e-05
+2.040188,-0.02080336,-1.5121948211e-05
+2.045459,-0.01951873,-1.5050782843e-05
+2.050731,-0.01823409,-1.4977619789e-05
+2.056003,-0.01694949,-1.5222769033e-05
+2.061275,-0.01566485,-1.3856285869e-05
+2.066547,-0.01438022,-1.5812167838e-05
+2.071818,-0.01309558,-1.4829762251e-05
+2.077090,-0.01181095,-1.4408660152e-05
+2.082362,-0.01052634,-1.4828820824e-05
+2.087634,-0.00924171,-1.4965118902e-05
+2.092906,-0.00795707,-1.5339766367e-05
+2.098177,-0.00667244,-1.4249423322e-05
+2.103449,-0.00538781,-1.4976555610e-05
+2.108721,-0.00410320,-1.4621364308e-05
+2.113993,-0.00281856,-1.4843717351e-05
+2.119265,-0.00153393,-1.4263001258e-05
+2.124536,-0.00024930,-1.4481787569e-05
+2.129808,0.00103534,-1.4911549611e-05
+2.135080,0.00231995,-1.4651887934e-05
+2.140352,0.00360458,-1.4346630885e-05
+2.145624,0.00488921,-1.4061044815e-05
+2.150895,0.00617385,-1.4360832479e-05
+2.156167,0.00745848,-1.4175925670e-05
+2.161439,0.00874309,-1.4917721850e-05
+2.166711,0.01002773,-1.4553906243e-05
+2.171983,0.01131236,-1.3692353783e-05
+2.177254,0.01259699,-1.3806886181e-05
+2.182526,0.01388163,-1.4722090096e-05
+2.187798,0.01516624,-1.4883130585e-05
+2.193070,0.01645087,-1.4722531607e-05
+2.198342,0.01773550,-1.4137899334e-05
+2.203614,0.01902014,-1.3577072995e-05
+2.208885,0.02030477,-1.4668511896e-05
+2.214157,0.02158938,-1.4437497920e-05
+2.219429,0.02287401,-1.4545457156e-05
+2.224701,0.02415865,-1.4896455097e-05
+2.229972,0.02544328,-1.3850745209e-05
+2.235244,0.02672791,-1.4433697563e-05
+2.240516,0.02801252,-1.4371507927e-05
+2.245788,0.02929716,-1.4631283447e-05
+2.251060,0.03058179,-1.3825957260e-05
+2.256332,0.03186643,-1.4371694035e-05
+2.261603,0.03315106,-1.4529503379e-05
+2.266875,0.03443567,-1.4748172878e-05
+2.272147,0.03572030,-1.4026255563e-05
+2.277419,0.03700494,-1.3901217985e-05
+2.282690,0.03828957,-1.4471081432e-05
+2.287962,0.03957420,-1.2507474018e-05
+2.293234,0.04085881,-1.3789097067e-05
+2.298506,0.04214345,-1.3892069015e-05
+2.303778,0.04342808,-1.3183668260e-05
+2.309050,0.04471271,-1.3886054176e-05
+2.314321,0.04599734,-1.3868917428e-05
+2.319593,0.04728197,-1.3367396057e-05
+2.324865,0.04856659,-1.3259374455e-05
+2.330137,0.04985122,-1.3997545496e-05
+2.335408,0.05113586,-1.3449883300e-05
+2.340680,0.05242048,-1.3742848338e-05
+2.345952,0.05370511,-1.4074704915e-05
+2.351224,0.05498973,-1.3275831118e-05
+2.356496,0.05627437,-1.4147038405e-05
+2.361768,0.05755900,-1.3822307374e-05
+2.367039,0.05884362,-1.4014144710e-05
+2.372311,0.06012826,-1.3028770311e-05
+2.377583,0.06141288,-1.5121926433e-05
+2.382855,0.06269751,-1.3830207047e-05
+2.388127,0.06398215,-1.2719350590e-05
+2.393398,0.06526677,-1.3357624418e-05
+2.398670,0.06655140,-1.4243498567e-05
+2.403942,0.06783602,-1.3509341708e-05
+2.409214,0.06912066,-1.3264032094e-05
+2.414486,0.07040529,-1.3891302806e-05
+2.419757,0.07168991,-1.3219914694e-05
+2.425029,0.07297455,-1.2601862249e-05
+2.430301,0.07425917,-1.3681379374e-05
+2.435573,0.07554380,-1.3060246254e-05
+2.440845,0.07682844,-1.2855053717e-05
+2.446116,0.07811306,-1.2712243853e-05
+2.451388,0.07939769,-1.3989114228e-05
+2.456660,0.08068231,-1.2692443193e-05
+2.461932,0.08196695,-1.2944254693e-05
+2.467204,0.08325158,-1.4046080972e-05
+2.472475,0.08453620,-1.3559253192e-05
+2.477747,0.08582083,-1.2999462324e-05
+2.483019,0.08710546,-1.3393711473e-05
+2.488291,0.08839009,-1.2259675710e-05
+2.493563,0.08967472,-1.2425334242e-05
+2.498835,0.09095935,-1.2433706114e-05
+2.504106,0.09224398,-1.3031205549e-05
+2.509378,0.09352860,-1.2642484192e-05
+2.514650,0.09481323,-1.2738072222e-05
+2.519922,0.09609787,-1.3087572393e-05
+2.525193,0.09738249,-1.2941456149e-05
+2.530465,0.09866712,-1.2420798364e-05
+2.535737,0.09995174,-1.2742980315e-05
+2.541009,0.10123638,-1.2948958860e-05
+2.546281,0.10252101,-1.2929907579e-05
+2.551553,0.10380563,-1.2212271729e-05
+2.556824,0.10509027,-1.2828905599e-05
+2.562096,0.10637489,-1.1593985659e-05
+2.567368,0.10765952,-1.2368985216e-05
+2.572640,0.10894416,-1.2481094256e-05
+2.577911,0.11022878,-1.2397939797e-05
+2.583183,0.11151341,-1.2154131913e-05
+2.588455,0.11279803,-1.2316902807e-05
+2.593727,0.11408267,-1.1757222811e-05
+2.598999,0.11536730,-1.2273970358e-05
+2.604271,0.11665192,-1.2341679866e-05
+2.609542,0.11793656,-1.1392934016e-05
+2.614814,0.11922118,-1.2323001791e-05
+2.620086,0.12050581,-1.1987830915e-05
+2.625358,0.12179044,-1.2380635750e-05
+2.630629,0.12307507,-1.2318011533e-05
+2.635901,0.12435970,-1.1542334861e-05
+2.641173,0.12564432,-1.2194899377e-05
+2.646445,0.12692896,-1.1860093787e-05
+2.651717,0.12821359,-1.1785171619e-05
+2.656989,0.12949821,-1.1939066764e-05
+2.662260,0.13078284,-1.1619067618e-05
+2.667532,0.13206747,-1.1077136149e-05
+2.672804,0.13335210,-1.1054741862e-05
+2.678076,0.13463673,-1.0450772217e-05
+2.683348,0.13592135,-1.1723470021e-05
+2.688619,0.13720599,-1.1221445763e-05
+2.693891,0.13849061,-1.0294454704e-05
+2.699163,0.13977524,-1.0622492115e-05
+2.704435,0.14105988,-1.0496184451e-05
+2.709707,0.14234450,-1.0641925510e-05
+2.714978,0.14362913,-1.0653393896e-05
+2.720250,0.14491375,-1.0734706087e-05
+2.725522,0.14619839,-1.0567370608e-05
+2.730794,0.14748302,-1.1437419672e-05
+2.736066,0.14876764,-1.0305236075e-05
+2.741337,0.15005227,-1.0446440266e-05
+2.746609,0.15133690,-1.0344270164e-05
+2.751881,0.15262153,-9.4579673735e-06
+2.757153,0.15390616,-1.0451429534e-05
+2.762424,0.15519079,-1.0232671931e-05
+2.767696,0.15647542,-9.7280649354e-06
+2.772968,0.15776005,-9.9067311999e-06
+2.778240,0.15904468,-9.6965781036e-06
+2.783512,0.16032930,-9.6605346054e-06
+2.788784,0.16161393,-9.2670892828e-06
+2.794055,0.16289856,-9.0377235467e-06
+2.799327,0.16418319,-8.7813345913e-06
+2.804599,0.16546782,-8.1904677140e-06
+2.809871,0.16675245,-7.8198057233e-06
+2.815142,0.16803708,-8.2431470537e-06
+2.820414,0.16932170,-8.2784545360e-06
+2.825686,0.17060634,-8.3388221983e-06
+2.830958,0.17189097,-7.6715541921e-06
+2.836230,0.17317559,-7.2006683098e-06
+2.841502,0.17446022,-7.6423649971e-06
+2.846773,0.17574485,-7.9416091868e-06
+2.852045,0.17702948,-6.6304752149e-06
+2.857317,0.17831411,-6.9937795209e-06
+2.862589,0.17959874,-6.1192816936e-06
+2.867860,0.18088336,-6.5370021785e-06
+2.873132,0.18216799,-6.6177020961e-06
+2.878404,0.18345263,-6.1457663887e-06
+2.883676,0.18473725,-6.2991972548e-06
+2.888948,0.18602188,-5.7838182923e-06
+2.894220,0.18730651,-5.1510564167e-06
+2.899491,0.18859114,-4.8150099444e-06
+2.904763,0.18987577,-4.6208650713e-06
+2.910035,0.19116040,-3.6690989327e-06
+2.915307,0.19244503,-3.3217288524e-06
+2.920579,0.19372965,-3.5730050460e-06
+2.925850,0.19501428,-4.1833513503e-06
+2.931122,0.19629891,-2.9425343727e-06
+2.936394,0.19758354,-1.6247412383e-06
+2.941666,0.19886817,-1.9658668147e-06
+2.946938,0.20015280,-1.3947626093e-06
+2.952209,0.20143743,-1.1768609280e-06
+2.957481,0.20272206,7.0253514871e-08
+2.962753,0.20400669,-1.1241485957e-07
+2.968025,0.20529131,7.3134711694e-07
+2.973297,0.20657594,7.2200758428e-07
+2.978568,0.20786057,1.3668708466e-06
+2.983840,0.20914520,2.1782352597e-06
+2.989112,0.21042983,1.6646942335e-06
+2.994384,0.21171446,2.2737111801e-06
+2.999656,0.21299909,3.1800019765e-06
+3.004927,0.21428372,3.6866420487e-06
+3.010199,0.21556834,4.4202455347e-06
+3.015471,0.21685297,4.5265941481e-06
+3.020743,0.21813760,5.8309807296e-06
+3.026015,0.21942223,6.8017516218e-06
+3.031287,0.22070686,6.9509584394e-06
+3.036558,0.22199149,6.5592004593e-06
+3.041830,0.22327612,7.8726385027e-06
+3.047102,0.22456075,9.4419344019e-06
+3.052374,0.22584538,8.9021857383e-06
+3.057645,0.22713000,9.6604415516e-06
+3.062917,0.22841463,1.0275812266e-05
+3.068189,0.22969926,1.1564903377e-05
+3.073461,0.23098389,1.2395838167e-05
+3.078733,0.23226852,1.2294126405e-05
+3.084005,0.23355315,1.4446101437e-05
+3.089276,0.23483778,1.3812173419e-05
+3.094548,0.23612241,1.5199251170e-05
+3.099820,0.23740704,1.5519870016e-05
+3.105092,0.23869166,1.6232670038e-05
+3.110363,0.23997629,1.5926265655e-05
+3.115635,0.24126092,1.6603310250e-05
+3.120907,0.24254555,1.8649103967e-05
+3.126179,0.24383018,1.7761519212e-05
+3.131451,0.24511481,1.9555952839e-05
+3.136723,0.24639944,2.0046732436e-05
+3.141994,0.24768407,1.9889554669e-05
+3.147266,0.24896870,2.1597501719e-05
+3.152538,0.25025332,2.1534136042e-05
+3.157810,0.25153795,2.2656624224e-05
+3.163081,0.25282258,2.2921001947e-05
+3.168353,0.25410721,2.3740039710e-05
+3.173625,0.25539184,2.4612834851e-05
+3.178897,0.25667647,2.5164641901e-05
+3.184169,0.25796110,2.4816240557e-05
+3.189441,0.25924573,2.6237209690e-05
+3.194712,0.26053035,2.6790921373e-05
+3.199984,0.26181498,2.6269277613e-05
+3.205256,0.26309961,2.7763822604e-05
+3.210528,0.26438424,2.7475761699e-05
+3.215800,0.26566887,2.8002182880e-05
+3.221071,0.26695350,2.8959460972e-05
+3.226343,0.26823813,2.8490685629e-05
+3.231615,0.26952276,2.9971397281e-05
+3.236887,0.27080739,2.9748897727e-05
+3.242159,0.27209201,3.0335000052e-05
+3.247430,0.27337664,3.1325339960e-05
+3.252702,0.27466127,3.0195759890e-05
+3.257974,0.27594590,3.1724192302e-05
+3.263246,0.27723053,3.1607726563e-05
+3.268518,0.27851516,3.2475954148e-05
+3.273789,0.27979979,3.2192474658e-05
+3.279061,0.28108442,3.1638497673e-05
+3.284333,0.28236904,3.2791857938e-05
+3.289605,0.28365368,3.3133254509e-05
+3.294877,0.28493830,3.2653312710e-05
+3.300148,0.28622293,3.2686067647e-05
+3.305420,0.28750756,3.3864574217e-05
+3.310692,0.28879219,3.3239066578e-05
+3.315964,0.29007682,3.3395064343e-05
+3.321236,0.29136145,3.2516208826e-05
+3.326508,0.29264608,3.2742216706e-05
+3.331779,0.29393071,3.3052467972e-05
+3.337051,0.29521533,3.3014547559e-05
+3.342323,0.29649996,3.2919306005e-05
+3.347595,0.29778459,3.3003868150e-05
+3.352866,0.29906922,3.1911250238e-05
+3.358138,0.30035385,3.2175083497e-05
+3.363410,0.30163848,3.1578430455e-05
+3.368682,0.30292311,3.3479814576e-05
+3.373954,0.30420773,3.2263155948e-05
+3.379226,0.30549237,3.2060470914e-05
+3.384497,0.30677699,3.2001072892e-05
+3.389769,0.30806162,3.1616172680e-05
+3.395041,0.30934625,3.1655290914e-05
+3.400313,0.31063088,3.1146694484e-05
+3.405584,0.31191551,3.1429528537e-05
+3.410856,0.31320014,3.0799102906e-05
+3.416128,0.31448477,3.0473000816e-05
+3.421400,0.31576939,3.0749612144e-05
+3.426672,0.31705402,3.0556703699e-05
+3.431944,0.31833866,3.0088651007e-05
+3.437215,0.31962328,2.9754415619e-05
+3.442487,0.32090791,2.9050160708e-05
+3.447759,0.32219254,2.9150286596e-05
+3.453031,0.32347717,2.8493366370e-05
+3.458302,0.32476180,2.9033866394e-05
+3.463574,0.32604643,2.8266004260e-05
+3.468846,0.32733105,2.7852645425e-05
+3.474118,0.32861568,2.8157260007e-05
+3.479390,0.32990031,2.7928951520e-05
+3.484662,0.33118494,2.7135751035e-05
+3.489933,0.33246957,2.7377894840e-05
+3.495205,0.33375420,2.7237292529e-05
+3.500477,0.33503883,2.5478411393e-05
+3.505749,0.33632345,2.5206137956e-05
+3.511021,0.33760809,2.6026850688e-05
+3.516292,0.33889272,2.5546588150e-05
+3.521564,0.34017734,2.5267599001e-05
+3.526836,0.34146197,2.4756450521e-05
+3.532108,0.34274660,2.5456327945e-05
+3.537380,0.34403123,2.5286524560e-05
diff --git a/demo_data/ec_MHC_4025mVs.csv b/demo_data/ec_MHC_4025mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..e36848a4d5f192d1307e2af524aab527a64f4eb8
--- /dev/null
+++ b/demo_data/ec_MHC_4025mVs.csv
@@ -0,0 +1,673 @@
+Time (s),E (V),I (A)
+0.000000,0.34475868,-3.0512996999e-05
+0.000319,0.34347405,-2.6995786040e-05
+0.000638,0.34218941,-2.7263609859e-05
+0.000958,0.34090479,-2.8060668590e-05
+0.001277,0.33962016,-2.8458897233e-05
+0.001596,0.33833553,-2.8260539243e-05
+0.001915,0.33705090,-2.7872679985e-05
+0.002234,0.33576627,-2.9352673864e-05
+0.002554,0.33448164,-2.9703635813e-05
+0.002873,0.33319702,-2.9547322612e-05
+0.003192,0.33191239,-3.0751301763e-05
+0.003511,0.33062776,-3.1546797543e-05
+0.003830,0.32934313,-3.4107327621e-05
+0.004150,0.32805850,-3.2758171042e-05
+0.004469,0.32677387,-3.3677101730e-05
+0.004788,0.32548924,-3.4992484889e-05
+0.005107,0.32420462,-3.6569697538e-05
+0.005426,0.32291998,-3.6022962402e-05
+0.005746,0.32163535,-3.8671812284e-05
+0.006065,0.32035073,-3.7921233744e-05
+0.006384,0.31906610,-4.0047506845e-05
+0.006703,0.31778147,-4.0817822419e-05
+0.007022,0.31649684,-4.1918449677e-05
+0.007342,0.31521221,-4.3712093822e-05
+0.007661,0.31392758,-4.5790754247e-05
+0.007980,0.31264296,-4.4750758222e-05
+0.008299,0.31135833,-4.7403176540e-05
+0.008618,0.31007369,-4.9456837795e-05
+0.008938,0.30878907,-5.0435164643e-05
+0.009257,0.30750444,-5.1301683168e-05
+0.009576,0.30621981,-5.4963997128e-05
+0.009895,0.30493518,-5.5749242203e-05
+0.010214,0.30365055,-5.7156948091e-05
+0.010534,0.30236592,-5.8199490701e-05
+0.010853,0.30108129,-6.0208033564e-05
+0.011172,0.29979667,-6.3088115706e-05
+0.011491,0.29851204,-6.4913553935e-05
+0.011810,0.29722741,-6.6281693227e-05
+0.012130,0.29594278,-6.8626952455e-05
+0.012449,0.29465815,-7.0622492853e-05
+0.012768,0.29337352,-7.3202621169e-05
+0.013087,0.29208889,-7.5707969221e-05
+0.013406,0.29080426,-7.7146447341e-05
+0.013726,0.28951963,-7.9075961610e-05
+0.014045,0.28823501,-8.2159098641e-05
+0.014364,0.28695038,-8.5793561097e-05
+0.014683,0.28566575,-8.7611798084e-05
+0.015002,0.28438112,-9.0540691769e-05
+0.015322,0.28309649,-9.2426081337e-05
+0.015641,0.28181186,-9.5855964171e-05
+0.015960,0.28052723,-9.8332813008e-05
+0.016279,0.27924260,-1.0112342677e-04
+0.016598,0.27795798,-1.0450912858e-04
+0.016918,0.27667334,-1.0741435874e-04
+0.017237,0.27538872,-1.0974594366e-04
+0.017556,0.27410409,-1.1304108684e-04
+0.017875,0.27281946,-1.1649717576e-04
+0.018194,0.27153483,-1.1988464771e-04
+0.018514,0.27025020,-1.2316438265e-04
+0.018833,0.26896557,-1.2631830104e-04
+0.019152,0.26768094,-1.3009591130e-04
+0.019471,0.26639631,-1.3265470141e-04
+0.019790,0.26511169,-1.3495063415e-04
+0.020110,0.26382706,-1.3864872500e-04
+0.020429,0.26254243,-1.4302902686e-04
+0.020748,0.26125780,-1.4646727761e-04
+0.021067,0.25997317,-1.5215447200e-04
+0.021386,0.25868854,-1.5432237552e-04
+0.021706,0.25740391,-1.5814432772e-04
+0.022025,0.25611928,-1.6326448269e-04
+0.022344,0.25483466,-1.6545401407e-04
+0.022663,0.25355003,-1.7054925838e-04
+0.022982,0.25226540,-1.7433500322e-04
+0.023302,0.25098077,-1.7791360979e-04
+0.023621,0.24969614,-1.8187152465e-04
+0.023940,0.24841151,-1.8702724329e-04
+0.024259,0.24712688,-1.9105152222e-04
+0.024578,0.24584225,-1.9515005036e-04
+0.024898,0.24455762,-1.9880448319e-04
+0.025217,0.24327300,-2.0384768545e-04
+0.025536,0.24198837,-2.0884003649e-04
+0.025855,0.24070374,-2.1282311949e-04
+0.026174,0.23941911,-2.1805204136e-04
+0.026494,0.23813448,-2.2427080805e-04
+0.026813,0.23684985,-2.2732765854e-04
+0.027132,0.23556522,-2.3281333081e-04
+0.027451,0.23428059,-2.3748483638e-04
+0.027770,0.23299596,-2.4173739868e-04
+0.028090,0.23171134,-2.4893923538e-04
+0.028409,0.23042671,-2.5202608165e-04
+0.028728,0.22914208,-2.5769887356e-04
+0.029047,0.22785745,-2.6317218705e-04
+0.029366,0.22657282,-2.6867581818e-04
+0.029686,0.22528819,-2.7354401821e-04
+0.030005,0.22400356,-2.7898661178e-04
+0.030324,0.22271894,-2.8518209311e-04
+0.030643,0.22143430,-2.8968944256e-04
+0.030962,0.22014968,-2.9467299119e-04
+0.031282,0.21886505,-3.0081189249e-04
+0.031601,0.21758042,-3.0658321669e-04
+0.031920,0.21629579,-3.1117530745e-04
+0.032239,0.21501116,-3.1765938557e-04
+0.032558,0.21372653,-3.2359587969e-04
+0.032878,0.21244190,-3.2873137049e-04
+0.033197,0.21115727,-3.3521100717e-04
+0.033516,0.20987265,-3.4168990361e-04
+0.033835,0.20858802,-3.4720156473e-04
+0.034154,0.20730339,-3.5302946896e-04
+0.034474,0.20601876,-3.5682174722e-04
+0.034793,0.20473413,-3.6482753210e-04
+0.035112,0.20344950,-3.6944002772e-04
+0.035431,0.20216487,-3.7606117885e-04
+0.035750,0.20088024,-3.8100848794e-04
+0.036070,0.19959561,-3.8837390144e-04
+0.036389,0.19831099,-3.9401771136e-04
+0.036708,0.19702636,-3.9950687564e-04
+0.037027,0.19574173,-4.0531328074e-04
+0.037346,0.19445710,-4.0969787921e-04
+0.037666,0.19317247,-4.1580256857e-04
+0.037985,0.19188784,-4.2107114153e-04
+0.038304,0.19060321,-4.2704574188e-04
+0.038623,0.18931859,-4.3133298278e-04
+0.038942,0.18803395,-4.3552003389e-04
+0.039262,0.18674933,-4.4224594498e-04
+0.039581,0.18546470,-4.4772587236e-04
+0.039900,0.18418007,-4.5220226050e-04
+0.040219,0.18289544,-4.5635870432e-04
+0.040538,0.18161081,-4.6200862927e-04
+0.040858,0.18032618,-4.6669273500e-04
+0.041177,0.17904155,-4.7145450149e-04
+0.041496,0.17775693,-4.7671808588e-04
+0.041815,0.17647230,-4.8040769616e-04
+0.042134,0.17518766,-4.8423128976e-04
+0.042454,0.17390304,-4.8846246558e-04
+0.042773,0.17261841,-4.9394133087e-04
+0.043092,0.17133378,-4.9762955723e-04
+0.043411,0.17004915,-5.0172243703e-04
+0.043730,0.16876452,-5.0546444339e-04
+0.044050,0.16747989,-5.0939311879e-04
+0.044369,0.16619526,-5.1286538837e-04
+0.044688,0.16491064,-5.1638258726e-04
+0.045007,0.16362601,-5.1979415722e-04
+0.045326,0.16234138,-5.2243542769e-04
+0.045646,0.16105675,-5.2704512328e-04
+0.045965,0.15977212,-5.2977750756e-04
+0.046284,0.15848749,-5.3233838161e-04
+0.046603,0.15720287,-5.3660763147e-04
+0.046922,0.15591823,-5.3807262947e-04
+0.047242,0.15463360,-5.4135060232e-04
+0.047561,0.15334898,-5.4313702511e-04
+0.047880,0.15206435,-5.4669261989e-04
+0.048199,0.15077972,-5.4819015623e-04
+0.048518,0.14949509,-5.5199048058e-04
+0.048838,0.14821046,-5.5343253115e-04
+0.049157,0.14692583,-5.5574201349e-04
+0.049476,0.14564120,-5.5810041599e-04
+0.049795,0.14435657,-5.6004621552e-04
+0.050114,0.14307195,-5.6240165706e-04
+0.050434,0.14178732,-5.6375713183e-04
+0.050753,0.14050268,-5.6567119762e-04
+0.051072,0.13921806,-5.6777328421e-04
+0.051391,0.13793343,-5.6993066345e-04
+0.051710,0.13664881,-5.6932598448e-04
+0.052030,0.13536417,-5.7004311546e-04
+0.052349,0.13407954,-5.7289091271e-04
+0.052668,0.13279492,-5.7432073325e-04
+0.052987,0.13151028,-5.7475979172e-04
+0.053306,0.13022566,-5.7548426073e-04
+0.053626,0.12894103,-5.7588559919e-04
+0.053945,0.12765639,-5.7677375764e-04
+0.054264,0.12637177,-5.7753659036e-04
+0.054583,0.12508714,-5.7793664144e-04
+0.054902,0.12380252,-5.7927422173e-04
+0.055222,0.12251788,-5.7844618358e-04
+0.055541,0.12123325,-5.7743224880e-04
+0.055860,0.11994863,-5.7816869038e-04
+0.056179,0.11866399,-5.7678334857e-04
+0.056498,0.11737937,-5.7657646777e-04
+0.056818,0.11609474,-5.7568747252e-04
+0.057137,0.11481010,-5.7539614007e-04
+0.057456,0.11352548,-5.7469027359e-04
+0.057775,0.11224085,-5.7296043084e-04
+0.058094,0.11095623,-5.7356504545e-04
+0.058414,0.10967159,-5.7183829239e-04
+0.058733,0.10838696,-5.7123618815e-04
+0.059052,0.10710234,-5.6992313232e-04
+0.059371,0.10581771,-5.6887237869e-04
+0.059690,0.10453308,-5.6653856501e-04
+0.060010,0.10324845,-5.6535759362e-04
+0.060329,0.10196382,-5.6437391211e-04
+0.060648,0.10067919,-5.6287991604e-04
+0.060967,0.09939456,-5.6094171200e-04
+0.061286,0.09810994,-5.5914968914e-04
+0.061606,0.09682531,-5.5717955826e-04
+0.061925,0.09554067,-5.5585395055e-04
+0.062244,0.09425605,-5.5337936266e-04
+0.062563,0.09297142,-5.5073329672e-04
+0.062882,0.09168680,-5.5107284128e-04
+0.063202,0.09040216,-5.4855634941e-04
+0.063521,0.08911753,-5.4510387319e-04
+0.063840,0.08783291,-5.4380349798e-04
+0.064159,0.08654827,-5.4342243564e-04
+0.064478,0.08526365,-5.3869858228e-04
+0.064798,0.08397902,-5.3723702800e-04
+0.065117,0.08269438,-5.3667557257e-04
+0.065436,0.08140976,-5.3342382994e-04
+0.065755,0.08012513,-5.3149302829e-04
+0.066074,0.07884051,-5.2942331913e-04
+0.066394,0.07755587,-5.2683402633e-04
+0.066713,0.07627124,-5.2561929360e-04
+0.067032,0.07498662,-5.2295382051e-04
+0.067351,0.07370198,-5.2090467713e-04
+0.067670,0.07241736,-5.1987983187e-04
+0.067990,0.07113273,-5.1652143041e-04
+0.068309,0.06984810,-5.1432623459e-04
+0.068628,0.06856347,-5.1160411711e-04
+0.068947,0.06727884,-5.1015176755e-04
+0.069266,0.06599422,-5.0866382213e-04
+0.069586,0.06470958,-5.0584524824e-04
+0.069905,0.06342495,-5.0452498313e-04
+0.070224,0.06214033,-5.0200672112e-04
+0.070543,0.06085570,-4.9993630390e-04
+0.070862,0.05957107,-4.9765730011e-04
+0.071182,0.05828644,-4.9602986786e-04
+0.071501,0.05700181,-4.9391918806e-04
+0.071820,0.05571719,-4.9118352098e-04
+0.072139,0.05443255,-4.8981723229e-04
+0.072458,0.05314793,-4.8761904333e-04
+0.072778,0.05186330,-4.8506898321e-04
+0.073097,0.05057866,-4.8263394985e-04
+0.073416,0.04929404,-4.8081646919e-04
+0.073735,0.04800941,-4.7897900207e-04
+0.074054,0.04672479,-4.7683478622e-04
+0.074374,0.04544015,-4.7391953064e-04
+0.074693,0.04415553,-4.7220858007e-04
+0.075012,0.04287090,-4.7055865098e-04
+0.075331,0.04158626,-4.6667271635e-04
+0.075650,0.04030163,-4.6598799497e-04
+0.075970,0.03901702,-4.6410054561e-04
+0.076289,0.03773239,-4.6228679833e-04
+0.076608,0.03644775,-4.5942039855e-04
+0.076927,0.03516312,-4.5831586492e-04
+0.077246,0.03387848,-4.5426047985e-04
+0.077566,0.03259388,-4.5288263699e-04
+0.077885,0.03130924,-4.5085457434e-04
+0.078204,0.03002461,-4.4871785743e-04
+0.078523,0.02873997,-4.4723094191e-04
+0.078842,0.02745534,-4.4366932866e-04
+0.079162,0.02617073,-4.4335511315e-04
+0.079481,0.02488610,-4.4006886893e-04
+0.079800,0.02360146,-4.3769392369e-04
+0.080119,0.02231683,-4.3640732337e-04
+0.080438,0.02103220,-4.3368292080e-04
+0.080758,0.01974759,-4.3250668051e-04
+0.081077,0.01846295,-4.3204078032e-04
+0.081396,0.01717832,-4.2925973334e-04
+0.081715,0.01589369,-4.2762695849e-04
+0.082034,0.01460905,-4.2475116089e-04
+0.082354,0.01332444,-4.2354354089e-04
+0.082673,0.01203981,-4.2126347502e-04
+0.082992,0.01075518,-4.2027132903e-04
+0.083311,0.00947054,-4.1869706527e-04
+0.083630,0.00818591,-4.1678650756e-04
+0.083950,0.00690130,-4.1491685613e-04
+0.084269,0.00561666,-4.1267982069e-04
+0.084588,0.00433203,-4.1184643995e-04
+0.084907,0.00304740,-4.0831675354e-04
+0.085226,0.00176276,-4.0872169664e-04
+0.085546,0.00047815,-4.0579392136e-04
+0.085865,-0.00080648,-4.0347655387e-04
+0.086184,-0.00209111,-4.0266618491e-04
+0.086503,-0.00337575,-4.0065505121e-04
+0.086822,-0.00466038,-3.9990229218e-04
+0.087142,-0.00594499,-3.9797226296e-04
+0.087461,-0.00722962,-3.9686293387e-04
+0.087780,-0.00851426,-3.9486708772e-04
+0.088099,-0.00979889,-3.9241155294e-04
+0.088418,-0.01108352,-3.9232697256e-04
+0.088738,-0.01236813,-3.9035487843e-04
+0.089057,-0.01365277,-3.8850138352e-04
+0.089376,-0.01493740,-3.8746224843e-04
+0.089695,-0.01622204,-3.8472893080e-04
+0.090014,-0.01750667,-3.8505402461e-04
+0.090334,-0.01879128,-3.8309885943e-04
+0.090653,-0.02007591,-3.8259787833e-04
+0.090972,-0.02136055,-3.8088876228e-04
+0.091291,-0.02264518,-3.7913680889e-04
+0.091610,-0.02392981,-3.7711193249e-04
+0.091930,-0.02521442,-3.7604830513e-04
+0.092249,-0.02649906,-3.7398879839e-04
+0.092568,-0.02778369,-3.7233407384e-04
+0.092887,-0.02906832,-3.7246825026e-04
+0.093206,-0.03035296,-3.7050310795e-04
+0.093526,-0.03163757,-3.6857909720e-04
+0.093845,-0.03292220,-3.6847665451e-04
+0.094164,-0.03420683,-3.6761656078e-04
+0.094483,-0.03549147,-3.6351334982e-04
+0.094802,-0.03677610,-3.6438995411e-04
+0.095122,-0.03806071,-3.6184530096e-04
+0.095441,-0.03934534,-3.6040630789e-04
+0.095760,-0.04062998,-3.5970848749e-04
+0.096079,-0.04191461,-3.5896560905e-04
+0.096398,-0.04319925,-3.5812511557e-04
+0.096718,-0.04448386,-3.5699734486e-04
+0.097037,-0.04576849,-3.5590735854e-04
+0.097356,-0.04705312,-3.5538156333e-04
+0.097675,-0.04833776,-3.5361094304e-04
+0.097994,-0.04962239,-3.5111398705e-04
+0.098314,-0.05090700,-3.4986700563e-04
+0.098633,-0.05219163,-3.4888705749e-04
+0.098952,-0.05347627,-3.4836090825e-04
+0.099271,-0.05476090,-3.4569076844e-04
+0.099590,-0.05604553,-3.4448160359e-04
+0.099910,-0.05733014,-3.4357661274e-04
+0.100229,-0.05861478,-3.4308074894e-04
+0.100548,-0.05989941,-3.4263811801e-04
+0.100867,-0.06118405,-3.4135203264e-04
+0.101186,-0.06246868,-3.4007408990e-04
+0.101506,-0.06375329,-3.3887480563e-04
+0.101825,-0.06503792,-3.3771176091e-04
+0.102144,-0.06632256,-3.3594252455e-04
+0.102463,-0.06760719,-3.3541737302e-04
+0.102782,-0.06889182,-3.3547247258e-04
+0.103102,-0.07017643,-3.3424888915e-04
+0.103421,-0.07146107,-3.3235992712e-04
+0.103740,-0.07274570,-3.3177900017e-04
+0.104059,-0.07403033,-3.3099666376e-04
+0.104378,-0.07531497,-3.3035310612e-04
+0.104698,-0.07659958,-3.2910184418e-04
+0.105017,-0.07788421,-3.2809614859e-04
+0.105336,-0.07916884,-3.2754846804e-04
+0.105655,-0.08045348,-3.2629775324e-04
+0.105974,-0.08173811,-3.2431191641e-04
+0.106294,-0.08302272,-3.2395016467e-04
+0.106613,-0.08430735,-3.2223654281e-04
+0.106932,-0.08559199,-3.2362716285e-04
+0.107251,-0.08631944,-3.2202840682e-04
+0.107570,-0.08503480,-3.1908029105e-04
+0.107890,-0.08375017,-3.1859414692e-04
+0.108209,-0.08246554,-3.1587853067e-04
+0.108528,-0.08118093,-3.1399957797e-04
+0.108847,-0.07989629,-3.1310804016e-04
+0.109166,-0.07861166,-3.1268031056e-04
+0.109486,-0.07732703,-3.1044092567e-04
+0.109805,-0.07604239,-3.0937459483e-04
+0.110124,-0.07475778,-3.0746487392e-04
+0.110443,-0.07347315,-3.0528808753e-04
+0.110762,-0.07218852,-3.0558868906e-04
+0.111082,-0.07090388,-3.0413559926e-04
+0.111401,-0.06961925,-3.0321715536e-04
+0.111720,-0.06833464,-3.0135236376e-04
+0.112039,-0.06705001,-3.0164797672e-04
+0.112358,-0.06576537,-2.9975499166e-04
+0.112678,-0.06448074,-2.9907815544e-04
+0.112997,-0.06319610,-2.9765393497e-04
+0.113316,-0.06191150,-2.9575924413e-04
+0.113635,-0.06062686,-2.9523779380e-04
+0.113954,-0.05934223,-2.9572503220e-04
+0.114274,-0.05805759,-2.9384907264e-04
+0.114593,-0.05677296,-2.9323670161e-04
+0.114912,-0.05548835,-2.9280575358e-04
+0.115231,-0.05420372,-2.9122614723e-04
+0.115550,-0.05291908,-2.9054741213e-04
+0.115870,-0.05163445,-2.8902380649e-04
+0.116189,-0.05034982,-2.8812966175e-04
+0.116508,-0.04906521,-2.8757963174e-04
+0.116827,-0.04778057,-2.8681689558e-04
+0.117146,-0.04649594,-2.8503623378e-04
+0.117466,-0.04521131,-2.8414968454e-04
+0.117785,-0.04392667,-2.8309796538e-04
+0.118104,-0.04264206,-2.8269694877e-04
+0.118423,-0.04135743,-2.8137378706e-04
+0.118742,-0.04007280,-2.8069154387e-04
+0.119062,-0.03878816,-2.8026844882e-04
+0.119381,-0.03750353,-2.7962585672e-04
+0.119700,-0.03621892,-2.7817518074e-04
+0.120019,-0.03493428,-2.7732390551e-04
+0.120338,-0.03364965,-2.7660635613e-04
+0.120658,-0.03236502,-2.7611374295e-04
+0.120977,-0.03108038,-2.7456249098e-04
+0.121296,-0.02979577,-2.7415220528e-04
+0.121615,-0.02851114,-2.7218677331e-04
+0.121934,-0.02722651,-2.7170317174e-04
+0.122254,-0.02594187,-2.7029777910e-04
+0.122573,-0.02465724,-2.7091674792e-04
+0.122892,-0.02337263,-2.6900129820e-04
+0.123211,-0.02208800,-2.6849835385e-04
+0.123530,-0.02080336,-2.6797376555e-04
+0.123850,-0.01951873,-2.6715401486e-04
+0.124169,-0.01823409,-2.6687737455e-04
+0.124488,-0.01694949,-2.6547338193e-04
+0.124807,-0.01566485,-2.6446401733e-04
+0.125126,-0.01438022,-2.6401161845e-04
+0.125446,-0.01309558,-2.6341165448e-04
+0.125765,-0.01181095,-2.6144237648e-04
+0.126084,-0.01052634,-2.6104024951e-04
+0.126403,-0.00924171,-2.6031215977e-04
+0.126722,-0.00795707,-2.5965271917e-04
+0.127042,-0.00667244,-2.5844789920e-04
+0.127361,-0.00538781,-2.5842379315e-04
+0.127680,-0.00410320,-2.5718748083e-04
+0.127999,-0.00281856,-2.5720128790e-04
+0.128318,-0.00153393,-2.5507128142e-04
+0.128638,-0.00024930,-2.5470840322e-04
+0.128957,0.00103534,-2.5445733335e-04
+0.129276,0.00231995,-2.5329288861e-04
+0.129595,0.00360458,-2.5202468163e-04
+0.129914,0.00488921,-2.5234742598e-04
+0.130234,0.00617385,-2.5050056104e-04
+0.130553,0.00745848,-2.5094039194e-04
+0.130872,0.00874309,-2.4868765056e-04
+0.131191,0.01002773,-2.4874236390e-04
+0.131510,0.01131236,-2.4718134399e-04
+0.131830,0.01259699,-2.4611861779e-04
+0.132149,0.01388163,-2.4621344888e-04
+0.132468,0.01516624,-2.4444944247e-04
+0.132787,0.01645087,-2.4481560346e-04
+0.133106,0.01773550,-2.4289999282e-04
+0.133426,0.01902014,-2.4297636621e-04
+0.133745,0.02030477,-2.4100631579e-04
+0.134064,0.02158938,-2.4148890355e-04
+0.134383,0.02287401,-2.4024291984e-04
+0.134702,0.02415865,-2.4034901545e-04
+0.135022,0.02544328,-2.3999244538e-04
+0.135341,0.02672791,-2.3806267364e-04
+0.135660,0.02801252,-2.3750495158e-04
+0.135979,0.02929716,-2.3620848677e-04
+0.136298,0.03058179,-2.3545538981e-04
+0.136618,0.03186643,-2.3624738152e-04
+0.136937,0.03315106,-2.3247690813e-04
+0.137256,0.03443567,-2.3339939116e-04
+0.137575,0.03572030,-2.3175366212e-04
+0.137894,0.03700494,-2.3159719806e-04
+0.138214,0.03828957,-2.3053765811e-04
+0.138533,0.03957420,-2.2892124898e-04
+0.138852,0.04085881,-2.2950880590e-04
+0.139171,0.04214345,-2.2746434534e-04
+0.139490,0.04342808,-2.2703859508e-04
+0.139810,0.04471271,-2.2741931948e-04
+0.140129,0.04599734,-2.2652702534e-04
+0.140448,0.04728197,-2.2329909910e-04
+0.140767,0.04856659,-2.2260615463e-04
+0.141086,0.04985122,-2.2247363570e-04
+0.141406,0.05113586,-2.2049333457e-04
+0.141725,0.05242048,-2.2025586258e-04
+0.142044,0.05370511,-2.1984710564e-04
+0.142363,0.05498973,-2.1892626401e-04
+0.142682,0.05627437,-2.1843595201e-04
+0.143002,0.05755900,-2.1677845960e-04
+0.143321,0.05884362,-2.1667289503e-04
+0.143640,0.06012826,-2.1495122709e-04
+0.143959,0.06141288,-2.1434841481e-04
+0.144278,0.06269751,-2.1299261820e-04
+0.144598,0.06398215,-2.1197725123e-04
+0.144917,0.06526677,-2.1114348427e-04
+0.145236,0.06655140,-2.0947760784e-04
+0.145555,0.06783602,-2.0933186116e-04
+0.145874,0.06912066,-2.0790778552e-04
+0.146194,0.07040529,-2.0908491088e-04
+0.146513,0.07168991,-2.0628083603e-04
+0.146832,0.07297455,-2.0467816961e-04
+0.147151,0.07425917,-2.0398530560e-04
+0.147470,0.07554380,-2.0306880885e-04
+0.147790,0.07682844,-2.0259796836e-04
+0.148109,0.07811306,-2.0028958029e-04
+0.148428,0.07939769,-2.0077059103e-04
+0.148747,0.08068231,-2.0002436541e-04
+0.149066,0.08196695,-1.9929481128e-04
+0.149386,0.08325158,-1.9779574618e-04
+0.149705,0.08453620,-1.9718937753e-04
+0.150024,0.08582083,-1.9548479946e-04
+0.150343,0.08710546,-1.9514527099e-04
+0.150662,0.08839009,-1.9329953250e-04
+0.150982,0.08967472,-1.9186652572e-04
+0.151301,0.09095935,-1.9111230230e-04
+0.151620,0.09224398,-1.9109643543e-04
+0.151939,0.09352860,-1.9004986576e-04
+0.152258,0.09481323,-1.8848854010e-04
+0.152578,0.09609787,-1.8723438157e-04
+0.152897,0.09738249,-1.8649996760e-04
+0.153216,0.09866712,-1.8523314455e-04
+0.153535,0.09995174,-1.8353807695e-04
+0.153854,0.10123638,-1.8320624053e-04
+0.154174,0.10252101,-1.8219146896e-04
+0.154493,0.10380563,-1.7996420147e-04
+0.154812,0.10509027,-1.7970503724e-04
+0.155131,0.10637489,-1.7809743053e-04
+0.155450,0.10765952,-1.7657190992e-04
+0.155770,0.10894416,-1.7594940083e-04
+0.156089,0.11022878,-1.7510869815e-04
+0.156408,0.11151341,-1.7260281101e-04
+0.156727,0.11279803,-1.7237188853e-04
+0.157046,0.11408267,-1.6903783450e-04
+0.157366,0.11536730,-1.6862655109e-04
+0.157685,0.11665192,-1.6832483920e-04
+0.158004,0.11793656,-1.6509670377e-04
+0.158323,0.11922118,-1.6585588357e-04
+0.158642,0.12050581,-1.6189941700e-04
+0.158962,0.12179044,-1.6292997498e-04
+0.159281,0.12307507,-1.6035833527e-04
+0.159600,0.12435970,-1.6013138755e-04
+0.159919,0.12564432,-1.5760477371e-04
+0.160238,0.12692896,-1.5540956180e-04
+0.160558,0.12821359,-1.5436506802e-04
+0.160877,0.12949821,-1.5302813142e-04
+0.161196,0.13078284,-1.5087051079e-04
+0.161515,0.13206747,-1.4998550640e-04
+0.161834,0.13335210,-1.4876596211e-04
+0.162154,0.13463673,-1.4858157815e-04
+0.162473,0.13592135,-1.4531599626e-04
+0.162792,0.13720599,-1.4496803550e-04
+0.163111,0.13849061,-1.4345757715e-04
+0.163430,0.13977524,-1.4203606017e-04
+0.163750,0.14105988,-1.3964985042e-04
+0.164069,0.14234450,-1.3811829525e-04
+0.164388,0.14362913,-1.3800854672e-04
+0.164707,0.14491375,-1.3375304761e-04
+0.165026,0.14619839,-1.3221666479e-04
+0.165346,0.14748302,-1.3089898246e-04
+0.165665,0.14876764,-1.3067769113e-04
+0.165984,0.15005227,-1.2661475885e-04
+0.166303,0.15133690,-1.2722849771e-04
+0.166622,0.15262153,-1.2575376395e-04
+0.166942,0.15390616,-1.2353735867e-04
+0.167261,0.15519079,-1.1975703688e-04
+0.167580,0.15647542,-1.2137354256e-04
+0.167899,0.15776005,-1.1941337273e-04
+0.168218,0.15904468,-1.1654626489e-04
+0.168538,0.16032930,-1.1441343423e-04
+0.168857,0.16161393,-1.1327216220e-04
+0.169176,0.16289856,-1.1190969540e-04
+0.169495,0.16418319,-1.0992212866e-04
+0.169814,0.16546782,-1.0860268425e-04
+0.170134,0.16675245,-1.0595300562e-04
+0.170453,0.16803708,-1.0410805565e-04
+0.170772,0.16932170,-1.0163769999e-04
+0.171091,0.17060634,-9.8557885994e-05
+0.171410,0.17189097,-9.7477281405e-05
+0.171730,0.17317559,-9.6176383201e-05
+0.172049,0.17446022,-9.3679918021e-05
+0.172368,0.17574485,-9.2009310503e-05
+0.172687,0.17702948,-8.8785632598e-05
+0.173006,0.17831411,-8.7807808631e-05
+0.173326,0.17959874,-8.7137658702e-05
+0.173645,0.18088336,-8.2570333772e-05
+0.173964,0.18216799,-8.1487613064e-05
+0.174283,0.18345263,-7.8238099198e-05
+0.174602,0.18473725,-7.5596643663e-05
+0.174922,0.18602188,-7.5604713881e-05
+0.175241,0.18730651,-7.2686328376e-05
+0.175560,0.18859114,-6.9509639577e-05
+0.175879,0.18987577,-6.8748311474e-05
+0.176198,0.19116040,-6.5396737110e-05
+0.176518,0.19244503,-6.3388339076e-05
+0.176837,0.19372965,-6.0584344686e-05
+0.177156,0.19501428,-5.8825101555e-05
+0.177475,0.19629891,-5.4320801567e-05
+0.177794,0.19758354,-5.1981122295e-05
+0.178114,0.19886817,-5.0751431896e-05
+0.178433,0.20015280,-4.8425443029e-05
+0.178752,0.20143743,-4.4669376149e-05
+0.179071,0.20272206,-4.2091854763e-05
+0.179390,0.20400669,-4.0477742793e-05
+0.179710,0.20529131,-3.7895538589e-05
+0.180029,0.20657594,-3.3643941824e-05
+0.180348,0.20786057,-3.2317680366e-05
+0.180667,0.20914520,-2.7864408615e-05
+0.180986,0.21042983,-2.5355045569e-05
+0.181306,0.21171446,-2.2390640512e-05
+0.181625,0.21299909,-1.9912731604e-05
+0.181944,0.21428372,-1.7085791806e-05
+0.182263,0.21556834,-1.3455902542e-05
+0.182582,0.21685297,-1.0830355112e-05
+0.182902,0.21813760,-8.1089094762e-06
+0.183221,0.21942223,-4.6568149365e-06
+0.183540,0.22070686,-1.6343902278e-06
+0.183859,0.22199149,1.5673098103e-06
+0.184178,0.22327612,4.4479764247e-06
+0.184498,0.22456075,6.6957181729e-06
+0.184817,0.22584538,1.0704339424e-05
+0.185136,0.22713000,1.4835552756e-05
+0.185455,0.22841463,1.7392586812e-05
+0.185774,0.22969926,2.0625217992e-05
+0.186094,0.23098389,2.5139432761e-05
+0.186413,0.23226852,2.8416238930e-05
+0.186732,0.23355315,3.1238093605e-05
+0.187051,0.23483778,3.4042102076e-05
+0.187370,0.23612241,3.7632858226e-05
+0.187690,0.23740704,4.0931227888e-05
+0.188009,0.23869166,4.4121755945e-05
+0.188328,0.23997629,4.6281512806e-05
+0.188647,0.24126092,5.1720457476e-05
+0.188966,0.24254555,5.4471697745e-05
+0.189286,0.24383018,5.8662104073e-05
+0.189605,0.24511481,6.2504968037e-05
+0.189924,0.24639944,6.6063149634e-05
+0.190243,0.24768407,6.7752834407e-05
+0.190562,0.24896870,7.3068138994e-05
+0.190882,0.25025332,7.6643124828e-05
+0.191201,0.25153795,7.9425499402e-05
+0.191520,0.25282258,8.1483099213e-05
+0.191839,0.25410721,8.6726455756e-05
+0.192158,0.25539184,9.1546910352e-05
+0.192478,0.25667647,9.3380949840e-05
+0.192797,0.25796110,9.8201227422e-05
+0.193116,0.25924573,1.0273791288e-04
+0.193435,0.26053035,1.0719787092e-04
+0.193754,0.26181498,1.0985981178e-04
+0.194074,0.26309961,1.1566668355e-04
+0.194393,0.26438424,1.1727510292e-04
+0.194712,0.26566887,1.2201357601e-04
+0.195031,0.26695350,1.2539597088e-04
+0.195350,0.26823813,1.3075851400e-04
+0.195670,0.26952276,1.3285481546e-04
+0.195989,0.27080739,1.3722973449e-04
+0.196308,0.27209201,1.4111914502e-04
+0.196627,0.27337664,1.4699427974e-04
+0.196946,0.27466127,1.5026945255e-04
+0.197266,0.27594590,1.5433386532e-04
+0.197585,0.27723053,1.5773214315e-04
+0.197904,0.27851516,1.6320711414e-04
+0.198223,0.27979979,1.6600520271e-04
+0.198542,0.28108442,1.7011755402e-04
+0.198862,0.28236904,1.7573553603e-04
+0.199181,0.28365368,1.8021288970e-04
+0.199500,0.28493830,1.8356039677e-04
+0.199819,0.28622293,1.8819492256e-04
+0.200138,0.28750756,1.9237574601e-04
+0.200458,0.28879219,1.9639925250e-04
+0.200777,0.29007682,2.0052880633e-04
+0.201096,0.29136145,2.0541576982e-04
+0.201415,0.29264608,2.1085947375e-04
+0.201734,0.29393071,2.1300246660e-04
+0.202054,0.29521533,2.1840862752e-04
+0.202373,0.29649996,2.2130761393e-04
+0.202692,0.29778459,2.2626156908e-04
+0.203011,0.29906922,2.3035684660e-04
+0.203330,0.30035385,2.3430344867e-04
+0.203650,0.30163848,2.3871109111e-04
+0.203969,0.30292311,2.4157753917e-04
+0.204288,0.30420773,2.4637639809e-04
+0.204607,0.30549237,2.4938347553e-04
+0.204926,0.30677699,2.5411157722e-04
+0.205246,0.30806162,2.5792319826e-04
+0.205565,0.30934625,2.6116544651e-04
+0.205884,0.31063088,2.6558290516e-04
+0.206203,0.31191551,2.6813486415e-04
+0.206522,0.31320014,2.7283715402e-04
+0.206842,0.31448477,2.7560339621e-04
+0.207161,0.31576939,2.7880776352e-04
+0.207480,0.31705402,2.8144159942e-04
+0.207799,0.31833866,2.8535756202e-04
+0.208118,0.31962328,2.8788692762e-04
+0.208438,0.32090791,2.8923599770e-04
+0.208757,0.32219254,2.9334879959e-04
+0.209076,0.32347717,2.9683053136e-04
+0.209395,0.32476180,2.9997294386e-04
+0.209714,0.32604643,3.0278874990e-04
+0.210034,0.32733105,3.0621734536e-04
+0.210353,0.32861568,3.0927372917e-04
+0.210672,0.32990031,3.1022023780e-04
+0.210991,0.33118494,3.1373235157e-04
+0.211310,0.33246957,3.1638173249e-04
+0.211630,0.33375420,3.1640213735e-04
+0.211949,0.33503883,3.1861043219e-04
+0.212268,0.33632345,3.2195946801e-04
+0.212587,0.33760809,3.2432179700e-04
+0.212906,0.33889272,3.2683236695e-04
+0.213226,0.34017734,3.2729401882e-04
+0.213545,0.34146197,3.2910728333e-04
+0.213864,0.34274660,3.3093760553e-04
+0.214183,0.34403123,3.3338145740e-04
diff --git a/demo_data/ec_MHC_metadata.json b/demo_data/ec_MHC_metadata.json
new file mode 100644
index 0000000000000000000000000000000000000000..01cae397aa945492b0f4374ea47fbe9ad651349a
--- /dev/null
+++ b/demo_data/ec_MHC_metadata.json
@@ -0,0 +1,36 @@
+{
+ "mechanism": "MHC",
+ "n_scans": 3,
+ "scan_rates_Vs": [
+ 0.010573734343051911,
+ 0.24367923736572267,
+ 4.024525451660156
+ ],
+ "physical_params": {
+ "E0_V": 0.25,
+ "T_K": 298.15,
+ "A_cm2": 0.0707,
+ "C_mM": 1.0,
+ "D_cm2s": 1e-05,
+ "n_electrons": 1
+ },
+ "true_params_dimless": {
+ "sigma": 8.719717822841444,
+ "C_A_bulk": 1.0,
+ "C_B_bulk": 0.0,
+ "dA": 1.0,
+ "dB": 1.2541572204674802,
+ "theta_i": 3.6881732361108934,
+ "theta_v": -13.090140187264856,
+ "cycles": 1.0,
+ "kinetics": "MHC",
+ "K0": 5.810825216518235,
+ "alpha": 0.5,
+ "reorg_e": 21.220031606830634
+ },
+ "csv_files": [
+ "ec_MHC_11mVs.csv",
+ "ec_MHC_244mVs.csv",
+ "ec_MHC_4025mVs.csv"
+ ]
+}
\ No newline at end of file
diff --git a/demo_data/ec_Nernst_10000mVs.csv b/demo_data/ec_Nernst_10000mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..1dfd8ade8ee0245945fc3be42cc8bac5124d6d21
--- /dev/null
+++ b/demo_data/ec_Nernst_10000mVs.csv
@@ -0,0 +1,673 @@
+Time (s),E (V),I (A)
+0.000000,0.34475868,-4.5526309482e-04
+0.000128,0.34347405,-2.5616804226e-04
+0.000257,0.34218941,-2.1756019101e-04
+0.000385,0.34090479,-1.8018920015e-04
+0.000514,0.33962016,-1.7693278976e-04
+0.000642,0.33833553,-1.8022506809e-04
+0.000771,0.33705090,-1.8180952277e-04
+0.000899,0.33576627,-1.7963121783e-04
+0.001028,0.33448164,-1.7656825078e-04
+0.001156,0.33319702,-1.8841429636e-04
+0.001285,0.33191239,-1.9184036920e-04
+0.001413,0.33062776,-1.9161051255e-04
+0.001542,0.32934313,-2.0216975152e-04
+0.001670,0.32805850,-2.0978308887e-04
+0.001798,0.32677387,-2.3129002621e-04
+0.001927,0.32548924,-2.2268590686e-04
+0.002055,0.32420462,-2.3186594250e-04
+0.002184,0.32291998,-2.4431850881e-04
+0.002312,0.32163535,-2.5900117802e-04
+0.002441,0.32035073,-2.5741893021e-04
+0.002569,0.31906610,-2.8081913146e-04
+0.002698,0.31778147,-2.7807259622e-04
+0.002826,0.31649684,-2.9784531628e-04
+0.002955,0.31521221,-3.0732340585e-04
+0.003083,0.31392758,-3.1958534447e-04
+0.003212,0.31264296,-3.3744737397e-04
+0.003340,0.31135833,-3.5775019880e-04
+0.003468,0.31007369,-3.5410759930e-04
+0.003597,0.30878907,-3.7933128181e-04
+0.003725,0.30750444,-4.0015320243e-04
+0.003854,0.30621981,-4.1288056178e-04
+0.003982,0.30493518,-4.2498550843e-04
+0.004111,0.30365055,-4.5901253714e-04
+0.004239,0.30236592,-4.7097837504e-04
+0.004368,0.30108129,-4.8801518834e-04
+0.004496,0.29979667,-5.0246403108e-04
+0.004625,0.29851204,-5.2464294685e-04
+0.004753,0.29722741,-5.5381585659e-04
+0.004882,0.29594278,-5.7504313056e-04
+0.005010,0.29465815,-5.9294965254e-04
+0.005139,0.29337352,-6.1864890229e-04
+0.005267,0.29208889,-6.4184378878e-04
+0.005395,0.29080426,-6.6976690133e-04
+0.005524,0.28951963,-6.9729262555e-04
+0.005652,0.28823501,-7.1671376881e-04
+0.005781,0.28695038,-7.4009174919e-04
+0.005909,0.28566575,-7.7254441901e-04
+0.006038,0.28438112,-8.0937972452e-04
+0.006166,0.28309649,-8.3221719996e-04
+0.006295,0.28181186,-8.6372274316e-04
+0.006423,0.28052723,-8.8716495100e-04
+0.006552,0.27924260,-9.2257690315e-04
+0.006680,0.27795798,-9.5055967721e-04
+0.006809,0.27667334,-9.8089684902e-04
+0.006937,0.27538872,-1.0157294351e-03
+0.007065,0.27410409,-1.0466742818e-03
+0.007194,0.27281946,-1.0729627905e-03
+0.007322,0.27153483,-1.1064644579e-03
+0.007451,0.27025020,-1.1409043738e-03
+0.007579,0.26896557,-1.1744486566e-03
+0.007708,0.26768094,-1.2067373079e-03
+0.007836,0.26639631,-1.2375711517e-03
+0.007965,0.26511169,-1.2727006249e-03
+0.008093,0.26382706,-1.2977774365e-03
+0.008222,0.26254243,-1.3201492883e-03
+0.008350,0.26125780,-1.3526604528e-03
+0.008479,0.25997317,-1.3896628714e-03
+0.008607,0.25868854,-1.4184961265e-03
+0.008735,0.25740391,-1.4638343145e-03
+0.008864,0.25611928,-1.4808879710e-03
+0.008992,0.25483466,-1.5097018463e-03
+0.009121,0.25355003,-1.5474517588e-03
+0.009249,0.25226540,-1.5612872446e-03
+0.009378,0.25098077,-1.5963974394e-03
+0.009506,0.24969614,-1.6200416644e-03
+0.009635,0.24841151,-1.6407101189e-03
+0.009763,0.24712688,-1.6628964924e-03
+0.009892,0.24584225,-1.6928969013e-03
+0.010020,0.24455762,-1.7126055968e-03
+0.010149,0.24327300,-1.7313293700e-03
+0.010277,0.24198837,-1.7450111361e-03
+0.010405,0.24070374,-1.7678294346e-03
+0.010534,0.23941911,-1.7885940781e-03
+0.010662,0.23813448,-1.7998520443e-03
+0.010791,0.23684985,-1.8190697499e-03
+0.010919,0.23556522,-1.8442505634e-03
+0.011048,0.23428059,-1.8431985725e-03
+0.011176,0.23299596,-1.8592588850e-03
+0.011305,0.23171134,-1.8672928970e-03
+0.011433,0.23042671,-1.8703748000e-03
+0.011562,0.22914208,-1.8946351215e-03
+0.011690,0.22785745,-1.8853238660e-03
+0.011819,0.22657282,-1.8944214358e-03
+0.011947,0.22528819,-1.9003642507e-03
+0.012076,0.22400356,-1.9049707692e-03
+0.012204,0.22271894,-1.9031204505e-03
+0.012332,0.22143430,-1.9042402200e-03
+0.012461,0.22014968,-1.9097658101e-03
+0.012589,0.21886505,-1.9008257142e-03
+0.012718,0.21758042,-1.8942601062e-03
+0.012846,0.21629579,-1.8953981395e-03
+0.012975,0.21501116,-1.8924980621e-03
+0.013103,0.21372653,-1.8793372182e-03
+0.013232,0.21244190,-1.8798005081e-03
+0.013360,0.21115727,-1.8750476768e-03
+0.013489,0.20987265,-1.8631920808e-03
+0.013617,0.20858802,-1.8609446273e-03
+0.013746,0.20730339,-1.8579591163e-03
+0.013874,0.20601876,-1.8468239229e-03
+0.014002,0.20473413,-1.8375735466e-03
+0.014131,0.20344950,-1.8120560717e-03
+0.014259,0.20216487,-1.8188069551e-03
+0.014388,0.20088024,-1.7989305376e-03
+0.014516,0.19959561,-1.7943930154e-03
+0.014645,0.19831099,-1.7767240741e-03
+0.014773,0.19702636,-1.7777289851e-03
+0.014902,0.19574173,-1.7653904149e-03
+0.015030,0.19445710,-1.7519328869e-03
+0.015159,0.19317247,-1.7410893044e-03
+0.015287,0.19188784,-1.7194463784e-03
+0.015416,0.19060321,-1.7114324566e-03
+0.015544,0.18931859,-1.6972926767e-03
+0.015672,0.18803395,-1.6890453850e-03
+0.015801,0.18674933,-1.6681904375e-03
+0.015929,0.18546470,-1.6470875091e-03
+0.016058,0.18418007,-1.6462474789e-03
+0.016186,0.18289544,-1.6363711640e-03
+0.016315,0.18161081,-1.6193790968e-03
+0.016443,0.18032618,-1.6006093599e-03
+0.016572,0.17904155,-1.5941546533e-03
+0.016700,0.17775693,-1.5809774735e-03
+0.016829,0.17647230,-1.5691931061e-03
+0.016957,0.17518766,-1.5621125623e-03
+0.017086,0.17390304,-1.5436598026e-03
+0.017214,0.17261841,-1.5270922657e-03
+0.017342,0.17133378,-1.5145436626e-03
+0.017471,0.17004915,-1.5125364787e-03
+0.017599,0.16876452,-1.4975216632e-03
+0.017728,0.16747989,-1.4865236508e-03
+0.017856,0.16619526,-1.4736880028e-03
+0.017985,0.16491064,-1.4631838213e-03
+0.018113,0.16362601,-1.4500256155e-03
+0.018242,0.16234138,-1.4380992983e-03
+0.018370,0.16105675,-1.4262369041e-03
+0.018499,0.15977212,-1.4092825820e-03
+0.018627,0.15848749,-1.4084699475e-03
+0.018756,0.15720287,-1.3939796055e-03
+0.018884,0.15591823,-1.3790370333e-03
+0.019013,0.15463360,-1.3782171947e-03
+0.019141,0.15334898,-1.3565328709e-03
+0.019269,0.15206435,-1.3497849300e-03
+0.019398,0.15077972,-1.3323549391e-03
+0.019526,0.14949509,-1.3295286269e-03
+0.019655,0.14821046,-1.3116377813e-03
+0.019783,0.14692583,-1.3125005396e-03
+0.019912,0.14564120,-1.2959847500e-03
+0.020040,0.14435657,-1.2871107079e-03
+0.020169,0.14307195,-1.2795425225e-03
+0.020297,0.14178732,-1.2697120698e-03
+0.020426,0.14050268,-1.2640069879e-03
+0.020554,0.13921806,-1.2515106393e-03
+0.020683,0.13793343,-1.2443197015e-03
+0.020811,0.13664881,-1.2395750888e-03
+0.020939,0.13536417,-1.2362597144e-03
+0.021068,0.13407954,-1.2125430433e-03
+0.021196,0.13279492,-1.2000997611e-03
+0.021325,0.13151028,-1.2052133011e-03
+0.021453,0.13022566,-1.2003806167e-03
+0.021582,0.12894103,-1.1889203290e-03
+0.021710,0.12765639,-1.1807363515e-03
+0.021839,0.12637177,-1.1711141053e-03
+0.021967,0.12508714,-1.1663371252e-03
+0.022096,0.12380252,-1.1616587693e-03
+0.022224,0.12251788,-1.1552371403e-03
+0.022353,0.12123325,-1.1571482368e-03
+0.022481,0.11994863,-1.1433263473e-03
+0.022609,0.11866399,-1.1291103671e-03
+0.022738,0.11737937,-1.1295001963e-03
+0.022866,0.11609474,-1.1144578838e-03
+0.022995,0.11481010,-1.1095537679e-03
+0.023123,0.11352548,-1.1003409336e-03
+0.023252,0.11224085,-1.0967181198e-03
+0.023380,0.11095623,-1.0908117310e-03
+0.023509,0.10967159,-1.0778679210e-03
+0.023637,0.10838696,-1.0838961696e-03
+0.023766,0.10710234,-1.0726892404e-03
+0.023894,0.10581771,-1.0710080640e-03
+0.024023,0.10453308,-1.0645867394e-03
+0.024151,0.10324845,-1.0609347037e-03
+0.024279,0.10196382,-1.0480329003e-03
+0.024408,0.10067919,-1.0447309194e-03
+0.024536,0.09939456,-1.0435824352e-03
+0.024665,0.09810994,-1.0390620605e-03
+0.024793,0.09682531,-1.0316469861e-03
+0.024922,0.09554067,-1.0258756474e-03
+0.025050,0.09425605,-1.0191986306e-03
+0.025179,0.09297142,-1.0179571028e-03
+0.025307,0.09168680,-1.0082122867e-03
+0.025436,0.09040216,-9.9750821887e-04
+0.025564,0.08911753,-1.0102929314e-03
+0.025693,0.08783291,-1.0012421370e-03
+0.025821,0.08654827,-9.8521500361e-04
+0.025950,0.08526365,-9.8612707400e-04
+0.026078,0.08397902,-9.9439476022e-04
+0.026206,0.08269438,-9.6919679913e-04
+0.026335,0.08140976,-9.6947511808e-04
+0.026463,0.08012513,-9.7689628041e-04
+0.026592,0.07884051,-9.6360444497e-04
+0.026720,0.07755587,-9.6068437892e-04
+0.026849,0.07627124,-9.5680262602e-04
+0.026977,0.07498662,-9.4899599752e-04
+0.027106,0.07370198,-9.5193919763e-04
+0.027234,0.07241736,-9.4371737366e-04
+0.027363,0.07113273,-9.4034964330e-04
+0.027491,0.06984810,-9.4499218202e-04
+0.027620,0.06856347,-9.3160527372e-04
+0.027748,0.06727884,-9.2729625100e-04
+0.027876,0.06599422,-9.1895753917e-04
+0.028005,0.06470958,-9.2051695732e-04
+0.028133,0.06342495,-9.2185183306e-04
+0.028262,0.06214033,-9.1291965146e-04
+0.028390,0.06085570,-9.1565383332e-04
+0.028519,0.05957107,-9.0914768387e-04
+0.028647,0.05828644,-9.0616207133e-04
+0.028776,0.05700181,-9.0160669118e-04
+0.028904,0.05571719,-9.0215064594e-04
+0.029033,0.05443255,-8.9899416605e-04
+0.029161,0.05314793,-8.9103787643e-04
+0.029290,0.05186330,-8.9374303926e-04
+0.029418,0.05057866,-8.9004148849e-04
+0.029546,0.04929404,-8.8365283570e-04
+0.029675,0.04800941,-8.7819492289e-04
+0.029803,0.04672479,-8.7756056267e-04
+0.029932,0.04544015,-8.7680373399e-04
+0.030060,0.04415553,-8.7369717496e-04
+0.030189,0.04287090,-8.6463674139e-04
+0.030317,0.04158626,-8.6493241089e-04
+0.030446,0.04030163,-8.6571511319e-04
+0.030574,0.03901702,-8.4916969570e-04
+0.030703,0.03773239,-8.5744600646e-04
+0.030831,0.03644775,-8.5639239216e-04
+0.030960,0.03516312,-8.5589906852e-04
+0.031088,0.03387848,-8.4722552163e-04
+0.031216,0.03259388,-8.5218655951e-04
+0.031345,0.03130924,-8.3423579872e-04
+0.031473,0.03002461,-8.3700473241e-04
+0.031602,0.02873997,-8.3468407183e-04
+0.031730,0.02745534,-8.3146635772e-04
+0.031859,0.02617073,-8.3322414028e-04
+0.031987,0.02488610,-8.1882714624e-04
+0.032116,0.02360146,-8.2953167064e-04
+0.032244,0.02231683,-8.1711066000e-04
+0.032373,0.02103220,-8.1166654646e-04
+0.032501,0.01974759,-8.1456586288e-04
+0.032630,0.01846295,-8.0621715672e-04
+0.032758,0.01717832,-8.0976650973e-04
+0.032887,0.01589369,-8.1871325159e-04
+0.033015,0.01460905,-8.0959614972e-04
+0.033143,0.01332444,-8.0926385130e-04
+0.033272,0.01203981,-7.9917293749e-04
+0.033400,0.01075518,-8.0189260983e-04
+0.033529,0.00947054,-7.9617093832e-04
+0.033657,0.00818591,-8.0030736879e-04
+0.033786,0.00690130,-7.9980186933e-04
+0.033914,0.00561666,-7.9655924551e-04
+0.034043,0.00433203,-7.9350387566e-04
+0.034171,0.00304740,-7.8747035096e-04
+0.034300,0.00176276,-7.9219066274e-04
+0.034428,0.00047815,-7.7587770195e-04
+0.034557,-0.00080648,-7.8994417320e-04
+0.034685,-0.00209111,-7.7804626623e-04
+0.034813,-0.00337575,-7.7075766814e-04
+0.034942,-0.00466038,-7.7503300443e-04
+0.035070,-0.00594499,-7.6987984225e-04
+0.035199,-0.00722962,-7.7436805246e-04
+0.035327,-0.00851426,-7.6961598208e-04
+0.035456,-0.00979889,-7.7111771729e-04
+0.035584,-0.01108352,-7.6563996804e-04
+0.035713,-0.01236813,-7.5649481105e-04
+0.035841,-0.01365277,-7.6563261182e-04
+0.035970,-0.01493740,-7.6003969960e-04
+0.036098,-0.01622204,-7.5527332264e-04
+0.036227,-0.01750667,-7.5673066684e-04
+0.036355,-0.01879128,-7.4496557777e-04
+0.036483,-0.02007591,-7.5682934171e-04
+0.036612,-0.02136055,-7.5093243986e-04
+0.036740,-0.02264518,-7.5623191481e-04
+0.036869,-0.02392981,-7.5208817884e-04
+0.036997,-0.02521442,-7.4753848075e-04
+0.037126,-0.02649906,-7.4080129511e-04
+0.037254,-0.02778369,-7.4144737456e-04
+0.037383,-0.02906832,-7.3430402386e-04
+0.037511,-0.03035296,-7.3023237890e-04
+0.037640,-0.03163757,-7.3996522213e-04
+0.037768,-0.03292220,-7.3335679579e-04
+0.037897,-0.03420683,-7.2700401094e-04
+0.038025,-0.03549147,-7.3471115284e-04
+0.038153,-0.03677610,-7.3648161854e-04
+0.038282,-0.03806071,-7.1304443323e-04
+0.038410,-0.03934534,-7.2815538692e-04
+0.038539,-0.04062998,-7.1667790087e-04
+0.038667,-0.04191461,-7.1370989253e-04
+0.038796,-0.04319925,-7.1642560773e-04
+0.038924,-0.04448386,-7.1872856263e-04
+0.039053,-0.04576849,-7.2021096873e-04
+0.039181,-0.04705312,-7.1940112449e-04
+0.039310,-0.04833776,-7.1881922176e-04
+0.039438,-0.04962239,-7.2254588515e-04
+0.039567,-0.05090700,-7.1655441776e-04
+0.039695,-0.05219163,-7.0486451438e-04
+0.039823,-0.05347627,-7.0279817625e-04
+0.039952,-0.05476090,-7.0273328928e-04
+0.040080,-0.05604553,-7.0611826872e-04
+0.040209,-0.05733014,-6.9281055399e-04
+0.040337,-0.05861478,-6.9076029808e-04
+0.040466,-0.05989941,-6.9099808170e-04
+0.040594,-0.06118405,-6.9433714816e-04
+0.040723,-0.06246868,-6.9801825369e-04
+0.040851,-0.06375329,-6.9508885285e-04
+0.040980,-0.06503792,-6.9215158846e-04
+0.041108,-0.06632256,-6.8975350996e-04
+0.041237,-0.06760719,-6.8756541363e-04
+0.041365,-0.06889182,-6.8060759199e-04
+0.041494,-0.07017643,-6.8322544404e-04
+0.041622,-0.07146107,-6.9027306235e-04
+0.041750,-0.07274570,-6.8733843605e-04
+0.041879,-0.07403033,-6.7917683167e-04
+0.042007,-0.07531497,-6.8108980520e-04
+0.042136,-0.07659958,-6.8137532818e-04
+0.042264,-0.07788421,-6.8267190082e-04
+0.042393,-0.07916884,-6.7919321829e-04
+0.042521,-0.08045348,-6.7755546903e-04
+0.042650,-0.08173811,-6.7940781712e-04
+0.042778,-0.08302272,-6.7574903392e-04
+0.042907,-0.08430735,-6.6633189956e-04
+0.043035,-0.08559199,-6.6944987341e-04
+0.043164,-0.08631944,-6.6202916768e-04
+0.043292,-0.08503480,-6.7861973717e-04
+0.043420,-0.08375017,-6.7456681253e-04
+0.043549,-0.08246554,-6.6821869507e-04
+0.043677,-0.08118093,-6.7670199477e-04
+0.043806,-0.07989629,-6.6632058619e-04
+0.043934,-0.07861166,-6.6154492517e-04
+0.044063,-0.07732703,-6.6383651597e-04
+0.044191,-0.07604239,-6.6928960918e-04
+0.044320,-0.07475778,-6.6035580414e-04
+0.044448,-0.07347315,-6.6023861187e-04
+0.044577,-0.07218852,-6.5334806163e-04
+0.044705,-0.07090388,-6.4418504678e-04
+0.044834,-0.06961925,-6.5405344748e-04
+0.044962,-0.06833464,-6.5016915794e-04
+0.045090,-0.06705001,-6.5029040882e-04
+0.045219,-0.06576537,-6.4294838932e-04
+0.045347,-0.06448074,-6.5224270010e-04
+0.045476,-0.06319610,-6.4446417745e-04
+0.045604,-0.06191150,-6.4601953700e-04
+0.045733,-0.06062686,-6.4169301154e-04
+0.045861,-0.05934223,-6.3363835144e-04
+0.045990,-0.05805759,-6.3615661542e-04
+0.046118,-0.05677296,-6.4642697038e-04
+0.046247,-0.05548835,-6.3831153264e-04
+0.046375,-0.05420372,-6.3993431580e-04
+0.046504,-0.05291908,-6.4290917303e-04
+0.046632,-0.05163445,-6.3692734483e-04
+0.046760,-0.05034982,-6.3788334964e-04
+0.046889,-0.04906521,-6.3224447370e-04
+0.047017,-0.04778057,-6.3144523258e-04
+0.047146,-0.04649594,-6.3327571493e-04
+0.047274,-0.04521131,-6.3342091158e-04
+0.047403,-0.04392667,-6.2563980157e-04
+0.047531,-0.04264206,-6.2475913466e-04
+0.047660,-0.04135743,-6.2256779144e-04
+0.047788,-0.04007280,-6.2539253096e-04
+0.047917,-0.03878816,-6.2103992895e-04
+0.048045,-0.03750353,-6.2163065916e-04
+0.048174,-0.03621892,-6.2420467825e-04
+0.048302,-0.03493428,-6.2505236899e-04
+0.048431,-0.03364965,-6.1961079207e-04
+0.048559,-0.03236502,-6.1879288136e-04
+0.048687,-0.03108038,-6.1898804961e-04
+0.048816,-0.02979577,-6.2090457442e-04
+0.048944,-0.02851114,-6.1458973754e-04
+0.049073,-0.02722651,-6.1709886966e-04
+0.049201,-0.02594187,-6.0752720384e-04
+0.049330,-0.02465724,-6.0942140632e-04
+0.049458,-0.02337263,-6.0414567422e-04
+0.049587,-0.02208800,-6.1454230257e-04
+0.049715,-0.02080336,-6.0526534234e-04
+0.049844,-0.01951873,-6.0691653574e-04
+0.049972,-0.01823409,-6.0837641656e-04
+0.050101,-0.01694949,-6.0752390623e-04
+0.050229,-0.01566485,-6.1085881261e-04
+0.050357,-0.01438022,-6.0542956371e-04
+0.050486,-0.01309558,-6.0303671067e-04
+0.050614,-0.01181095,-6.0493903036e-04
+0.050743,-0.01052634,-6.0567480502e-04
+0.050871,-0.00924171,-5.9577185543e-04
+0.051000,-0.00795707,-5.9799800120e-04
+0.051128,-0.00667244,-5.9767645809e-04
+0.051257,-0.00538781,-5.9786787212e-04
+0.051385,-0.00410320,-5.9381215719e-04
+0.051514,-0.00281856,-5.9889383716e-04
+0.051642,-0.00153393,-5.9456142672e-04
+0.051771,-0.00024930,-5.9990732198e-04
+0.051899,0.00103534,-5.8861952506e-04
+0.052027,0.00231995,-5.9102232169e-04
+0.052156,0.00360458,-5.9428376729e-04
+0.052284,0.00488921,-5.9045731290e-04
+0.052413,0.00617385,-5.8582248553e-04
+0.052541,0.00745848,-5.9352135802e-04
+0.052670,0.00874309,-5.8439958876e-04
+0.052798,0.01002773,-5.9301073457e-04
+0.052927,0.01131236,-5.8075166234e-04
+0.053055,0.01259699,-5.8639185732e-04
+0.053184,0.01388163,-5.7951622246e-04
+0.053312,0.01516624,-5.7651807897e-04
+0.053441,0.01645087,-5.8251167713e-04
+0.053569,0.01773550,-5.7411249205e-04
+0.053697,0.01902014,-5.8225106384e-04
+0.053826,0.02030477,-5.7272277439e-04
+0.053954,0.02158938,-5.7866604582e-04
+0.054083,0.02287401,-5.6877151785e-04
+0.054211,0.02415865,-5.7792438618e-04
+0.054340,0.02544328,-5.7370840702e-04
+0.054468,0.02672791,-5.8001066222e-04
+0.054597,0.02801252,-5.8276224536e-04
+0.054725,0.02929716,-5.7335475018e-04
+0.054854,0.03058179,-5.7462433309e-04
+0.054982,0.03186643,-5.7020684410e-04
+0.055111,0.03315106,-5.7004348518e-04
+0.055239,0.03443567,-5.8190151634e-04
+0.055368,0.03572030,-5.5842739771e-04
+0.055496,0.03700494,-5.7138170927e-04
+0.055624,0.03828957,-5.6446594494e-04
+0.055753,0.03957420,-5.6913866955e-04
+0.055881,0.04085881,-5.6685093443e-04
+0.056010,0.04214345,-5.6028629031e-04
+0.056138,0.04342808,-5.7084886495e-04
+0.056267,0.04471271,-5.6104286533e-04
+0.056395,0.04599734,-5.6382417776e-04
+0.056524,0.04728197,-5.7289384466e-04
+0.056652,0.04856659,-5.7212702166e-04
+0.056781,0.04985122,-5.5328336740e-04
+0.056909,0.05113586,-5.5412436144e-04
+0.057038,0.05242048,-5.5933860565e-04
+0.057166,0.05370511,-5.5025290725e-04
+0.057294,0.05498973,-5.5470398120e-04
+0.057423,0.05627437,-5.5784935065e-04
+0.057551,0.05755900,-5.5704493481e-04
+0.057680,0.05884362,-5.5959724036e-04
+0.057808,0.06012826,-5.5311696452e-04
+0.057937,0.06141288,-5.5868481484e-04
+0.058065,0.06269751,-5.5173642946e-04
+0.058194,0.06398215,-5.5347579609e-04
+0.058322,0.06526677,-5.4938893135e-04
+0.058451,0.06655140,-5.4795274264e-04
+0.058579,0.06783602,-5.4793503697e-04
+0.058708,0.06912066,-5.4147642395e-04
+0.058836,0.07040529,-5.4681425273e-04
+0.058964,0.07168991,-5.4225182076e-04
+0.059093,0.07297455,-5.5786898416e-04
+0.059221,0.07425917,-5.4263119902e-04
+0.059350,0.07554380,-5.3672242574e-04
+0.059478,0.07682844,-5.3788308578e-04
+0.059607,0.07811306,-5.3732725960e-04
+0.059735,0.07939769,-5.4024656466e-04
+0.059864,0.08068231,-5.2894080840e-04
+0.059992,0.08196695,-5.3928690711e-04
+0.060121,0.08325158,-5.4014580975e-04
+0.060249,0.08453620,-5.4116467222e-04
+0.060378,0.08582083,-5.3625167809e-04
+0.060506,0.08710546,-5.3829772319e-04
+0.060634,0.08839009,-5.3187025998e-04
+0.060763,0.08967472,-5.3607132376e-04
+0.060891,0.09095935,-5.2864290667e-04
+0.061020,0.09224398,-5.2446680332e-04
+0.061148,0.09352860,-5.2560925037e-04
+0.061277,0.09481323,-5.3253592221e-04
+0.061405,0.09609787,-5.3153420734e-04
+0.061534,0.09738249,-5.2660756615e-04
+0.061662,0.09866712,-5.2413156241e-04
+0.061791,0.09995174,-5.2575738951e-04
+0.061919,0.10123638,-5.2332978465e-04
+0.062048,0.10252101,-5.1765864280e-04
+0.062176,0.10380563,-5.2263586438e-04
+0.062305,0.10509027,-5.2239823295e-04
+0.062433,0.10637489,-5.1284112739e-04
+0.062561,0.10765952,-5.1862504778e-04
+0.062690,0.10894416,-5.1403628559e-04
+0.062818,0.11022878,-5.1016584606e-04
+0.062947,0.11151341,-5.1337787812e-04
+0.063075,0.11279803,-5.1497788235e-04
+0.063204,0.11408267,-5.0374528248e-04
+0.063332,0.11536730,-5.1022708029e-04
+0.063461,0.11665192,-4.9272225891e-04
+0.063589,0.11793656,-4.9794832381e-04
+0.063718,0.11922118,-5.0408985818e-04
+0.063846,0.12050581,-4.8760354415e-04
+0.063975,0.12179044,-5.0208906655e-04
+0.064103,0.12307507,-4.8006463150e-04
+0.064231,0.12435970,-4.9675225242e-04
+0.064360,0.12564432,-4.8555125895e-04
+0.064488,0.12692896,-4.9256351665e-04
+0.064617,0.12821359,-4.8177310198e-04
+0.064745,0.12949821,-4.7357263644e-04
+0.064874,0.13078284,-4.7430759937e-04
+0.065002,0.13206747,-4.7278110667e-04
+0.065131,0.13335210,-4.6489016061e-04
+0.065259,0.13463673,-4.6685696141e-04
+0.065388,0.13592135,-4.6621316493e-04
+0.065516,0.13720599,-4.7357075933e-04
+0.065645,0.13849061,-4.5700636785e-04
+0.065773,0.13977524,-4.6302294787e-04
+0.065901,0.14105988,-4.5997823187e-04
+0.066030,0.14234450,-4.5756741950e-04
+0.066158,0.14362913,-4.4761383879e-04
+0.066287,0.14491375,-4.4421577034e-04
+0.066415,0.14619839,-4.5176340900e-04
+0.066544,0.14748302,-4.2708236221e-04
+0.066672,0.14876764,-4.2339108479e-04
+0.066801,0.15005227,-4.2129628568e-04
+0.066929,0.15133690,-4.2759628328e-04
+0.067058,0.15262153,-4.0399842788e-04
+0.067186,0.15390616,-4.1654132355e-04
+0.067315,0.15519079,-4.1276676860e-04
+0.067443,0.15647542,-4.0311063303e-04
+0.067571,0.15776005,-3.8119192468e-04
+0.067700,0.15904468,-4.0097354831e-04
+0.067828,0.16032930,-3.9287533429e-04
+0.067957,0.16161393,-3.7759092590e-04
+0.068085,0.16289856,-3.6783938770e-04
+0.068214,0.16418319,-3.6560979212e-04
+0.068342,0.16546782,-3.6149352785e-04
+0.068471,0.16675245,-3.5235298753e-04
+0.068599,0.16803708,-3.4820912474e-04
+0.068728,0.16932170,-3.3356194296e-04
+0.068856,0.17060634,-3.2495807727e-04
+0.068985,0.17189097,-3.1130286971e-04
+0.069113,0.17317559,-2.9271315739e-04
+0.069241,0.17446022,-2.8940780274e-04
+0.069370,0.17574485,-2.8417105863e-04
+0.069498,0.17702948,-2.6943377578e-04
+0.069627,0.17831411,-2.6086075551e-04
+0.069755,0.17959874,-2.3999933957e-04
+0.069884,0.18088336,-2.3629530291e-04
+0.070012,0.18216799,-2.3471237020e-04
+0.070141,0.18345263,-2.0264022013e-04
+0.070269,0.18473725,-1.9730263233e-04
+0.070398,0.18602188,-1.7487302149e-04
+0.070526,0.18730651,-1.5685600395e-04
+0.070655,0.18859114,-1.5906968219e-04
+0.070783,0.18987577,-1.3827203710e-04
+0.070912,0.19116040,-1.1514009707e-04
+0.071040,0.19244503,-1.1039384826e-04
+0.071168,0.19372965,-8.5213643572e-05
+0.071297,0.19501428,-7.0087210104e-05
+0.071425,0.19629891,-4.8423188835e-05
+0.071554,0.19758354,-3.4481998522e-05
+0.071682,0.19886817,1.1274872796e-06
+0.071811,0.20015280,2.0345917403e-05
+0.071939,0.20143743,3.1355910624e-05
+0.072068,0.20272206,5.1268211879e-05
+0.072196,0.20400669,8.2673970437e-05
+0.072325,0.20529131,1.0534969772e-04
+0.072453,0.20657594,1.2096350009e-04
+0.072582,0.20786057,1.4448937864e-04
+0.072710,0.20914520,1.8136100868e-04
+0.072838,0.21042983,1.9594826259e-04
+0.072967,0.21171446,2.3516858296e-04
+0.073095,0.21299909,2.5969492074e-04
+0.073224,0.21428372,2.8811361453e-04
+0.073352,0.21556834,3.1310846772e-04
+0.073481,0.21685297,3.4113834699e-04
+0.073609,0.21813760,3.7570027470e-04
+0.073738,0.21942223,4.0275639276e-04
+0.073866,0.22070686,4.3080846754e-04
+0.073995,0.22199149,4.6474577568e-04
+0.074123,0.22327612,4.9553669972e-04
+0.074252,0.22456075,5.2786370492e-04
+0.074380,0.22584538,5.5780577137e-04
+0.074508,0.22713000,5.8289912187e-04
+0.074637,0.22841463,6.2165521373e-04
+0.074765,0.22969926,6.6132012909e-04
+0.074894,0.23098389,6.8868376271e-04
+0.075022,0.23226852,7.2113191732e-04
+0.075151,0.23355315,7.6330317451e-04
+0.075279,0.23483778,7.9560501635e-04
+0.075408,0.23612241,8.2403996993e-04
+0.075536,0.23740704,8.5193147608e-04
+0.075665,0.23869166,8.8545089993e-04
+0.075793,0.23997629,9.1616349286e-04
+0.075922,0.24126092,9.4543193206e-04
+0.076050,0.24254555,9.6603189763e-04
+0.076178,0.24383018,1.0113119461e-03
+0.076307,0.24511481,1.0349419659e-03
+0.076435,0.24639944,1.0688528424e-03
+0.076564,0.24768407,1.0991274102e-03
+0.076692,0.24896870,1.1261911128e-03
+0.076821,0.25025332,1.1377047712e-03
+0.076949,0.25153795,1.1762095845e-03
+0.077078,0.25282258,1.2000487241e-03
+0.077206,0.25410721,1.2165210867e-03
+0.077335,0.25539184,1.2261075157e-03
+0.077463,0.25667647,1.2590866375e-03
+0.077592,0.25796110,1.2874438180e-03
+0.077720,0.25924573,1.2912723017e-03
+0.077849,0.26053035,1.3168542070e-03
+0.077977,0.26181498,1.3388168498e-03
+0.078105,0.26309961,1.3587489716e-03
+0.078234,0.26438424,1.3632954228e-03
+0.078362,0.26566887,1.3907761473e-03
+0.078491,0.26695350,1.3842570103e-03
+0.078619,0.26823813,1.4005649993e-03
+0.078748,0.26952276,1.4049295234e-03
+0.078876,0.27080739,1.4232352601e-03
+0.079005,0.27209201,1.4148274505e-03
+0.079133,0.27337664,1.4227246874e-03
+0.079262,0.27466127,1.4255275612e-03
+0.079390,0.27594590,1.4424332815e-03
+0.079519,0.27723053,1.4379280251e-03
+0.079647,0.27851516,1.4383341902e-03
+0.079775,0.27979979,1.4324162343e-03
+0.079904,0.28108442,1.4414918876e-03
+0.080032,0.28236904,1.4287601399e-03
+0.080161,0.28365368,1.4252234701e-03
+0.080289,0.28493830,1.4324259750e-03
+0.080418,0.28622293,1.4299125813e-03
+0.080546,0.28750756,1.4178317326e-03
+0.080675,0.28879219,1.4149875625e-03
+0.080803,0.29007682,1.4079509532e-03
+0.080932,0.29136145,1.3990882752e-03
+0.081060,0.29264608,1.3905101056e-03
+0.081189,0.29393071,1.3873356664e-03
+0.081317,0.29521533,1.3880781885e-03
+0.081445,0.29649996,1.3628988970e-03
+0.081574,0.29778459,1.3627573531e-03
+0.081702,0.29906922,1.3429820964e-03
+0.081831,0.30035385,1.3390108512e-03
+0.081959,0.30163848,1.3283184519e-03
+0.082088,0.30292311,1.3164726980e-03
+0.082216,0.30420773,1.3082622381e-03
+0.082345,0.30549237,1.2882231720e-03
+0.082473,0.30677699,1.2833436106e-03
+0.082602,0.30806162,1.2648037938e-03
+0.082730,0.30934625,1.2598910534e-03
+0.082859,0.31063088,1.2482053100e-03
+0.082987,0.31191551,1.2324834853e-03
+0.083115,0.31320014,1.2262953277e-03
+0.083244,0.31448477,1.2061051799e-03
+0.083372,0.31576939,1.2030856780e-03
+0.083501,0.31705402,1.1855876041e-03
+0.083629,0.31833866,1.1720492083e-03
+0.083758,0.31962328,1.1546775599e-03
+0.083886,0.32090791,1.1478610285e-03
+0.084015,0.32219254,1.1309295361e-03
+0.084143,0.32347717,1.1055011476e-03
+0.084272,0.32476180,1.1021708579e-03
+0.084400,0.32604643,1.0946309813e-03
+0.084529,0.32733105,1.0851543376e-03
+0.084657,0.32861568,1.0738480740e-03
+0.084786,0.32990031,1.0680019555e-03
+0.084914,0.33118494,1.0599841780e-03
+0.085042,0.33246957,1.0363248347e-03
+0.085171,0.33375420,1.0332762123e-03
+0.085299,0.33503883,1.0242583941e-03
+0.085428,0.33632345,9.9557652502e-04
+0.085556,0.33760809,9.8457668624e-04
+0.085685,0.33889272,9.8313811310e-04
+0.085813,0.34017734,9.7476449725e-04
+0.085942,0.34146197,9.6825398479e-04
+0.086070,0.34274660,9.4656966098e-04
+0.086199,0.34403123,9.3607501727e-04
diff --git a/demo_data/ec_Nernst_12mVs.csv b/demo_data/ec_Nernst_12mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..e1391124d7a0d13973f454a75b8ab152af3af88b
--- /dev/null
+++ b/demo_data/ec_Nernst_12mVs.csv
@@ -0,0 +1,673 @@
+Time (s),E (V),I (A)
+0.000000,0.34475868,-5.5497589369e-07
+0.110314,0.34347405,-3.0917141371e-07
+0.220628,0.34218941,-2.2402582107e-07
+0.330942,0.34090479,-2.6135816271e-07
+0.441256,0.33962016,-2.0322943168e-07
+0.551570,0.33833553,-2.1759800429e-07
+0.661884,0.33705090,-1.9908060624e-07
+0.772198,0.33576627,-2.4396578138e-07
+0.882512,0.33448164,-2.1620799770e-07
+0.992826,0.33319702,-2.0696240480e-07
+1.103140,0.33191239,-2.2215156416e-07
+1.213454,0.33062776,-2.1233885073e-07
+1.323768,0.32934313,-2.2898760492e-07
+1.434082,0.32805850,-2.3993569553e-07
+1.544396,0.32677387,-2.7652723683e-07
+1.654710,0.32548924,-2.7066643238e-07
+1.765024,0.32420462,-2.8525862063e-07
+1.875338,0.32291998,-2.8673708341e-07
+1.985652,0.32163535,-2.3992660645e-07
+2.095966,0.32035073,-3.1267774151e-07
+2.206280,0.31906610,-3.0647874765e-07
+2.316594,0.31778147,-3.2266019886e-07
+2.426908,0.31649684,-3.3191818104e-07
+2.537222,0.31521221,-3.4848039964e-07
+2.647536,0.31392758,-4.1501739238e-07
+2.757850,0.31264296,-3.9220710972e-07
+2.868164,0.31135833,-4.3926315406e-07
+2.978478,0.31007369,-4.5522592640e-07
+3.088792,0.30878907,-4.2515117203e-07
+3.199106,0.30750444,-4.6563892466e-07
+3.309420,0.30621981,-5.0535461972e-07
+3.419735,0.30493518,-5.2722136964e-07
+3.530049,0.30365055,-5.2169001717e-07
+3.640363,0.30236592,-5.8176221465e-07
+3.750677,0.30108129,-5.4103957972e-07
+3.860991,0.29979667,-5.7882876921e-07
+3.971305,0.29851204,-5.9775644711e-07
+4.081619,0.29722741,-6.1812815209e-07
+4.191933,0.29594278,-6.4976906801e-07
+4.302247,0.29465815,-6.6894069024e-07
+4.412561,0.29337352,-7.2725831718e-07
+4.522875,0.29208889,-7.4541953704e-07
+4.633189,0.29080426,-7.9274581910e-07
+4.743503,0.28951963,-7.7273897564e-07
+4.853817,0.28823501,-8.3361836970e-07
+4.964131,0.28695038,-8.5889633672e-07
+5.074445,0.28566575,-9.1524677365e-07
+5.184759,0.28438112,-9.4040945005e-07
+5.295073,0.28309649,-9.7253046400e-07
+5.405387,0.28181186,-1.0163957554e-06
+5.515701,0.28052723,-1.0547149788e-06
+5.626015,0.27924260,-1.0521826971e-06
+5.736329,0.27795798,-1.1158403189e-06
+5.846643,0.27667334,-1.1371920753e-06
+5.956957,0.27538872,-1.1781793755e-06
+6.067271,0.27410409,-1.2250684080e-06
+6.177585,0.27281946,-1.2600071440e-06
+6.287899,0.27153483,-1.2743057767e-06
+6.398213,0.27025020,-1.3261837386e-06
+6.508527,0.26896557,-1.3832964677e-06
+6.618841,0.26768094,-1.4173475039e-06
+6.729155,0.26639631,-1.4504800022e-06
+6.839469,0.26511169,-1.4948895562e-06
+6.949783,0.26382706,-1.4900127255e-06
+7.060097,0.26254243,-1.5507711483e-06
+7.170411,0.26125780,-1.5565295113e-06
+7.280725,0.25997317,-1.6381195572e-06
+7.391039,0.25868854,-1.6693737545e-06
+7.501353,0.25740391,-1.6526441183e-06
+7.611667,0.25611928,-1.7542917009e-06
+7.721981,0.25483466,-1.7749898012e-06
+7.832295,0.25355003,-1.8119925150e-06
+7.942609,0.25226540,-1.8305376942e-06
+8.052923,0.25098077,-1.8519281874e-06
+8.163237,0.24969614,-1.8692731756e-06
+8.273551,0.24841151,-1.8958740903e-06
+8.383865,0.24712688,-1.9522226877e-06
+8.494179,0.24584225,-1.9669757743e-06
+8.604493,0.24455762,-2.0206725254e-06
+8.714807,0.24327300,-2.0096057087e-06
+8.825121,0.24198837,-2.0704012452e-06
+8.935435,0.24070374,-2.0352795375e-06
+9.045749,0.23941911,-2.1198360849e-06
+9.156063,0.23813448,-2.0882158358e-06
+9.266377,0.23684985,-2.1149418334e-06
+9.376691,0.23556522,-2.1521341194e-06
+9.487005,0.23428059,-2.1097459112e-06
+9.597319,0.23299596,-2.1702936621e-06
+9.707633,0.23171134,-2.1325114518e-06
+9.817947,0.23042671,-2.1855832206e-06
+9.928261,0.22914208,-2.1864808752e-06
+10.038575,0.22785745,-2.2379040586e-06
+10.148889,0.22657282,-2.2166561775e-06
+10.259203,0.22528819,-2.2051567640e-06
+10.369517,0.22400356,-2.2272365121e-06
+10.479831,0.22271894,-2.2277922442e-06
+10.590145,0.22143430,-2.2365197057e-06
+10.700459,0.22014968,-2.2182558550e-06
+10.810773,0.21886505,-2.2258846201e-06
+10.921088,0.21758042,-2.1618760950e-06
+11.031401,0.21629579,-2.2220466492e-06
+11.141716,0.21501116,-2.2013681338e-06
+11.252029,0.21372653,-2.1877055201e-06
+11.362344,0.21244190,-2.1921440193e-06
+11.472657,0.21115727,-2.1751788245e-06
+11.582972,0.20987265,-2.1977327195e-06
+11.693285,0.20858802,-2.1827785912e-06
+11.803600,0.20730339,-2.1785181947e-06
+11.913913,0.20601876,-2.1787248629e-06
+12.024228,0.20473413,-2.1224812227e-06
+12.134541,0.20344950,-2.1263072912e-06
+12.244856,0.20216487,-2.1641925111e-06
+12.355169,0.20088024,-2.1067653432e-06
+12.465484,0.19959561,-2.0672789309e-06
+12.575797,0.19831099,-2.0819735877e-06
+12.686112,0.19702636,-2.0562962964e-06
+12.796425,0.19574173,-2.0422324649e-06
+12.906740,0.19445710,-2.0314902581e-06
+13.017053,0.19317247,-2.0392064515e-06
+13.127368,0.19188784,-2.0195703666e-06
+13.237681,0.19060321,-2.0011323086e-06
+13.347996,0.18931859,-1.9604673460e-06
+13.458309,0.18803395,-1.9686085620e-06
+13.568624,0.18674933,-1.9818753681e-06
+13.678938,0.18546470,-1.9201047035e-06
+13.789252,0.18418007,-1.9272192866e-06
+13.899566,0.18289544,-1.9109411828e-06
+14.009880,0.18161081,-1.8972073713e-06
+14.120194,0.18032618,-1.8532497824e-06
+14.230508,0.17904155,-1.8646310379e-06
+14.340822,0.17775693,-1.8500668743e-06
+14.451136,0.17647230,-1.8155506722e-06
+14.561450,0.17518766,-1.8171572747e-06
+14.671764,0.17390304,-1.8241634381e-06
+14.782078,0.17261841,-1.8330229075e-06
+14.892392,0.17133378,-1.7689256557e-06
+15.002706,0.17004915,-1.7293778921e-06
+15.113020,0.16876452,-1.7788346971e-06
+15.223334,0.16747989,-1.7613184230e-06
+15.333648,0.16619526,-1.7345906941e-06
+15.443962,0.16491064,-1.6963576006e-06
+15.554276,0.16362601,-1.6869761584e-06
+15.664590,0.16234138,-1.7031656437e-06
+15.774904,0.16105675,-1.6687111175e-06
+15.885218,0.15977212,-1.6286457094e-06
+15.995532,0.15848749,-1.6540424295e-06
+16.105846,0.15720287,-1.6042319080e-06
+16.216161,0.15591823,-1.6284457497e-06
+16.326474,0.15463360,-1.6080752891e-06
+16.436789,0.15334898,-1.5742216157e-06
+16.547102,0.15206435,-1.5731624137e-06
+16.657416,0.15077972,-1.5970153974e-06
+16.767731,0.14949509,-1.5311557302e-06
+16.878044,0.14821046,-1.5299208060e-06
+16.988358,0.14692583,-1.5011945623e-06
+17.098671,0.14564120,-1.5368532830e-06
+17.208987,0.14435657,-1.4803534173e-06
+17.319300,0.14307195,-1.4919675262e-06
+17.429614,0.14178732,-1.4418591210e-06
+17.539927,0.14050268,-1.4913175490e-06
+17.650243,0.13921806,-1.4752122459e-06
+17.760556,0.13793343,-1.4555500840e-06
+17.870870,0.13664881,-1.4612964365e-06
+17.981183,0.13536417,-1.4179931529e-06
+18.091499,0.13407954,-1.4135023915e-06
+18.201812,0.13279492,-1.4515124781e-06
+18.312126,0.13151028,-1.4116137030e-06
+18.422439,0.13022566,-1.3837151063e-06
+18.532755,0.12894103,-1.3791533635e-06
+18.643068,0.12765639,-1.3939270087e-06
+18.753382,0.12637177,-1.3654538525e-06
+18.863695,0.12508714,-1.3582949060e-06
+18.974011,0.12380252,-1.3585041712e-06
+19.084324,0.12251788,-1.3404833451e-06
+19.194638,0.12123325,-1.3512923134e-06
+19.304953,0.11994863,-1.3098634355e-06
+19.415267,0.11866399,-1.3285290450e-06
+19.525580,0.11737937,-1.2895001163e-06
+19.635894,0.11609474,-1.3503454263e-06
+19.746209,0.11481010,-1.3010550380e-06
+19.856523,0.11352548,-1.2876186774e-06
+19.966836,0.11224085,-1.2773467221e-06
+20.077150,0.11095623,-1.2894360599e-06
+20.187465,0.10967159,-1.2527515720e-06
+20.297779,0.10838696,-1.2628430442e-06
+20.408092,0.10710234,-1.2582355314e-06
+20.518406,0.10581771,-1.2302350072e-06
+20.628721,0.10453308,-1.2248178092e-06
+20.739035,0.10324845,-1.2289709763e-06
+20.849348,0.10196382,-1.2322383912e-06
+20.959662,0.10067919,-1.2237054793e-06
+21.069977,0.09939456,-1.2015629733e-06
+21.180291,0.09810994,-1.2032157786e-06
+21.290604,0.09682531,-1.2202879864e-06
+21.400918,0.09554067,-1.1890098761e-06
+21.511233,0.09425605,-1.2173287345e-06
+21.621547,0.09297142,-1.1862985180e-06
+21.731860,0.09168680,-1.1790659933e-06
+21.842176,0.09040216,-1.1699854645e-06
+21.952489,0.08911753,-1.1743705113e-06
+22.062803,0.08783291,-1.1745126904e-06
+22.173116,0.08654827,-1.1236854907e-06
+22.283432,0.08526365,-1.1738748320e-06
+22.393745,0.08397902,-1.1498315186e-06
+22.504059,0.08269438,-1.1266721181e-06
+22.614372,0.08140976,-1.1484328828e-06
+22.724688,0.08012513,-1.1357141265e-06
+22.835001,0.07884051,-1.1088999431e-06
+22.945315,0.07755587,-1.1152235602e-06
+23.055628,0.07627124,-1.1252312830e-06
+23.165944,0.07498662,-1.1250509081e-06
+23.276257,0.07370198,-1.1135400251e-06
+23.386571,0.07241736,-1.0588113391e-06
+23.496884,0.07113273,-1.1100365106e-06
+23.607200,0.06984810,-1.0973440476e-06
+23.717513,0.06856347,-1.0650387634e-06
+23.827827,0.06727884,-1.1022221768e-06
+23.938140,0.06599422,-1.0878915159e-06
+24.048456,0.06470958,-1.0802072424e-06
+24.158769,0.06342495,-1.0667581138e-06
+24.269083,0.06214033,-1.0774735944e-06
+24.379398,0.06085570,-1.0279884401e-06
+24.489712,0.05957107,-1.0539719467e-06
+24.600025,0.05828644,-1.0426360285e-06
+24.710339,0.05700181,-1.0519270127e-06
+24.820654,0.05571719,-1.0146378847e-06
+24.930967,0.05443255,-1.0666818305e-06
+25.041281,0.05314793,-1.0671326054e-06
+25.151595,0.05186330,-1.0381090190e-06
+25.261910,0.05057866,-1.0466175851e-06
+25.372223,0.04929404,-1.0283802443e-06
+25.482537,0.04800941,-1.0267525421e-06
+25.592850,0.04672479,-1.0208478883e-06
+25.703166,0.04544015,-1.0361770491e-06
+25.813479,0.04415553,-1.0201189226e-06
+25.923793,0.04287090,-1.0056785436e-06
+26.034106,0.04158626,-1.0283354481e-06
+26.144422,0.04030163,-1.0063138052e-06
+26.254735,0.03901702,-9.9385928123e-07
+26.365049,0.03773239,-9.6471093643e-07
+26.475362,0.03644775,-9.7782095594e-07
+26.585678,0.03516312,-9.9540453250e-07
+26.695991,0.03387848,-9.9529232568e-07
+26.806305,0.03259388,-9.7736260678e-07
+26.916618,0.03130924,-9.7203554212e-07
+27.026934,0.03002461,-9.5446397613e-07
+27.137247,0.02873997,-1.0075595497e-06
+27.247561,0.02745534,-9.5463850804e-07
+27.357876,0.02617073,-9.6368884810e-07
+27.468190,0.02488610,-9.6878435770e-07
+27.578503,0.02360146,-9.8343313627e-07
+27.688817,0.02231683,-9.6820514546e-07
+27.799132,0.02103220,-9.5736717875e-07
+27.909446,0.01974759,-9.3938108593e-07
+28.019759,0.01846295,-9.3397676413e-07
+28.130073,0.01717832,-9.6501498769e-07
+28.240388,0.01589369,-9.2362571225e-07
+28.350702,0.01460905,-9.5225273358e-07
+28.461015,0.01332444,-9.3083551425e-07
+28.571329,0.01203981,-9.7663364117e-07
+28.681644,0.01075518,-9.4047101773e-07
+28.791958,0.00947054,-9.4981902505e-07
+28.902271,0.00818591,-9.3763078942e-07
+29.012585,0.00690130,-9.2967027296e-07
+29.122900,0.00561666,-9.1552680378e-07
+29.233214,0.00433203,-9.2598508512e-07
+29.343527,0.00304740,-9.4311907698e-07
+29.453841,0.00176276,-9.2604795123e-07
+29.564156,0.00047815,-9.4561002505e-07
+29.674470,-0.00080648,-9.4063786721e-07
+29.784783,-0.00209111,-8.7221713625e-07
+29.895099,-0.00337575,-9.1143899147e-07
+30.005412,-0.00466038,-8.8820536342e-07
+30.115726,-0.00594499,-8.9120897870e-07
+30.226039,-0.00722962,-8.8340546522e-07
+30.336355,-0.00851426,-9.3161338774e-07
+30.446668,-0.00979889,-8.8181444396e-07
+30.556982,-0.01108352,-8.6225934925e-07
+30.667295,-0.01236813,-8.6450986960e-07
+30.777611,-0.01365277,-8.8452829082e-07
+30.887924,-0.01493740,-8.6536083442e-07
+30.998238,-0.01622204,-8.9630665237e-07
+31.108551,-0.01750667,-8.5216576712e-07
+31.218867,-0.01879128,-8.9186258071e-07
+31.329180,-0.02007591,-9.0888063275e-07
+31.439494,-0.02136055,-8.7654586319e-07
+31.549807,-0.02264518,-8.9169416228e-07
+31.660123,-0.02392981,-8.5914152539e-07
+31.770436,-0.02521442,-8.6566515619e-07
+31.880750,-0.02649906,-8.7256555086e-07
+31.991063,-0.02778369,-8.6066508189e-07
+32.101379,-0.02906832,-8.7698662932e-07
+32.211692,-0.03035296,-8.2199403555e-07
+32.322006,-0.03163757,-8.5729000470e-07
+32.432321,-0.03292220,-8.3420656282e-07
+32.542635,-0.03420683,-8.4513412185e-07
+32.652948,-0.03549147,-8.8297227333e-07
+32.763262,-0.03677610,-8.4203544997e-07
+32.873577,-0.03806071,-8.4809559195e-07
+32.983889,-0.03934534,-8.3358087726e-07
+33.094204,-0.04062998,-8.5521688365e-07
+33.204519,-0.04191461,-8.4614230606e-07
+33.314831,-0.04319925,-8.3624927874e-07
+33.425146,-0.04448386,-8.3074384095e-07
+33.535462,-0.04576849,-8.4017446149e-07
+33.645773,-0.04705312,-8.2572261291e-07
+33.756089,-0.04833776,-8.3495781830e-07
+33.866400,-0.04962239,-8.5903359260e-07
+33.976716,-0.05090700,-8.1065698114e-07
+34.087031,-0.05219163,-7.9292814166e-07
+34.197343,-0.05347627,-8.1373033345e-07
+34.307658,-0.05476090,-8.3363746759e-07
+34.417974,-0.05604553,-8.1920514970e-07
+34.528285,-0.05733014,-8.0286066318e-07
+34.638601,-0.05861478,-8.0842934579e-07
+34.748912,-0.05989941,-8.0661980798e-07
+34.859228,-0.06118405,-7.9603952742e-07
+34.969543,-0.06246868,-7.8491282023e-07
+35.079855,-0.06375329,-8.3820775839e-07
+35.190170,-0.06503792,-8.1750570874e-07
+35.300486,-0.06632256,-8.0822711384e-07
+35.410797,-0.06760719,-7.7174583169e-07
+35.521113,-0.06889182,-7.7166949426e-07
+35.631428,-0.07017643,-7.7538270676e-07
+35.741740,-0.07146107,-8.0961887873e-07
+35.852055,-0.07274570,-7.8865838551e-07
+35.962367,-0.07403033,-8.0339702692e-07
+36.072682,-0.07531497,-7.9241671878e-07
+36.182998,-0.07659958,-8.1319072362e-07
+36.293309,-0.07788421,-7.6096764730e-07
+36.403625,-0.07916884,-7.9380772625e-07
+36.513940,-0.08045348,-8.0975856918e-07
+36.624252,-0.08173811,-7.6915122486e-07
+36.734567,-0.08302272,-7.6229513944e-07
+36.844879,-0.08430735,-8.1164417391e-07
+36.955194,-0.08559199,-7.5474628241e-07
+37.065510,-0.08631944,-7.8788792394e-07
+37.175821,-0.08503480,-8.0679796471e-07
+37.286137,-0.08375017,-7.6933051772e-07
+37.396452,-0.08246554,-7.9681588607e-07
+37.506764,-0.08118093,-7.5481726377e-07
+37.617079,-0.07989629,-7.7593703224e-07
+37.727391,-0.07861166,-7.6899324805e-07
+37.837706,-0.07732703,-7.8865135230e-07
+37.948022,-0.07604239,-7.8487105375e-07
+38.058333,-0.07475778,-7.4620774395e-07
+38.168649,-0.07347315,-7.4420495504e-07
+38.278964,-0.07218852,-7.7732820201e-07
+38.389276,-0.07090388,-7.4122649703e-07
+38.499591,-0.06961925,-7.5599954708e-07
+38.609907,-0.06833464,-7.6443783520e-07
+38.720218,-0.06705001,-7.5368724266e-07
+38.830534,-0.06576537,-7.1628304050e-07
+38.940845,-0.06448074,-7.2608128173e-07
+39.051161,-0.06319610,-7.6679585552e-07
+39.161476,-0.06191150,-7.6714794904e-07
+39.271788,-0.06062686,-7.4964828414e-07
+39.382103,-0.05934223,-7.4713937432e-07
+39.492419,-0.05805759,-7.4836461434e-07
+39.602730,-0.05677296,-7.2210123991e-07
+39.713046,-0.05548835,-7.2898021033e-07
+39.823357,-0.05420372,-7.4614563525e-07
+39.933673,-0.05291908,-7.5673689844e-07
+40.043988,-0.05163445,-7.2365411951e-07
+40.154300,-0.05034982,-7.2547712863e-07
+40.264615,-0.04906521,-7.4766464722e-07
+40.374931,-0.04778057,-7.5015164587e-07
+40.485242,-0.04649594,-7.1832878611e-07
+40.595558,-0.04521131,-7.5704571065e-07
+40.705873,-0.04392667,-7.2259648639e-07
+40.816185,-0.04264206,-7.2333464927e-07
+40.926500,-0.04135743,-7.1524861699e-07
+41.036812,-0.04007280,-7.5035041532e-07
+41.147127,-0.03878816,-7.2845071750e-07
+41.257442,-0.03750353,-7.0608547500e-07
+41.367754,-0.03621892,-7.1099547005e-07
+41.478070,-0.03493428,-7.0105899910e-07
+41.588385,-0.03364965,-7.2782898136e-07
+41.698697,-0.03236502,-7.1663897524e-07
+41.809012,-0.03108038,-6.9752691892e-07
+41.919324,-0.02979577,-7.3981639168e-07
+42.029639,-0.02851114,-7.3157681892e-07
+42.139954,-0.02722651,-7.1826105084e-07
+42.250266,-0.02594187,-7.3398969831e-07
+42.360581,-0.02465724,-7.1044314632e-07
+42.470897,-0.02337263,-7.2828040551e-07
+42.581208,-0.02208800,-7.1062628040e-07
+42.691524,-0.02080336,-7.3527261068e-07
+42.801835,-0.01951873,-7.2956299328e-07
+42.912151,-0.01823409,-7.2397001903e-07
+43.022466,-0.01694949,-7.0692307671e-07
+43.132778,-0.01566485,-7.0877778940e-07
+43.243093,-0.01438022,-7.3702371872e-07
+43.353409,-0.01309558,-6.9462523114e-07
+43.463720,-0.01181095,-7.0908454574e-07
+43.574036,-0.01052634,-7.0316880106e-07
+43.684351,-0.00924171,-6.9614375619e-07
+43.794663,-0.00795707,-6.8342489160e-07
+43.904978,-0.00667244,-7.2228226402e-07
+44.015290,-0.00538781,-6.6872460826e-07
+44.125605,-0.00410320,-6.8646199581e-07
+44.235921,-0.00281856,-7.0110298374e-07
+44.346232,-0.00153393,-7.1354679556e-07
+44.456548,-0.00024930,-6.8888039356e-07
+44.566863,0.00103534,-6.7862948384e-07
+44.677175,0.00231995,-6.9721210143e-07
+44.787490,0.00360458,-7.1819125972e-07
+44.897802,0.00488921,-7.2009174240e-07
+45.008117,0.00617385,-6.5307105388e-07
+45.118433,0.00745848,-6.9285821722e-07
+45.228744,0.00874309,-6.8248520008e-07
+45.339060,0.01002773,-6.8441359921e-07
+45.449375,0.01131236,-6.5143685951e-07
+45.559687,0.01259699,-6.8009883050e-07
+45.670002,0.01388163,-7.3202169677e-07
+45.780314,0.01516624,-6.9774478626e-07
+45.890629,0.01645087,-6.8324613976e-07
+46.000945,0.01773550,-7.1175900660e-07
+46.111256,0.01902014,-6.7353018713e-07
+46.221572,0.02030477,-6.5686157763e-07
+46.331887,0.02158938,-6.9297745725e-07
+46.442199,0.02287401,-6.6362477053e-07
+46.552514,0.02415865,-6.5954512757e-07
+46.662830,0.02544328,-6.5008880875e-07
+46.773141,0.02672791,-6.7451662247e-07
+46.883457,0.02801252,-6.8060489731e-07
+46.993768,0.02929716,-6.9225785124e-07
+47.104084,0.03058179,-6.4537087455e-07
+47.214399,0.03186643,-6.9866099766e-07
+47.324711,0.03315106,-6.6667983648e-07
+47.435026,0.03443567,-6.0566470138e-07
+47.545342,0.03572030,-6.3787898656e-07
+47.655653,0.03700494,-6.5660540633e-07
+47.765969,0.03828957,-6.3680826085e-07
+47.876280,0.03957420,-6.7197141045e-07
+47.986596,0.04085881,-6.4637943747e-07
+48.096911,0.04214345,-6.7628845144e-07
+48.207223,0.04342808,-6.6020202978e-07
+48.317538,0.04471271,-6.3001736791e-07
+48.427854,0.04599734,-6.1082924468e-07
+48.538165,0.04728197,-6.6190087562e-07
+48.648481,0.04856659,-6.4390233942e-07
+48.758796,0.04985122,-6.4187509657e-07
+48.869108,0.05113586,-6.7528237720e-07
+48.979423,0.05242048,-6.6350645022e-07
+49.089735,0.05370511,-6.6314207563e-07
+49.200050,0.05498973,-6.2668540973e-07
+49.310366,0.05627437,-6.2411655528e-07
+49.420677,0.05755900,-6.0981164678e-07
+49.530993,0.05884362,-6.1767656563e-07
+49.641308,0.06012826,-6.6001840878e-07
+49.751620,0.06141288,-6.6245622904e-07
+49.861935,0.06269751,-6.1078655848e-07
+49.972247,0.06398215,-6.1954550706e-07
+50.082562,0.06526677,-6.2755612165e-07
+50.192877,0.06655140,-6.2795977404e-07
+50.303189,0.06783602,-6.7227903242e-07
+50.413504,0.06912066,-6.4215399057e-07
+50.523820,0.07040529,-6.6247143160e-07
+50.634131,0.07168991,-6.5180356048e-07
+50.744447,0.07297455,-6.5927045350e-07
+50.854758,0.07425917,-6.3543375438e-07
+50.965074,0.07554380,-6.0930963759e-07
+51.075389,0.07682844,-6.3237095190e-07
+51.185701,0.07811306,-6.3360089876e-07
+51.296016,0.07939769,-6.0893363114e-07
+51.406332,0.08068231,-6.3848882033e-07
+51.516643,0.08196695,-6.4914267913e-07
+51.626959,0.08325158,-6.4849930233e-07
+51.737274,0.08453620,-6.2604235754e-07
+51.847586,0.08582083,-6.1989062147e-07
+51.957901,0.08710546,-6.2275779240e-07
+52.068213,0.08839009,-6.0586888099e-07
+52.178528,0.08967472,-5.9956219781e-07
+52.288844,0.09095935,-6.0872041655e-07
+52.399155,0.09224398,-6.3415987698e-07
+52.509471,0.09352860,-6.1071287203e-07
+52.619786,0.09481323,-6.1744636312e-07
+52.730098,0.09609787,-6.2958266117e-07
+52.840413,0.09738249,-6.3323630775e-07
+52.950725,0.09866712,-5.8020825302e-07
+53.061040,0.09995174,-5.8915093080e-07
+53.171356,0.10123638,-5.8329464383e-07
+53.281667,0.10252101,-6.3656740031e-07
+53.391983,0.10380563,-5.6885540094e-07
+53.502298,0.10509027,-5.8976709447e-07
+53.612610,0.10637489,-5.9428533948e-07
+53.722925,0.10765952,-5.9352272265e-07
+53.833237,0.10894416,-6.2139340294e-07
+53.943552,0.11022878,-5.9873633615e-07
+54.053868,0.11151341,-5.9538766056e-07
+54.164179,0.11279803,-6.1891949689e-07
+54.274495,0.11408267,-5.8988022101e-07
+54.384810,0.11536730,-5.7085640448e-07
+54.495122,0.11665192,-5.9892601653e-07
+54.605437,0.11793656,-5.5927838134e-07
+54.715753,0.11922118,-5.8578450986e-07
+54.826064,0.12050581,-5.6762897068e-07
+54.936380,0.12179044,-6.0254584958e-07
+55.046691,0.12307507,-5.6458970241e-07
+55.157007,0.12435970,-5.6925407598e-07
+55.267322,0.12564432,-5.6633036883e-07
+55.377634,0.12692896,-5.4364165257e-07
+55.487949,0.12821359,-5.2497209363e-07
+55.598265,0.12949821,-5.9038174329e-07
+55.708576,0.13078284,-5.4594443511e-07
+55.818892,0.13206747,-5.8281990187e-07
+55.929203,0.13335210,-5.6809689583e-07
+56.039519,0.13463673,-5.5654678914e-07
+56.149834,0.13592135,-5.9637198594e-07
+56.260146,0.13720599,-5.0924079519e-07
+56.370461,0.13849061,-5.3636920087e-07
+56.480777,0.13977524,-5.3185728574e-07
+56.591088,0.14105988,-5.1946259823e-07
+56.701404,0.14234450,-5.0711698090e-07
+56.811719,0.14362913,-5.0009815772e-07
+56.922031,0.14491375,-5.1121198873e-07
+57.032346,0.14619839,-5.0221071887e-07
+57.142658,0.14748302,-5.1534519232e-07
+57.252973,0.14876764,-5.2281370839e-07
+57.363289,0.15005227,-5.3012938732e-07
+57.473600,0.15133690,-4.8943623778e-07
+57.583916,0.15262153,-4.8459116471e-07
+57.694231,0.15390616,-4.7367518343e-07
+57.804543,0.15519079,-4.7601221231e-07
+57.914858,0.15647542,-4.3850970746e-07
+58.025170,0.15776005,-4.6792785718e-07
+58.135485,0.15904468,-4.7823270624e-07
+58.245800,0.16032930,-4.6364966117e-07
+58.356112,0.16161393,-4.5710130592e-07
+58.466427,0.16289856,-4.1542529175e-07
+58.576743,0.16418319,-3.8542081542e-07
+58.687054,0.16546782,-4.1497454387e-07
+58.797370,0.16675245,-3.9531211149e-07
+58.907681,0.16803708,-3.8131728659e-07
+59.017997,0.16932170,-3.8664470290e-07
+59.128312,0.17060634,-3.7760675212e-07
+59.238624,0.17189097,-3.6718747807e-07
+59.348939,0.17317559,-3.7455090170e-07
+59.459255,0.17446022,-3.4511113837e-07
+59.569566,0.17574485,-3.1084548100e-07
+59.679882,0.17702948,-2.9019012108e-07
+59.790197,0.17831411,-2.9656394441e-07
+59.900509,0.17959874,-2.9965479861e-07
+60.010824,0.18088336,-2.6147247950e-07
+60.121136,0.18216799,-3.0494880715e-07
+60.231451,0.18345263,-2.5407654078e-07
+60.341767,0.18473725,-2.1070415592e-07
+60.452078,0.18602188,-1.8526685955e-07
+60.562394,0.18730651,-1.9624374576e-07
+60.672709,0.18859114,-2.0109715048e-07
+60.783021,0.18987577,-1.5541200132e-07
+60.893336,0.19116040,-1.6396081910e-07
+61.003648,0.19244503,-1.4871654369e-07
+61.113963,0.19372965,-7.7373606900e-08
+61.224279,0.19501428,-6.5064007749e-08
+61.334590,0.19629891,-5.7119573002e-08
+61.444906,0.19758354,-2.6711623491e-08
+61.555221,0.19886817,-3.5156721650e-08
+61.665533,0.20015280,3.1698417519e-09
+61.775848,0.20143743,5.6575012865e-08
+61.886160,0.20272206,4.3946842923e-08
+61.996475,0.20400669,9.5883660656e-08
+62.106791,0.20529131,8.5838797059e-08
+62.217102,0.20657594,1.5983782720e-07
+62.327418,0.20786057,1.8723369790e-07
+62.437733,0.20914520,2.1808560892e-07
+62.548045,0.21042983,2.7032229179e-07
+62.658360,0.21171446,2.7316533339e-07
+62.768676,0.21299909,3.2618895178e-07
+62.878987,0.21428372,3.3539131747e-07
+62.989303,0.21556834,3.8658113346e-07
+63.099614,0.21685297,4.2658175486e-07
+63.209930,0.21813760,4.3079275661e-07
+63.320245,0.21942223,4.6289694495e-07
+63.430557,0.22070686,5.0239174298e-07
+63.540872,0.22199149,5.8208081926e-07
+63.651188,0.22327612,5.8194313056e-07
+63.761499,0.22456075,6.2303387311e-07
+63.871815,0.22584538,6.6635598401e-07
+63.982126,0.22713000,6.5700813900e-07
+64.092442,0.22841463,7.3088328989e-07
+64.202757,0.22969926,7.4474407796e-07
+64.313069,0.23098389,8.0903495964e-07
+64.423384,0.23226852,8.3018356429e-07
+64.533700,0.23355315,8.8230390157e-07
+64.644011,0.23483778,8.8292071446e-07
+64.754327,0.23612241,9.3027686063e-07
+64.864642,0.23740704,9.7141304856e-07
+64.974954,0.23869166,1.0385527607e-06
+65.085269,0.23997629,1.0586465455e-06
+65.195581,0.24126092,1.0948129561e-06
+65.305896,0.24254555,1.1424736945e-06
+65.416212,0.24383018,1.1642528539e-06
+65.526523,0.24511481,1.2320974023e-06
+65.636839,0.24639944,1.2334156431e-06
+65.747154,0.24768407,1.2850951601e-06
+65.857466,0.24896870,1.3141644083e-06
+65.967777,0.25025332,1.3387372685e-06
+66.078096,0.25153795,1.3228241345e-06
+66.188408,0.25282258,1.4168592906e-06
+66.298720,0.25410721,1.4245196511e-06
+66.409039,0.25539184,1.4338769639e-06
+66.519350,0.25667647,1.4936483562e-06
+66.629662,0.25796110,1.4751451599e-06
+66.739981,0.25924573,1.5206328515e-06
+66.850293,0.26053035,1.5149172288e-06
+66.960605,0.26181498,1.5698649182e-06
+67.070924,0.26309961,1.5544186814e-06
+67.181235,0.26438424,1.6332589569e-06
+67.291547,0.26566887,1.6014695861e-06
+67.401859,0.26695350,1.6135054715e-06
+67.512178,0.26823813,1.6516102359e-06
+67.622489,0.26952276,1.6060471265e-06
+67.732801,0.27080739,1.6701551987e-06
+67.843120,0.27209201,1.6384864745e-06
+67.953432,0.27337664,1.6551555168e-06
+68.063743,0.27466127,1.6367898469e-06
+68.174063,0.27594590,1.6551312793e-06
+68.284374,0.27723053,1.6793070334e-06
+68.394686,0.27851516,1.7027864994e-06
+68.505005,0.27979979,1.6735414208e-06
+68.615317,0.28108442,1.6640425781e-06
+68.725628,0.28236904,1.6840888617e-06
+68.835948,0.28365368,1.6908763462e-06
+68.946259,0.28493830,1.6531052808e-06
+69.056571,0.28622293,1.6426909300e-06
+69.166890,0.28750756,1.6869903331e-06
+69.277202,0.28879219,1.6822584947e-06
+69.387513,0.29007682,1.6220604568e-06
+69.497825,0.29136145,1.6069018243e-06
+69.608144,0.29264608,1.6296274379e-06
+69.718456,0.29393071,1.6412263984e-06
+69.828767,0.29521533,1.6283884020e-06
+69.939087,0.29649996,1.6118141457e-06
+70.049398,0.29778459,1.5869709937e-06
+70.159710,0.29906922,1.5713976179e-06
+70.270029,0.30035385,1.5712145380e-06
+70.380341,0.30163848,1.5178162115e-06
+70.490652,0.30292311,1.5532516006e-06
+70.600972,0.30420773,1.5271284036e-06
+70.711283,0.30549237,1.4869479754e-06
+70.821595,0.30677699,1.4771102399e-06
+70.931914,0.30806162,1.4825146699e-06
+71.042226,0.30934625,1.4567691024e-06
+71.152537,0.31063088,1.4650373490e-06
+71.262857,0.31191551,1.4496155661e-06
+71.373168,0.31320014,1.4274675417e-06
+71.483480,0.31448477,1.4204963280e-06
+71.593791,0.31576939,1.3580028653e-06
+71.704111,0.31705402,1.3836382819e-06
+71.814422,0.31833866,1.3920075905e-06
+71.924734,0.31962328,1.3319339863e-06
+72.035053,0.32090791,1.3231348943e-06
+72.145365,0.32219254,1.3188476633e-06
+72.255676,0.32347717,1.3149782053e-06
+72.365996,0.32476180,1.3030881779e-06
+72.476307,0.32604643,1.2641112950e-06
+72.586619,0.32733105,1.2818906113e-06
+72.696938,0.32861568,1.2504354804e-06
+72.807250,0.32990031,1.2343126484e-06
+72.917561,0.33118494,1.2321896997e-06
+73.027881,0.33246957,1.1774939076e-06
+73.138192,0.33375420,1.2087791593e-06
+73.248504,0.33503883,1.1803617277e-06
+73.358823,0.33632345,1.1670301079e-06
+73.469135,0.33760809,1.2055350081e-06
+73.579446,0.33889272,1.1382007464e-06
+73.689758,0.34017734,1.1657233367e-06
+73.800077,0.34146197,1.1139372394e-06
+73.910389,0.34274660,1.1280599335e-06
+74.020700,0.34403123,1.1395229907e-06
diff --git a/demo_data/ec_Nernst_352mVs.csv b/demo_data/ec_Nernst_352mVs.csv
new file mode 100644
index 0000000000000000000000000000000000000000..726a9601f28e6717d203765867e25dd0de1b3bc7
--- /dev/null
+++ b/demo_data/ec_Nernst_352mVs.csv
@@ -0,0 +1,673 @@
+Time (s),E (V),I (A)
+0.000000,0.34475868,-1.6471397799e-05
+0.003654,0.34347405,-8.9555465868e-06
+0.007307,0.34218941,-7.6357850998e-06
+0.010961,0.34090479,-6.6219206948e-06
+0.014615,0.33962016,-6.7395697140e-06
+0.018268,0.33833553,-6.3648316829e-06
+0.021922,0.33705090,-6.0968254832e-06
+0.025576,0.33576627,-6.6724939936e-06
+0.029229,0.33448164,-6.7688276823e-06
+0.032883,0.33319702,-6.6918062741e-06
+0.036537,0.33191239,-6.8226347566e-06
+0.040190,0.33062776,-6.7927293198e-06
+0.043844,0.32934313,-7.3208615096e-06
+0.047498,0.32805850,-7.7037276790e-06
+0.051151,0.32677387,-7.2455553877e-06
+0.054805,0.32548924,-7.7352645700e-06
+0.058459,0.32420462,-8.2147753795e-06
+0.062112,0.32291998,-8.6681252489e-06
+0.065766,0.32163535,-8.5659548304e-06
+0.069420,0.32035073,-9.0694023560e-06
+0.073074,0.31906610,-9.5104931308e-06
+0.076727,0.31778147,-1.0229169548e-05
+0.080381,0.31649684,-1.0953949055e-05
+0.084035,0.31521221,-1.1275816433e-05
+0.087688,0.31392758,-1.1738614349e-05
+0.091342,0.31264296,-1.1690846748e-05
+0.094996,0.31135833,-1.2400548383e-05
+0.098649,0.31007369,-1.2657963804e-05
+0.102303,0.30878907,-1.2950461438e-05
+0.105957,0.30750444,-1.4284721108e-05
+0.109610,0.30621981,-1.4633276795e-05
+0.113264,0.30493518,-1.5371683464e-05
+0.116918,0.30365055,-1.5713279310e-05
+0.120571,0.30236592,-1.6603576512e-05
+0.124225,0.30108129,-1.7067883404e-05
+0.127879,0.29979667,-1.8132604710e-05
+0.131532,0.29851204,-1.8997974670e-05
+0.135186,0.29722741,-1.9390352504e-05
+0.138840,0.29594278,-2.0041226656e-05
+0.142493,0.29465815,-2.1062507519e-05
+0.146147,0.29337352,-2.1557309051e-05
+0.149801,0.29208889,-2.2450249637e-05
+0.153454,0.29080426,-2.3729466750e-05
+0.157108,0.28951963,-2.4273801707e-05
+0.160762,0.28823501,-2.5716169004e-05
+0.164415,0.28695038,-2.6775025636e-05
+0.168069,0.28566575,-2.7498116611e-05
+0.171723,0.28438112,-2.8301396181e-05
+0.175376,0.28309649,-2.9258003913e-05
+0.179030,0.28181186,-3.0345410995e-05
+0.182684,0.28052723,-3.1464020234e-05
+0.186337,0.27924260,-3.2257140077e-05
+0.189991,0.27795798,-3.3487432588e-05
+0.193645,0.27667334,-3.4177787458e-05
+0.197299,0.27538872,-3.5250915748e-05
+0.200952,0.27410409,-3.7463769432e-05
+0.204606,0.27281946,-3.7820013882e-05
+0.208260,0.27153483,-3.8828775831e-05
+0.211913,0.27025020,-3.9841618793e-05
+0.215567,0.26896557,-4.1529001509e-05
+0.219221,0.26768094,-4.1914257782e-05
+0.222874,0.26639631,-4.3530424902e-05
+0.226528,0.26511169,-4.4370980585e-05
+0.230182,0.26382706,-4.5537351481e-05
+0.233835,0.26254243,-4.6680211361e-05
+0.237489,0.26125780,-4.7882740610e-05
+0.241143,0.25997317,-4.9239596873e-05
+0.244796,0.25868854,-5.0019217977e-05
+0.248450,0.25740391,-5.1055443532e-05
+0.252104,0.25611928,-5.2605900620e-05
+0.255757,0.25483466,-5.2849724553e-05
+0.259411,0.25355003,-5.4185381423e-05
+0.263065,0.25226540,-5.5315945940e-05
+0.266718,0.25098077,-5.6108751858e-05
+0.270372,0.24969614,-5.6994940697e-05
+0.274026,0.24841151,-5.7757571846e-05
+0.277679,0.24712688,-5.8564318850e-05
+0.281333,0.24584225,-5.9322088931e-05
+0.284987,0.24455762,-6.0399400498e-05
+0.288640,0.24327300,-6.1147220134e-05
+0.292294,0.24198837,-6.1813885623e-05
+0.295948,0.24070374,-6.2079950606e-05
+0.299601,0.23941911,-6.2989170062e-05
+0.303255,0.23813448,-6.3593745159e-05
+0.306909,0.23684985,-6.3893837617e-05
+0.310562,0.23556522,-6.4088893910e-05
+0.314216,0.23428059,-6.4931466318e-05
+0.317870,0.23299596,-6.5153762665e-05
+0.321523,0.23171134,-6.5228576497e-05
+0.325177,0.23042671,-6.5988639175e-05
+0.328831,0.22914208,-6.6454892635e-05
+0.332485,0.22785745,-6.6285254685e-05
+0.336138,0.22657282,-6.6359973388e-05
+0.339792,0.22528819,-6.6745457971e-05
+0.343446,0.22400356,-6.6867541168e-05
+0.347099,0.22271894,-6.6889511102e-05
+0.350753,0.22143430,-6.7006576270e-05
+0.354407,0.22014968,-6.7058226305e-05
+0.358060,0.21886505,-6.6784517745e-05
+0.361714,0.21758042,-6.6828995088e-05
+0.365368,0.21629579,-6.6378609067e-05
+0.369021,0.21501116,-6.6532798144e-05
+0.372675,0.21372653,-6.6268493038e-05
+0.376329,0.21244190,-6.6500383097e-05
+0.379982,0.21115727,-6.5502784482e-05
+0.383636,0.20987265,-6.5792346212e-05
+0.387290,0.20858802,-6.5183252509e-05
+0.390943,0.20730339,-6.5404492929e-05
+0.394597,0.20601876,-6.4830630077e-05
+0.398251,0.20473413,-6.4428379092e-05
+0.401904,0.20344950,-6.3845721607e-05
+0.405558,0.20216487,-6.3766555645e-05
+0.409212,0.20088024,-6.3125769873e-05
+0.412865,0.19959561,-6.2668534598e-05
+0.416519,0.19831099,-6.2384694849e-05
+0.420173,0.19702636,-6.2216469558e-05
+0.423826,0.19574173,-6.1881655187e-05
+0.427480,0.19445710,-6.1558479791e-05
+0.431134,0.19317247,-6.1123257258e-05
+0.434787,0.19188784,-6.0544100503e-05
+0.438441,0.19060321,-6.0030839281e-05
+0.442095,0.18931859,-5.9842132817e-05
+0.445748,0.18803395,-5.9019366169e-05
+0.449402,0.18674933,-5.8490094815e-05
+0.453056,0.18546470,-5.8087615521e-05
+0.456710,0.18418007,-5.7844390898e-05
+0.460363,0.18289544,-5.7565283793e-05
+0.464017,0.18161081,-5.7118693401e-05
+0.467671,0.18032618,-5.6412454444e-05
+0.471324,0.17904155,-5.5441439496e-05
+0.474978,0.17775693,-5.5384062723e-05
+0.478632,0.17647230,-5.5648267944e-05
+0.482285,0.17518766,-5.4799726220e-05
+0.485939,0.17390304,-5.4428677392e-05
+0.489593,0.17261841,-5.4033075891e-05
+0.493246,0.17133378,-5.3280138340e-05
+0.496900,0.17004915,-5.2711274492e-05
+0.500554,0.16876452,-5.2848449831e-05
+0.504207,0.16747989,-5.2145958938e-05
+0.507861,0.16619526,-5.1631247006e-05
+0.511515,0.16491064,-5.1657597608e-05
+0.515168,0.16362601,-5.0768031707e-05
+0.518822,0.16234138,-5.0366465647e-05
+0.522476,0.16105675,-4.9851663342e-05
+0.526129,0.15977212,-4.9812855659e-05
+0.529783,0.15848749,-4.9531284725e-05
+0.533437,0.15720287,-4.9175646719e-05
+0.537090,0.15591823,-4.8703105263e-05
+0.540744,0.15463360,-4.8267045599e-05
+0.544398,0.15334898,-4.8072246153e-05
+0.548051,0.15206435,-4.7036481972e-05
+0.551705,0.15077972,-4.6962010603e-05
+0.555359,0.14949509,-4.6464236305e-05
+0.559012,0.14821046,-4.6815317654e-05
+0.562666,0.14692583,-4.5853130634e-05
+0.566320,0.14564120,-4.5787534756e-05
+0.569974,0.14435657,-4.5249758912e-05
+0.573627,0.14307195,-4.5372189329e-05
+0.577281,0.14178732,-4.5169218343e-05
+0.580935,0.14050268,-4.4473153382e-05
+0.584588,0.13921806,-4.4597938230e-05
+0.588242,0.13793343,-4.3320680765e-05
+0.591896,0.13664881,-4.3741148863e-05
+0.595549,0.13536417,-4.3253543805e-05
+0.599203,0.13407954,-4.2814891888e-05
+0.602857,0.13279492,-4.2550681911e-05
+0.606510,0.13151028,-4.2232567354e-05
+0.610164,0.13022566,-4.1973974716e-05
+0.613818,0.12894103,-4.1813849620e-05
+0.617471,0.12765639,-4.1270080678e-05
+0.621125,0.12637177,-4.1153248575e-05
+0.624779,0.12508714,-4.1005181019e-05
+0.628432,0.12380252,-4.0405019885e-05
+0.632086,0.12251788,-4.0560160247e-05
+0.635740,0.12123325,-4.0317316138e-05
+0.639393,0.11994863,-4.0037362390e-05
+0.643047,0.11866399,-3.9706374564e-05
+0.646701,0.11737937,-3.9562628221e-05
+0.650354,0.11609474,-3.9509237334e-05
+0.654008,0.11481010,-3.8953969732e-05
+0.657662,0.11352548,-3.8315046101e-05
+0.661315,0.11224085,-3.8909744479e-05
+0.664969,0.11095623,-3.8062803293e-05
+0.668623,0.10967159,-3.8675785374e-05
+0.672276,0.10838696,-3.7909601175e-05
+0.675930,0.10710234,-3.7989314126e-05
+0.679584,0.10581771,-3.7536017172e-05
+0.683237,0.10453308,-3.7370660006e-05
+0.686891,0.10324845,-3.7105727052e-05
+0.690545,0.10196382,-3.7202751017e-05
+0.694198,0.10067919,-3.6903797723e-05
+0.697852,0.09939456,-3.6424977785e-05
+0.701506,0.09810994,-3.6474963071e-05
+0.705160,0.09682531,-3.6291388791e-05
+0.708813,0.09554067,-3.5785806819e-05
+0.712467,0.09425605,-3.5959114352e-05
+0.716121,0.09297142,-3.5527977589e-05
+0.719774,0.09168680,-3.5196668704e-05
+0.723428,0.09040216,-3.6011960628e-05
+0.727082,0.08911753,-3.5420560832e-05
+0.730735,0.08783291,-3.5182161603e-05
+0.734389,0.08654827,-3.4242218011e-05
+0.738043,0.08526365,-3.4479078536e-05
+0.741696,0.08397902,-3.4734929093e-05
+0.745350,0.08269438,-3.4502002133e-05
+0.749004,0.08140976,-3.3691818611e-05
+0.752657,0.08012513,-3.3901118022e-05
+0.756311,0.07884051,-3.4054943232e-05
+0.759965,0.07755587,-3.3741382952e-05
+0.763618,0.07627124,-3.3581155593e-05
+0.767272,0.07498662,-3.3620320008e-05
+0.770926,0.07370198,-3.3054899813e-05
+0.774579,0.07241736,-3.3074774541e-05
+0.778233,0.07113273,-3.3193171508e-05
+0.781887,0.06984810,-3.2668199964e-05
+0.785540,0.06856347,-3.3149126999e-05
+0.789194,0.06727884,-3.2846335269e-05
+0.792848,0.06599422,-3.2566041437e-05
+0.796501,0.06470958,-3.2308423867e-05
+0.800155,0.06342495,-3.2467428825e-05
+0.803809,0.06214033,-3.2164620448e-05
+0.807462,0.06085570,-3.2314414586e-05
+0.811116,0.05957107,-3.2054742240e-05
+0.814770,0.05828644,-3.1300551370e-05
+0.818423,0.05700181,-3.1965069332e-05
+0.822077,0.05571719,-3.1448338296e-05
+0.825731,0.05443255,-3.1716274933e-05
+0.829384,0.05314793,-3.1363229180e-05
+0.833038,0.05186330,-3.1049676035e-05
+0.836692,0.05057866,-3.0674146653e-05
+0.840346,0.04929404,-3.1259522435e-05
+0.843999,0.04800941,-3.0552208526e-05
+0.847653,0.04672479,-3.0499452622e-05
+0.851307,0.04544015,-3.0838683335e-05
+0.854960,0.04415553,-3.0290157967e-05
+0.858614,0.04287090,-3.0792103651e-05
+0.862268,0.04158626,-3.0383350631e-05
+0.865921,0.04030163,-3.0075110414e-05
+0.869575,0.03901702,-3.0295932269e-05
+0.873229,0.03773239,-3.0475475476e-05
+0.876882,0.03644775,-2.9999190713e-05
+0.880536,0.03516312,-3.0092887558e-05
+0.884190,0.03387848,-3.0029543849e-05
+0.887843,0.03259388,-2.9724875708e-05
+0.891497,0.03130924,-2.9835388899e-05
+0.895151,0.03002461,-2.9809468753e-05
+0.898804,0.02873997,-2.9076348852e-05
+0.902458,0.02745534,-2.9543313398e-05
+0.906112,0.02617073,-2.9096304439e-05
+0.909765,0.02488610,-2.9511157577e-05
+0.913419,0.02360146,-2.9640789223e-05
+0.917073,0.02231683,-2.9011692369e-05
+0.920726,0.02103220,-2.8667384171e-05
+0.924380,0.01974759,-2.8242806520e-05
+0.928034,0.01846295,-2.8634736060e-05
+0.931687,0.01717832,-2.8469217175e-05
+0.935341,0.01589369,-2.8383330383e-05
+0.938995,0.01460905,-2.8041057935e-05
+0.942648,0.01332444,-2.8863798423e-05
+0.946302,0.01203981,-2.8387463717e-05
+0.949956,0.01075518,-2.8018279409e-05
+0.953610,0.00947054,-2.8021209367e-05
+0.957263,0.00818591,-2.8304778000e-05
+0.960917,0.00690130,-2.8203594540e-05
+0.964571,0.00561666,-2.7839390210e-05
+0.968224,0.00433203,-2.7751099044e-05
+0.971878,0.00304740,-2.7799602702e-05
+0.975532,0.00176276,-2.7622083354e-05
+0.979185,0.00047815,-2.7425578730e-05
+0.982839,-0.00080648,-2.7308230554e-05
+0.986493,-0.00209111,-2.7538898212e-05
+0.990146,-0.00337575,-2.7428263733e-05
+0.993800,-0.00466038,-2.7272224406e-05
+0.997454,-0.00594499,-2.7111483352e-05
+1.001107,-0.00722962,-2.7050170637e-05
+1.004761,-0.00851426,-2.6803866228e-05
+1.008415,-0.00979889,-2.7133805262e-05
+1.012068,-0.01108352,-2.7164733925e-05
+1.015722,-0.01236813,-2.6996377832e-05
+1.019376,-0.01365277,-2.6920969447e-05
+1.023029,-0.01493740,-2.6962048324e-05
+1.026683,-0.01622204,-2.6634052290e-05
+1.030337,-0.01750667,-2.6485644650e-05
+1.033990,-0.01879128,-2.6736783967e-05
+1.037644,-0.02007591,-2.6671233276e-05
+1.041298,-0.02136055,-2.6332851585e-05
+1.044951,-0.02264518,-2.6095360834e-05
+1.048605,-0.02392981,-2.6150269021e-05
+1.052259,-0.02521442,-2.6297040450e-05
+1.055912,-0.02649906,-2.6175544671e-05
+1.059566,-0.02778369,-2.6196946212e-05
+1.063220,-0.02906832,-2.6109749024e-05
+1.066873,-0.03035296,-2.5854369353e-05
+1.070527,-0.03163757,-2.5712095125e-05
+1.074181,-0.03292220,-2.5560198646e-05
+1.077835,-0.03420683,-2.5622712359e-05
+1.081488,-0.03549147,-2.6023346159e-05
+1.085142,-0.03677610,-2.5335985459e-05
+1.088796,-0.03806071,-2.5440301026e-05
+1.092449,-0.03934534,-2.5532133351e-05
+1.096103,-0.04062998,-2.5307515868e-05
+1.099757,-0.04191461,-2.5541805545e-05
+1.103410,-0.04319925,-2.5453961483e-05
+1.107064,-0.04448386,-2.4838380014e-05
+1.110718,-0.04576849,-2.4944978666e-05
+1.114371,-0.04705312,-2.5705590711e-05
+1.118025,-0.04833776,-2.5773412596e-05
+1.121679,-0.04962239,-2.4951689983e-05
+1.125332,-0.05090700,-2.5179822466e-05
+1.128986,-0.05219163,-2.5224666054e-05
+1.132640,-0.05347627,-2.4796464006e-05
+1.136293,-0.05476090,-2.5045577085e-05
+1.139947,-0.05604553,-2.4941525500e-05
+1.143601,-0.05733014,-2.4562478741e-05
+1.147254,-0.05861478,-2.4550644752e-05
+1.150908,-0.05989941,-2.4811030562e-05
+1.154562,-0.06118405,-2.4528253875e-05
+1.158215,-0.06246868,-2.4213233372e-05
+1.161869,-0.06375329,-2.4877304230e-05
+1.165523,-0.06503792,-2.4341816227e-05
+1.169176,-0.06632256,-2.4301010844e-05
+1.172830,-0.06760719,-2.4559815142e-05
+1.176484,-0.06889182,-2.4564326613e-05
+1.180137,-0.07017643,-2.4157159861e-05
+1.183791,-0.07146107,-2.4288211301e-05
+1.187445,-0.07274570,-2.4047714488e-05
+1.191098,-0.07403033,-2.4147073858e-05
+1.194752,-0.07531497,-2.4140783484e-05
+1.198406,-0.07659958,-2.3993707644e-05
+1.202059,-0.07788421,-2.3624960926e-05
+1.205713,-0.07916884,-2.3943948288e-05
+1.209367,-0.08045348,-2.3615588388e-05
+1.213020,-0.08173811,-2.3996361730e-05
+1.216674,-0.08302272,-2.3582412313e-05
+1.220328,-0.08430735,-2.3647675241e-05
+1.223981,-0.08559199,-2.3727863834e-05
+1.227635,-0.08631944,-2.3855806950e-05
+1.231289,-0.08503480,-2.3371533768e-05
+1.234942,-0.08375017,-2.3574062407e-05
+1.238596,-0.08246554,-2.2954166860e-05
+1.242250,-0.08118093,-2.3613207796e-05
+1.245904,-0.07989629,-2.3599718571e-05
+1.249557,-0.07861166,-2.3414384414e-05
+1.253211,-0.07732703,-2.3083196818e-05
+1.256865,-0.07604239,-2.2933181506e-05
+1.260518,-0.07475778,-2.3049426190e-05
+1.264172,-0.07347315,-2.3178976978e-05
+1.267826,-0.07218852,-2.3090452747e-05
+1.271479,-0.07090388,-2.3478874422e-05
+1.275133,-0.06961925,-2.3365179182e-05
+1.278787,-0.06833464,-2.2866905460e-05
+1.282440,-0.06705001,-2.2636682528e-05
+1.286094,-0.06576537,-2.3030421888e-05
+1.289748,-0.06448074,-2.2871369366e-05
+1.293401,-0.06319610,-2.2938725121e-05
+1.297055,-0.06191150,-2.2647596149e-05
+1.300709,-0.06062686,-2.2976783667e-05
+1.304362,-0.05934223,-2.2456611357e-05
+1.308016,-0.05805759,-2.2655843792e-05
+1.311670,-0.05677296,-2.2947776601e-05
+1.315323,-0.05548835,-2.2537289863e-05
+1.318977,-0.05420372,-2.2130819927e-05
+1.322631,-0.05291908,-2.2425057224e-05
+1.326284,-0.05163445,-2.1739418350e-05
+1.329938,-0.05034982,-2.2330620755e-05
+1.333592,-0.04906521,-2.2255378845e-05
+1.337245,-0.04778057,-2.2133944899e-05
+1.340899,-0.04649594,-2.2333633951e-05
+1.344553,-0.04521131,-2.1850371510e-05
+1.348207,-0.04392667,-2.1947661835e-05
+1.351860,-0.04264206,-2.2227520455e-05
+1.355514,-0.04135743,-2.1575913813e-05
+1.359168,-0.04007280,-2.2234324523e-05
+1.362821,-0.03878816,-2.1583799968e-05
+1.366475,-0.03750353,-2.2239064302e-05
+1.370129,-0.03621892,-2.1913715220e-05
+1.373782,-0.03493428,-2.1923228073e-05
+1.377436,-0.03364965,-2.1578035179e-05
+1.381090,-0.03236502,-2.1322926624e-05
+1.384743,-0.03108038,-2.1778014373e-05
+1.388397,-0.02979577,-2.1681682468e-05
+1.392051,-0.02851114,-2.1883397757e-05
+1.395704,-0.02722651,-2.1529224731e-05
+1.399358,-0.02594187,-2.1701022098e-05
+1.403012,-0.02465724,-2.1521509807e-05
+1.406665,-0.02337263,-2.1458843888e-05
+1.410319,-0.02208800,-2.1257918166e-05
+1.413973,-0.02080336,-2.1508705507e-05
+1.417626,-0.01951873,-2.1286416295e-05
+1.421280,-0.01823409,-2.1462016425e-05
+1.424934,-0.01694949,-2.1403952349e-05
+1.428587,-0.01566485,-2.1344960770e-05
+1.432241,-0.01438022,-2.1450008826e-05
+1.435895,-0.01309558,-2.0725091383e-05
+1.439548,-0.01181095,-2.1711433915e-05
+1.443202,-0.01052634,-2.1184519371e-05
+1.446856,-0.00924171,-2.0946793176e-05
+1.450509,-0.00795707,-2.1142446400e-05
+1.454163,-0.00667244,-2.1191984582e-05
+1.457817,-0.00538781,-2.1364371746e-05
+1.461471,-0.00410320,-2.0782311193e-05
+1.465124,-0.00281856,-2.1136420008e-05
+1.468778,-0.00153393,-2.0933163636e-05
+1.472432,-0.00024930,-2.1027455034e-05
+1.476085,0.00103534,-2.0708213204e-05
+1.479739,0.00231995,-2.0800830340e-05
+1.483393,0.00360458,-2.1002188897e-05
+1.487046,0.00488921,-2.0848542053e-05
+1.490700,0.00617385,-2.0671493591e-05
+1.494354,0.00745848,-2.0504650042e-05
+1.498007,0.00874309,-2.0639380578e-05
+1.501661,0.01002773,-2.0524543796e-05
+1.505315,0.01131236,-2.0887071486e-05
+1.508968,0.01259699,-2.0680238281e-05
+1.512622,0.01388163,-2.0217116928e-05
+1.516276,0.01516624,-2.0256797416e-05
+1.519929,0.01645087,-2.0708926668e-05
+1.523583,0.01773550,-2.0772693699e-05
+1.527237,0.01902014,-2.0670870499e-05
+1.530890,0.02030477,-2.0350717813e-05
+1.534544,0.02158938,-2.0042891405e-05
+1.538198,0.02287401,-2.0586115736e-05
+1.541851,0.02415865,-2.0448279254e-05
+1.545505,0.02544328,-2.0485089239e-05
+1.549159,0.02672791,-2.0647131175e-05
+1.552812,0.02801252,-2.0089863495e-05
+1.556466,0.02929716,-2.0371479614e-05
+1.560120,0.03058179,-2.0320868859e-05
+1.563773,0.03186643,-2.0436133719e-05
+1.567427,0.03315106,-2.0002868455e-05
+1.571081,0.03443567,-2.0265506433e-05
+1.574734,0.03572030,-2.0328381634e-05
+1.578388,0.03700494,-2.0422637359e-05
+1.582042,0.03828957,-2.0032481966e-05
+1.585695,0.03957420,-1.9949776034e-05
+1.589349,0.04085881,-2.0224998327e-05
+1.593003,0.04214345,-1.9195392529e-05
+1.596656,0.04342808,-1.9837240173e-05
+1.600310,0.04471271,-1.9872040567e-05
+1.603964,0.04599734,-1.9488954413e-05
+1.607617,0.04728197,-1.9832487314e-05
+1.611271,0.04856659,-1.9805429193e-05
+1.614925,0.04985122,-1.9528879857e-05
+1.618578,0.05113586,-1.9454982826e-05
+1.622232,0.05242048,-1.9816887424e-05
+1.625886,0.05370511,-1.9516501257e-05
+1.629540,0.05498973,-1.9649036702e-05
+1.633193,0.05627437,-1.9801556273e-05
+1.636847,0.05755900,-1.9371644289e-05
+1.640501,0.05884362,-1.9801835713e-05
+1.644154,0.06012826,-1.9615994996e-05
+1.647808,0.06141288,-1.9696127702e-05
+1.651462,0.06269751,-1.9169851708e-05
+1.655115,0.06398215,-2.0229057937e-05
+1.658769,0.06526677,-1.9544787725e-05
+1.662423,0.06655140,-1.8953548458e-05
+1.666076,0.06783602,-1.9263057451e-05
+1.669730,0.06912066,-1.9699942356e-05
+1.673384,0.07040529,-1.9302283700e-05
+1.677037,0.07168991,-1.9156231680e-05
+1.680691,0.07297455,-1.9459413437e-05
+1.684345,0.07425917,-1.9093528900e-05
+1.687998,0.07554380,-1.8754902253e-05
+1.691652,0.07682844,-1.9290374798e-05
+1.695306,0.07811306,-1.8949690996e-05
+1.698959,0.07939769,-1.8822978606e-05
+1.702613,0.08068231,-1.8728120004e-05
+1.706267,0.08196695,-1.9364168376e-05
+1.709920,0.08325158,-1.8674417572e-05
+1.713574,0.08453620,-1.8781874758e-05
+1.717228,0.08582083,-1.9326780486e-05
+1.720881,0.08710546,-1.9053089762e-05
+1.724535,0.08839009,-1.8741429675e-05
+1.728189,0.08967472,-1.8920731494e-05
+1.731843,0.09095935,-1.8312463031e-05
+1.735496,0.09224398,-1.8373139574e-05
+1.739150,0.09352860,-1.8352320696e-05
+1.742804,0.09481323,-1.8634421971e-05
+1.746457,0.09609787,-1.8408037475e-05
+1.750111,0.09738249,-1.8430529427e-05
+1.753765,0.09866712,-1.8583203581e-05
+1.757418,0.09995174,-1.8479984371e-05
+1.761072,0.10123638,-1.8183201197e-05
+1.764726,0.10252101,-1.8319823601e-05
+1.768379,0.10380563,-1.8395865780e-05
+1.772033,0.10509027,-1.8355237574e-05
+1.775687,0.10637489,-1.7953996140e-05
+1.779340,0.10765952,-1.8239110611e-05
+1.782994,0.10894416,-1.7569692341e-05
+1.786648,0.11022878,-1.7934528087e-05
+1.790301,0.11151341,-1.7956947503e-05
+1.793955,0.11279803,-1.7877749435e-05
+1.797609,0.11408267,-1.7714700325e-05
+1.801262,0.11536730,-1.7759889944e-05
+1.804916,0.11665192,-1.7431757163e-05
+1.808570,0.11793656,-1.7656736134e-05
+1.812223,0.11922118,-1.7649075909e-05
+1.815877,0.12050581,-1.7116452464e-05
+1.819531,0.12179044,-1.7549984088e-05
+1.823184,0.12307507,-1.7330256211e-05
+1.826838,0.12435970,-1.7483775821e-05
+1.830492,0.12564432,-1.7400943843e-05
+1.834145,0.12692896,-1.6948975121e-05
+1.837799,0.12821359,-1.7230625725e-05
+1.841453,0.12949821,-1.7001637086e-05
+1.845107,0.13078284,-1.6904287305e-05
+1.848760,0.13206747,-1.6922452098e-05
+1.852414,0.13335210,-1.6694073471e-05
+1.856068,0.13463673,-1.6348790205e-05
+1.859721,0.13592135,-1.6268345954e-05
+1.863375,0.13720599,-1.5885472650e-05
+1.867029,0.13849061,-1.6466115787e-05
+1.870682,0.13977524,-1.6129483272e-05
+1.874336,0.14105988,-1.5570585327e-05
+1.877990,0.14234450,-1.5654516039e-05
+1.881643,0.14362913,-1.5500681316e-05
+1.885297,0.14491375,-1.5483011192e-05
+1.888951,0.14619839,-1.5392027889e-05
+1.892604,0.14748302,-1.5332646283e-05
+1.896258,0.14876764,-1.5140610321e-05
+1.899912,0.15005227,-1.5478052618e-05
+1.903565,0.15133690,-1.4779196824e-05
+1.907219,0.15262153,-1.4730889368e-05
+1.910873,0.15390616,-1.4551674353e-05
+1.914526,0.15519079,-1.3962780005e-05
+1.918180,0.15647542,-1.4335958523e-05
+1.921834,0.15776005,-1.4078424190e-05
+1.925487,0.15904468,-1.3667017084e-05
+1.929141,0.16032930,-1.3600586454e-05
+1.932795,0.16161393,-1.3326655531e-05
+1.936448,0.16289856,-1.3134857390e-05
+1.940102,0.16418319,-1.2751126740e-05
+1.943756,0.16546782,-1.2443733168e-05
+1.947409,0.16675245,-1.2113930881e-05
+1.951063,0.16803708,-1.1603037170e-05
+1.954717,0.16932170,-1.1196407894e-05
+1.958370,0.17060634,-1.1189239959e-05
+1.962024,0.17189097,-1.0972392099e-05
+1.965678,0.17317559,-1.0758285129e-05
+1.969331,0.17446022,-1.0158902860e-05
+1.972985,0.17574485,-9.6498112399e-06
+1.976639,0.17702948,-9.5995381904e-06
+1.980292,0.17831411,-9.4643474704e-06
+1.983946,0.17959874,-8.4878471733e-06
+1.987600,0.18088336,-8.3615212431e-06
+1.991253,0.18216799,-7.5850946740e-06
+1.994907,0.18345263,-7.4613051081e-06
+1.998561,0.18473725,-7.1506896511e-06
+2.002214,0.18602188,-6.5418724157e-06
+2.005868,0.18730651,-6.2412615072e-06
+2.009522,0.18859114,-5.5819886945e-06
+2.013176,0.18987577,-4.8477685728e-06
+2.016829,0.19116040,-4.2515965944e-06
+2.020483,0.19244503,-3.7134678825e-06
+2.024137,0.19372965,-2.7698371678e-06
+2.027790,0.19501428,-2.1219714548e-06
+2.031444,0.19629891,-1.7666998422e-06
+2.035098,0.19758354,-1.5804430872e-06
+2.038751,0.19886817,-4.2467404316e-07
+2.042405,0.20015280,7.8695045994e-07
+2.046059,0.20143743,1.1604612587e-06
+2.049712,0.20272206,2.0201733753e-06
+2.053366,0.20400669,2.7143498859e-06
+2.057020,0.20529131,3.9549697876e-06
+2.060673,0.20657594,4.4754649402e-06
+2.064327,0.20786057,5.5407683137e-06
+2.067981,0.20914520,6.1826522259e-06
+2.071634,0.21042983,7.1772013777e-06
+2.075288,0.21171446,8.2729179365e-06
+2.078942,0.21299909,8.7012799195e-06
+2.082595,0.21428372,9.7223889566e-06
+2.086249,0.21556834,1.0910652494e-05
+2.089903,0.21685297,1.1906511447e-05
+2.093557,0.21813760,1.3032000857e-05
+2.097210,0.21942223,1.3846370035e-05
+2.100864,0.22070686,1.5288844351e-05
+2.104517,0.22199149,1.6569582332e-05
+2.108171,0.22327612,1.7436194909e-05
+2.111825,0.22456075,1.8032037207e-05
+2.115479,0.22584538,1.9512717520e-05
+2.119132,0.22713000,2.1130400750e-05
+2.122786,0.22841463,2.1665598612e-05
+2.126439,0.22969926,2.2871554867e-05
+2.130093,0.23098389,2.4004511866e-05
+2.133747,0.23226852,2.5483349063e-05
+2.137401,0.23355315,2.6723309011e-05
+2.141054,0.23483778,2.7478161024e-05
+2.144708,0.23612241,2.9387100462e-05
+2.148362,0.23740704,2.9852564355e-05
+2.152015,0.23869166,3.1348332052e-05
+2.155669,0.23997629,3.2282220713e-05
+2.159323,0.24126092,3.3403476904e-05
+2.162976,0.24254555,3.3983173513e-05
+2.166630,0.24383018,3.5050781970e-05
+2.170284,0.24511481,3.6802804520e-05
+2.173937,0.24639944,3.7021564464e-05
+2.177591,0.24768407,3.8597425626e-05
+2.181245,0.24896870,3.9475844843e-05
+2.184898,0.25025332,3.9992908828e-05
+2.188552,0.25153795,4.1441454723e-05
+2.192206,0.25282258,4.1947153228e-05
+2.195859,0.25410721,4.3031832499e-05
+2.199513,0.25539184,4.3641658691e-05
+2.203167,0.25667647,4.4503337665e-05
+2.206820,0.25796110,4.5358105550e-05
+2.210474,0.25924573,4.6012356766e-05
+2.214128,0.26053035,4.6167349678e-05
+2.217782,0.26181498,4.7197786662e-05
+2.221435,0.26309961,4.7745641374e-05
+2.225089,0.26438424,4.7703837142e-05
+2.228742,0.26566887,4.8664949210e-05
+2.232396,0.26695350,4.8672882930e-05
+2.236050,0.26823813,4.9065877909e-05
+2.239704,0.26952276,4.9647117979e-05
+2.243357,0.27080739,4.9461108409e-05
+2.247011,0.27209201,5.0247445587e-05
+2.250664,0.27337664,5.0125975969e-05
+2.254318,0.27466127,5.0391641412e-05
+2.257972,0.27594590,5.0837532610e-05
+2.261626,0.27723053,5.0164983422e-05
+2.265279,0.27851516,5.0836329234e-05
+2.268933,0.27979979,5.0636887516e-05
+2.272587,0.28108442,5.0922553733e-05
+2.276240,0.28236904,5.0594536295e-05
+2.279894,0.28365368,5.0108258280e-05
+2.283548,0.28493830,5.0483939867e-05
+2.287201,0.28622293,5.0425535707e-05
+2.290855,0.28750756,4.9929706787e-05
+2.294509,0.28879219,4.9684993403e-05
+2.298162,0.29007682,5.0018827950e-05
+2.301816,0.29136145,4.9413282541e-05
+2.305470,0.29264608,4.9201288614e-05
+2.309123,0.29393071,4.8448541319e-05
+2.312777,0.29521533,4.8258212915e-05
+2.316431,0.29649996,4.8105702857e-05
+2.320084,0.29778459,4.7769276057e-05
+2.323738,0.29906922,4.7399635132e-05
+2.327392,0.30035385,4.7119762242e-05
+2.331045,0.30163848,4.6231499602e-05
+2.334699,0.30292311,4.6040486272e-05
+2.338353,0.30420773,4.5405531878e-05
+2.342006,0.30549237,4.6056991072e-05
+2.345660,0.30677699,4.5102837655e-05
+2.349314,0.30806162,4.4671705648e-05
+2.352967,0.30934625,4.4315563461e-05
+2.356621,0.31063088,4.3793317349e-05
+2.360275,0.31191551,4.3491327077e-05
+2.363928,0.31320014,4.2909383056e-05
+2.367582,0.31448477,4.2737457265e-05
+2.371236,0.31576939,4.2097765471e-05
+2.374890,0.31705402,4.1617618490e-05
+2.378543,0.31833866,4.1450858178e-05
+2.382197,0.31962328,4.1045387092e-05
+2.385850,0.32090791,4.0501432650e-05
+2.389504,0.32219254,4.0029756864e-05
+2.393158,0.32347717,3.9370951370e-05
+2.396812,0.32476180,3.9129967023e-05
+2.400465,0.32604643,3.8502677611e-05
+2.404119,0.32733105,3.8495792684e-05
+2.407773,0.32861568,3.7818774833e-05
+2.411426,0.32990031,3.7328132797e-05
+2.415080,0.33118494,3.7211110437e-05
+2.418734,0.33246957,3.6823487841e-05
+2.422387,0.33375420,3.6148829178e-05
+2.426041,0.33503883,3.6011363697e-05
+2.429695,0.33632345,3.5680737359e-05
+2.433348,0.33760809,3.4520616408e-05
+2.437002,0.33889272,3.4130180386e-05
+2.440656,0.34017734,3.4306705641e-05
+2.444309,0.34146197,3.3817207525e-05
+2.447963,0.34274660,3.3435416308e-05
+2.451617,0.34403123,3.2938096249e-05
diff --git a/demo_data/ec_Nernst_metadata.json b/demo_data/ec_Nernst_metadata.json
new file mode 100644
index 0000000000000000000000000000000000000000..00502eb961ec5f72defd6bc8958af19f33c1947f
--- /dev/null
+++ b/demo_data/ec_Nernst_metadata.json
@@ -0,0 +1,36 @@
+{
+ "mechanism": "Nernst",
+ "n_scans": 3,
+ "scan_rates_Vs": [
+ 0.011645200848579408,
+ 0.35159897804260254,
+ 10.0
+ ],
+ "physical_params": {
+ "E0_V": 0.25,
+ "T_K": 298.15,
+ "A_cm2": 0.0707,
+ "C_mM": 1.0,
+ "D_cm2s": 1e-05,
+ "n_electrons": 1
+ },
+ "true_params_dimless": {
+ "sigma": 8.719717822841444,
+ "C_A_bulk": 1.0,
+ "C_B_bulk": 0.0,
+ "dA": 1.0,
+ "dB": 1.2541572204674802,
+ "theta_i": 3.6881732361108934,
+ "theta_v": -13.090140187264856,
+ "cycles": 1.0,
+ "kinetics": "Nernst",
+ "K0": 1000000.0,
+ "alpha": 0.5,
+ "E0_offset": 0.0
+ },
+ "csv_files": [
+ "ec_Nernst_12mVs.csv",
+ "ec_Nernst_352mVs.csv",
+ "ec_Nernst_10000mVs.csv"
+ ]
+}
\ No newline at end of file
diff --git a/demo_data/tpd_DiffLimited_1.csv b/demo_data/tpd_DiffLimited_1.csv
new file mode 100644
index 0000000000000000000000000000000000000000..f2564d9fcaa7ff75160bb14a1378cadf1949face
--- /dev/null
+++ b/demo_data/tpd_DiffLimited_1.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,0.00000000e+00
+4.6546,366.1553,0.00000000e+00
+9.3093,367.6273,2.72774378e-05
+13.9640,369.0992,1.52372604e-06
+18.6186,370.5711,4.51655760e-05
+23.2733,372.0431,2.01680286e-05
+27.9279,373.5150,1.24455837e-05
+32.5825,374.9869,0.00000000e+00
+37.2372,376.4588,0.00000000e+00
+41.8919,377.9308,0.00000000e+00
+46.5465,379.4027,0.00000000e+00
+51.2011,380.8746,1.47543760e-04
+55.8558,382.3466,0.00000000e+00
+60.5104,383.8185,3.55035700e-05
+65.1651,385.2904,2.78359257e-05
+69.8198,386.7624,4.04534876e-05
+74.4744,388.2343,3.52926218e-05
+79.1290,389.7062,0.00000000e+00
+83.7837,391.1781,2.02140677e-06
+88.4383,392.6501,0.00000000e+00
+93.0930,394.1220,0.00000000e+00
+97.7477,395.5939,5.35329636e-05
+102.4023,397.0659,0.00000000e+00
+107.0569,398.5378,0.00000000e+00
+111.7116,400.0097,0.00000000e+00
+116.3662,401.4816,8.81683718e-06
+121.0209,402.9536,0.00000000e+00
+125.6755,404.4255,7.61190458e-05
+130.3302,405.8974,3.76420066e-05
+134.9848,407.3694,5.17627159e-05
+139.6394,408.8413,6.41317747e-05
+144.2941,410.3132,4.84505072e-05
+148.9488,411.7852,6.82624377e-05
+153.6034,413.2571,0.00000000e+00
+158.2581,414.7290,1.20971090e-05
+162.9127,416.2009,0.00000000e+00
+167.5673,417.6729,9.57841912e-05
+172.2220,419.1448,1.42368026e-05
+176.8767,420.6167,2.99420044e-05
+181.5313,422.0887,0.00000000e+00
+186.1860,423.5606,0.00000000e+00
+190.8406,425.0325,0.00000000e+00
+195.4952,426.5044,0.00000000e+00
+200.1498,427.9763,0.00000000e+00
+204.8046,429.4483,4.98862792e-05
+209.4592,430.9202,0.00000000e+00
+214.1138,432.3922,1.33620679e-05
+218.7685,433.8641,8.66589119e-07
+223.4231,435.3360,0.00000000e+00
+228.0777,436.8079,0.00000000e+00
+232.7325,438.2799,4.02608057e-05
+237.3871,439.7518,1.42636748e-06
+242.0417,441.2237,0.00000000e+00
+246.6964,442.6956,0.00000000e+00
+251.3510,444.1676,0.00000000e+00
+256.0056,445.6395,0.00000000e+00
+260.6603,447.1115,6.32717129e-05
+265.3150,448.5834,0.00000000e+00
+269.9696,450.0553,8.17148757e-05
+274.6242,451.5272,0.00000000e+00
+279.2789,452.9991,0.00000000e+00
+283.9335,454.4711,1.10006418e-04
+288.5882,455.9430,0.00000000e+00
+293.2429,457.4149,0.00000000e+00
+297.8975,458.8869,0.00000000e+00
+302.5521,460.3588,0.00000000e+00
+307.2068,461.8307,1.42068993e-05
+311.8615,463.3027,4.78162474e-05
+316.5161,464.7746,5.37416709e-05
+321.1708,466.2465,0.00000000e+00
+325.8254,467.7184,8.35597348e-06
+330.4800,469.1904,0.00000000e+00
+335.1347,470.6623,2.58864202e-05
+339.7894,472.1342,0.00000000e+00
+344.4440,473.6062,7.46475489e-05
+349.0986,475.0781,0.00000000e+00
+353.7533,476.5500,3.56468081e-05
+358.4079,478.0219,9.78465050e-06
+363.0625,479.4939,0.00000000e+00
+367.7173,480.9658,1.03593869e-04
+372.3719,482.4377,0.00000000e+00
+377.0265,483.9097,1.07273328e-04
+381.6812,485.3816,0.00000000e+00
+386.3358,486.8535,1.23484033e-05
+390.9904,488.3254,0.00000000e+00
+395.6452,489.7974,0.00000000e+00
+400.2998,491.2693,9.36340984e-06
+404.9544,492.7412,0.00000000e+00
+409.6091,494.2132,0.00000000e+00
+414.2637,495.6851,0.00000000e+00
+418.9183,497.1570,0.00000000e+00
+423.5730,498.6290,0.00000000e+00
+428.2277,500.1009,1.29566484e-04
+432.8823,501.5728,0.00000000e+00
+437.5369,503.0447,1.99946680e-06
+442.1916,504.5167,2.38492594e-05
+446.8462,505.9886,0.00000000e+00
+451.5009,507.4605,2.09992759e-05
+456.1556,508.9325,0.00000000e+00
+460.8102,510.4044,0.00000000e+00
+465.4648,511.8763,0.00000000e+00
+470.1196,513.3483,0.00000000e+00
+474.7742,514.8202,3.68747169e-05
+479.4288,516.2921,0.00000000e+00
+484.0835,517.7640,0.00000000e+00
+488.7381,519.2360,0.00000000e+00
+493.3927,520.7079,5.77806823e-05
+498.0473,522.1798,0.00000000e+00
+502.7020,523.6517,1.74912711e-05
+507.3566,525.1237,1.91175950e-05
+512.0112,526.5956,1.12048165e-05
+516.6659,528.0675,0.00000000e+00
+521.3207,529.5395,0.00000000e+00
+525.9753,531.0114,0.00000000e+00
+530.6300,532.4833,5.00966999e-05
+535.2846,533.9553,0.00000000e+00
+539.9392,535.4272,0.00000000e+00
+544.5939,536.8991,4.24010941e-05
+549.2485,538.3710,0.00000000e+00
+553.9031,539.8430,0.00000000e+00
+558.5578,541.3149,0.00000000e+00
+563.2124,542.7868,6.80060548e-05
+567.8670,544.2587,0.00000000e+00
+572.5218,545.7307,1.54244117e-06
+577.1765,547.2026,5.71103155e-05
+581.8311,548.6746,1.65077654e-05
+586.4857,550.1465,0.00000000e+00
+591.1404,551.6184,0.00000000e+00
+595.7950,553.0903,4.05565370e-05
+600.4496,554.5623,1.12907903e-04
+605.1043,556.0342,0.00000000e+00
+609.7589,557.5061,0.00000000e+00
+614.4135,558.9780,3.92151924e-06
+619.0682,560.4500,7.66864832e-05
+623.7228,561.9219,7.34008427e-05
+628.3776,563.3939,2.93569610e-06
+633.0323,564.8658,6.94088085e-05
+637.6869,566.3377,1.52368986e-04
+642.3415,567.8096,6.16639081e-05
+646.9961,569.2816,1.73972425e-04
+651.6508,570.7535,8.99301667e-05
+656.3054,572.2254,1.27177598e-04
+660.9600,573.6973,2.02598079e-04
+665.6147,575.1693,1.92457592e-04
+670.2693,576.6412,1.18016149e-04
+674.9239,578.1131,2.86289229e-04
+679.5786,579.5850,2.84305279e-04
+684.2334,581.0570,3.58847319e-04
+688.8880,582.5289,2.64173083e-04
+693.5427,584.0009,4.19558724e-04
+698.1973,585.4728,3.96191521e-04
+702.8519,586.9447,5.41878224e-04
+707.5066,588.4166,4.25105565e-04
+712.1612,589.8885,4.88181540e-04
+716.8158,591.3605,5.65385679e-04
+721.4704,592.8324,5.79453481e-04
+726.1251,594.3043,7.29985302e-04
+730.7797,595.7762,7.82056130e-04
+735.4343,597.2482,7.26067752e-04
+740.0892,598.7202,8.84616398e-04
+744.7438,600.1921,1.01726979e-03
+749.3984,601.6640,1.09390786e-03
+754.0531,603.1359,1.12543837e-03
+758.7077,604.6078,1.27954513e-03
+763.3623,606.0798,1.38350320e-03
+768.0170,607.5517,1.47467968e-03
+772.6716,609.0236,1.62155449e-03
+777.3262,610.4955,1.69800641e-03
+781.9809,611.9675,1.92079064e-03
+786.6355,613.4394,1.98880327e-03
+791.2901,614.9113,2.21681176e-03
+795.9449,616.3833,2.18228530e-03
+800.5996,617.8552,2.44649057e-03
+805.2542,619.3271,2.61748186e-03
+809.9088,620.7991,2.78139859e-03
+814.5635,622.2710,2.88523571e-03
+819.2181,623.7429,3.11754877e-03
+823.8727,625.2148,3.22043034e-03
+828.5274,626.6868,3.35607491e-03
+833.1820,628.1587,3.54515878e-03
+837.8366,629.6306,3.66181647e-03
+842.4913,631.1025,3.73795442e-03
+847.1461,632.5745,3.79856047e-03
+851.8007,634.0464,3.86986719e-03
+856.4554,635.5184,3.95385362e-03
+861.1100,636.9903,3.94777348e-03
+865.7646,638.4622,3.87182180e-03
+870.4192,639.9341,3.89501592e-03
+875.0739,641.4061,3.72738368e-03
+879.7285,642.8780,3.68716824e-03
+884.3831,644.3499,3.55257397e-03
+889.0378,645.8218,3.39408312e-03
+893.6924,647.2938,3.17361532e-03
+898.3470,648.7657,2.94255349e-03
+903.0019,650.2377,2.83093215e-03
+907.6565,651.7096,2.43764254e-03
+912.3111,653.1815,2.23812321e-03
+916.9658,654.6534,2.03784043e-03
+921.6204,656.1254,1.72534387e-03
+926.2750,657.5973,1.51912752e-03
+930.9297,659.0692,1.36972265e-03
+935.5843,660.5411,1.15464057e-03
+940.2389,662.0131,9.55322525e-04
+944.8936,663.4850,8.10053258e-04
+949.5482,664.9569,7.21631688e-04
+954.2028,666.4288,7.73917709e-04
+958.8576,667.9008,5.65111986e-04
+963.5123,669.3727,5.46837575e-04
+968.1669,670.8447,5.97090926e-04
+972.8215,672.3166,4.73984459e-04
+977.4762,673.7885,4.98363341e-04
+982.1308,675.2604,5.11921884e-04
+986.7854,676.7324,5.45808696e-04
+991.4401,678.2043,5.18358545e-04
+996.0947,679.6762,6.54335774e-04
+1000.7493,681.1481,5.89856005e-04
+1005.4040,682.6201,6.26415131e-04
+1010.0586,684.0920,6.08645089e-04
+1014.7134,685.5640,7.16318318e-04
+1019.3680,687.0359,5.85529546e-04
+1024.0227,688.5078,5.93492412e-04
+1028.6773,689.9797,6.80972647e-04
+1033.3319,691.4517,6.68579829e-04
+1037.9866,692.9236,7.28370273e-04
+1042.6412,694.3955,7.44271325e-04
+1047.2958,695.8674,7.72183354e-04
+1051.9505,697.3394,7.43801938e-04
+1056.6051,698.8113,7.99980480e-04
+1061.2597,700.2832,8.52352881e-04
+1065.9146,701.7552,8.05929245e-04
+1070.5692,703.2271,8.79606348e-04
+1075.2238,704.6990,9.28157882e-04
+1079.8785,706.1710,1.02186878e-03
+1084.5331,707.6429,1.00291253e-03
+1089.1877,709.1148,9.72422597e-04
+1093.8423,710.5867,9.89730470e-04
+1098.4970,712.0587,1.05514587e-03
+1103.1516,713.5306,1.08722027e-03
+1107.8062,715.0025,1.15245185e-03
+1112.4609,716.4744,1.02887431e-03
+1117.1155,717.9464,1.18944480e-03
+1121.7703,719.4183,1.18445081e-03
+1126.4250,720.8903,1.19035761e-03
+1131.0796,722.3622,1.17098738e-03
+1135.7342,723.8341,1.23187597e-03
+1140.3889,725.3060,1.28127646e-03
+1145.0435,726.7780,1.35005929e-03
+1149.6981,728.2499,1.38539274e-03
+1154.3528,729.7218,1.32338668e-03
+1159.0074,731.1937,1.45546533e-03
+1163.6620,732.6656,1.40029902e-03
+1168.3167,734.1376,1.47926877e-03
+1172.9713,735.6095,1.37846323e-03
+1177.6261,737.0815,1.49720535e-03
+1182.2807,738.5534,1.49424816e-03
+1186.9354,740.0253,1.54906115e-03
+1191.5900,741.4973,1.59266370e-03
+1196.2446,742.9692,1.65291410e-03
+1200.8993,744.4411,1.64739380e-03
+1205.5539,745.9130,1.62408047e-03
+1210.2085,747.3849,1.69240218e-03
+1214.8632,748.8569,1.66272116e-03
+1219.5178,750.3288,1.69877301e-03
+1224.1724,751.8007,1.90472300e-03
+1228.8271,753.2726,1.82256440e-03
+1233.4819,754.7446,1.90763641e-03
+1238.1365,756.2166,1.92250987e-03
+1242.7911,757.6885,1.96634745e-03
+1247.4458,759.1604,1.86027703e-03
+1252.1004,760.6323,2.01659626e-03
+1256.7550,762.1042,2.09198310e-03
+1261.4097,763.5762,2.10902537e-03
+1266.0643,765.0481,2.07853154e-03
+1270.7189,766.5200,2.15296377e-03
+1275.3736,767.9919,2.09327298e-03
+1280.0282,769.4639,2.23461352e-03
+1284.6830,770.9359,2.15155329e-03
+1289.3377,772.4078,2.12923251e-03
+1293.9923,773.8797,2.23905640e-03
+1298.6469,775.3516,2.22180062e-03
+1303.3016,776.8235,2.33226921e-03
+1307.9562,778.2955,2.33816379e-03
+1312.6108,779.7674,2.34308187e-03
+1317.2655,781.2393,2.39836052e-03
+1321.9201,782.7112,2.37812195e-03
+1326.5747,784.1832,2.54881964e-03
+1331.2293,785.6551,2.47784983e-03
+1335.8840,787.1270,2.56318902e-03
+1340.5388,788.5990,2.55751144e-03
+1345.1934,790.0709,2.47982307e-03
+1349.8481,791.5428,2.61303736e-03
+1354.5027,793.0148,2.62046652e-03
+1359.1573,794.4867,2.68299528e-03
+1363.8120,795.9586,2.64876965e-03
+1368.4666,797.4305,2.69677071e-03
+1373.1212,798.9025,2.74697598e-03
+1377.7759,800.3744,2.78544542e-03
+1382.4305,801.8463,2.78393761e-03
+1387.0851,803.3182,2.84636416e-03
+1391.7398,804.7902,2.84537999e-03
+1396.3946,806.2621,2.80466187e-03
+1401.0492,807.7341,2.95788422e-03
+1405.7038,809.2060,3.02904821e-03
+1410.3585,810.6779,2.99704587e-03
+1415.0131,812.1498,2.96741328e-03
+1419.6677,813.6218,3.02967429e-03
+1424.3224,815.0937,3.09701706e-03
+1428.9770,816.5656,3.10565671e-03
+1433.6316,818.0375,3.13399849e-03
+1438.2863,819.5095,3.18576372e-03
+1442.9409,820.9814,3.23893060e-03
+1447.5955,822.4533,3.11957556e-03
+1452.2504,823.9253,3.19823273e-03
+1456.9050,825.3972,3.24622798e-03
+1461.5596,826.8691,3.36695509e-03
+1466.2143,828.3411,3.39013198e-03
+1470.8689,829.8130,3.40306130e-03
+1475.5235,831.2849,3.33417114e-03
+1480.1781,832.7568,3.41292191e-03
+1484.8328,834.2288,3.39598116e-03
+1489.4874,835.7007,3.44775431e-03
+1494.1420,837.1726,3.41438060e-03
+1498.7967,838.6445,3.57626565e-03
+1503.4513,840.1165,3.51028121e-03
+1508.1061,841.5884,3.48934042e-03
+1512.7608,843.0604,3.61962616e-03
+1517.4154,844.5323,3.65937571e-03
+1522.0700,846.0042,3.54847149e-03
+1526.7247,847.4761,3.72178108e-03
+1531.3793,848.9481,3.65384202e-03
+1536.0339,850.4200,3.62376892e-03
+1540.6886,851.8919,3.74438730e-03
+1545.3432,853.3638,3.69088794e-03
+1549.9978,854.8358,3.82314087e-03
+1554.6524,856.3077,3.78616550e-03
+1559.3073,857.7797,3.82404076e-03
+1563.9619,859.2516,3.79041862e-03
+1568.6165,860.7235,3.81924491e-03
+1573.2712,862.1954,3.94114386e-03
+1577.9258,863.6674,3.96458665e-03
+1582.5804,865.1393,3.89366900e-03
+1587.2351,866.6112,4.00772225e-03
+1591.8897,868.0831,3.98523454e-03
+1596.5443,869.5551,3.97933880e-03
+1601.1990,871.0270,4.02443437e-03
+1605.8536,872.4989,4.14049206e-03
+1610.5082,873.9708,4.12978930e-03
+1615.1630,875.4428,4.03591152e-03
+1619.8177,876.9147,4.04965552e-03
+1624.4723,878.3867,4.11074795e-03
+1629.1269,879.8586,4.13125847e-03
+1633.7816,881.3305,4.14130650e-03
+1638.4362,882.8024,4.22446057e-03
+1643.0908,884.2744,4.21840139e-03
+1647.7455,885.7463,4.18429822e-03
+1652.4001,887.2182,4.16727364e-03
+1657.0547,888.6901,4.26662620e-03
+1661.7094,890.1620,4.27198829e-03
+1666.3640,891.6340,4.22227103e-03
+1671.0188,893.1060,4.22471249e-03
+1675.6735,894.5779,4.31840494e-03
+1680.3281,896.0498,4.22265613e-03
+1684.9827,897.5217,4.32214560e-03
+1689.6374,898.9937,4.32679988e-03
+1694.2920,900.4656,4.35441919e-03
+1698.9466,901.9375,4.26575495e-03
+1703.6012,903.4094,4.32899268e-03
+1708.2559,904.8813,4.39277245e-03
+1712.9105,906.3533,4.38281661e-03
+1717.5651,907.8252,4.41186503e-03
+1722.2198,909.2971,4.34189802e-03
+1726.8746,910.7691,4.37277555e-03
+1731.5292,912.2410,4.42407047e-03
+1736.1839,913.7130,4.31018975e-03
+1740.8385,915.1849,4.33074730e-03
+1745.4931,916.6568,4.36405139e-03
+1750.1478,918.1287,4.31874394e-03
+1754.8024,919.6006,4.37769480e-03
+1759.4570,921.0726,4.32496564e-03
+1764.1117,922.5445,4.36632801e-03
+1768.7663,924.0164,4.29351907e-03
+1773.4209,925.4883,4.30101622e-03
+1778.0757,926.9603,4.30722721e-03
+1782.7304,928.4323,4.34310688e-03
+1787.3850,929.9042,4.32737498e-03
+1792.0396,931.3761,4.23996290e-03
+1796.6943,932.8480,4.34060954e-03
+1801.3489,934.3199,4.28797957e-03
+1806.0035,935.7919,4.28880053e-03
+1810.6582,937.2638,4.29147994e-03
+1815.3128,938.7357,4.30827029e-03
+1819.9674,940.2076,4.18584328e-03
+1824.6221,941.6796,4.30963654e-03
+1829.2767,943.1515,4.24138736e-03
+1833.9315,944.6235,4.18021949e-03
+1838.5862,946.0954,4.12370730e-03
+1843.2408,947.5673,4.16529411e-03
+1847.8954,949.0392,4.16703010e-03
+1852.5500,950.5112,4.09030216e-03
+1857.2047,951.9831,4.00586659e-03
+1861.8593,953.4550,3.97119625e-03
+1866.5139,954.9269,4.11970215e-03
+1871.1686,956.3989,3.98095557e-03
+1875.8232,957.8708,3.97514319e-03
+1880.4778,959.3427,3.93504556e-03
+1885.1325,960.8146,3.98702547e-03
+1889.7873,962.2866,3.87263764e-03
+1894.4419,963.7585,3.69461114e-03
+1899.0966,965.2305,3.74596450e-03
+1903.7512,966.7024,3.74300359e-03
+1908.4058,968.1743,3.62353632e-03
+1913.0605,969.6462,3.68137262e-03
+1917.7151,971.1182,3.68014188e-03
+1922.3697,972.5901,3.53627163e-03
+1927.0243,974.0620,3.56633309e-03
+1931.6790,975.5339,3.52743501e-03
+1936.3336,977.0059,3.50164738e-03
+1940.9882,978.4778,3.38389212e-03
+1945.6431,979.9498,3.31400358e-03
+1950.2977,981.4217,3.22801992e-03
+1954.9523,982.8936,3.29758227e-03
+1959.6070,984.3655,3.09785199e-03
+1964.2616,985.8375,3.12530971e-03
+1968.9162,987.3094,3.22945509e-03
+1973.5709,988.7813,3.08304396e-03
+1978.2255,990.2532,2.97180703e-03
+1982.8801,991.7252,2.96282070e-03
+1987.5348,993.1971,2.80589005e-03
+1992.1894,994.6690,2.81084306e-03
+1996.8440,996.1409,2.66653672e-03
+2001.4988,997.6129,2.64473981e-03
+2006.1535,999.0848,2.66012666e-03
+2010.8081,1000.5568,2.64558848e-03
+2015.4627,1002.0287,2.44256365e-03
+2020.1174,1003.5006,2.42411369e-03
+2024.7720,1004.9725,2.36265454e-03
+2029.4266,1006.4445,2.20615952e-03
+2034.0813,1007.9164,2.17052549e-03
+2038.7359,1009.3883,2.10433151e-03
+2043.3905,1010.8602,2.13481672e-03
+2048.0452,1012.3322,2.07472453e-03
+2052.7000,1013.8041,2.04627449e-03
+2057.3546,1015.2761,1.95879233e-03
+2062.0093,1016.7480,1.77938584e-03
+2066.6639,1018.2199,1.70726213e-03
+2071.3185,1019.6918,1.78051891e-03
+2075.9731,1021.1638,1.69261545e-03
+2080.6278,1022.6357,1.60739315e-03
+2085.2826,1024.1077,1.54328602e-03
+2089.9372,1025.5796,1.36243389e-03
+2094.5919,1027.0515,1.38174288e-03
+2099.2465,1028.5234,1.26695842e-03
+2103.9011,1029.9954,1.23612210e-03
+2108.5558,1031.4673,1.15779124e-03
+2113.2104,1032.9392,1.16436416e-03
+2117.8650,1034.4111,1.17820350e-03
+2122.5197,1035.8831,1.06157560e-03
+2127.1743,1037.3550,1.00462011e-03
+2131.8289,1038.8269,1.01825513e-03
+2136.4836,1040.2988,8.88041104e-04
+2141.1382,1041.7708,8.09749588e-04
+2145.7928,1043.2427,7.63046730e-04
+2150.4475,1044.7146,7.76105386e-04
+2155.1021,1046.1865,7.46895559e-04
+2159.7567,1047.6584,6.94932474e-04
+2164.4113,1049.1304,6.97252690e-04
+2169.0660,1050.6023,6.72640512e-04
+2173.7206,1052.0742,6.08025584e-04
+2178.3752,1053.5461,5.01217495e-04
+2183.0299,1055.0181,5.26646618e-04
+2187.6845,1056.4900,4.72666346e-04
+2192.3395,1057.9620,4.05551342e-04
+2196.9942,1059.4340,3.62476014e-04
+2201.6488,1060.9059,4.72444633e-04
+2206.3034,1062.3778,4.17786767e-04
+2210.9581,1063.8497,4.03994985e-04
+2215.6127,1065.3217,2.33133818e-04
+2220.2673,1066.7936,3.87313572e-04
+2224.9219,1068.2655,3.05396912e-04
+2229.5766,1069.7374,2.68470234e-04
+2234.2312,1071.2094,2.46727053e-04
+2238.8858,1072.6813,1.49355532e-04
+2243.5405,1074.1532,1.88237944e-04
+2248.1951,1075.6251,1.76322559e-04
+2252.8497,1077.0970,9.33494375e-05
+2257.5044,1078.5690,1.51930988e-04
+2262.1590,1080.0409,1.84486082e-04
+2266.8136,1081.5128,9.17105281e-05
+2271.4683,1082.9847,1.80889823e-04
+2276.1229,1084.4567,9.36143479e-05
+2280.7775,1085.9286,1.26480983e-04
+2285.4322,1087.4005,1.78070914e-05
+2290.0868,1088.8724,1.04696897e-04
+2294.7414,1090.3444,7.79269103e-05
+2299.3964,1091.8164,7.18526499e-05
+2304.0511,1093.2883,1.19032309e-04
+2308.7057,1094.7603,1.55735848e-04
+2313.3603,1096.2322,0.00000000e+00
+2318.0150,1097.7041,7.37262890e-05
+2322.6696,1099.1760,0.00000000e+00
diff --git a/demo_data/tpd_DiffLimited_2.csv b/demo_data/tpd_DiffLimited_2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..ed1414960e95de51b15f4961abfb22f5efc3edfa
--- /dev/null
+++ b/demo_data/tpd_DiffLimited_2.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,0.00000000e+00
+0.8737,366.1553,0.00000000e+00
+1.7475,367.6273,8.19416891e-05
+2.6212,369.0992,2.72086641e-06
+3.4950,370.5711,4.43342424e-06
+4.3687,372.0431,2.60097022e-05
+5.2424,373.5150,4.70480081e-05
+6.1162,374.9869,5.39663524e-05
+6.9899,376.4588,1.38359474e-05
+7.8637,377.9308,2.49231634e-05
+8.7374,379.4027,0.00000000e+00
+9.6112,380.8746,0.00000000e+00
+10.4849,382.3466,0.00000000e+00
+11.3586,383.8185,4.38481857e-06
+12.2324,385.2904,2.07391145e-06
+13.1061,386.7624,1.47434857e-05
+13.9799,388.2343,0.00000000e+00
+14.8536,389.7062,7.23732155e-05
+15.7273,391.1781,0.00000000e+00
+16.6011,392.6501,0.00000000e+00
+17.4748,394.1220,0.00000000e+00
+18.3486,395.5939,0.00000000e+00
+19.2223,397.0659,3.69201334e-05
+20.0961,398.5378,9.25907807e-05
+20.9698,400.0097,0.00000000e+00
+21.8435,401.4816,2.15438886e-05
+22.7173,402.9536,3.32370255e-05
+23.5910,404.4255,0.00000000e+00
+24.4648,405.8974,0.00000000e+00
+25.3385,407.3694,0.00000000e+00
+26.2122,408.8413,0.00000000e+00
+27.0860,410.3132,0.00000000e+00
+27.9597,411.7852,4.58188188e-05
+28.8335,413.2571,6.66060369e-05
+29.7072,414.7290,1.66173559e-05
+30.5810,416.2009,0.00000000e+00
+31.4547,417.6729,3.54451258e-05
+32.3284,419.1448,0.00000000e+00
+33.2022,420.6167,0.00000000e+00
+34.0759,422.0887,4.78906877e-05
+34.9497,423.5606,7.08106163e-05
+35.8234,425.0325,0.00000000e+00
+36.6971,426.5044,0.00000000e+00
+37.5709,427.9763,1.02579197e-05
+38.4446,429.4483,0.00000000e+00
+39.3184,430.9202,0.00000000e+00
+40.1921,432.3922,5.77881292e-05
+41.0659,433.8641,3.47491696e-05
+41.9396,435.3360,0.00000000e+00
+42.8133,436.8079,1.82722797e-05
+43.6871,438.2799,0.00000000e+00
+44.5608,439.7518,0.00000000e+00
+45.4346,441.2237,4.51664018e-05
+46.3083,442.6956,0.00000000e+00
+47.1820,444.1676,1.15229477e-05
+48.0558,445.6395,0.00000000e+00
+48.9295,447.1115,3.32529344e-05
+49.8033,448.5834,2.93799967e-05
+50.6770,450.0553,3.24354442e-05
+51.5508,451.5272,8.85191548e-05
+52.4245,452.9991,1.57824270e-05
+53.2982,454.4711,7.01510435e-05
+54.1720,455.9430,1.01145934e-05
+55.0457,457.4149,5.62422356e-05
+55.9195,458.8869,7.19531890e-05
+56.7932,460.3588,0.00000000e+00
+57.6669,461.8307,0.00000000e+00
+58.5407,463.3027,0.00000000e+00
+59.4144,464.7746,1.08339351e-04
+60.2882,466.2465,1.39846943e-05
+61.1619,467.7184,2.45417286e-05
+62.0357,469.1904,3.99357523e-05
+62.9094,470.6623,0.00000000e+00
+63.7832,472.1342,1.17991049e-05
+64.6569,473.6062,0.00000000e+00
+65.5306,475.0781,1.69757623e-05
+66.4044,476.5500,0.00000000e+00
+67.2781,478.0219,9.32030889e-06
+68.1518,479.4939,0.00000000e+00
+69.0256,480.9658,0.00000000e+00
+69.8993,482.4377,0.00000000e+00
+70.7731,483.9097,2.42429360e-05
+71.6468,485.3816,0.00000000e+00
+72.5206,486.8535,0.00000000e+00
+73.3943,488.3254,1.22989732e-05
+74.2681,489.7974,0.00000000e+00
+75.1418,491.2693,6.48651912e-05
+76.0155,492.7412,0.00000000e+00
+76.8893,494.2132,3.17316008e-05
+77.7630,495.6851,2.53857634e-05
+78.6367,497.1570,1.01242340e-05
+79.5105,498.6290,0.00000000e+00
+80.3842,500.1009,6.26059846e-05
+81.2580,501.5728,1.27119429e-05
+82.1317,503.0447,0.00000000e+00
+83.0055,504.5167,6.09349190e-05
+83.8792,505.9886,0.00000000e+00
+84.7530,507.4605,1.45155209e-05
+85.6267,508.9325,0.00000000e+00
+86.5004,510.4044,3.95393799e-05
+87.3742,511.8763,0.00000000e+00
+88.2479,513.3483,1.15613315e-04
+89.1217,514.8202,0.00000000e+00
+89.9954,516.2921,0.00000000e+00
+90.8691,517.7640,6.02868095e-05
+91.7429,519.2360,0.00000000e+00
+92.6166,520.7079,5.79681400e-05
+93.4904,522.1798,0.00000000e+00
+94.3641,523.6517,0.00000000e+00
+95.2378,525.1237,0.00000000e+00
+96.1116,526.5956,0.00000000e+00
+96.9853,528.0675,1.79177041e-05
+97.8591,529.5395,7.54610737e-05
+98.7328,531.0114,6.08636583e-07
+99.6066,532.4833,0.00000000e+00
+100.4803,533.9553,3.71836759e-05
+101.3540,535.4272,6.35832912e-05
+102.2278,536.8991,0.00000000e+00
+103.1015,538.3710,0.00000000e+00
+103.9753,539.8430,9.60445686e-05
+104.8490,541.3149,1.02862425e-04
+105.7227,542.7868,0.00000000e+00
+106.5965,544.2587,0.00000000e+00
+107.4702,545.7307,3.75492600e-05
+108.3440,547.2026,9.46718792e-05
+109.2177,548.6746,9.08458751e-05
+110.0915,550.1465,7.91827697e-05
+110.9652,551.6184,4.79578848e-05
+111.8389,553.0903,4.21711411e-05
+112.7127,554.5623,7.74881919e-05
+113.5864,556.0342,0.00000000e+00
+114.4602,557.5061,1.07360087e-04
+115.3339,558.9780,8.03945732e-05
+116.2076,560.4500,1.87001242e-05
+117.0814,561.9219,3.63600921e-05
+117.9551,563.3939,9.45664724e-05
+118.8289,564.8658,7.41118129e-05
+119.7026,566.3377,1.42473495e-04
+120.5764,567.8096,1.51400367e-04
+121.4501,569.2816,1.44535268e-04
+122.3238,570.7535,1.78227012e-04
+123.1976,572.2254,7.08759908e-05
+124.0713,573.6973,1.91726896e-04
+124.9451,575.1693,2.70053511e-04
+125.8188,576.6412,1.74474524e-04
+126.6925,578.1131,2.12787418e-04
+127.5663,579.5850,2.64994014e-04
+128.4400,581.0570,3.20766732e-04
+129.3138,582.5289,3.58637859e-04
+130.1875,584.0009,3.29851406e-04
+131.0613,585.4728,4.50129795e-04
+131.9350,586.9447,4.47395345e-04
+132.8087,588.4166,4.87890997e-04
+133.6825,589.8885,5.68544143e-04
+134.5562,591.3605,5.18661400e-04
+135.4300,592.8324,6.94710703e-04
+136.3037,594.3043,7.22770288e-04
+137.1774,595.7762,7.95517000e-04
+138.0512,597.2482,1.00791780e-03
+138.9249,598.7202,9.55349591e-04
+139.7987,600.1921,1.15416013e-03
+140.6724,601.6640,1.15743454e-03
+141.5462,603.1359,1.33904081e-03
+142.4199,604.6078,1.52351079e-03
+143.2936,606.0798,1.55060471e-03
+144.1674,607.5517,1.66388834e-03
+145.0411,609.0236,1.85411691e-03
+145.9149,610.4955,1.97524880e-03
+146.7886,611.9675,2.23034318e-03
+147.6623,613.4394,2.35370616e-03
+148.5361,614.9113,2.61929678e-03
+149.4098,616.3833,2.90200743e-03
+150.2836,617.8552,3.05763981e-03
+151.1573,619.3271,3.33273830e-03
+152.0311,620.7991,3.66865611e-03
+152.9048,622.2710,3.99336498e-03
+153.7785,623.7429,4.37641423e-03
+154.6523,625.2148,4.68289806e-03
+155.5260,626.6868,5.04572364e-03
+156.3998,628.1587,5.59640257e-03
+157.2735,629.6306,5.99866686e-03
+158.1472,631.1025,6.43325364e-03
+159.0210,632.5745,6.90338714e-03
+159.8947,634.0464,7.50871375e-03
+160.7685,635.5184,8.03037453e-03
+161.6422,636.9903,8.59349221e-03
+162.5160,638.4622,9.13305301e-03
+163.3897,639.9341,9.69867036e-03
+164.2634,641.4061,1.03653157e-02
+165.1372,642.8780,1.10279787e-02
+166.0109,644.3499,1.18059991e-02
+166.8847,645.8218,1.24566332e-02
+167.7584,647.2938,1.32027771e-02
+168.6321,648.7657,1.39470007e-02
+169.5059,650.2377,1.44932410e-02
+170.3796,651.7096,1.52156986e-02
+171.2534,653.1815,1.58470813e-02
+172.1271,654.6534,1.65262688e-02
+173.0009,656.1254,1.70652904e-02
+173.8746,657.5973,1.76369771e-02
+174.7483,659.0692,1.80369690e-02
+175.6221,660.5411,1.84043907e-02
+176.4958,662.0131,1.87793113e-02
+177.3696,663.4850,1.90129243e-02
+178.2433,664.9569,1.90737508e-02
+179.1170,666.4288,1.91213656e-02
+179.9908,667.9008,1.89740453e-02
+180.8645,669.3727,1.86284631e-02
+181.7383,670.8447,1.82926767e-02
+182.6120,672.3166,1.76593177e-02
+183.4858,673.7885,1.69730559e-02
+184.3595,675.2604,1.62319764e-02
+185.2332,676.7324,1.53686553e-02
+186.1070,678.2043,1.43839177e-02
+186.9807,679.6762,1.33000668e-02
+187.8545,681.1481,1.21568814e-02
+188.7282,682.6201,1.10447835e-02
+189.6019,684.0920,9.84480977e-03
+190.4757,685.5640,8.76573008e-03
+191.3494,687.0359,7.65772304e-03
+192.2232,688.5078,6.40002033e-03
+193.0969,689.9797,5.57512837e-03
+193.9707,691.4517,4.72499477e-03
+194.8444,692.9236,3.98114277e-03
+195.7181,694.3955,3.22171790e-03
+196.5919,695.8674,2.81817419e-03
+197.4656,697.3394,2.28850660e-03
+198.3394,698.8113,2.00153701e-03
+199.2131,700.2832,1.73832639e-03
+200.0869,701.7552,1.55146769e-03
+200.9606,703.2271,1.41166814e-03
+201.8343,704.6990,1.28798571e-03
+202.7081,706.1710,1.30625628e-03
+203.5818,707.6429,1.29935413e-03
+204.4556,709.1148,1.21053739e-03
+205.3293,710.5867,1.37621269e-03
+206.2030,712.0587,1.34019565e-03
+207.0768,713.5306,1.34332315e-03
+207.9505,715.0025,1.40832190e-03
+208.8243,716.4744,1.45253912e-03
+209.6980,717.9464,1.51582761e-03
+210.5718,719.4183,1.56596035e-03
+211.4455,720.8903,1.61999185e-03
+212.3192,722.3622,1.60820258e-03
+213.1930,723.8341,1.65249454e-03
+214.0667,725.3060,1.70589529e-03
+214.9405,726.7780,1.82835606e-03
+215.8142,728.2499,1.82324543e-03
+216.6879,729.7218,1.86886778e-03
+217.5617,731.1937,1.96511298e-03
+218.4354,732.6656,2.07438529e-03
+219.3092,734.1376,2.05500238e-03
+220.1829,735.6095,2.14563310e-03
+221.0567,737.0815,2.25731800e-03
+221.9304,738.5534,2.23336858e-03
+222.8041,740.0253,2.25818483e-03
+223.6779,741.4973,2.39628227e-03
+224.5516,742.9692,2.48210388e-03
+225.4254,744.4411,2.50331080e-03
+226.2991,745.9130,2.56817322e-03
+227.1728,747.3849,2.64615403e-03
+228.0466,748.8569,2.70072115e-03
+228.9203,750.3288,2.76231812e-03
+229.7941,751.8007,2.88011925e-03
+230.6678,753.2726,2.93322606e-03
+231.5416,754.7446,3.07495007e-03
+232.4153,756.2166,3.09858238e-03
+233.2890,757.6885,3.19697754e-03
+234.1628,759.1604,3.19821038e-03
+235.0365,760.6323,3.42739932e-03
+235.9103,762.1042,3.41105857e-03
+236.7840,763.5762,3.56091675e-03
+237.6577,765.0481,3.55175301e-03
+238.5315,766.5200,3.68979713e-03
+239.4052,767.9919,3.79331410e-03
+240.2790,769.4639,3.92880477e-03
+241.1527,770.9359,3.96775408e-03
+242.0265,772.4078,4.11088346e-03
+242.9002,773.8797,4.21812804e-03
+243.7739,775.3516,4.29159822e-03
+244.6477,776.8235,4.34235903e-03
+245.5214,778.2955,4.42371564e-03
+246.3952,779.7674,4.50228481e-03
+247.2689,781.2393,4.60151071e-03
+248.1426,782.7112,4.72754147e-03
+249.0164,784.1832,4.84101893e-03
+249.8901,785.6551,4.89337603e-03
+250.7639,787.1270,5.06518921e-03
+251.6376,788.5990,5.18195750e-03
+252.5114,790.0709,5.27516240e-03
+253.3851,791.5428,5.33878151e-03
+254.2588,793.0148,5.40963141e-03
+255.1326,794.4867,5.51255979e-03
+256.0063,795.9586,5.66498144e-03
+256.8801,797.4305,5.86791988e-03
+257.7538,798.9025,5.89959463e-03
+258.6275,800.3744,5.87150361e-03
+259.5013,801.8463,6.05369220e-03
+260.3750,803.3182,6.14683609e-03
+261.2488,804.7902,6.24547247e-03
+262.1225,806.2621,6.41226862e-03
+262.9963,807.7341,6.54532667e-03
+263.8700,809.2060,6.54640235e-03
+264.7437,810.6779,6.70647947e-03
+265.6175,812.1498,6.83215493e-03
+266.4912,813.6218,6.85692718e-03
+267.3650,815.0937,7.05507025e-03
+268.2387,816.5656,7.16230506e-03
+269.1124,818.0375,7.29180500e-03
+269.9862,819.5095,7.33265188e-03
+270.8599,820.9814,7.42014032e-03
+271.7337,822.4533,7.52250850e-03
+272.6074,823.9253,7.64781423e-03
+273.4812,825.3972,7.76717579e-03
+274.3549,826.8691,7.84203317e-03
+275.2286,828.3411,8.07610527e-03
+276.1024,829.8130,8.13011266e-03
+276.9761,831.2849,8.26469250e-03
+277.8499,832.7568,8.24035332e-03
+278.7236,834.2288,8.46409891e-03
+279.5973,835.7007,8.51992052e-03
+280.4711,837.1726,8.66547227e-03
+281.3448,838.6445,8.68758094e-03
+282.2186,840.1165,8.77176877e-03
+283.0923,841.5884,8.94959550e-03
+283.9661,843.0604,8.97370651e-03
+284.8398,844.5323,9.26254224e-03
+285.7135,846.0042,9.23257321e-03
+286.5873,847.4761,9.37431958e-03
+287.4610,848.9481,9.50761512e-03
+288.3348,850.4200,9.60882753e-03
+289.2085,851.8919,9.72092990e-03
+290.0822,853.3638,9.82256234e-03
+290.9560,854.8358,9.90637857e-03
+291.8297,856.3077,1.00631258e-02
+292.7035,857.7797,1.01402020e-02
+293.5772,859.2516,1.02238460e-02
+294.4510,860.7235,1.03932684e-02
+295.3247,862.1954,1.04211718e-02
+296.1984,863.6674,1.05246408e-02
+297.0722,865.1393,1.06357336e-02
+297.9459,866.6112,1.07570533e-02
+298.8197,868.0831,1.08437324e-02
+299.6934,869.5551,1.09139960e-02
+300.5671,871.0270,1.10793132e-02
+301.4409,872.4989,1.12609398e-02
+302.3146,873.9708,1.12108877e-02
+303.1884,875.4428,1.14327464e-02
+304.0621,876.9147,1.13802943e-02
+304.9359,878.3867,1.15879579e-02
+305.8096,879.8586,1.16368625e-02
+306.6833,881.3305,1.17865633e-02
+307.5571,882.8024,1.18825007e-02
+308.4308,884.2744,1.19976057e-02
+309.3046,885.7463,1.20449765e-02
+310.1783,887.2182,1.21672740e-02
+311.0520,888.6901,1.23237930e-02
+311.9258,890.1620,1.23811103e-02
+312.7995,891.6340,1.24827195e-02
+313.6733,893.1060,1.26452493e-02
+314.5470,894.5779,1.26802633e-02
+315.4208,896.0498,1.28293242e-02
+316.2945,897.5217,1.29598342e-02
+317.1682,898.9937,1.28747215e-02
+318.0420,900.4656,1.30546130e-02
+318.9157,901.9375,1.31682307e-02
+319.7895,903.4094,1.34140663e-02
+320.6632,904.8813,1.34385079e-02
+321.5369,906.3533,1.34594878e-02
+322.4107,907.8252,1.35725662e-02
+323.2844,909.2971,1.37943802e-02
+324.1582,910.7691,1.38243269e-02
+325.0319,912.2410,1.38647379e-02
+325.9057,913.7130,1.39931338e-02
+326.7794,915.1849,1.40926419e-02
+327.6531,916.6568,1.41545711e-02
+328.5269,918.1287,1.43302437e-02
+329.4006,919.6006,1.43956449e-02
+330.2744,921.0726,1.44423852e-02
+331.1481,922.5445,1.46100996e-02
+332.0218,924.0164,1.45882964e-02
+332.8956,925.4883,1.47138415e-02
+333.7693,926.9603,1.48349414e-02
+334.6431,928.4323,1.49515411e-02
+335.5168,929.9042,1.49894571e-02
+336.3906,931.3761,1.51140271e-02
+337.2643,932.8480,1.51530923e-02
+338.1380,934.3199,1.52689079e-02
+339.0118,935.7919,1.54774617e-02
+339.8855,937.2638,1.54185714e-02
+340.7593,938.7357,1.55816432e-02
+341.6330,940.2076,1.55965770e-02
+342.5067,941.6796,1.57279540e-02
+343.3805,943.1515,1.58514194e-02
+344.2542,944.6235,1.59860495e-02
+345.1280,946.0954,1.59392618e-02
+346.0017,947.5673,1.61352642e-02
+346.8755,949.0392,1.62074678e-02
+347.7492,950.5112,1.62052717e-02
+348.6229,951.9831,1.63695607e-02
+349.4967,953.4550,1.63354445e-02
+350.3704,954.9269,1.64720789e-02
+351.2442,956.3989,1.65890753e-02
+352.1179,957.8708,1.66057404e-02
+352.9916,959.3427,1.66294109e-02
+353.8654,960.8146,1.67757403e-02
+354.7391,962.2866,1.68139543e-02
+355.6129,963.7585,1.68808829e-02
+356.4866,965.2305,1.69923585e-02
+357.3604,966.7024,1.70247778e-02
+358.2341,968.1743,1.70819443e-02
+359.1078,969.6462,1.72712766e-02
+359.9816,971.1182,1.72337089e-02
+360.8553,972.5901,1.73671711e-02
+361.7291,974.0620,1.73373464e-02
+362.6028,975.5339,1.73601359e-02
+363.4765,977.0059,1.75246447e-02
+364.3503,978.4778,1.76344085e-02
+365.2240,979.9498,1.77581161e-02
+366.0978,981.4217,1.77269224e-02
+366.9715,982.8936,1.77994408e-02
+367.8453,984.3655,1.78557113e-02
+368.7190,985.8375,1.79589558e-02
+369.5927,987.3094,1.78415738e-02
+370.4665,988.7813,1.79673918e-02
+371.3402,990.2532,1.80716570e-02
+372.2140,991.7252,1.81044545e-02
+373.0877,993.1971,1.80829819e-02
+373.9614,994.6690,1.81324631e-02
+374.8352,996.1409,1.82299465e-02
+375.7089,997.6129,1.82739496e-02
+376.5827,999.0848,1.82906240e-02
+377.4564,1000.5568,1.83482431e-02
+378.3302,1002.0287,1.84077956e-02
+379.2039,1003.5006,1.84507687e-02
+380.0776,1004.9725,1.84265226e-02
+380.9514,1006.4445,1.84647907e-02
+381.8251,1007.9164,1.85098238e-02
+382.6989,1009.3883,1.85539350e-02
+383.5726,1010.8602,1.85774807e-02
+384.4463,1012.3322,1.86339729e-02
+385.3201,1013.8041,1.85800754e-02
+386.1938,1015.2761,1.85805149e-02
+387.0676,1016.7480,1.86164826e-02
+387.9413,1018.2199,1.86329335e-02
+388.8151,1019.6918,1.86253935e-02
+389.6888,1021.1638,1.86852347e-02
+390.5625,1022.6357,1.87091436e-02
+391.4363,1024.1077,1.86556727e-02
+392.3101,1025.5796,1.86596066e-02
+393.1838,1027.0515,1.87126566e-02
+394.0575,1028.5234,1.87444370e-02
+394.9313,1029.9954,1.87188555e-02
+395.8050,1031.4673,1.86736267e-02
+396.6787,1032.9392,1.86764970e-02
+397.5525,1034.4111,1.86500400e-02
+398.4262,1035.8831,1.86415538e-02
+399.3000,1037.3550,1.86622087e-02
+400.1737,1038.8269,1.86590217e-02
+401.0474,1040.2988,1.86550599e-02
+401.9212,1041.7708,1.86081231e-02
+402.7949,1043.2427,1.84948556e-02
+403.6687,1044.7146,1.85836777e-02
+404.5424,1046.1865,1.85207408e-02
+405.4161,1047.6584,1.84573550e-02
+406.2899,1049.1304,1.84507146e-02
+407.1636,1050.6023,1.83548108e-02
+408.0373,1052.0742,1.83166470e-02
+408.9111,1053.5461,1.83748826e-02
+409.7848,1055.0181,1.82941835e-02
+410.6586,1056.4900,1.80873387e-02
+411.5324,1057.9620,1.80078354e-02
+412.4061,1059.4340,1.80927031e-02
+413.2799,1060.9059,1.79767851e-02
+414.1536,1062.3778,1.78921837e-02
+415.0273,1063.8497,1.78934243e-02
+415.9011,1065.3217,1.77639183e-02
+416.7748,1066.7936,1.76976025e-02
+417.6485,1068.2655,1.76797360e-02
+418.5223,1069.7374,1.75893903e-02
+419.3960,1071.2094,1.74444206e-02
+420.2698,1072.6813,1.73982903e-02
+421.1435,1074.1532,1.73547938e-02
+422.0172,1075.6251,1.71235185e-02
+422.8910,1077.0970,1.71145629e-02
+423.7647,1078.5690,1.70089789e-02
+424.6385,1080.0409,1.68434810e-02
+425.5122,1081.5128,1.67223029e-02
+426.3859,1082.9847,1.66750476e-02
+427.2597,1084.4567,1.65229216e-02
+428.1334,1085.9286,1.64371803e-02
+429.0071,1087.4005,1.62838809e-02
+429.8809,1088.8724,1.61468945e-02
+430.7546,1090.3444,1.60328392e-02
+431.6284,1091.8164,1.59569550e-02
+432.5022,1093.2883,1.57480687e-02
+433.3759,1094.7603,1.56575143e-02
+434.2497,1096.2322,1.54299624e-02
+435.1234,1097.7041,1.53485369e-02
+435.9971,1099.1760,1.51734687e-02
diff --git a/demo_data/tpd_DiffLimited_3.csv b/demo_data/tpd_DiffLimited_3.csv
new file mode 100644
index 0000000000000000000000000000000000000000..3fba48d579fb04f509213a99d8beb846006dd593
--- /dev/null
+++ b/demo_data/tpd_DiffLimited_3.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,0.00000000e+00
+0.0465,366.1553,9.33312520e-04
+0.0931,367.6273,0.00000000e+00
+0.1396,369.0992,3.85171012e-03
+0.1862,370.5711,0.00000000e+00
+0.2327,372.0431,0.00000000e+00
+0.2793,373.5150,0.00000000e+00
+0.3258,374.9869,1.07859878e-03
+0.3724,376.4588,2.02534185e-03
+0.4189,377.9308,5.87461400e-04
+0.4655,379.4027,0.00000000e+00
+0.5120,380.8746,0.00000000e+00
+0.5586,382.3466,0.00000000e+00
+0.6051,383.8185,0.00000000e+00
+0.6517,385.2904,2.78925669e-04
+0.6982,386.7624,1.96053181e-03
+0.7447,388.2343,0.00000000e+00
+0.7913,389.7062,0.00000000e+00
+0.8378,391.1781,0.00000000e+00
+0.8844,392.6501,3.54887481e-04
+0.9309,394.1220,0.00000000e+00
+0.9775,395.5939,1.32567179e-03
+1.0240,397.0659,0.00000000e+00
+1.0706,398.5378,0.00000000e+00
+1.1171,400.0097,0.00000000e+00
+1.1637,401.4816,2.78782006e-03
+1.2102,402.9536,0.00000000e+00
+1.2568,404.4255,5.57920942e-03
+1.3033,405.8974,0.00000000e+00
+1.3498,407.3694,2.43984236e-04
+1.3964,408.8413,9.80524695e-04
+1.4429,410.3132,0.00000000e+00
+1.4895,411.7852,2.82408274e-03
+1.5360,413.2571,1.60536170e-03
+1.5826,414.7290,0.00000000e+00
+1.6291,416.2009,4.25023399e-03
+1.6757,417.6729,0.00000000e+00
+1.7222,419.1448,3.49883083e-03
+1.7688,420.6167,0.00000000e+00
+1.8153,422.0887,0.00000000e+00
+1.8619,423.5606,0.00000000e+00
+1.9084,425.0325,2.20971485e-03
+1.9550,426.5044,4.16564755e-03
+2.0015,427.9763,0.00000000e+00
+2.0480,429.4483,2.92357174e-04
+2.0946,430.9202,0.00000000e+00
+2.1411,432.3922,1.00837520e-03
+2.1877,433.8641,0.00000000e+00
+2.2342,435.3360,4.33043955e-04
+2.2808,436.8079,6.74909679e-04
+2.3273,438.2799,2.15772539e-03
+2.3739,439.7518,0.00000000e+00
+2.4204,441.2237,1.26990373e-03
+2.4670,442.6956,0.00000000e+00
+2.5135,444.1676,0.00000000e+00
+2.5601,445.6395,0.00000000e+00
+2.6066,447.1115,0.00000000e+00
+2.6531,448.5834,4.74638818e-03
+2.6997,450.0553,0.00000000e+00
+2.7462,451.5272,1.52138664e-05
+2.7928,452.9991,1.84211414e-03
+2.8393,454.4711,0.00000000e+00
+2.8859,455.9430,0.00000000e+00
+2.9324,457.4149,0.00000000e+00
+2.9790,458.8869,2.11259536e-03
+3.0255,460.3588,0.00000000e+00
+3.0721,461.8307,1.65742458e-04
+3.1186,463.3027,0.00000000e+00
+3.1652,464.7746,1.59266894e-03
+3.2117,466.2465,4.69274004e-04
+3.2583,467.7184,0.00000000e+00
+3.3048,469.1904,0.00000000e+00
+3.3513,470.6623,7.56144407e-04
+3.3979,472.1342,1.96314231e-03
+3.4444,473.6062,4.67697362e-04
+3.4910,475.0781,1.21055020e-03
+3.5375,476.5500,0.00000000e+00
+3.5841,478.0219,0.00000000e+00
+3.6306,479.4939,3.11254547e-03
+3.6772,480.9658,2.47406843e-03
+3.7237,482.4377,0.00000000e+00
+3.7703,483.9097,0.00000000e+00
+3.8168,485.3816,0.00000000e+00
+3.8634,486.8535,5.09645208e-04
+3.9099,488.3254,2.99065723e-03
+3.9565,489.7974,0.00000000e+00
+4.0030,491.2693,0.00000000e+00
+4.0495,492.7412,0.00000000e+00
+4.0961,494.2132,0.00000000e+00
+4.1426,495.6851,1.18727388e-03
+4.1892,497.1570,0.00000000e+00
+4.2357,498.6290,0.00000000e+00
+4.2823,500.1009,0.00000000e+00
+4.3288,501.5728,8.71899014e-04
+4.3754,503.0447,0.00000000e+00
+4.4219,504.5167,0.00000000e+00
+4.4685,505.9886,0.00000000e+00
+4.5150,507.4605,0.00000000e+00
+4.5616,508.9325,0.00000000e+00
+4.6081,510.4044,0.00000000e+00
+4.6546,511.8763,6.20835600e-03
+4.7012,513.3483,1.83331154e-04
+4.7477,514.8202,0.00000000e+00
+4.7943,516.2921,2.76353629e-03
+4.8408,517.7640,0.00000000e+00
+4.8874,519.2360,0.00000000e+00
+4.9339,520.7079,1.59159082e-03
+4.9805,522.1798,1.98220182e-03
+5.0270,523.6517,0.00000000e+00
+5.0736,525.1237,8.85814661e-04
+5.1201,526.5956,0.00000000e+00
+5.1667,528.0675,0.00000000e+00
+5.2132,529.5395,1.36294065e-03
+5.2598,531.0114,0.00000000e+00
+5.3063,532.4833,0.00000000e+00
+5.3528,533.9553,0.00000000e+00
+5.3994,535.4272,2.06532306e-03
+5.4459,536.8991,0.00000000e+00
+5.4925,538.3710,0.00000000e+00
+5.5390,539.8430,3.16256587e-03
+5.5856,541.3149,1.04470142e-04
+5.6321,542.7868,0.00000000e+00
+5.6787,544.2587,0.00000000e+00
+5.7252,545.7307,2.01608826e-04
+5.7718,547.2026,0.00000000e+00
+5.8183,548.6746,1.80276766e-04
+5.8649,550.1465,2.92089442e-03
+5.9114,551.6184,0.00000000e+00
+5.9580,553.0903,5.77114697e-04
+6.0045,554.5623,1.41026510e-03
+6.0510,556.0342,1.95494667e-03
+6.0976,557.5061,0.00000000e+00
+6.1441,558.9780,1.81560765e-03
+6.1907,560.4500,5.36857871e-04
+6.2372,561.9219,0.00000000e+00
+6.2838,563.3939,0.00000000e+00
+6.3303,564.8658,0.00000000e+00
+6.3769,566.3377,0.00000000e+00
+6.4234,567.8096,3.10989749e-03
+6.4700,569.2816,2.22593988e-03
+6.5165,570.7535,2.06771283e-03
+6.5631,572.2254,0.00000000e+00
+6.6096,573.6973,8.63139110e-04
+6.6561,575.1693,3.00807384e-04
+6.7027,576.6412,0.00000000e+00
+6.7492,578.1131,0.00000000e+00
+6.7958,579.5850,1.40053593e-03
+6.8423,581.0570,0.00000000e+00
+6.8889,582.5289,0.00000000e+00
+6.9354,584.0009,0.00000000e+00
+6.9820,585.4728,1.87357841e-03
+7.0285,586.9447,0.00000000e+00
+7.0751,588.4166,4.48412960e-03
+7.1216,589.8885,7.84377509e-04
+7.1682,591.3605,1.46082923e-04
+7.2147,592.8324,4.10357199e-04
+7.2613,594.3043,1.41766388e-03
+7.3078,595.7762,5.49285556e-04
+7.3543,597.2482,3.01855733e-03
+7.4009,598.7202,5.20044821e-04
+7.4474,600.1921,9.76190204e-05
+7.4940,601.6640,4.37168125e-03
+7.5405,603.1359,0.00000000e+00
+7.5871,604.6078,1.42399047e-03
+7.6336,606.0798,0.00000000e+00
+7.6802,607.5517,0.00000000e+00
+7.7267,609.0236,3.22026107e-03
+7.7733,610.4955,1.34470407e-04
+7.8198,611.9675,1.61629496e-03
+7.8664,613.4394,1.90799148e-03
+7.9129,614.9113,1.15422055e-03
+7.9594,616.3833,2.60091061e-03
+8.0060,617.8552,5.08614816e-03
+8.0525,619.3271,5.18800039e-03
+8.0991,620.7991,7.99226388e-03
+8.1456,622.2710,2.15054839e-03
+8.1922,623.7429,4.52418951e-03
+8.2387,625.2148,8.88325088e-03
+8.2853,626.6868,7.47316983e-03
+8.3318,628.1587,8.18907283e-03
+8.3784,629.6306,7.67977256e-03
+8.4249,631.1025,7.82429799e-03
+8.4715,632.5745,7.68335350e-03
+8.5180,634.0464,8.73087440e-03
+8.5646,635.5184,5.03257476e-03
+8.6111,636.9903,1.06269363e-02
+8.6576,638.4622,1.03937741e-02
+8.7042,639.9341,1.13407159e-02
+8.7507,641.4061,1.59692168e-02
+8.7973,642.8780,1.19844005e-02
+8.8438,644.3499,1.36678945e-02
+8.8904,645.8218,1.67479701e-02
+8.9369,647.2938,1.67557914e-02
+8.9835,648.7657,1.86476223e-02
+9.0300,650.2377,1.98307279e-02
+9.0766,651.7096,2.27660146e-02
+9.1231,653.1815,2.50527747e-02
+9.1697,654.6534,2.75807623e-02
+9.2162,656.1254,3.17772850e-02
+9.2628,657.5973,3.50892395e-02
+9.3093,659.0692,3.48755419e-02
+9.3558,660.5411,3.66024487e-02
+9.4024,662.0131,3.83713655e-02
+9.4489,663.4850,4.36665937e-02
+9.4955,664.9569,4.82308045e-02
+9.5420,666.4288,4.87662964e-02
+9.5886,667.9008,5.01535982e-02
+9.6351,669.3727,5.91795705e-02
+9.6817,670.8447,6.06864169e-02
+9.7282,672.3166,6.81293234e-02
+9.7748,673.7885,6.98349029e-02
+9.8213,675.2604,7.33334869e-02
+9.8679,676.7324,7.96276629e-02
+9.9144,678.2043,8.32844749e-02
+9.9609,679.6762,9.02844444e-02
+10.0075,681.1481,9.80851799e-02
+10.0540,682.6201,1.04776733e-01
+10.1006,684.0920,1.11074008e-01
+10.1471,685.5640,1.21128172e-01
+10.1937,687.0359,1.28645703e-01
+10.2402,688.5078,1.33645400e-01
+10.2868,689.9797,1.37222290e-01
+10.3333,691.4517,1.49566546e-01
+10.3799,692.9236,1.62467077e-01
+10.4264,694.3955,1.67884871e-01
+10.4730,695.8674,1.77662298e-01
+10.5195,697.3394,1.85921758e-01
+10.5661,698.8113,1.99005201e-01
+10.6126,700.2832,2.05511481e-01
+10.6591,701.7552,2.16727227e-01
+10.7057,703.2271,2.23912850e-01
+10.7522,704.6990,2.33959258e-01
+10.7988,706.1710,2.44538665e-01
+10.8453,707.6429,2.48681724e-01
+10.8919,709.1148,2.57598788e-01
+10.9384,710.5867,2.67382860e-01
+10.9850,712.0587,2.74713933e-01
+11.0315,713.5306,2.82378435e-01
+11.0781,715.0025,2.86322296e-01
+11.1246,716.4744,2.94861794e-01
+11.1712,717.9464,3.00813824e-01
+11.2177,719.4183,3.01817268e-01
+11.2642,720.8903,2.99065024e-01
+11.3108,722.3622,3.02834064e-01
+11.3573,723.8341,3.06349993e-01
+11.4039,725.3060,2.98626423e-01
+11.4504,726.7780,2.95345902e-01
+11.4970,728.2499,2.89829016e-01
+11.5435,729.7218,2.85844862e-01
+11.5901,731.1937,2.78193951e-01
+11.6366,732.6656,2.64742315e-01
+11.6832,734.1376,2.60290354e-01
+11.7297,735.6095,2.41689488e-01
+11.7763,737.0815,2.31285989e-01
+11.8228,738.5534,2.15005234e-01
+11.8694,740.0253,1.99788943e-01
+11.9159,741.4973,1.79348335e-01
+11.9624,742.9692,1.63173258e-01
+12.0090,744.4411,1.53293684e-01
+12.0555,745.9130,1.30096674e-01
+12.1021,747.3849,1.19752169e-01
+12.1486,748.8569,1.04082681e-01
+12.1952,750.3288,8.63158852e-02
+12.2417,751.8007,7.82233253e-02
+12.2883,753.2726,6.31451160e-02
+12.3348,754.7446,5.48243038e-02
+12.3814,756.2166,4.38698530e-02
+12.4279,757.6885,3.68095823e-02
+12.4745,759.1604,3.12967785e-02
+12.5210,760.6323,2.55339071e-02
+12.5676,762.1042,1.67526081e-02
+12.6141,763.5762,1.71660539e-02
+12.6606,765.0481,1.44765424e-02
+12.7072,766.5200,7.59629160e-03
+12.7537,767.9919,1.06764212e-02
+12.8003,769.4639,6.06296165e-03
+12.8468,770.9359,5.64633217e-03
+12.8934,772.4078,7.56967440e-03
+12.9399,773.8797,3.18967854e-03
+12.9865,775.3516,8.03791173e-03
+13.0330,776.8235,5.20883268e-03
+13.0796,778.2955,6.27164403e-03
+13.1261,779.7674,9.34028812e-03
+13.1727,781.2393,2.74825795e-03
+13.2192,782.7112,8.54955241e-03
+13.2657,784.1832,6.87322486e-03
+13.3123,785.6551,9.85934865e-03
+13.3588,787.1270,7.64349895e-03
+13.4054,788.5990,4.29470837e-03
+13.4519,790.0709,8.94554518e-03
+13.4985,791.5428,9.96403769e-03
+13.5450,793.0148,7.30684912e-03
+13.5916,794.4867,7.13309087e-03
+13.6381,795.9586,1.23648718e-02
+13.6847,797.4305,9.38112289e-03
+13.7312,798.9025,1.01180840e-02
+13.7778,800.3744,6.18709531e-03
+13.8243,801.8463,7.46517070e-03
+13.8709,803.3182,9.23698116e-03
+13.9174,804.7902,9.50272381e-03
+13.9639,806.2621,9.60178301e-03
+14.0105,807.7341,1.06251957e-02
+14.0570,809.2060,6.30341517e-03
+14.1036,810.6779,8.33054259e-03
+14.1501,812.1498,6.46608230e-03
+14.1967,813.6218,1.62125845e-02
+14.2432,815.0937,1.16347512e-02
+14.2898,816.5656,1.18064284e-02
+14.3363,818.0375,1.27028422e-02
+14.3829,819.5095,1.21549135e-02
+14.4294,820.9814,1.36188399e-02
+14.4760,822.4533,1.26035111e-02
+14.5225,823.9253,1.52877653e-02
+14.5691,825.3972,1.37965186e-02
+14.6156,826.8691,1.37476819e-02
+14.6621,828.3411,1.65151730e-02
+14.7087,829.8130,1.71446763e-02
+14.7552,831.2849,1.65302437e-02
+14.8018,832.7568,1.65569708e-02
+14.8483,834.2288,1.48955826e-02
+14.8949,835.7007,1.69657674e-02
+14.9414,837.1726,1.55555271e-02
+14.9880,838.6445,1.96867660e-02
+15.0345,840.1165,1.77875794e-02
+15.0811,841.5884,1.75338686e-02
+15.1276,843.0604,2.06021387e-02
+15.1742,844.5323,2.12151501e-02
+15.2207,846.0042,1.92239378e-02
+15.2672,847.4761,2.20159162e-02
+15.3138,848.9481,2.30424013e-02
+15.3603,850.4200,1.65976994e-02
+15.4069,851.8919,1.70170106e-02
+15.4534,853.3638,2.24821996e-02
+15.5000,854.8358,2.19392385e-02
+15.5465,856.3077,2.23238487e-02
+15.5931,857.7797,2.16343943e-02
+15.6396,859.2516,2.65340488e-02
+15.6862,860.7235,2.74154730e-02
+15.7327,862.1954,2.39014123e-02
+15.7793,863.6674,2.17064135e-02
+15.8258,865.1393,2.98475958e-02
+15.8724,866.6112,2.82118581e-02
+15.9189,868.0831,2.59543918e-02
+15.9654,869.5551,2.55994406e-02
+16.0120,871.0270,2.75789946e-02
+16.0585,872.4989,3.05089764e-02
+16.1051,873.9708,2.78666336e-02
+16.1516,875.4428,2.90140621e-02
+16.1982,876.9147,3.19701843e-02
+16.2447,878.3867,3.08528040e-02
+16.2913,879.8586,3.11980136e-02
+16.3378,881.3305,2.61734910e-02
+16.3844,882.8024,3.35810743e-02
+16.4309,884.2744,3.40267122e-02
+16.4775,885.7463,3.33805196e-02
+16.5240,887.2182,3.20625342e-02
+16.5705,888.6901,3.75589356e-02
+16.6171,890.1620,3.31742540e-02
+16.6636,891.6340,3.96065712e-02
+16.7102,893.1060,3.71590704e-02
+16.7567,894.5779,3.91173437e-02
+16.8033,896.0498,4.01907638e-02
+16.8498,897.5217,3.92430276e-02
+16.8964,898.9937,3.75567973e-02
+16.9429,900.4656,4.58167233e-02
+16.9895,901.9375,4.26493436e-02
+17.0360,903.4094,4.15249169e-02
+17.0826,904.8813,4.39419411e-02
+17.1291,906.3533,4.68793288e-02
+17.1757,907.8252,4.12146263e-02
+17.2222,909.2971,4.47545052e-02
+17.2687,910.7691,4.65187617e-02
+17.3153,912.2410,4.96096537e-02
+17.3618,913.7130,4.98520657e-02
+17.4084,915.1849,4.75448668e-02
+17.4549,916.6568,4.87355739e-02
+17.5015,918.1287,5.15515730e-02
+17.5480,919.6006,5.14929816e-02
+17.5946,921.0726,5.27257212e-02
+17.6411,922.5445,5.23190163e-02
+17.6877,924.0164,5.23435026e-02
+17.7342,925.4883,5.59137799e-02
+17.7808,926.9603,5.81412390e-02
+17.8273,928.4323,5.69468774e-02
+17.8739,929.9042,5.42212427e-02
+17.9204,931.3761,5.73946051e-02
+17.9669,932.8480,5.72809540e-02
+18.0135,934.3199,6.06404357e-02
+18.0600,935.7919,5.93500994e-02
+18.1066,937.2638,6.12472184e-02
+18.1531,938.7357,6.23550080e-02
+18.1997,940.2076,6.17891513e-02
+18.2462,941.6796,6.29237592e-02
+18.2928,943.1515,6.60497099e-02
+18.3393,944.6235,6.63409159e-02
+18.3859,946.0954,6.63145781e-02
+18.4324,947.5673,6.66894019e-02
+18.4790,949.0392,6.75864369e-02
+18.5255,950.5112,6.90606907e-02
+18.5720,951.9831,6.87582716e-02
+18.6186,953.4550,7.24602118e-02
+18.6651,954.9269,7.71649852e-02
+18.7117,956.3989,7.76457787e-02
+18.7582,957.8708,7.61610270e-02
+18.8048,959.3427,7.78076127e-02
+18.8513,960.8146,7.25703165e-02
+18.8979,962.2866,7.85519406e-02
+18.9444,963.7585,7.95162544e-02
+18.9910,965.2305,7.65803754e-02
+19.0375,966.7024,8.30165893e-02
+19.0841,968.1743,8.05087686e-02
+19.1306,969.6462,8.22870955e-02
+19.1772,971.1182,8.48932117e-02
+19.2237,972.5901,8.64879489e-02
+19.2702,974.0620,8.45043436e-02
+19.3168,975.5339,8.62543657e-02
+19.3633,977.0059,8.79559889e-02
+19.4099,978.4778,9.12379920e-02
+19.4564,979.9498,9.03501511e-02
+19.5030,981.4217,8.98127034e-02
+19.5495,982.8936,9.26353633e-02
+19.5961,984.3655,9.17425603e-02
+19.6426,985.8375,8.79391655e-02
+19.6892,987.3094,9.42563862e-02
+19.7357,988.7813,9.31491703e-02
+19.7823,990.2532,9.47956592e-02
+19.8288,991.7252,9.79556441e-02
+19.8753,993.1971,9.20575261e-02
+19.9219,994.6690,9.92707610e-02
+19.9684,996.1409,9.85630974e-02
+20.0150,997.6129,9.86734778e-02
+20.0615,999.0848,9.88773257e-02
+20.1081,1000.5568,1.01259664e-01
+20.1546,1002.0287,1.02018245e-01
+20.2012,1003.5006,1.00586355e-01
+20.2477,1004.9725,1.04617968e-01
+20.2943,1006.4445,1.07312106e-01
+20.3408,1007.9164,1.06527969e-01
+20.3874,1009.3883,1.07035041e-01
+20.4339,1010.8602,1.11369058e-01
+20.4805,1012.3322,1.09878905e-01
+20.5270,1013.8041,1.10207915e-01
+20.5735,1015.2761,1.13137007e-01
+20.6201,1016.7480,1.11918792e-01
+20.6666,1018.2199,1.10758290e-01
+20.7132,1019.6918,1.12672128e-01
+20.7597,1021.1638,1.13614783e-01
+20.8063,1022.6357,1.20949849e-01
+20.8528,1024.1077,1.15046628e-01
+20.8994,1025.5796,1.19759969e-01
+20.9459,1027.0515,1.18117377e-01
+20.9925,1028.5234,1.21657304e-01
+21.0390,1029.9954,1.17518917e-01
+21.0856,1031.4673,1.18675388e-01
+21.1321,1032.9392,1.20190874e-01
+21.1787,1034.4111,1.20566115e-01
+21.2252,1035.8831,1.25241965e-01
+21.2717,1037.3550,1.24340869e-01
+21.3183,1038.8269,1.25869364e-01
+21.3648,1040.2988,1.24972105e-01
+21.4114,1041.7708,1.29146740e-01
+21.4579,1043.2427,1.33398667e-01
+21.5045,1044.7146,1.29433274e-01
+21.5510,1046.1865,1.29117757e-01
+21.5976,1047.6584,1.31681621e-01
+21.6441,1049.1304,1.34970531e-01
+21.6907,1050.6023,1.33285746e-01
+21.7372,1052.0742,1.34338945e-01
+21.7838,1053.5461,1.34850100e-01
+21.8303,1055.0181,1.33483633e-01
+21.8768,1056.4900,1.36751100e-01
+21.9234,1057.9620,1.39289901e-01
+21.9699,1059.4340,1.40239835e-01
+22.0165,1060.9059,1.36963829e-01
+22.0630,1062.3778,1.38997093e-01
+22.1096,1063.8497,1.39450803e-01
+22.1561,1065.3217,1.40697062e-01
+22.2027,1066.7936,1.41050249e-01
+22.2492,1068.2655,1.42530203e-01
+22.2958,1069.7374,1.43565416e-01
+22.3423,1071.2094,1.44629955e-01
+22.3889,1072.6813,1.47811934e-01
+22.4354,1074.1532,1.44517168e-01
+22.4820,1075.6251,1.46816865e-01
+22.5285,1077.0970,1.49358109e-01
+22.5750,1078.5690,1.46241531e-01
+22.6216,1080.0409,1.51629776e-01
+22.6681,1081.5128,1.51031286e-01
+22.7147,1082.9847,1.54816121e-01
+22.7612,1084.4567,1.52748823e-01
+22.8078,1085.9286,1.56838551e-01
+22.8543,1087.4005,1.53395951e-01
+22.9009,1088.8724,1.57046333e-01
+22.9474,1090.3444,1.57661542e-01
+22.9940,1091.8164,1.57805756e-01
+23.0405,1093.2883,1.58922747e-01
+23.0871,1094.7603,1.58426255e-01
+23.1336,1096.2322,1.60734609e-01
+23.1801,1097.7041,1.60950452e-01
+23.2267,1099.1760,1.60230473e-01
diff --git a/demo_data/tpd_DiffLimited_metadata.json b/demo_data/tpd_DiffLimited_metadata.json
new file mode 100644
index 0000000000000000000000000000000000000000..8b24c035d277a09785d57022960938daa945343b
--- /dev/null
+++ b/demo_data/tpd_DiffLimited_metadata.json
@@ -0,0 +1,24 @@
+{
+ "mechanism": "DiffLimited",
+ "betas_Ks": [
+ 0.3162277638912201,
+ 1.6846271753311157,
+ 31.62277603149414
+ ],
+ "n_rates": 3,
+ "true_params": {
+ "mechanism": "DiffLimited",
+ "Ed": 23369.582400663046,
+ "nu": 160197624009364.56,
+ "D0": 175.0557535242827,
+ "E_diff": 12198.817834034686,
+ "theta_0": 0.5502601671297983,
+ "T_start": 364.6834143679138,
+ "T_end": 1099.1759914138238
+ },
+ "csv_files": [
+ "tpd_DiffLimited_1.csv",
+ "tpd_DiffLimited_2.csv",
+ "tpd_DiffLimited_3.csv"
+ ]
+}
\ No newline at end of file
diff --git a/demo_data/tpd_FirstOrderCovDep_1.csv b/demo_data/tpd_FirstOrderCovDep_1.csv
new file mode 100644
index 0000000000000000000000000000000000000000..8b3c687ce42b08a7577110f7d34ed6366628442e
--- /dev/null
+++ b/demo_data/tpd_FirstOrderCovDep_1.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,5.20775393e-05
+4.6546,366.1553,0.00000000e+00
+9.3093,367.6273,0.00000000e+00
+13.9640,369.0992,5.97793914e-05
+18.6186,370.5711,3.33929506e-06
+23.2733,372.0431,9.89818291e-05
+27.9279,373.5150,4.41988923e-05
+32.5825,374.9869,2.72749021e-05
+37.2372,376.4588,0.00000000e+00
+41.8919,377.9308,0.00000000e+00
+46.5465,379.4027,0.00000000e+00
+51.2011,380.8746,0.00000000e+00
+55.8558,382.3466,3.23346962e-04
+60.5104,383.8185,0.00000000e+00
+65.1651,385.2904,7.78072354e-05
+69.8198,386.7624,6.10033348e-05
+74.4744,388.2343,8.86551352e-05
+79.1290,389.7062,7.73449283e-05
+83.7837,391.1781,0.00000000e+00
+88.4383,392.6501,4.42997680e-06
+93.0930,394.1220,0.00000000e+00
+97.7477,395.5939,0.00000000e+00
+102.4023,397.0659,1.17319229e-04
+107.0569,398.5378,0.00000000e+00
+111.7116,400.0097,0.00000000e+00
+116.3662,401.4816,0.00000000e+00
+121.0209,402.9536,1.93223750e-05
+125.6755,404.4255,0.00000000e+00
+130.3302,405.8974,1.66817350e-04
+134.9848,407.3694,8.24936651e-05
+139.6394,408.8413,1.13439652e-04
+144.2941,410.3132,1.40546836e-04
+148.9488,411.7852,1.06180836e-04
+153.6034,413.2571,1.49599320e-04
+158.2581,414.7290,0.00000000e+00
+162.9127,416.2009,2.65111466e-05
+167.5673,417.6729,0.00000000e+00
+172.2220,419.1448,2.09914084e-04
+176.8767,420.6167,3.12003067e-05
+181.5313,422.0887,6.56187403e-05
+186.1860,423.5606,0.00000000e+00
+190.8406,425.0325,0.00000000e+00
+195.4952,426.5044,0.00000000e+00
+200.1498,427.9763,0.00000000e+00
+204.8046,429.4483,0.00000000e+00
+209.4592,430.9202,1.09326989e-04
+214.1138,432.3922,0.00000000e+00
+218.7685,433.8641,2.92828026e-05
+223.4231,435.3360,1.89843252e-06
+228.0777,436.8079,0.00000000e+00
+232.7325,438.2799,0.00000000e+00
+237.3871,439.7518,8.82316162e-05
+242.0417,441.2237,3.12444035e-06
+246.6964,442.6956,0.00000000e+00
+251.3510,444.1676,0.00000000e+00
+256.0056,445.6395,0.00000000e+00
+260.6603,447.1115,0.00000000e+00
+265.3150,448.5834,1.38658463e-04
+269.9696,450.0553,0.00000000e+00
+274.6242,451.5272,1.79075781e-04
+279.2789,452.9991,0.00000000e+00
+283.9335,454.4711,0.00000000e+00
+288.5882,455.9430,2.41074347e-04
+293.2429,457.4149,0.00000000e+00
+297.8975,458.8869,0.00000000e+00
+302.5521,460.3588,0.00000000e+00
+307.2068,461.8307,0.00000000e+00
+311.8615,463.3027,3.11160984e-05
+316.5161,464.7746,1.04768813e-04
+321.1708,466.2465,1.17750758e-04
+325.8254,467.7184,0.00000000e+00
+330.4800,469.1904,1.82769327e-05
+335.1347,470.6623,0.00000000e+00
+339.7894,472.1342,5.66825111e-05
+344.4440,473.6062,0.00000000e+00
+349.0986,475.0781,1.63526682e-04
+353.7533,476.5500,0.00000000e+00
+358.4079,478.0219,7.80318733e-05
+363.0625,479.4939,2.13396088e-05
+367.7173,480.9658,0.00000000e+00
+372.3719,482.4377,2.26889504e-04
+377.0265,483.9097,0.00000000e+00
+381.6812,485.3816,2.34905223e-04
+386.3358,486.8535,0.00000000e+00
+390.9904,488.3254,2.68106942e-05
+395.6452,489.7974,0.00000000e+00
+400.2998,491.2693,0.00000000e+00
+404.9544,492.7412,2.01339499e-05
+409.6091,494.2132,0.00000000e+00
+414.2637,495.6851,0.00000000e+00
+418.9183,497.1570,0.00000000e+00
+423.5730,498.6290,0.00000000e+00
+428.2277,500.1009,0.00000000e+00
+432.8823,501.5728,2.83056695e-04
+437.5369,503.0447,0.00000000e+00
+442.1916,504.5167,3.20980689e-06
+446.8462,505.9886,5.09247984e-05
+451.5009,507.4605,0.00000000e+00
+456.1556,508.9325,4.42669225e-05
+460.8102,510.4044,0.00000000e+00
+465.4648,511.8763,0.00000000e+00
+470.1196,513.3483,0.00000000e+00
+474.7742,514.8202,0.00000000e+00
+479.4288,516.2921,7.74323198e-05
+484.0835,517.7640,0.00000000e+00
+488.7381,519.2360,0.00000000e+00
+493.3927,520.7079,0.00000000e+00
+498.0473,522.1798,1.20991652e-04
+502.7020,523.6517,0.00000000e+00
+507.3566,525.1237,3.10851428e-05
+512.0112,526.5956,3.36873745e-05
+516.6659,528.0675,1.52632183e-05
+521.3207,529.5395,0.00000000e+00
+525.9753,531.0114,0.00000000e+00
+530.6300,532.4833,0.00000000e+00
+535.2846,533.9553,9.46392829e-05
+539.9392,535.4272,0.00000000e+00
+544.5939,536.8991,0.00000000e+00
+549.2485,538.3710,7.12223555e-05
+553.9031,539.8430,0.00000000e+00
+558.5578,541.3149,0.00000000e+00
+563.2124,542.7868,0.00000000e+00
+567.8670,544.2587,1.14319693e-04
+572.5218,545.7307,0.00000000e+00
+577.1765,547.2026,0.00000000e+00
+581.8311,548.6746,7.61108677e-05
+586.4857,550.1465,0.00000000e+00
+591.1404,551.6184,0.00000000e+00
+595.7950,553.0903,0.00000000e+00
+600.4496,554.5623,1.18267199e-05
+605.1043,556.0342,1.61313539e-04
+609.7589,557.5061,0.00000000e+00
+614.4135,558.9780,0.00000000e+00
+619.0682,560.4500,0.00000000e+00
+623.7228,561.9219,3.44806758e-05
+628.3776,563.3939,1.20299992e-05
+633.0323,564.8658,0.00000000e+00
+637.6869,566.3377,0.00000000e+00
+642.3415,567.8096,1.28883417e-04
+646.9961,569.2816,0.00000000e+00
+651.6508,570.7535,1.28247790e-04
+656.3054,572.2254,0.00000000e+00
+660.9600,573.6973,0.00000000e+00
+665.6147,575.1693,9.89441469e-05
+670.2693,576.6412,3.96694995e-05
+674.9239,578.1131,0.00000000e+00
+679.5786,579.5850,1.59876916e-04
+684.2334,581.0570,1.06491636e-04
+688.8880,582.5289,2.16123677e-04
+693.5427,584.0009,0.00000000e+00
+698.1973,585.4728,2.26086268e-04
+702.8519,586.9447,1.04689847e-04
+707.5066,588.4166,3.47436930e-04
+712.1612,589.8885,8.19581328e-06
+716.8158,591.3605,5.58303000e-05
+721.4704,592.8324,1.26682746e-04
+726.1251,594.3043,5.09467427e-05
+730.7797,595.7762,2.65579438e-04
+735.4343,597.2482,2.55275168e-04
+740.0892,598.7202,0.00000000e+00
+744.7438,600.1921,2.02021707e-04
+749.3984,601.6640,3.38390120e-04
+754.0531,603.1359,3.41380044e-04
+758.7077,604.6078,2.34709121e-04
+763.3623,606.0798,3.85789201e-04
+768.0170,607.5517,4.16158437e-04
+772.6716,609.0236,4.07952000e-04
+777.3262,610.4955,5.11700113e-04
+781.9809,611.9675,4.51706204e-04
+786.6355,613.4394,7.03989295e-04
+791.2901,614.9113,6.10000629e-04
+795.9449,616.3833,8.61275068e-04
+800.5996,617.8552,5.33970306e-04
+805.2542,619.3271,8.60746077e-04
+809.9088,620.7991,9.85795050e-04
+814.5635,622.2710,1.10161444e-03
+819.2181,623.7429,1.09636027e-03
+823.8727,625.2148,1.38819264e-03
+828.5274,626.6868,1.41745224e-03
+833.1820,628.1587,1.54573726e-03
+837.8366,629.6306,1.82504556e-03
+842.4913,631.1025,1.98666961e-03
+847.1461,632.5745,2.10797414e-03
+851.8007,634.0464,2.25128001e-03
+856.4554,635.5184,2.48149806e-03
+861.1100,636.9903,2.80992710e-03
+865.7646,638.4622,3.01748724e-03
+870.4192,639.9341,3.15317092e-03
+875.0739,641.4061,3.59017611e-03
+879.7285,642.8780,3.69318365e-03
+884.3831,644.3499,4.15638834e-03
+889.0378,645.8218,4.48620366e-03
+893.6924,647.2938,4.82439483e-03
+898.3470,648.7657,5.06875291e-03
+903.0019,650.2377,5.30641014e-03
+907.6565,651.7096,5.78999333e-03
+912.3111,653.1815,5.60207805e-03
+916.9658,654.6534,5.74264443e-03
+921.6204,656.1254,5.74446702e-03
+926.2750,657.5973,5.33036841e-03
+930.9297,659.0692,4.96230740e-03
+935.5843,660.5411,4.53771558e-03
+940.2389,662.0131,3.81849729e-03
+944.8936,663.4850,3.03258398e-03
+949.5482,664.9569,2.32090708e-03
+954.2028,666.4288,1.74106332e-03
+958.8576,667.9008,1.51323259e-03
+963.5123,669.3727,7.75108056e-04
+968.1669,670.8447,5.19093126e-04
+972.8215,672.3166,4.70272149e-04
+977.4762,673.7885,8.63111709e-05
+982.1308,675.2604,5.75305457e-05
+986.7854,676.7324,2.59219305e-05
+991.4401,678.2043,5.13139748e-05
+996.0947,679.6762,0.00000000e+00
+1000.7493,681.1481,2.07660880e-04
+1005.4040,682.6201,2.79495707e-05
+1010.0586,684.0920,6.94119663e-05
+1014.7134,685.5640,0.00000000e+00
+1019.3680,687.0359,1.86548365e-04
+1024.0227,688.5078,0.00000000e+00
+1028.6773,689.9797,0.00000000e+00
+1033.3319,691.4517,0.00000000e+00
+1037.9866,692.9236,0.00000000e+00
+1042.6412,694.3955,0.00000000e+00
+1047.2958,695.8674,0.00000000e+00
+1051.9505,697.3394,0.00000000e+00
+1056.6051,698.8113,0.00000000e+00
+1061.2597,700.2832,0.00000000e+00
+1065.9146,701.7552,2.28926729e-05
+1070.5692,703.2271,0.00000000e+00
+1075.2238,704.6990,0.00000000e+00
+1079.8785,706.1710,3.19971332e-05
+1084.5331,707.6429,1.83353419e-04
+1089.1877,709.1148,8.70047443e-05
+1093.8423,710.5867,0.00000000e+00
+1098.4970,712.0587,0.00000000e+00
+1103.1516,713.5306,3.26033951e-05
+1107.8062,715.0025,4.52198074e-05
+1112.4609,716.4744,1.29861655e-04
+1117.1155,717.9464,0.00000000e+00
+1121.7703,719.4183,9.25114000e-05
+1126.4250,720.8903,2.15269065e-05
+1131.0796,722.3622,0.00000000e+00
+1135.7342,723.8341,0.00000000e+00
+1140.3889,725.3060,0.00000000e+00
+1145.0435,726.7780,0.00000000e+00
+1149.6981,728.2499,7.73057182e-05
+1154.3528,729.7218,9.21494357e-05
+1159.0074,731.1937,0.00000000e+00
+1163.6620,732.6656,1.19633347e-04
+1168.3167,734.1376,0.00000000e+00
+1172.9713,735.6095,4.47190760e-05
+1177.6261,737.0815,0.00000000e+00
+1182.2807,738.5534,0.00000000e+00
+1186.9354,740.0253,0.00000000e+00
+1191.5900,741.4973,0.00000000e+00
+1196.2446,742.9692,0.00000000e+00
+1200.8993,744.4411,4.02290643e-05
+1205.5539,745.9130,0.00000000e+00
+1210.2085,747.3849,0.00000000e+00
+1214.8632,748.8569,0.00000000e+00
+1219.5178,750.3288,0.00000000e+00
+1224.1724,751.8007,0.00000000e+00
+1228.8271,753.2726,2.04959186e-04
+1233.4819,754.7446,0.00000000e+00
+1238.1365,756.2166,8.24013914e-05
+1242.7911,757.6885,5.05832504e-05
+1247.4458,759.1604,8.22859802e-05
+1252.1004,760.6323,0.00000000e+00
+1256.7550,762.1042,6.38172205e-05
+1261.4097,763.5762,1.64811077e-04
+1266.0643,765.0481,1.37992465e-04
+1270.7189,766.5200,7.04769263e-06
+1275.3736,767.9919,1.06101616e-04
+1280.0282,769.4639,0.00000000e+00
+1284.6830,770.9359,1.57046656e-04
+1289.3377,772.4078,0.00000000e+00
+1293.9923,773.8797,0.00000000e+00
+1298.6469,775.3516,0.00000000e+00
+1303.3016,776.8235,0.00000000e+00
+1307.9562,778.2955,5.17746157e-05
+1312.6108,779.7674,9.33342278e-07
+1317.2655,781.2393,0.00000000e+00
+1321.9201,782.7112,5.41729742e-06
+1326.5747,784.1832,0.00000000e+00
+1331.2293,785.6551,2.07813660e-04
+1335.8840,787.1270,0.00000000e+00
+1340.5388,788.5990,1.12062437e-04
+1345.1934,790.0709,3.60368504e-05
+1349.8481,791.5428,0.00000000e+00
+1354.5027,793.0148,3.06442125e-05
+1359.1573,794.4867,0.00000000e+00
+1363.8120,795.9586,5.70165794e-05
+1368.4666,797.4305,0.00000000e+00
+1373.1212,798.9025,0.00000000e+00
+1377.7759,800.3744,7.14794487e-06
+1382.4305,801.8463,2.82046785e-05
+1387.0851,803.3182,0.00000000e+00
+1391.7398,804.7902,3.54170661e-05
+1396.3946,806.2621,0.00000000e+00
+1401.0492,807.7341,0.00000000e+00
+1405.7038,809.2060,9.10154340e-05
+1410.3585,810.6779,1.84246470e-04
+1415.0131,812.1498,5.15045685e-05
+1419.6677,813.6218,0.00000000e+00
+1424.3224,815.0937,0.00000000e+00
+1428.9770,816.5656,8.35990504e-05
+1433.6316,818.0375,4.05147948e-05
+1438.2863,819.5095,4.07850530e-05
+1442.9409,820.9814,9.25794739e-05
+1447.5955,822.4533,1.47647603e-04
+1452.2504,823.9253,0.00000000e+00
+1456.9050,825.3972,0.00000000e+00
+1461.5596,826.8691,0.00000000e+00
+1466.2143,828.3411,1.84729623e-04
+1470.8689,829.8130,1.75299530e-04
+1475.5235,831.2849,1.43701312e-04
+1480.1781,832.7568,0.00000000e+00
+1484.8328,834.2288,4.63779943e-05
+1489.4874,835.7007,0.00000000e+00
+1494.1420,837.1726,5.13597251e-06
+1498.7967,838.6445,0.00000000e+00
+1503.4513,840.1165,1.70684449e-04
+1508.1061,841.5884,0.00000000e+00
+1512.7608,843.0604,0.00000000e+00
+1517.4154,844.5323,9.46888395e-05
+1522.0700,846.0042,1.25697319e-04
+1526.7247,847.4761,0.00000000e+00
+1531.3793,848.9481,1.51726068e-04
+1536.0339,850.4200,0.00000000e+00
+1540.6886,851.8919,0.00000000e+00
+1545.3432,853.3638,3.91508183e-05
+1549.9978,854.8358,0.00000000e+00
+1554.6524,856.3077,1.06564352e-04
+1559.3073,857.7797,0.00000000e+00
+1563.9619,859.2516,5.88254716e-06
+1568.6165,860.7235,0.00000000e+00
+1573.2712,862.1954,0.00000000e+00
+1577.9258,863.6674,1.13669157e-04
+1582.5804,865.1393,1.16890456e-04
+1587.2351,866.6112,0.00000000e+00
+1591.8897,868.0831,1.17455231e-04
+1596.5443,869.5551,2.24059168e-05
+1601.1990,871.0270,0.00000000e+00
+1605.8536,872.4989,1.93511551e-05
+1610.5082,873.9708,2.30548671e-04
+1615.1630,875.4428,1.64873083e-04
+1619.8177,876.9147,0.00000000e+00
+1624.4723,878.3867,0.00000000e+00
+1629.1269,879.8586,2.30924229e-06
+1633.7816,881.3305,9.01614476e-06
+1638.4362,882.8024,0.00000000e+00
+1643.0908,884.2744,1.40013406e-04
+1647.7455,885.7463,9.17759899e-05
+1652.4001,887.2182,0.00000000e+00
+1657.0547,888.6901,0.00000000e+00
+1661.7094,890.1620,9.96336603e-05
+1666.3640,891.6340,8.12261060e-05
+1671.0188,893.1060,0.00000000e+00
+1675.6735,894.5779,0.00000000e+00
+1680.3281,896.0498,1.00269361e-04
+1684.9827,897.5217,0.00000000e+00
+1689.6374,898.9937,6.01698048e-05
+1694.2920,900.4656,4.83667063e-05
+1698.9466,901.9375,8.83704342e-05
+1703.6012,903.4094,0.00000000e+00
+1708.2559,904.8813,0.00000000e+00
+1712.9105,906.3533,1.20053191e-04
+1717.5651,907.8252,8.39645654e-05
+1722.2198,909.2971,1.35011112e-04
+1726.8746,910.7691,0.00000000e+00
+1731.5292,912.2410,2.92238365e-05
+1736.1839,913.7130,1.34207745e-04
+1740.8385,915.1849,0.00000000e+00
+1745.4931,916.6568,0.00000000e+00
+1750.1478,918.1287,0.00000000e+00
+1754.8024,919.6006,0.00000000e+00
+1759.4570,921.0726,2.32554667e-05
+1764.1117,922.5445,0.00000000e+00
+1768.7663,924.0164,8.34528055e-06
+1773.4209,925.4883,0.00000000e+00
+1778.0757,926.9603,0.00000000e+00
+1782.7304,928.4323,0.00000000e+00
+1787.3850,929.9042,2.78510447e-06
+1792.0396,931.3761,0.00000000e+00
+1796.6943,932.8480,0.00000000e+00
+1801.3489,934.3199,5.47937379e-05
+1806.0035,935.7919,0.00000000e+00
+1810.6582,937.2638,0.00000000e+00
+1815.3128,938.7357,2.60139568e-05
+1819.9674,940.2076,9.40648679e-05
+1824.6221,941.6796,0.00000000e+00
+1829.2767,943.1515,1.67257807e-04
+1833.9315,944.6235,5.67162497e-05
+1838.5862,946.0954,0.00000000e+00
+1843.2408,947.5673,0.00000000e+00
+1847.8954,949.0392,2.32388593e-05
+1852.5500,950.5112,7.69990875e-05
+1857.2047,951.9831,0.00000000e+00
+1861.8593,953.4550,0.00000000e+00
+1866.5139,954.9269,0.00000000e+00
+1871.1686,956.3989,2.01674717e-04
+1875.8232,957.8708,0.00000000e+00
+1880.4778,959.3427,1.66206410e-05
+1885.1325,960.8146,0.00000000e+00
+1889.7873,962.2866,1.86366276e-04
+1894.4419,963.7585,1.20473442e-05
+1899.0966,965.2305,0.00000000e+00
+1903.7512,966.7024,0.00000000e+00
+1908.4058,968.1743,0.00000000e+00
+1913.0605,969.6462,0.00000000e+00
+1917.7151,971.1182,2.00304312e-05
+1922.3697,972.5901,1.11763511e-04
+1927.0243,974.0620,0.00000000e+00
+1931.6790,975.5339,6.00255044e-05
+1936.3336,977.0059,7.79523398e-05
+1940.9882,978.4778,1.27436957e-04
+1945.6431,979.9498,0.00000000e+00
+1950.2977,981.4217,0.00000000e+00
+1954.9523,982.8936,0.00000000e+00
+1959.6070,984.3655,1.31279274e-04
+1964.2616,985.8375,0.00000000e+00
+1968.9162,987.3094,0.00000000e+00
+1973.5709,988.7813,3.46459157e-04
+1978.2255,990.2532,1.51566288e-04
+1982.8801,991.7252,3.58088000e-05
+1987.5348,993.1971,1.46060862e-04
+1992.1894,994.6690,0.00000000e+00
+1996.8440,996.1409,7.81418275e-05
+2001.4988,997.6129,0.00000000e+00
+2006.1535,999.0848,0.00000000e+00
+2010.8081,1000.5568,1.56494993e-04
+2015.4627,1002.0287,2.63184396e-04
+2020.1174,1003.5006,0.00000000e+00
+2024.7720,1004.9725,5.73865473e-05
+2029.4266,1006.4445,6.33865639e-05
+2034.0813,1007.9164,0.00000000e+00
+2038.7359,1009.3883,0.00000000e+00
+2043.3905,1010.8602,0.00000000e+00
+2048.0452,1012.3322,1.28834625e-04
+2052.7000,1013.8041,1.37957381e-04
+2057.3546,1015.2761,2.15914639e-04
+2062.0093,1016.7480,1.63790770e-04
+2066.6639,1018.2199,0.00000000e+00
+2071.3185,1019.6918,0.00000000e+00
+2075.9731,1021.1638,1.86128033e-04
+2080.6278,1022.6357,1.28661384e-04
+2085.2826,1024.1077,7.55544024e-05
+2089.9372,1025.5796,6.70414447e-05
+2094.5919,1027.0515,0.00000000e+00
+2099.2465,1028.5234,0.00000000e+00
+2103.9011,1029.9954,0.00000000e+00
+2108.5558,1031.4673,0.00000000e+00
+2113.2104,1032.9392,0.00000000e+00
+2117.8650,1034.4111,0.00000000e+00
+2122.5197,1035.8831,1.32240180e-04
+2127.1743,1037.3550,0.00000000e+00
+2131.8289,1038.8269,0.00000000e+00
+2136.4836,1040.2988,1.14657349e-04
+2141.1382,1041.7708,0.00000000e+00
+2145.7928,1043.2427,0.00000000e+00
+2150.4475,1044.7146,0.00000000e+00
+2155.1021,1046.1865,0.00000000e+00
+2159.7567,1047.6584,1.58414114e-05
+2164.4113,1049.1304,0.00000000e+00
+2169.0660,1050.6023,8.36200634e-05
+2173.7206,1052.0742,1.13210604e-04
+2178.3752,1053.5461,5.19542518e-05
+2183.0299,1055.0181,0.00000000e+00
+2187.6845,1056.4900,2.48174802e-05
+2192.3395,1057.9620,0.00000000e+00
+2196.9942,1059.4340,0.00000000e+00
+2201.6488,1060.9059,0.00000000e+00
+2206.3034,1062.3778,1.71097301e-04
+2210.9581,1063.8497,1.10041176e-04
+2215.6127,1065.3217,1.35617025e-04
+2220.2673,1066.7936,0.00000000e+00
+2224.9219,1068.2655,2.02156763e-04
+2229.5766,1069.7374,7.00643504e-05
+2234.2312,1071.2094,3.39133767e-05
+2238.8858,1072.6813,2.84964899e-05
+2243.5405,1074.1532,0.00000000e+00
+2248.1951,1075.6251,0.00000000e+00
+2252.8497,1077.0970,0.00000000e+00
+2257.5044,1078.5690,0.00000000e+00
+2262.1590,1080.0409,0.00000000e+00
+2266.8136,1081.5128,9.61708938e-05
+2271.4683,1082.9847,0.00000000e+00
+2276.1229,1084.4567,1.39676864e-04
+2280.7775,1085.9286,0.00000000e+00
+2285.4322,1087.4005,6.47029228e-05
+2290.0868,1088.8724,0.00000000e+00
+2294.7414,1090.3444,5.48172502e-05
+2299.3964,1091.8164,1.28889524e-05
+2304.0511,1093.2883,1.49746102e-05
+2308.7057,1094.7603,1.32486428e-04
+2313.3603,1096.2322,2.25864540e-04
+2318.0150,1097.7041,0.00000000e+00
+2322.6696,1099.1760,6.87519932e-05
diff --git a/demo_data/tpd_FirstOrderCovDep_2.csv b/demo_data/tpd_FirstOrderCovDep_2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..dcec2cd733d0153830b4b9a34014227e7ed5fb20
--- /dev/null
+++ b/demo_data/tpd_FirstOrderCovDep_2.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,0.00000000e+00
+0.6652,366.1553,0.00000000e+00
+1.3304,367.6273,0.00000000e+00
+1.9956,369.0992,1.21613790e-03
+2.6608,370.5711,4.03817503e-05
+3.3260,372.0431,6.57986820e-05
+3.9912,373.5150,3.86023108e-04
+4.6564,374.9869,6.98263233e-04
+5.3216,376.4588,8.00941838e-04
+5.9868,377.9308,2.05346267e-04
+6.6520,379.4027,3.69897229e-04
+7.3172,380.8746,0.00000000e+00
+7.9824,382.3466,0.00000000e+00
+8.6476,383.8185,0.00000000e+00
+9.3128,385.2904,6.50772927e-05
+9.9780,386.7624,3.07799564e-05
+10.6432,388.2343,2.18815490e-04
+11.3084,389.7062,0.00000000e+00
+11.9736,391.1781,1.07412739e-03
+12.6388,392.6501,0.00000000e+00
+13.3040,394.1220,0.00000000e+00
+13.9692,395.5939,0.00000000e+00
+14.6344,397.0659,0.00000000e+00
+15.2996,398.5378,5.47950214e-04
+15.9648,400.0097,1.37418648e-03
+16.6300,401.4816,0.00000000e+00
+17.2952,402.9536,3.19743616e-04
+17.9604,404.4255,4.93287342e-04
+18.6256,405.8974,0.00000000e+00
+19.2908,407.3694,0.00000000e+00
+19.9560,408.8413,0.00000000e+00
+20.6212,410.3132,0.00000000e+00
+21.2864,411.7852,0.00000000e+00
+21.9516,413.2571,6.80019904e-04
+22.6168,414.7290,9.88533488e-04
+23.2820,416.2009,2.46626121e-04
+23.9472,417.6729,0.00000000e+00
+24.6124,419.1448,5.26058371e-04
+25.2776,420.6167,0.00000000e+00
+25.9428,422.0887,0.00000000e+00
+26.6080,423.5606,7.10768625e-04
+27.2732,425.0325,1.05093466e-03
+27.9384,426.5044,0.00000000e+00
+28.6036,427.9763,0.00000000e+00
+29.2688,429.4483,1.52240464e-04
+29.9340,430.9202,0.00000000e+00
+30.5992,432.3922,0.00000000e+00
+31.2644,433.8641,8.57658393e-04
+31.9296,435.3360,5.15724707e-04
+32.5948,436.8079,0.00000000e+00
+33.2600,438.2799,2.71180586e-04
+33.9252,439.7518,0.00000000e+00
+34.5904,441.2237,0.00000000e+00
+35.2556,442.6956,6.70324429e-04
+35.9208,444.1676,0.00000000e+00
+36.5860,445.6395,1.70999600e-04
+37.2512,447.1115,0.00000000e+00
+37.9164,448.5834,4.93497704e-04
+38.5816,450.0553,4.36012662e-04
+39.2468,451.5272,4.81354422e-04
+39.9120,452.9991,1.31371443e-03
+40.5772,454.4711,2.34184001e-04
+41.2424,455.9430,1.04108686e-03
+41.9076,457.4149,1.50044711e-04
+42.5728,458.8869,8.34635575e-04
+43.2380,460.3588,1.06779486e-03
+43.9032,461.8307,0.00000000e+00
+44.5685,463.3027,0.00000000e+00
+45.2336,464.7746,0.00000000e+00
+45.8988,466.2465,1.60773075e-03
+46.5640,467.7184,2.07333374e-04
+47.2292,469.1904,3.63978004e-04
+47.8944,470.6623,5.92404627e-04
+48.5597,472.1342,0.00000000e+00
+49.2249,473.6062,1.74704561e-04
+49.8901,475.0781,0.00000000e+00
+50.5552,476.5500,2.51386169e-04
+51.2204,478.0219,0.00000000e+00
+51.8856,479.4939,1.37569776e-04
+52.5509,480.9658,0.00000000e+00
+53.2161,482.4377,0.00000000e+00
+53.8813,483.9097,0.00000000e+00
+54.5465,485.3816,3.58428573e-04
+55.2117,486.8535,0.00000000e+00
+55.8768,488.3254,0.00000000e+00
+56.5421,489.7974,1.80410760e-04
+57.2073,491.2693,0.00000000e+00
+57.8725,492.7412,9.59867320e-04
+58.5377,494.2132,0.00000000e+00
+59.2029,495.6851,4.67188394e-04
+59.8681,497.1570,3.72440612e-04
+60.5333,498.6290,1.45289392e-04
+61.1985,500.1009,0.00000000e+00
+61.8637,501.5728,9.22614126e-04
+62.5289,503.0447,1.81148818e-04
+63.1941,504.5167,0.00000000e+00
+63.8593,505.9886,8.94503552e-04
+64.5245,507.4605,0.00000000e+00
+65.1897,508.9325,2.02531068e-04
+65.8549,510.4044,0.00000000e+00
+66.5201,511.8763,5.69999916e-04
+67.1853,513.3483,0.00000000e+00
+67.8505,514.8202,1.69400242e-03
+68.5157,516.2921,0.00000000e+00
+69.1809,517.7640,0.00000000e+00
+69.8461,519.2360,8.62503366e-04
+70.5113,520.7079,0.00000000e+00
+71.1765,522.1798,8.18723114e-04
+71.8417,523.6517,0.00000000e+00
+72.5069,525.1237,0.00000000e+00
+73.1721,526.5956,0.00000000e+00
+73.8373,528.0675,0.00000000e+00
+74.5025,529.5395,1.88172344e-04
+75.1677,531.0114,1.03203056e-03
+75.8329,532.4833,0.00000000e+00
+76.4981,533.9553,0.00000000e+00
+77.1633,535.4272,4.25234583e-04
+77.8285,536.8991,8.00865062e-04
+78.4937,538.3710,0.00000000e+00
+79.1589,539.8430,0.00000000e+00
+79.8241,541.3149,1.22141314e-03
+80.4893,542.7868,1.29713141e-03
+81.1545,544.2587,0.00000000e+00
+81.8197,545.7307,0.00000000e+00
+82.4849,547.2026,2.31914455e-04
+83.1501,548.6746,1.04001164e-03
+83.8153,550.1465,9.38953366e-04
+84.4805,551.6184,7.16494687e-04
+85.1457,553.0903,1.98072958e-04
+85.8109,554.5623,5.09480524e-05
+86.4761,556.0342,5.06953860e-04
+87.1413,557.5061,0.00000000e+00
+87.8065,558.9780,7.90247228e-04
+88.4717,560.4500,2.96445098e-04
+89.1369,561.9219,0.00000000e+00
+89.8021,563.3939,0.00000000e+00
+90.4673,564.8658,1.59723117e-04
+91.1325,566.3377,0.00000000e+00
+91.7977,567.8096,5.72098477e-04
+92.4629,569.2816,5.30853402e-04
+93.1281,570.7535,2.36758206e-04
+93.7933,572.2254,5.24272211e-04
+94.4585,573.6973,0.00000000e+00
+95.1237,575.1693,2.30416525e-04
+95.7889,576.6412,1.10662251e-03
+96.4541,578.1131,0.00000000e+00
+97.1193,579.5850,0.00000000e+00
+97.7845,581.0570,0.00000000e+00
+98.4497,582.5289,3.89328459e-04
+99.1149,584.0009,4.86545352e-04
+99.7801,585.4728,0.00000000e+00
+100.4453,586.9447,7.71243067e-04
+101.1105,588.4166,1.13402930e-04
+101.7757,589.8885,3.68204273e-05
+102.4409,591.3605,4.90473292e-04
+103.1061,592.8324,0.00000000e+00
+103.7713,594.3043,6.55126409e-04
+104.4365,595.7762,9.40100799e-05
+105.1017,597.2482,1.04151106e-04
+105.7669,598.7202,2.08719634e-03
+106.4321,600.1921,2.95719656e-05
+107.0973,601.6640,1.58572686e-03
+107.7625,603.1359,1.13254879e-04
+108.4277,604.6078,1.15079188e-03
+109.0929,606.0798,2.08338303e-03
+109.7581,607.5517,5.21472830e-04
+110.4233,609.0236,6.79535733e-05
+111.0885,610.4955,5.73030615e-04
+111.7537,611.9675,0.00000000e+00
+112.4189,613.4394,9.16953664e-04
+113.0841,614.9113,0.00000000e+00
+113.7493,616.3833,5.51146222e-04
+114.4145,617.8552,1.30388723e-03
+115.0797,619.3271,0.00000000e+00
+115.7449,620.7991,0.00000000e+00
+116.4101,622.2710,6.74188253e-04
+117.0753,623.7429,8.80418927e-04
+117.7405,625.2148,1.62283634e-03
+118.4057,626.6868,8.85614601e-04
+119.0709,628.1587,6.28836744e-04
+119.7361,629.6306,2.79348763e-03
+120.4013,631.1025,2.38007749e-03
+121.0665,632.5745,2.06483225e-03
+121.7317,634.0464,1.89261895e-03
+122.3969,635.5184,3.34326248e-03
+123.0621,636.9903,3.17408680e-03
+123.7273,638.4622,3.25309113e-03
+124.3925,639.9341,2.63265800e-03
+125.0577,641.4061,2.07369868e-03
+125.7229,642.8780,2.72166776e-03
+126.3881,644.3499,3.06010875e-03
+127.0533,645.8218,4.91242018e-03
+127.7185,647.2938,4.73933620e-03
+128.3837,648.7657,5.92437340e-03
+129.0489,650.2377,7.10975565e-03
+129.7141,651.7096,5.48701547e-03
+130.3793,653.1815,6.72481908e-03
+131.0445,654.6534,6.98447973e-03
+131.7097,656.1254,8.46836064e-03
+132.3749,657.5973,8.53952300e-03
+133.0401,659.0692,9.92587768e-03
+133.7053,660.5411,9.76461079e-03
+134.3705,662.0131,1.02949049e-02
+135.0357,663.4850,1.22858966e-02
+135.7009,664.9569,1.36982491e-02
+136.3661,666.4288,1.42231649e-02
+137.0313,667.9008,1.63694955e-02
+137.6965,669.3727,1.75559651e-02
+138.3617,670.8447,1.78160928e-02
+139.0269,672.3166,2.02802885e-02
+139.6921,673.7885,2.03813855e-02
+140.3573,675.2604,2.16904897e-02
+141.0225,676.7324,2.40591578e-02
+141.6877,678.2043,2.63027661e-02
+142.3529,679.6762,2.81848237e-02
+143.0181,681.1481,2.97241360e-02
+143.6833,682.6201,3.11403871e-02
+144.3485,684.0920,3.33550759e-02
+145.0138,685.5640,3.41450311e-02
+145.6789,687.0359,3.61318290e-02
+146.3441,688.5078,3.66185643e-02
+147.0093,689.9797,3.33713144e-02
+147.6745,691.4517,3.46587524e-02
+148.3397,692.9236,3.34062427e-02
+149.0049,694.3955,3.14214677e-02
+149.6701,695.8674,2.69042198e-02
+150.3353,697.3394,2.55288314e-02
+151.0005,698.8113,2.04316229e-02
+151.6657,700.2832,1.74586698e-02
+152.3310,701.7552,1.37579050e-02
+152.9962,703.2271,1.04796002e-02
+153.6614,704.6990,7.49473181e-03
+154.3266,706.1710,4.57012141e-03
+154.9918,707.6429,3.72168981e-03
+155.6570,709.1148,2.55257776e-03
+156.3221,710.5867,2.56464235e-04
+156.9873,712.0587,1.83079811e-03
+157.6525,713.5306,4.92289837e-04
+158.3177,715.0025,0.00000000e+00
+158.9829,716.4744,5.48902026e-05
+159.6481,717.9464,2.65701747e-05
+160.3134,719.4183,2.86928553e-04
+160.9786,720.8903,3.47316556e-04
+161.6438,722.3622,4.54085442e-04
+162.3090,723.8341,0.00000000e+00
+162.9742,725.3060,0.00000000e+00
+163.6394,726.7780,0.00000000e+00
+164.3046,728.2499,5.92278317e-04
+164.9698,729.7218,0.00000000e+00
+165.6350,731.1937,0.00000000e+00
+166.3002,732.6656,1.99746763e-04
+166.9653,734.1376,9.73700895e-04
+167.6305,735.6095,0.00000000e+00
+168.2958,737.0815,2.74595455e-04
+168.9610,738.5534,1.02339103e-03
+169.6262,740.0253,0.00000000e+00
+170.2914,741.4973,0.00000000e+00
+170.9566,742.9692,2.37277141e-04
+171.6218,744.4411,5.20775560e-04
+172.2870,745.9130,0.00000000e+00
+172.9522,747.3849,0.00000000e+00
+173.6174,748.8569,0.00000000e+00
+174.2826,750.3288,0.00000000e+00
+174.9478,751.8007,0.00000000e+00
+175.6130,753.2726,6.28043344e-05
+176.2782,754.7446,0.00000000e+00
+176.9434,756.2166,6.73753442e-04
+177.6086,757.6885,0.00000000e+00
+178.2738,759.1604,1.26846950e-04
+178.9390,760.6323,0.00000000e+00
+179.6042,762.1042,1.11309777e-03
+180.2694,763.5762,0.00000000e+00
+180.9346,765.0481,5.87674149e-04
+181.5998,766.5200,0.00000000e+00
+182.2650,767.9919,0.00000000e+00
+182.9302,769.4639,1.43977813e-04
+183.5954,770.9359,8.23401031e-04
+184.2606,772.4078,5.37283922e-05
+184.9258,773.8797,8.14380182e-04
+185.5910,775.3516,1.02703425e-03
+186.2562,776.8235,7.23455159e-04
+186.9214,778.2955,6.83485196e-05
+187.5866,779.7674,0.00000000e+00
+188.2518,781.2393,0.00000000e+00
+188.9170,782.7112,0.00000000e+00
+189.5822,784.1832,1.62264205e-05
+190.2474,785.6551,2.27083234e-04
+190.9126,787.1270,0.00000000e+00
+191.5778,788.5990,5.73950703e-04
+192.2430,790.0709,8.01242189e-04
+192.9082,791.5428,6.69146539e-04
+193.5734,793.0148,8.88585273e-05
+194.2386,794.4867,0.00000000e+00
+194.9038,795.9586,0.00000000e+00
+195.5690,797.4305,3.07779672e-04
+196.2342,798.9025,1.76449399e-03
+196.8994,800.3744,6.73142786e-04
+197.5646,801.8463,0.00000000e+00
+198.2298,803.3182,0.00000000e+00
+198.8950,804.7902,0.00000000e+00
+199.5602,806.2621,0.00000000e+00
+200.2254,807.7341,3.99628014e-04
+200.8906,809.2060,7.86531018e-04
+201.5558,810.6779,0.00000000e+00
+202.2210,812.1498,0.00000000e+00
+202.8862,813.6218,2.65606388e-04
+203.5514,815.0937,0.00000000e+00
+204.2166,816.5656,3.81128950e-04
+204.8818,818.0375,3.75080766e-04
+205.5470,819.5095,6.99196826e-04
+206.2122,820.9814,0.00000000e+00
+206.8774,822.4533,0.00000000e+00
+207.5426,823.9253,0.00000000e+00
+208.2078,825.3972,0.00000000e+00
+208.8730,826.8691,0.00000000e+00
+209.5382,828.3411,0.00000000e+00
+210.2034,829.8130,1.16989808e-03
+210.8686,831.2849,3.80693033e-04
+211.5338,832.7568,7.89002341e-04
+212.1990,834.2288,0.00000000e+00
+212.8642,835.7007,5.75959624e-04
+213.5294,837.1726,0.00000000e+00
+214.1946,838.6445,4.00043064e-04
+214.8598,840.1165,0.00000000e+00
+215.5250,841.5884,0.00000000e+00
+216.1902,843.0604,0.00000000e+00
+216.8554,844.5323,0.00000000e+00
+217.5206,846.0042,1.38659833e-03
+218.1858,847.4761,0.00000000e+00
+218.8510,848.9481,0.00000000e+00
+219.5162,850.4200,3.24107299e-04
+220.1814,851.8919,2.63722904e-04
+220.8466,853.3638,3.66958120e-04
+221.5118,854.8358,3.16707621e-04
+222.1770,856.3077,3.96410678e-06
+222.8422,857.7797,7.75483553e-04
+223.5074,859.2516,3.66380875e-04
+224.1726,860.7235,5.65686132e-05
+224.8378,862.1954,1.02161441e-03
+225.5030,863.6674,0.00000000e+00
+226.1682,865.1393,0.00000000e+00
+226.8334,866.6112,0.00000000e+00
+227.4986,868.0831,2.40422320e-04
+228.1638,869.5551,0.00000000e+00
+228.8290,871.0270,0.00000000e+00
+229.4942,872.4989,4.06318024e-04
+230.1594,873.9708,1.56652846e-03
+230.8246,875.4428,0.00000000e+00
+231.4898,876.9147,1.05118996e-03
+232.1550,878.3867,0.00000000e+00
+232.8202,879.8586,2.97366321e-04
+233.4854,881.3305,0.00000000e+00
+234.1506,882.8024,1.95950633e-04
+234.8158,884.2744,9.86423183e-05
+235.4810,885.7463,2.88154260e-04
+236.1462,887.2182,0.00000000e+00
+236.8114,888.6901,0.00000000e+00
+237.4766,890.1620,5.88020484e-04
+238.1418,891.6340,0.00000000e+00
+238.8070,893.1060,0.00000000e+00
+239.4722,894.5779,8.43081449e-04
+240.1374,896.0498,0.00000000e+00
+240.8026,897.5217,5.80438878e-04
+241.4678,898.9937,1.02535030e-03
+242.1330,900.4656,0.00000000e+00
+242.7982,901.9375,0.00000000e+00
+243.4634,903.4094,0.00000000e+00
+244.1286,904.8813,1.83747604e-03
+244.7938,906.3533,7.28492858e-04
+245.4590,907.8252,0.00000000e+00
+246.1242,909.2971,0.00000000e+00
+246.7894,910.7691,1.62346405e-03
+247.4546,912.2410,6.15842524e-04
+248.1198,913.7130,0.00000000e+00
+248.7850,915.1849,2.33569823e-04
+249.4502,916.6568,2.75317725e-04
+250.1154,918.1287,0.00000000e+00
+250.7806,919.6006,9.49944428e-04
+251.4458,921.0726,5.04453899e-04
+252.1110,922.5445,0.00000000e+00
+252.7762,924.0164,8.75622092e-04
+253.4414,925.4883,0.00000000e+00
+254.1067,926.9603,0.00000000e+00
+254.7719,928.4323,5.03680822e-05
+255.4371,929.9042,4.09225118e-04
+256.1023,931.3761,0.00000000e+00
+256.7674,932.8480,1.02649559e-04
+257.4326,934.3199,0.00000000e+00
+258.0978,935.7919,0.00000000e+00
+258.7630,937.2638,1.48649875e-03
+259.4282,938.7357,0.00000000e+00
+260.0934,940.2076,4.07327636e-04
+260.7586,941.6796,0.00000000e+00
+261.4238,943.1515,0.00000000e+00
+262.0891,944.6235,5.50961355e-04
+262.7543,946.0954,1.28425146e-03
+263.4195,947.5673,0.00000000e+00
+264.0847,949.0392,1.00396888e-03
+264.7499,950.5112,8.46167444e-04
+265.4151,951.9831,0.00000000e+00
+266.0803,953.4550,8.30726465e-04
+266.7455,954.9269,0.00000000e+00
+267.4106,956.3989,0.00000000e+00
+268.0758,957.8708,5.55903534e-04
+268.7410,959.3427,0.00000000e+00
+269.4062,960.8146,0.00000000e+00
+270.0715,962.2866,0.00000000e+00
+270.7367,963.7585,0.00000000e+00
+271.4019,965.2305,0.00000000e+00
+272.0671,966.7024,0.00000000e+00
+272.7323,968.1743,0.00000000e+00
+273.3975,969.6462,0.00000000e+00
+274.0627,971.1182,8.82268418e-04
+274.7279,972.5901,0.00000000e+00
+275.3931,974.0620,3.09459836e-04
+276.0583,975.5339,0.00000000e+00
+276.7235,977.0059,0.00000000e+00
+277.3887,978.4778,0.00000000e+00
+278.0539,979.9498,5.04175259e-04
+278.7191,981.4217,1.44557469e-03
+279.3843,982.8936,1.08139400e-04
+280.0495,984.3655,3.30453593e-04
+280.7147,985.8375,3.32556025e-04
+281.3799,987.3094,1.05321524e-03
+282.0451,988.7813,0.00000000e+00
+282.7103,990.2532,0.00000000e+00
+283.3755,991.7252,4.23170248e-04
+284.0407,993.1971,1.88009435e-04
+284.7059,994.6690,0.00000000e+00
+285.3711,996.1409,0.00000000e+00
+286.0363,997.6129,2.73535316e-05
+286.7015,999.0848,5.51445846e-05
+287.3667,1000.5568,0.00000000e+00
+288.0319,1002.0287,0.00000000e+00
+288.6971,1003.5006,3.19483981e-04
+289.3623,1004.9725,4.36044560e-04
+290.0275,1006.4445,0.00000000e+00
+290.6927,1007.9164,0.00000000e+00
+291.3579,1009.3883,0.00000000e+00
+292.0231,1010.8602,1.58593437e-04
+292.6883,1012.3322,1.27480482e-04
+293.3535,1013.8041,6.14904042e-04
+294.0187,1015.2761,0.00000000e+00
+294.6839,1016.7480,0.00000000e+00
+295.3491,1018.2199,0.00000000e+00
+296.0143,1019.6918,0.00000000e+00
+296.6795,1021.1638,0.00000000e+00
+297.3447,1022.6357,0.00000000e+00
+298.0099,1024.1077,1.44447113e-04
+298.6751,1025.5796,0.00000000e+00
+299.3403,1027.0515,0.00000000e+00
+300.0055,1028.5234,1.18203261e-05
+300.6707,1029.9954,4.91754035e-04
+301.3359,1031.4673,1.56211856e-04
+302.0011,1032.9392,0.00000000e+00
+302.6663,1034.4111,0.00000000e+00
+303.3315,1035.8831,0.00000000e+00
+303.9967,1037.3550,0.00000000e+00
+304.6619,1038.8269,9.29988601e-05
+305.3271,1040.2988,3.16541933e-04
+305.9923,1041.7708,5.68270101e-04
+306.6575,1043.2427,2.22263916e-04
+307.3227,1044.7146,0.00000000e+00
+307.9879,1046.1865,6.84407249e-04
+308.6531,1047.6584,2.25372089e-04
+309.3183,1049.1304,0.00000000e+00
+309.9835,1050.6023,2.64801783e-04
+310.6487,1052.0742,0.00000000e+00
+311.3139,1053.5461,0.00000000e+00
+311.9791,1055.0181,1.08707801e-03
+312.6443,1056.4900,6.28764450e-04
+313.3095,1057.9620,0.00000000e+00
+313.9747,1059.4340,0.00000000e+00
+314.6399,1060.9059,1.35278591e-04
+315.3051,1062.3778,0.00000000e+00
+315.9703,1063.8497,0.00000000e+00
+316.6355,1065.3217,1.04055129e-04
+317.3007,1066.7936,0.00000000e+00
+317.9659,1068.2655,0.00000000e+00
+318.6311,1069.7374,3.02356406e-04
+319.2963,1071.2094,1.85661644e-04
+319.9615,1072.6813,0.00000000e+00
+320.6267,1074.1532,0.00000000e+00
+321.2919,1075.6251,6.85052015e-04
+321.9571,1077.0970,0.00000000e+00
+322.6223,1078.5690,3.51619456e-05
+323.2875,1080.0409,5.27668772e-06
+323.9527,1081.5128,0.00000000e+00
+324.6179,1082.9847,0.00000000e+00
+325.2831,1084.4567,0.00000000e+00
+325.9483,1085.9286,0.00000000e+00
+326.6135,1087.4005,7.33178695e-06
+327.2787,1088.8724,0.00000000e+00
+327.9439,1090.3444,0.00000000e+00
+328.6091,1091.8164,0.00000000e+00
+329.2743,1093.2883,6.39972801e-04
+329.9395,1094.7603,0.00000000e+00
+330.6047,1096.2322,3.97059717e-04
+331.2699,1097.7041,0.00000000e+00
+331.9351,1099.1760,2.23972267e-04
diff --git a/demo_data/tpd_FirstOrderCovDep_3.csv b/demo_data/tpd_FirstOrderCovDep_3.csv
new file mode 100644
index 0000000000000000000000000000000000000000..31677e26dfe4acddbc32a7e77c823923d89f245b
--- /dev/null
+++ b/demo_data/tpd_FirstOrderCovDep_3.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,0.00000000e+00
+0.0874,366.1553,0.00000000e+00
+0.1747,367.6273,1.32179586e-03
+0.2621,369.0992,0.00000000e+00
+0.3495,370.5711,5.45495097e-03
+0.4369,372.0431,0.00000000e+00
+0.5242,373.5150,0.00000000e+00
+0.6116,374.9869,0.00000000e+00
+0.6990,376.4588,1.52755622e-03
+0.7864,377.9308,2.86837295e-03
+0.8737,379.4027,8.31987127e-04
+0.9611,380.8746,0.00000000e+00
+1.0485,382.3466,0.00000000e+00
+1.1359,383.8185,0.00000000e+00
+1.2232,385.2904,0.00000000e+00
+1.3106,386.7624,3.95026058e-04
+1.3980,388.2343,2.77658622e-03
+1.4854,389.7062,0.00000000e+00
+1.5727,391.1781,0.00000000e+00
+1.6601,392.6501,0.00000000e+00
+1.7475,394.1220,5.02606330e-04
+1.8349,395.5939,0.00000000e+00
+1.9222,397.0659,1.87747134e-03
+2.0096,398.5378,0.00000000e+00
+2.0970,400.0097,0.00000000e+00
+2.1844,401.4816,0.00000000e+00
+2.2717,402.9536,3.94822611e-03
+2.3591,404.4255,0.00000000e+00
+2.4465,405.8974,7.90150743e-03
+2.5339,407.3694,0.00000000e+00
+2.6212,408.8413,3.45540553e-04
+2.7086,410.3132,1.38865970e-03
+2.7960,411.7852,0.00000000e+00
+2.8833,413.2571,3.99958249e-03
+2.9707,414.7290,2.27357959e-03
+3.0581,416.2009,0.00000000e+00
+3.1455,417.6729,6.01935713e-03
+3.2328,419.1448,0.00000000e+00
+3.3202,420.6167,4.95518884e-03
+3.4076,422.0887,0.00000000e+00
+3.4950,423.5606,0.00000000e+00
+3.5823,425.0325,0.00000000e+00
+3.6697,426.5044,3.12948925e-03
+3.7571,427.9763,5.89956250e-03
+3.8445,429.4483,0.00000000e+00
+3.9318,430.9202,4.14048060e-04
+4.0192,432.3922,0.00000000e+00
+4.1066,433.8641,1.42810226e-03
+4.1940,435.3360,0.00000000e+00
+4.2813,436.8079,6.13294193e-04
+4.3687,438.2799,9.55834344e-04
+4.4561,439.7518,3.05585889e-03
+4.5435,441.2237,0.00000000e+00
+4.6308,442.6956,1.79848901e-03
+4.7182,444.1676,0.00000000e+00
+4.8056,445.6395,0.00000000e+00
+4.8930,447.1115,0.00000000e+00
+4.9803,448.5834,0.00000000e+00
+5.0677,450.0553,6.72202930e-03
+5.1551,451.5272,0.00000000e+00
+5.2424,452.9991,2.15428445e-05
+5.3298,454.4711,2.60887411e-03
+5.4172,455.9430,0.00000000e+00
+5.5046,457.4149,0.00000000e+00
+5.5919,458.8869,0.00000000e+00
+5.6793,460.3588,2.99193664e-03
+5.7667,461.8307,0.00000000e+00
+5.8541,463.3027,2.34719759e-04
+5.9414,464.7746,0.00000000e+00
+6.0288,466.2465,2.25558784e-03
+6.1162,467.7184,6.64586667e-04
+6.2036,469.1904,0.00000000e+00
+6.2909,470.6623,0.00000000e+00
+6.3783,472.1342,1.07085321e-03
+6.4657,473.6062,2.78024864e-03
+6.5531,475.0781,6.62331877e-04
+6.6404,476.5500,1.71438418e-03
+6.7278,478.0219,0.00000000e+00
+6.8152,479.4939,0.00000000e+00
+6.9026,480.9658,4.40804195e-03
+6.9899,482.4377,3.50379245e-03
+7.0773,483.9097,0.00000000e+00
+7.1647,485.3816,0.00000000e+00
+7.2521,486.8535,0.00000000e+00
+7.3394,488.3254,7.21626682e-04
+7.4268,489.7974,4.23531467e-03
+7.5142,491.2693,0.00000000e+00
+7.6016,492.7412,0.00000000e+00
+7.6889,494.2132,0.00000000e+00
+7.7763,495.6851,0.00000000e+00
+7.8637,497.1570,1.68110582e-03
+7.9511,498.6290,0.00000000e+00
+8.0384,500.1009,0.00000000e+00
+8.1258,501.5728,0.00000000e+00
+8.2132,503.0447,1.23419415e-03
+8.3005,504.5167,0.00000000e+00
+8.3879,505.9886,0.00000000e+00
+8.4753,507.4605,0.00000000e+00
+8.5627,508.9325,0.00000000e+00
+8.6500,510.4044,0.00000000e+00
+8.7374,511.8763,0.00000000e+00
+8.8248,513.3483,8.79094191e-03
+8.9122,514.8202,2.57830805e-04
+8.9995,516.2921,0.00000000e+00
+9.0869,517.7640,3.91149055e-03
+9.1743,519.2360,0.00000000e+00
+9.2617,520.7079,0.00000000e+00
+9.3490,522.1798,2.25064368e-03
+9.4364,523.6517,2.80338316e-03
+9.5238,525.1237,0.00000000e+00
+9.6112,526.5956,1.24953117e-03
+9.6985,528.0675,0.00000000e+00
+9.7859,529.5395,0.00000000e+00
+9.8733,531.0114,1.92302710e-03
+9.9607,532.4833,0.00000000e+00
+10.0480,533.9553,0.00000000e+00
+10.1354,535.4272,0.00000000e+00
+10.2228,536.8991,2.91328947e-03
+10.3102,538.3710,0.00000000e+00
+10.3975,539.8430,0.00000000e+00
+10.4849,541.3149,4.46226308e-03
+10.5723,542.7868,1.29189619e-04
+10.6596,544.2587,0.00000000e+00
+10.7470,545.7307,0.00000000e+00
+10.8344,547.2026,2.58971850e-04
+10.9218,548.6746,0.00000000e+00
+11.0091,550.1465,2.21948678e-04
+11.0965,551.6184,4.09932388e-03
+11.1839,553.0903,0.00000000e+00
+11.2713,554.5623,7.70552084e-04
+11.3586,556.0342,1.94497907e-03
+11.4460,557.5061,2.71024927e-03
+11.5334,558.9780,0.00000000e+00
+11.6208,560.4500,2.49853940e-03
+11.7081,561.9219,6.79129676e-04
+11.7955,563.3939,0.00000000e+00
+11.8829,564.8658,0.00000000e+00
+11.9703,566.3377,0.00000000e+00
+12.0576,567.8096,0.00000000e+00
+12.1450,569.2816,4.26547043e-03
+12.2324,570.7535,2.99808802e-03
+12.3198,572.2254,2.75688223e-03
+12.4071,573.6973,0.00000000e+00
+12.4945,575.1693,1.01112016e-03
+12.5819,576.6412,1.91675499e-04
+12.6693,578.1131,0.00000000e+00
+12.7566,579.5850,0.00000000e+00
+12.8440,581.0570,1.66482246e-03
+12.9314,582.5289,0.00000000e+00
+13.0188,584.0009,0.00000000e+00
+13.1061,585.4728,0.00000000e+00
+13.1935,586.9447,2.17681448e-03
+13.2809,588.4166,0.00000000e+00
+13.3682,589.8885,5.76949865e-03
+13.4556,591.3605,4.69697174e-04
+13.5430,592.8324,0.00000000e+00
+13.6304,594.3043,0.00000000e+00
+13.7177,595.7762,1.14909443e-03
+13.8051,597.2482,0.00000000e+00
+13.8925,598.7202,3.23431729e-03
+13.9799,600.1921,0.00000000e+00
+14.0672,601.6640,0.00000000e+00
+14.1546,603.1359,4.80780471e-03
+14.2420,604.6078,0.00000000e+00
+14.3294,606.0798,3.47900961e-04
+14.4167,607.5517,0.00000000e+00
+14.5041,609.0236,0.00000000e+00
+14.5915,610.4955,2.35779304e-03
+14.6789,611.9675,0.00000000e+00
+14.7662,613.4394,0.00000000e+00
+14.8536,614.9113,0.00000000e+00
+14.9410,616.3833,0.00000000e+00
+15.0284,617.8552,2.16876913e-04
+15.1157,619.3271,3.41277500e-03
+15.2031,620.7991,3.20489053e-03
+15.2905,622.2710,6.79364987e-03
+15.3779,623.7429,0.00000000e+00
+15.4652,625.2148,1.01461727e-03
+15.5526,626.6868,6.69799466e-03
+15.6400,628.1587,4.16930718e-03
+15.7273,629.6306,4.60672751e-03
+15.8147,631.1025,3.26071586e-03
+15.9021,632.5745,2.78874487e-03
+15.9895,634.0464,1.85662089e-03
+16.0768,635.5184,2.54760892e-03
+16.1642,636.9903,0.00000000e+00
+16.2516,638.4622,3.44959483e-03
+16.3390,639.9341,2.11890298e-03
+16.4263,641.4061,2.37999065e-03
+16.5137,642.8780,7.76991015e-03
+16.6011,644.3499,8.70221062e-04
+16.6885,645.8218,1.90090737e-03
+16.7758,647.2938,4.80559748e-03
+16.8632,648.7657,3.24845221e-03
+16.9506,650.2377,4.24150983e-03
+17.0380,651.7096,4.10530251e-03
+17.1253,653.1815,6.31721085e-03
+17.2127,654.6534,7.46910600e-03
+17.3001,656.1254,8.81267898e-03
+17.3875,657.5973,1.23606622e-02
+17.4748,659.0692,1.44883562e-02
+17.5622,660.5411,1.14462711e-02
+17.6496,662.0131,1.09667750e-02
+17.7370,663.4850,1.03517398e-02
+17.8243,664.9569,1.45265562e-02
+17.9117,666.4288,1.74527075e-02
+17.9991,667.9008,1.44509748e-02
+18.0865,669.3727,1.24248117e-02
+18.1738,670.8447,2.09780242e-02
+18.2612,672.3166,1.86361689e-02
+18.3486,673.7885,2.44485326e-02
+18.4360,675.2604,2.18774006e-02
+18.5233,676.7324,2.15834975e-02
+18.6107,678.2043,2.49843467e-02
+18.6981,679.6762,2.43851263e-02
+18.7854,681.1481,2.82576177e-02
+18.8728,682.6201,3.30057777e-02
+18.9602,684.0920,3.59323919e-02
+19.0476,685.5640,3.80613320e-02
+19.1349,687.0359,4.52871099e-02
+19.2223,688.5078,4.87167202e-02
+19.3097,689.9797,4.84021306e-02
+19.3971,691.4517,4.59252708e-02
+19.4844,692.9236,5.57553582e-02
+19.5718,694.3955,6.63079172e-02
+19.6592,695.8674,6.62496015e-02
+19.7466,697.3394,7.24119321e-02
+19.8339,698.8113,7.65388459e-02
+19.9213,700.2832,8.76888707e-02
+20.0087,701.7552,8.98004994e-02
+20.0961,703.2271,9.89520848e-02
+20.1834,704.6990,1.02867857e-01
+20.2708,706.1710,1.11415520e-01
+20.3582,707.6429,1.21412173e-01
+20.4456,709.1148,1.23104498e-01
+20.5329,710.5867,1.32486150e-01
+20.6203,712.0587,1.44136816e-01
+20.7077,713.5306,1.53458387e-01
+20.7951,715.0025,1.64485201e-01
+20.8824,716.4744,1.71540082e-01
+20.9698,717.9464,1.86432272e-01
+21.0572,719.4183,1.98976800e-01
+21.1446,720.8903,2.05763146e-01
+21.2319,722.3622,2.08348826e-01
+21.3193,723.8341,2.21082494e-01
+21.4067,725.3060,2.34085679e-01
+21.4940,726.7780,2.31439158e-01
+21.5814,728.2499,2.34933063e-01
+21.6688,729.7218,2.34656706e-01
+21.7562,731.1937,2.35512927e-01
+21.8435,732.6656,2.29780644e-01
+21.9309,734.1376,2.14227512e-01
+22.0183,735.6095,2.09815100e-01
+22.1057,737.0815,1.84008628e-01
+22.1930,738.5534,1.68948397e-01
+22.2804,740.0253,1.45380110e-01
+22.3678,741.4973,1.23896651e-01
+22.4552,742.9692,9.63103995e-02
+22.5425,744.4411,7.66189694e-02
+22.6299,745.9130,6.80129379e-02
+22.7173,747.3849,4.27592397e-02
+22.8047,748.8569,3.77132036e-02
+22.8920,750.3288,2.67293844e-02
+22.9794,751.8007,1.38580296e-02
+23.0668,753.2726,1.52060669e-02
+23.1542,754.7446,6.63570315e-03
+23.2415,756.2166,7.13559566e-03
+23.3289,757.6885,3.02878744e-03
+23.4163,759.1604,3.29362415e-03
+23.5037,760.6323,4.44961665e-03
+23.5910,762.1042,3.89313651e-03
+23.6784,763.5762,0.00000000e+00
+23.7658,765.0481,3.33829504e-03
+23.8531,766.5200,3.43705318e-03
+23.9405,767.9919,0.00000000e+00
+24.0279,769.4639,3.14087793e-03
+24.1153,770.9359,0.00000000e+00
+24.2026,772.4078,0.00000000e+00
+24.2900,773.8797,1.83892099e-03
+24.3774,775.3516,0.00000000e+00
+24.4648,776.8235,2.97160912e-03
+24.5521,778.2955,0.00000000e+00
+24.6395,779.7674,3.81084392e-04
+24.7269,781.2393,4.57773590e-03
+24.8143,782.7112,0.00000000e+00
+24.9016,784.1832,3.05710966e-03
+24.9890,785.6551,4.53075190e-04
+25.0764,787.1270,4.43993416e-03
+25.1638,788.5990,1.04988168e-03
+25.2511,790.0709,0.00000000e+00
+25.3385,791.5428,2.36581941e-03
+25.4259,793.0148,3.53294751e-03
+25.5133,794.4867,0.00000000e+00
+25.6006,795.9586,0.00000000e+00
+25.6880,797.4305,6.06294814e-03
+25.7754,798.9025,1.53225346e-03
+25.8628,800.3744,2.26337020e-03
+25.9501,801.8463,0.00000000e+00
+26.0375,803.3182,0.00000000e+00
+26.1249,804.7902,3.10716714e-05
+26.2123,806.2621,6.33876043e-05
+26.2996,807.7341,0.00000000e+00
+26.3870,809.2060,9.40525089e-04
+26.4744,810.6779,0.00000000e+00
+26.5617,812.1498,0.00000000e+00
+26.6491,813.6218,0.00000000e+00
+26.7365,815.0937,7.32751843e-03
+26.8239,816.5656,4.40987584e-04
+26.9112,818.0375,2.72005680e-04
+26.9986,819.5095,1.12041156e-03
+27.0860,820.9814,0.00000000e+00
+27.1734,822.4533,1.54791528e-03
+27.2607,823.9253,0.00000000e+00
+27.3481,825.3972,3.00431810e-03
+27.4355,826.8691,4.24434955e-04
+27.5229,828.3411,0.00000000e+00
+27.6102,829.8130,3.30967433e-03
+27.6976,831.2849,3.70386639e-03
+27.7850,832.7568,2.32631667e-03
+27.8724,834.2288,1.84666843e-03
+27.9597,835.7007,0.00000000e+00
+28.0471,837.1726,1.35979254e-03
+28.1345,838.6445,0.00000000e+00
+28.2219,840.1165,4.10574907e-03
+28.3092,841.5884,8.46292125e-04
+28.3966,843.0604,0.00000000e+00
+28.4840,844.5323,3.66053986e-03
+28.5714,846.0042,3.92642291e-03
+28.6587,847.4761,4.93062893e-04
+28.7461,848.9481,3.82273435e-03
+28.8335,850.4200,4.64083767e-03
+28.9209,851.8919,0.00000000e+00
+29.0082,853.3638,0.00000000e+00
+29.0956,854.8358,1.87246117e-03
+29.1830,856.3077,4.22227808e-04
+29.2703,857.7797,2.74076214e-04
+29.3577,859.2516,0.00000000e+00
+29.4451,860.7235,4.81601246e-03
+29.5325,862.1954,5.33633307e-03
+29.6198,863.6674,0.00000000e+00
+29.7072,865.1393,0.00000000e+00
+29.7946,866.6112,6.52571674e-03
+29.8820,868.0831,3.43356654e-03
+29.9693,869.5551,0.00000000e+00
+30.0567,871.0270,0.00000000e+00
+30.1441,872.4989,1.38594143e-04
+30.2315,873.9708,3.46449809e-03
+30.3188,875.4428,0.00000000e+00
+30.4062,876.9147,0.00000000e+00
+30.4936,878.3867,2.99049006e-03
+30.5810,879.8586,5.36038191e-04
+30.6683,881.3305,1.40900695e-04
+30.7557,882.8024,0.00000000e+00
+30.8431,884.2744,1.71168440e-03
+30.9305,885.7463,1.42269651e-03
+31.0178,887.2182,0.00000000e+00
+31.1052,888.6901,0.00000000e+00
+31.1926,890.1620,3.59321828e-03
+31.2800,891.6340,0.00000000e+00
+31.3673,893.1060,4.54602251e-03
+31.4547,894.5779,8.86415801e-05
+31.5421,896.0498,1.85928622e-03
+31.6295,897.5217,2.36524409e-03
+31.7168,898.9937,0.00000000e+00
+31.8042,900.4656,0.00000000e+00
+31.8916,901.9375,7.22195115e-03
+31.9789,903.4094,1.67678634e-03
+32.0663,904.8813,0.00000000e+00
+32.1537,906.3533,1.35574536e-03
+32.2411,907.8252,4.42378037e-03
+32.3284,909.2971,0.00000000e+00
+32.4158,910.7691,0.00000000e+00
+32.5032,912.2410,5.74070436e-04
+32.5906,913.7130,3.81800323e-03
+32.6779,915.1849,3.01782438e-03
+32.7653,916.6568,0.00000000e+00
+32.8527,918.1287,0.00000000e+00
+32.9401,919.6006,1.93618750e-03
+33.0274,921.0726,6.71622402e-04
+33.1148,922.5445,1.22685183e-03
+33.2022,924.0164,0.00000000e+00
+33.2896,925.4883,0.00000000e+00
+33.3769,926.9603,2.11784011e-03
+33.4643,928.4323,4.04776027e-03
+33.5517,929.9042,1.12359517e-03
+33.6391,931.3761,0.00000000e+00
+33.7264,932.8480,0.00000000e+00
+33.8138,934.3199,0.00000000e+00
+33.9012,935.7919,1.34891097e-03
+33.9886,937.2638,0.00000000e+00
+34.0759,938.7357,0.00000000e+00
+34.1633,940.2076,0.00000000e+00
+34.2507,941.6796,0.00000000e+00
+34.3380,943.1515,0.00000000e+00
+34.4254,944.6235,1.30316324e-03
+34.5128,946.0954,4.11291199e-04
+34.6002,947.5673,0.00000000e+00
+34.6875,949.0392,0.00000000e+00
+34.7749,950.5112,0.00000000e+00
+34.8623,951.9831,0.00000000e+00
+34.9497,953.4550,0.00000000e+00
+35.0370,954.9269,1.15637842e-03
+35.1244,956.3989,6.48576114e-03
+35.2118,957.8708,5.82980923e-03
+35.2992,959.3427,2.38725054e-03
+35.3865,960.8146,3.37678636e-03
+35.4739,962.2866,0.00000000e+00
+35.5613,963.7585,1.73907902e-03
+35.6487,965.2305,1.75585866e-03
+35.7360,966.7024,0.00000000e+00
+35.8234,968.1743,4.01053438e-03
+35.9108,969.6462,0.00000000e+00
+35.9982,971.1182,2.69903481e-04
+36.0855,972.5901,2.60578189e-03
+36.1729,974.0620,3.50875081e-03
+36.2603,975.5339,0.00000000e+00
+36.3477,977.0059,4.66007245e-04
+36.4350,978.4778,1.51993532e-03
+36.5224,979.9498,4.81231976e-03
+36.6098,981.4217,2.19960767e-03
+36.6972,982.8936,8.37509724e-05
+36.7845,984.3655,2.72739120e-03
+36.8719,985.8375,1.09976747e-04
+36.9593,987.3094,0.00000000e+00
+37.0466,988.7813,9.67647240e-04
+37.1340,990.2532,0.00000000e+00
+37.2214,991.7252,0.00000000e+00
+37.3088,993.1971,2.16358714e-03
+37.3961,994.6690,0.00000000e+00
+37.4835,996.1409,1.33929774e-03
+37.5709,997.6129,0.00000000e+00
+37.6583,999.0848,0.00000000e+00
+37.7456,1000.5568,0.00000000e+00
+37.8330,1002.0287,0.00000000e+00
+37.9204,1003.5006,0.00000000e+00
+38.0078,1004.9725,0.00000000e+00
+38.0951,1006.4445,0.00000000e+00
+38.1825,1007.9164,2.06636707e-03
+38.2699,1009.3883,0.00000000e+00
+38.3573,1010.8602,0.00000000e+00
+38.4446,1012.3322,3.85436509e-03
+38.5320,1013.8041,4.30025335e-04
+38.6194,1015.2761,0.00000000e+00
+38.7068,1016.7480,2.42453883e-03
+38.7941,1018.2199,0.00000000e+00
+38.8815,1019.6918,0.00000000e+00
+38.9689,1021.1638,0.00000000e+00
+39.0563,1022.6357,0.00000000e+00
+39.1436,1024.1077,6.98792748e-03
+39.2310,1025.5796,0.00000000e+00
+39.3184,1027.0515,2.72145891e-03
+39.4058,1028.5234,0.00000000e+00
+39.4931,1029.9954,2.83822790e-03
+39.5805,1031.4673,0.00000000e+00
+39.6679,1032.9392,0.00000000e+00
+39.7552,1034.4111,0.00000000e+00
+39.8426,1035.8831,0.00000000e+00
+39.9300,1037.3550,1.53660809e-03
+40.0174,1038.8269,0.00000000e+00
+40.1047,1040.2988,0.00000000e+00
+40.1921,1041.7708,0.00000000e+00
+40.2795,1043.2427,2.01182649e-03
+40.3669,1044.7146,6.77638501e-03
+40.4542,1046.1865,0.00000000e+00
+40.5416,1047.6584,0.00000000e+00
+40.6290,1049.1304,5.88405004e-04
+40.7164,1050.6023,3.99931287e-03
+40.8037,1052.0742,3.68796638e-04
+40.8911,1053.5461,6.18402788e-04
+40.9785,1055.0181,1.02882608e-04
+41.0659,1056.4900,0.00000000e+00
+41.1532,1057.9620,3.23740562e-04
+41.2406,1059.4340,2.68733734e-03
+41.3280,1060.9059,2.80322414e-03
+41.4154,1062.3778,0.00000000e+00
+41.5027,1063.8497,0.00000000e+00
+41.5901,1065.3217,0.00000000e+00
+41.6775,1066.7936,0.00000000e+00
+41.7649,1068.2655,0.00000000e+00
+41.8522,1069.7374,0.00000000e+00
+41.9396,1071.2094,0.00000000e+00
+42.0270,1072.6813,0.00000000e+00
+42.1144,1074.1532,2.57496862e-03
+42.2017,1075.6251,0.00000000e+00
+42.2891,1077.0970,0.00000000e+00
+42.3765,1078.5690,1.16018555e-03
+42.4638,1080.0409,0.00000000e+00
+42.5512,1081.5128,1.98772945e-03
+42.6386,1082.9847,0.00000000e+00
+42.7260,1084.4567,4.12160996e-03
+42.8133,1085.9286,8.58307885e-06
+42.9007,1087.4005,4.61824564e-03
+42.9881,1088.8724,0.00000000e+00
+43.0755,1090.3444,2.55640550e-03
+43.1628,1091.8164,2.25406373e-03
+43.2502,1093.2883,1.28764333e-03
+43.3376,1094.7603,1.70192413e-03
+43.4250,1096.2322,0.00000000e+00
+43.5123,1097.7041,1.94199849e-03
+43.5997,1099.1760,1.08942459e-03
diff --git a/demo_data/tpd_FirstOrderCovDep_metadata.json b/demo_data/tpd_FirstOrderCovDep_metadata.json
new file mode 100644
index 0000000000000000000000000000000000000000..076dbd7bedcc94fea6a9c23efa814e3d05de9c9f
--- /dev/null
+++ b/demo_data/tpd_FirstOrderCovDep_metadata.json
@@ -0,0 +1,23 @@
+{
+ "mechanism": "FirstOrderCovDep",
+ "betas_Ks": [
+ 0.3162277638912201,
+ 2.212759494781494,
+ 16.846271514892578
+ ],
+ "n_rates": 3,
+ "true_params": {
+ "mechanism": "FirstOrderCovDep",
+ "Ed0": 23369.582400663046,
+ "alpha_cov": 1594.6989199486932,
+ "nu": 160197624009364.56,
+ "theta_0": 0.5589947991241528,
+ "T_start": 364.6834143679138,
+ "T_end": 1099.1759914138238
+ },
+ "csv_files": [
+ "tpd_FirstOrderCovDep_1.csv",
+ "tpd_FirstOrderCovDep_2.csv",
+ "tpd_FirstOrderCovDep_3.csv"
+ ]
+}
\ No newline at end of file
diff --git a/demo_data/tpd_FirstOrder_1.csv b/demo_data/tpd_FirstOrder_1.csv
new file mode 100644
index 0000000000000000000000000000000000000000..383d606bd71ed53aa8699fbf4c054fdc281837fb
--- /dev/null
+++ b/demo_data/tpd_FirstOrder_1.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,0.00000000e+00
+4.6546,366.1553,9.92057380e-07
+9.3093,367.6273,0.00000000e+00
+13.9640,369.0992,0.00000000e+00
+18.6186,370.5711,1.13877479e-06
+23.2733,372.0431,6.36123190e-08
+27.9279,373.5150,1.88556623e-06
+32.5825,374.9869,8.41972110e-07
+37.2372,376.4588,5.19576531e-07
+41.8919,377.9308,0.00000000e+00
+46.5465,379.4027,0.00000000e+00
+51.2011,380.8746,0.00000000e+00
+55.8558,382.3466,0.00000000e+00
+60.5104,383.8185,6.15963700e-06
+65.1651,385.2904,0.00000000e+00
+69.8198,386.7624,1.48219840e-06
+74.4744,388.2343,1.16209060e-06
+79.1290,389.7062,1.68884696e-06
+83.7837,391.1781,1.47339176e-06
+88.4383,392.6501,0.00000000e+00
+93.0930,394.1220,8.43898178e-08
+97.7477,395.5939,0.00000000e+00
+102.4023,397.0659,0.00000000e+00
+107.0569,398.5378,2.23488769e-06
+111.7116,400.0097,0.00000000e+00
+116.3662,401.4816,0.00000000e+00
+121.0209,402.9536,0.00000000e+00
+125.6755,404.4255,3.68085892e-07
+130.3302,405.8974,0.00000000e+00
+134.9848,407.3694,3.17780996e-06
+139.6394,408.8413,1.57147679e-06
+144.2941,410.3132,2.16098692e-06
+148.9488,411.7852,2.67736959e-06
+153.6034,413.2571,2.02271144e-06
+158.2581,414.7290,2.84981843e-06
+162.9127,416.2009,0.00000000e+00
+167.5673,417.6729,5.05039623e-07
+172.2220,419.1448,0.00000000e+00
+176.8767,420.6167,3.99880173e-06
+181.5313,422.0887,5.94376161e-07
+186.1860,423.5606,1.25003908e-06
+190.8406,425.0325,0.00000000e+00
+195.4952,426.5044,0.00000000e+00
+200.1498,427.9763,0.00000000e+00
+204.8046,429.4483,0.00000000e+00
+209.4592,430.9202,0.00000000e+00
+214.1138,432.3922,2.08272058e-06
+218.7685,433.8641,0.00000000e+00
+223.4231,435.3360,5.57945782e-07
+228.0777,436.8079,3.63075863e-08
+232.7325,438.2799,0.00000000e+00
+237.3871,439.7518,0.00000000e+00
+242.0417,441.2237,1.68102338e-06
+246.6964,442.6956,5.98109793e-08
+251.3510,444.1676,0.00000000e+00
+256.0056,445.6395,0.00000000e+00
+260.6603,447.1115,0.00000000e+00
+265.3150,448.5834,0.00000000e+00
+269.9696,450.0553,2.64208211e-06
+274.6242,451.5272,0.00000000e+00
+279.2789,452.9991,3.41229406e-06
+283.9335,454.4711,0.00000000e+00
+288.5882,455.9430,0.00000000e+00
+293.2429,457.4149,4.59396779e-06
+297.8975,458.8869,0.00000000e+00
+302.5521,460.3588,0.00000000e+00
+307.2068,461.8307,0.00000000e+00
+311.8615,463.3027,0.00000000e+00
+316.5161,464.7746,5.96326345e-07
+321.1708,466.2465,1.99999772e-06
+325.8254,467.7184,2.24801465e-06
+330.4800,469.1904,0.00000000e+00
+335.1347,470.6623,3.54875453e-07
+339.7894,472.1342,0.00000000e+00
+344.4440,473.6062,1.08891095e-06
+349.0986,475.0781,0.00000000e+00
+353.7533,476.5500,3.12750421e-06
+358.4079,478.0219,0.00000000e+00
+363.0625,479.4939,1.50320886e-06
+367.7173,480.9658,4.25932825e-07
+372.3719,482.4377,0.00000000e+00
+377.0265,483.9097,4.34825597e-06
+381.6812,485.3816,0.00000000e+00
+386.3358,486.8535,4.50979860e-06
+390.9904,488.3254,0.00000000e+00
+395.6452,489.7974,5.57357112e-07
+400.2998,491.2693,0.00000000e+00
+404.9544,492.7412,0.00000000e+00
+409.6091,494.2132,4.54939141e-07
+414.2637,495.6851,0.00000000e+00
+418.9183,497.1570,0.00000000e+00
+423.5730,498.6290,0.00000000e+00
+428.2277,500.1009,0.00000000e+00
+432.8823,501.5728,0.00000000e+00
+437.5369,503.0447,5.55581846e-06
+442.1916,504.5167,0.00000000e+00
+446.8462,505.9886,2.75613161e-07
+451.5009,507.4605,1.21529365e-06
+456.1556,508.9325,3.74399747e-08
+460.8102,510.4044,1.16301487e-06
+465.4648,511.8763,0.00000000e+00
+470.1196,513.3483,0.00000000e+00
+474.7742,514.8202,0.00000000e+00
+479.4288,516.2921,0.00000000e+00
+484.0835,517.7640,2.08781603e-06
+488.7381,519.2360,4.88180717e-07
+493.3927,520.7079,0.00000000e+00
+498.0473,522.1798,1.98606642e-07
+502.7020,523.6517,3.32235504e-06
+507.3566,525.1237,3.64339542e-07
+512.0112,526.5956,1.89774528e-06
+516.6659,528.0675,2.11907809e-06
+521.3207,529.5395,1.96130418e-06
+525.9753,531.0114,0.00000000e+00
+530.6300,532.4833,5.78751724e-07
+535.2846,533.9553,1.29596174e-06
+539.9392,535.4272,4.51549522e-06
+544.5939,536.8991,2.30580486e-06
+549.2485,538.3710,0.00000000e+00
+553.9031,539.8430,5.23142899e-06
+558.5578,541.3149,3.25641622e-06
+563.2124,542.7868,3.95160487e-06
+567.8670,544.2587,4.42689179e-06
+572.5218,545.7307,8.35357787e-06
+577.1765,547.2026,6.17908836e-06
+581.8311,548.6746,6.99791190e-06
+586.4857,550.1465,1.01513770e-05
+591.1404,551.6184,9.38461017e-06
+595.7950,553.0903,8.14401392e-06
+600.4496,554.5623,6.83974667e-06
+605.1043,556.0342,1.38473242e-05
+609.7589,557.5061,1.82858967e-05
+614.4135,558.9780,1.29697146e-05
+619.0682,560.4500,1.53493656e-05
+623.7228,561.9219,1.89901566e-05
+628.3776,563.3939,2.41708130e-05
+633.0323,564.8658,2.64053542e-05
+637.6869,566.3377,2.60866673e-05
+642.3415,567.8096,3.17607301e-05
+646.9961,569.2816,3.84255654e-05
+651.6508,570.7535,3.81715254e-05
+656.3054,572.2254,4.67553364e-05
+660.9600,573.6973,4.75380584e-05
+665.6147,575.1693,5.38167806e-05
+670.2693,576.6412,6.21605723e-05
+674.9239,578.1131,6.74456314e-05
+679.5786,579.5850,7.06042993e-05
+684.2334,581.0570,8.45015238e-05
+688.8880,582.5289,9.19473750e-05
+693.5427,584.0009,1.03298211e-04
+698.1973,585.4728,1.08351480e-04
+702.8519,586.9447,1.24670478e-04
+707.5066,588.4166,1.34415212e-04
+712.1612,589.8885,1.52170207e-04
+716.8158,591.3605,1.59986841e-04
+721.4704,592.8324,1.76398098e-04
+726.1251,594.3043,1.94553606e-04
+730.7797,595.7762,2.11295643e-04
+735.4343,597.2482,2.35023646e-04
+740.0892,598.7202,2.55993946e-04
+744.7438,600.1921,2.73865415e-04
+749.3984,601.6640,3.02159227e-04
+754.0531,603.1359,3.30882991e-04
+758.7077,604.6078,3.58813297e-04
+763.3623,606.0798,3.86425701e-04
+768.0170,607.5517,4.20723547e-04
+772.6716,609.0236,4.54477587e-04
+777.3262,610.4955,4.89204365e-04
+781.9809,611.9675,5.27689350e-04
+786.6355,613.4394,5.64559305e-04
+791.2901,614.9113,6.08715403e-04
+795.9449,616.3833,6.47394801e-04
+800.5996,617.8552,6.93495444e-04
+805.2542,619.3271,7.29080290e-04
+809.9088,620.7991,7.77224603e-04
+814.5635,622.2710,8.21147230e-04
+819.2181,623.7429,8.63962108e-04
+823.8727,625.2148,9.02910659e-04
+828.5274,626.6868,9.45257896e-04
+833.1820,628.1587,9.79574863e-04
+837.8366,629.6306,1.01192493e-03
+842.4913,631.1025,1.04243122e-03
+847.1461,632.5745,1.06508518e-03
+851.8007,634.0464,1.08047330e-03
+856.4554,635.5184,1.08893088e-03
+861.1100,636.9903,1.09091448e-03
+865.7646,638.4622,1.08597381e-03
+870.4192,639.9341,1.06943038e-03
+875.0739,641.4061,1.04192051e-03
+879.7285,642.8780,1.01051212e-03
+884.3831,644.3499,9.63359780e-04
+889.0378,645.8218,9.14279139e-04
+893.6924,647.2938,8.54817801e-04
+898.3470,648.7657,7.88993959e-04
+903.0019,650.2377,7.16534851e-04
+907.6565,651.7096,6.41095976e-04
+912.3111,653.1815,5.69742813e-04
+916.9658,654.6534,4.87409561e-04
+921.6204,656.1254,4.15572809e-04
+926.2750,657.5973,3.47590365e-04
+930.9297,659.0692,2.80048844e-04
+935.5843,660.5411,2.22995383e-04
+940.2389,662.0131,1.74927671e-04
+944.8936,663.4850,1.30915883e-04
+949.5482,664.9569,9.41832186e-05
+954.2028,666.4288,6.58415665e-05
+958.8576,667.9008,4.52884742e-05
+963.5123,669.3727,3.51640847e-05
+968.1669,670.8447,1.77851107e-05
+972.8215,672.3166,1.11316185e-05
+977.4762,673.7885,9.33358206e-06
+982.1308,675.2604,1.65151846e-06
+986.7854,676.7324,9.87024919e-07
+991.4401,678.2043,3.78409311e-07
+996.0947,679.6762,8.91701802e-07
+1000.7493,681.1481,0.00000000e+00
+1005.4040,682.6201,3.92681659e-06
+1010.0586,684.0920,5.18273168e-07
+1014.7134,685.5640,1.31605577e-06
+1019.3680,687.0359,0.00000000e+00
+1024.0227,688.5078,3.55279622e-06
+1028.6773,689.9797,0.00000000e+00
+1033.3319,691.4517,0.00000000e+00
+1037.9866,692.9236,0.00000000e+00
+1042.6412,694.3955,0.00000000e+00
+1047.2958,695.8674,0.00000000e+00
+1051.9505,697.3394,0.00000000e+00
+1056.6051,698.8113,0.00000000e+00
+1061.2597,700.2832,0.00000000e+00
+1065.9146,701.7552,0.00000000e+00
+1070.5692,703.2271,4.36096741e-07
+1075.2238,704.6990,0.00000000e+00
+1079.8785,706.1710,0.00000000e+00
+1084.5331,707.6429,6.09532890e-07
+1089.1877,709.1148,3.49281299e-06
+1093.8423,710.5867,1.65740721e-06
+1098.4970,712.0587,0.00000000e+00
+1103.1516,713.5306,0.00000000e+00
+1107.8062,715.0025,6.21082279e-07
+1112.4609,716.4744,8.61420176e-07
+1117.1155,717.9464,2.47381536e-06
+1121.7703,719.4183,0.00000000e+00
+1126.4250,720.8903,1.76230697e-06
+1131.0796,722.3622,4.10079394e-07
+1135.7342,723.8341,0.00000000e+00
+1140.3889,725.3060,0.00000000e+00
+1145.0435,726.7780,0.00000000e+00
+1149.6981,728.2499,0.00000000e+00
+1154.3528,729.7218,1.47264450e-06
+1159.0074,731.1937,1.75541186e-06
+1163.6620,732.6656,0.00000000e+00
+1168.3167,734.1376,2.27896999e-06
+1172.9713,735.6095,0.00000000e+00
+1177.6261,737.0815,8.51881396e-07
+1182.2807,738.5534,0.00000000e+00
+1186.9354,740.0253,0.00000000e+00
+1191.5900,741.4973,0.00000000e+00
+1196.2446,742.9692,0.00000000e+00
+1200.8993,744.4411,0.00000000e+00
+1205.5539,745.9130,7.66348421e-07
+1210.2085,747.3849,0.00000000e+00
+1214.8632,748.8569,0.00000000e+00
+1219.5178,750.3288,0.00000000e+00
+1224.1724,751.8007,0.00000000e+00
+1228.8271,753.2726,0.00000000e+00
+1233.4819,754.7446,3.90439436e-06
+1238.1365,756.2166,0.00000000e+00
+1242.7911,757.6885,1.56971532e-06
+1247.4458,759.1604,9.63591674e-07
+1252.1004,760.6323,1.56751673e-06
+1256.7550,762.1042,0.00000000e+00
+1261.4097,763.5762,1.21569371e-06
+1266.0643,765.0481,3.13958844e-06
+1270.7189,766.5200,2.62870412e-06
+1275.3736,767.9919,1.34255870e-07
+1280.0282,769.4639,2.02119554e-06
+1284.6830,770.9359,0.00000000e+00
+1289.3377,772.4078,2.99167914e-06
+1293.9923,773.8797,0.00000000e+00
+1298.6469,775.3516,0.00000000e+00
+1303.3016,776.8235,0.00000000e+00
+1307.9562,778.2955,0.00000000e+00
+1312.6108,779.7674,9.86286750e-07
+1317.2655,781.2393,1.77798274e-08
+1321.9201,782.7112,0.00000000e+00
+1326.5747,784.1832,1.03197465e-07
+1331.2293,785.6551,0.00000000e+00
+1335.8840,787.1270,3.95877123e-06
+1340.5388,788.5990,0.00000000e+00
+1345.1934,790.0709,2.13474686e-06
+1349.8481,791.5428,6.86488306e-07
+1354.5027,793.0148,0.00000000e+00
+1359.1573,794.4867,5.83760595e-07
+1363.8120,795.9586,0.00000000e+00
+1368.4666,797.4305,1.08614415e-06
+1373.1212,798.9025,0.00000000e+00
+1377.7759,800.3744,0.00000000e+00
+1382.4305,801.8463,1.36165639e-07
+1387.0851,803.3182,5.37288429e-07
+1391.7398,804.7902,0.00000000e+00
+1396.3946,806.2621,6.74681644e-07
+1401.0492,807.7341,0.00000000e+00
+1405.7038,809.2060,0.00000000e+00
+1410.3585,810.6779,1.73380943e-06
+1415.0131,812.1498,3.50982532e-06
+1419.6677,813.6218,9.81142534e-07
+1424.3224,815.0937,0.00000000e+00
+1428.9770,816.5656,0.00000000e+00
+1433.6316,818.0375,1.59253023e-06
+1438.2863,819.5095,7.71791463e-07
+1442.9409,820.9814,7.76939771e-07
+1447.5955,822.4533,1.76360379e-06
+1452.2504,823.9253,2.81263078e-06
+1456.9050,825.3972,0.00000000e+00
+1461.5596,826.8691,0.00000000e+00
+1466.2143,828.3411,0.00000000e+00
+1470.8689,829.8130,3.51902941e-06
+1475.5235,831.2849,3.33938942e-06
+1480.1781,832.7568,2.73745536e-06
+1484.8328,834.2288,0.00000000e+00
+1489.4874,835.7007,8.83483153e-07
+1494.1420,837.1726,0.00000000e+00
+1498.7967,838.6445,9.78383454e-08
+1503.4513,840.1165,0.00000000e+00
+1508.1061,841.5884,3.25147380e-06
+1512.7608,843.0604,0.00000000e+00
+1517.4154,844.5323,0.00000000e+00
+1522.0700,846.0042,1.80378652e-06
+1526.7247,847.4761,2.39448605e-06
+1531.3793,848.9481,0.00000000e+00
+1536.0339,850.4200,2.89032391e-06
+1540.6886,851.8919,0.00000000e+00
+1545.3432,853.3638,0.00000000e+00
+1549.9978,854.8358,7.45808222e-07
+1554.6524,856.3077,0.00000000e+00
+1559.3073,857.7797,2.03001036e-06
+1563.9619,859.2516,0.00000000e+00
+1568.6165,860.7235,1.12060292e-07
+1573.2712,862.1954,0.00000000e+00
+1577.9258,863.6674,0.00000000e+00
+1582.5804,865.1393,2.16535432e-06
+1587.2351,866.6112,2.22671883e-06
+1591.8897,868.0831,0.00000000e+00
+1596.5443,869.5551,2.23747747e-06
+1601.1990,871.0270,4.26824215e-07
+1605.8536,872.4989,0.00000000e+00
+1610.5082,873.9708,3.68632158e-07
+1615.1630,875.4428,4.39186488e-06
+1619.8177,876.9147,3.14076965e-06
+1624.4723,878.3867,0.00000000e+00
+1629.1269,879.8586,0.00000000e+00
+1633.7816,881.3305,4.39901910e-08
+1638.4362,882.8024,1.71754138e-07
+1643.0908,884.2744,0.00000000e+00
+1647.7455,885.7463,2.66720212e-06
+1652.4001,887.2182,1.74829768e-06
+1657.0547,888.6901,0.00000000e+00
+1661.7094,890.1620,0.00000000e+00
+1666.3640,891.6340,1.89798334e-06
+1671.0188,893.1060,1.54732641e-06
+1675.6735,894.5779,0.00000000e+00
+1680.3281,896.0498,0.00000000e+00
+1684.9827,897.5217,1.91009326e-06
+1689.6374,898.9937,0.00000000e+00
+1694.2920,900.4656,1.14621196e-06
+1698.9466,901.9375,9.21367416e-07
+1703.6012,903.4094,1.68342319e-06
+1708.2559,904.8813,0.00000000e+00
+1712.9105,906.3533,0.00000000e+00
+1717.5651,907.8252,2.28696786e-06
+1722.2198,909.2971,1.59949309e-06
+1726.8746,910.7691,2.57191027e-06
+1731.5292,912.2410,0.00000000e+00
+1736.1839,913.7130,5.56702958e-07
+1740.8385,915.1849,2.55660666e-06
+1745.4931,916.6568,0.00000000e+00
+1750.1478,918.1287,0.00000000e+00
+1754.8024,919.6006,0.00000000e+00
+1759.4570,921.0726,0.00000000e+00
+1764.1117,922.5445,4.43007821e-07
+1768.7663,924.0164,0.00000000e+00
+1773.4209,925.4883,1.58974416e-07
+1778.0757,926.9603,0.00000000e+00
+1782.7304,928.4323,0.00000000e+00
+1787.3850,929.9042,0.00000000e+00
+1792.0396,931.3761,5.30551816e-08
+1796.6943,932.8480,0.00000000e+00
+1801.3489,934.3199,0.00000000e+00
+1806.0035,935.7919,1.04379990e-06
+1810.6582,937.2638,0.00000000e+00
+1815.3128,938.7357,0.00000000e+00
+1819.9674,940.2076,4.95555980e-07
+1824.6221,941.6796,1.79189999e-06
+1829.2767,943.1515,0.00000000e+00
+1833.9315,944.6235,3.18619777e-06
+1838.5862,946.0954,1.08042298e-06
+1843.2408,947.5673,0.00000000e+00
+1847.8954,949.0392,0.00000000e+00
+1852.5500,950.5112,4.42691459e-07
+1857.2047,951.9831,1.46680338e-06
+1861.8593,953.4550,0.00000000e+00
+1866.5139,954.9269,0.00000000e+00
+1871.1686,956.3989,0.00000000e+00
+1875.8232,957.8708,3.84182658e-06
+1880.4778,959.3427,0.00000000e+00
+1885.1325,960.8146,3.16616877e-07
+1889.7873,962.2866,0.00000000e+00
+1894.4419,963.7585,3.55020666e-06
+1899.0966,965.2305,2.29497331e-07
+1903.7512,966.7024,0.00000000e+00
+1908.4058,968.1743,0.00000000e+00
+1913.0605,969.6462,0.00000000e+00
+1917.7151,971.1182,0.00000000e+00
+1922.3697,972.5901,3.81572107e-07
+1927.0243,974.0620,2.12905252e-06
+1931.6790,975.5339,0.00000000e+00
+1936.3336,977.0059,1.14346301e-06
+1940.9882,978.4778,1.48496258e-06
+1945.6431,979.9498,2.42762576e-06
+1950.2977,981.4217,0.00000000e+00
+1954.9523,982.8936,0.00000000e+00
+1959.6070,984.3655,0.00000000e+00
+1964.2616,985.8375,2.50082030e-06
+1968.9162,987.3094,0.00000000e+00
+1973.5709,988.7813,0.00000000e+00
+1978.2255,990.2532,6.59991565e-06
+1982.8801,991.7252,2.88728029e-06
+1987.5348,993.1971,6.82144048e-07
+1992.1894,994.6690,2.78240395e-06
+1996.8440,996.1409,0.00000000e+00
+2001.4988,997.6129,1.48857214e-06
+2006.1535,999.0848,0.00000000e+00
+2010.8081,1000.5568,0.00000000e+00
+2015.4627,1002.0287,2.98117016e-06
+2020.1174,1003.5006,5.01356271e-06
+2024.7720,1004.9725,0.00000000e+00
+2029.4266,1006.4445,1.09319194e-06
+2034.0813,1007.9164,1.20748996e-06
+2038.7359,1009.3883,0.00000000e+00
+2043.3905,1010.8602,0.00000000e+00
+2048.0452,1012.3322,0.00000000e+00
+2052.7000,1013.8041,2.45425053e-06
+2057.3546,1015.2761,2.62803565e-06
+2062.0093,1016.7480,4.11309156e-06
+2066.6639,1018.2199,3.12015186e-06
+2071.3185,1019.6918,0.00000000e+00
+2075.9731,1021.1638,0.00000000e+00
+2080.6278,1022.6357,3.54566828e-06
+2085.2826,1024.1077,2.45095043e-06
+2089.9372,1025.5796,1.43928264e-06
+2094.5919,1027.0515,1.27711405e-06
+2099.2465,1028.5234,0.00000000e+00
+2103.9011,1029.9954,0.00000000e+00
+2108.5558,1031.4673,0.00000000e+00
+2113.2104,1032.9392,0.00000000e+00
+2117.8650,1034.4111,0.00000000e+00
+2122.5197,1035.8831,0.00000000e+00
+2127.1743,1037.3550,2.51912502e-06
+2131.8289,1038.8269,0.00000000e+00
+2136.4836,1040.2988,0.00000000e+00
+2141.1382,1041.7708,2.18417904e-06
+2145.7928,1043.2427,0.00000000e+00
+2150.4475,1044.7146,0.00000000e+00
+2155.1021,1046.1865,0.00000000e+00
+2159.7567,1047.6584,0.00000000e+00
+2164.4113,1049.1304,3.01772872e-07
+2169.0660,1050.6023,0.00000000e+00
+2173.7206,1052.0742,1.59293052e-06
+2178.3752,1053.5461,2.15661908e-06
+2183.0299,1055.0181,9.89708838e-07
+2187.6845,1056.4900,0.00000000e+00
+2192.3395,1057.9620,4.72763560e-07
+2196.9942,1059.4340,0.00000000e+00
+2201.6488,1060.9059,0.00000000e+00
+2206.3034,1062.3778,0.00000000e+00
+2210.9581,1063.8497,3.25933843e-06
+2215.6127,1065.3217,2.09624272e-06
+2220.2673,1066.7936,2.58345290e-06
+2224.9219,1068.2655,0.00000000e+00
+2229.5766,1069.7374,3.85100975e-06
+2234.2312,1071.2094,1.33469939e-06
+2238.8858,1072.6813,6.46036938e-07
+2243.5405,1074.1532,5.42847317e-07
+2248.1951,1075.6251,0.00000000e+00
+2252.8497,1077.0970,0.00000000e+00
+2257.5044,1078.5690,0.00000000e+00
+2262.1590,1080.0409,0.00000000e+00
+2266.8136,1081.5128,0.00000000e+00
+2271.4683,1082.9847,1.83201905e-06
+2276.1229,1084.4567,0.00000000e+00
+2280.7775,1085.9286,2.66079110e-06
+2285.4322,1087.4005,0.00000000e+00
+2290.0868,1088.8724,1.23256621e-06
+2294.7414,1090.3444,0.00000000e+00
+2299.3964,1091.8164,1.04424782e-06
+2304.0511,1093.2883,2.45529634e-07
+2308.7057,1094.7603,2.85260626e-07
+2313.3603,1096.2322,2.52381619e-06
+2318.0150,1097.7041,4.30263344e-06
+2322.6696,1099.1760,0.00000000e+00
diff --git a/demo_data/tpd_FirstOrder_2.csv b/demo_data/tpd_FirstOrder_2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..55f9c09871de6fe76c32b0598c95cca900beb0f4
--- /dev/null
+++ b/demo_data/tpd_FirstOrder_2.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,0.00000000e+00
+0.5667,366.1553,0.00000000e+00
+1.1335,367.6273,0.00000000e+00
+1.7002,369.0992,0.00000000e+00
+2.2669,370.5711,2.47517455e-04
+2.8337,372.0431,8.21879439e-06
+3.4004,373.5150,1.33918384e-05
+3.9671,374.9869,7.85662996e-05
+4.5339,376.4588,1.42115721e-04
+5.1006,377.9308,1.63013654e-04
+5.6673,379.4027,4.17936026e-05
+6.2341,380.8746,7.52842388e-05
+6.8008,382.3466,0.00000000e+00
+7.3675,383.8185,0.00000000e+00
+7.9343,385.2904,0.00000000e+00
+8.5010,386.7624,1.32450159e-05
+9.0677,388.2343,6.26456631e-06
+9.6345,389.7062,4.45349579e-05
+10.2012,391.1781,0.00000000e+00
+10.7679,392.6501,2.18614397e-04
+11.3347,394.1220,0.00000000e+00
+11.9014,395.5939,0.00000000e+00
+12.4681,397.0659,0.00000000e+00
+13.0348,398.5378,0.00000000e+00
+13.6016,400.0097,1.11522910e-04
+14.1683,401.4816,2.79684667e-04
+14.7351,402.9536,0.00000000e+00
+15.3018,404.4255,6.50766015e-05
+15.8685,405.8974,1.00397512e-04
+16.4352,407.3694,0.00000000e+00
+17.0020,408.8413,0.00000000e+00
+17.5687,410.3132,0.00000000e+00
+18.1354,411.7852,0.00000000e+00
+18.7022,413.2571,0.00000000e+00
+19.2689,414.7290,1.38402727e-04
+19.8356,416.2009,2.01193718e-04
+20.4024,417.6729,5.01951981e-05
+20.9691,419.1448,0.00000000e+00
+21.5358,420.6167,1.07067339e-04
+22.1026,422.0887,0.00000000e+00
+22.6693,423.5606,0.00000000e+00
+23.2360,425.0325,1.44660953e-04
+23.8028,426.5044,2.13894105e-04
+24.3695,427.9763,0.00000000e+00
+24.9362,429.4483,0.00000000e+00
+25.5030,430.9202,3.09851748e-05
+26.0697,432.3922,0.00000000e+00
+26.6364,433.8641,0.00000000e+00
+27.2032,435.3360,1.74557121e-04
+27.7699,436.8079,1.04964267e-04
+28.3366,438.2799,0.00000000e+00
+28.9034,439.7518,5.51928824e-05
+29.4701,441.2237,0.00000000e+00
+30.0368,442.6956,0.00000000e+00
+30.6036,444.1676,1.36429750e-04
+31.1703,445.6395,0.00000000e+00
+31.7370,447.1115,3.48035646e-05
+32.3038,448.5834,0.00000000e+00
+32.8705,450.0553,1.00440971e-04
+33.4372,451.5272,8.87412971e-05
+34.0039,452.9991,9.79697288e-05
+34.5707,454.4711,2.67377996e-04
+35.1374,455.9430,4.76641144e-05
+35.7042,457.4149,2.11891209e-04
+36.2709,458.8869,3.05399408e-05
+36.8376,460.3588,1.69873267e-04
+37.4043,461.8307,2.17327950e-04
+37.9711,463.3027,0.00000000e+00
+38.5378,464.7746,0.00000000e+00
+39.1045,466.2465,0.00000000e+00
+39.6713,467.7184,3.27221816e-04
+40.2380,469.1904,4.22032826e-05
+40.8047,470.6623,7.40856412e-05
+41.3715,472.1342,1.20577759e-04
+41.9382,473.6062,0.00000000e+00
+42.5049,475.0781,3.55668781e-05
+43.0717,476.5500,0.00000000e+00
+43.6384,478.0219,5.11771068e-05
+44.2051,479.4939,0.00000000e+00
+44.7719,480.9658,2.80168952e-05
+45.3386,482.4377,0.00000000e+00
+45.9053,483.9097,0.00000000e+00
+46.4721,485.3816,0.00000000e+00
+47.0388,486.8535,7.29817621e-05
+47.6055,488.3254,0.00000000e+00
+48.1723,489.7974,0.00000000e+00
+48.7390,491.2693,3.67672401e-05
+49.3057,492.7412,0.00000000e+00
+49.8725,494.2132,1.95423898e-04
+50.4392,495.6851,0.00000000e+00
+51.0059,497.1570,9.51709590e-05
+51.5727,498.6290,7.58998067e-05
+52.1394,500.1009,2.96827020e-05
+52.7061,501.5728,0.00000000e+00
+53.2729,503.0447,1.87924728e-04
+53.8396,504.5167,3.70374692e-05
+54.4063,505.9886,0.00000000e+00
+54.9731,507.4605,1.82276432e-04
+55.5398,508.9325,0.00000000e+00
+56.1065,510.4044,4.15076647e-05
+56.6733,511.8763,0.00000000e+00
+57.2400,513.3483,1.16383300e-04
+57.8067,514.8202,0.00000000e+00
+58.3735,516.2921,3.45258421e-04
+58.9402,517.7640,0.00000000e+00
+59.5069,519.2360,0.00000000e+00
+60.0736,520.7079,1.76249683e-04
+60.6404,522.1798,0.00000000e+00
+61.2071,523.6517,1.67540638e-04
+61.7738,525.1237,0.00000000e+00
+62.3406,526.5956,0.00000000e+00
+62.9073,528.0675,0.00000000e+00
+63.4741,529.5395,0.00000000e+00
+64.0408,531.0114,3.99774508e-05
+64.6075,532.4833,2.11941588e-04
+65.1742,533.9553,0.00000000e+00
+65.7410,535.4272,0.00000000e+00
+66.3077,536.8991,8.92596290e-05
+66.8744,538.3710,1.66051264e-04
+67.4412,539.8430,0.00000000e+00
+68.0079,541.3149,0.00000000e+00
+68.5746,542.7868,2.52927624e-04
+69.1414,544.2587,2.68870237e-04
+69.7081,545.7307,0.00000000e+00
+70.2748,547.2026,0.00000000e+00
+70.8416,548.6746,5.40631954e-05
+71.4083,550.1465,2.19355497e-04
+71.9750,551.6184,1.99703005e-04
+72.5418,553.0903,1.55445465e-04
+73.1085,554.5623,5.10655227e-05
+73.6752,556.0342,2.23809420e-05
+74.2420,557.5061,1.16589530e-04
+74.8087,558.9780,0.00000000e+00
+75.3754,560.4500,1.77523427e-04
+75.9421,561.9219,7.89316327e-05
+76.5089,563.3939,0.00000000e+00
+77.0756,564.8658,0.00000000e+00
+77.6424,566.3377,5.81626737e-05
+78.2091,567.8096,0.00000000e+00
+78.7758,569.2816,1.48138730e-04
+79.3426,570.7535,1.43252517e-04
+79.9093,572.2254,8.72705568e-05
+80.4760,573.6973,1.50064079e-04
+81.0427,575.1693,0.00000000e+00
+81.6095,576.6412,1.00175021e-04
+82.1762,578.1131,2.84237904e-04
+82.7429,579.5850,0.00000000e+00
+83.3097,581.0570,0.00000000e+00
+83.8764,582.5289,7.66464218e-05
+84.4432,584.0009,1.67545251e-04
+85.0099,585.4728,1.96559398e-04
+85.5766,586.9447,1.56849710e-05
+86.1433,588.4166,2.75754253e-04
+86.7101,589.8885,1.54059540e-04
+87.2768,591.3605,1.51837477e-04
+87.8435,592.8324,2.58806802e-04
+88.4103,594.3043,0.00000000e+00
+88.9770,595.7762,3.25870467e-04
+89.5437,597.2482,2.30829770e-04
+90.1105,598.7202,2.53826933e-04
+90.6772,600.1921,6.80283294e-04
+91.2439,601.6640,2.86429364e-04
+91.8107,603.1359,6.30324357e-04
+92.3774,604.6078,3.60235688e-04
+92.9441,606.0798,6.03618682e-04
+93.5109,607.5517,8.28460325e-04
+94.0776,609.0236,5.48634387e-04
+94.6443,610.4955,4.97653615e-04
+95.2111,611.9675,6.45267079e-04
+95.7778,613.4394,5.47897245e-04
+96.3445,614.9113,8.16379092e-04
+96.9113,616.3833,6.45510096e-04
+97.4780,617.8552,8.60114349e-04
+98.0447,619.3271,1.07950543e-03
+98.6115,620.7991,8.65290174e-04
+99.1782,622.2710,9.59352998e-04
+99.7449,623.7429,1.18171622e-03
+100.3117,625.2148,1.31203479e-03
+100.8784,626.6868,1.55771826e-03
+101.4451,628.1587,1.50874618e-03
+102.0118,629.6306,1.56428106e-03
+102.5786,631.1025,2.11956841e-03
+103.1453,632.5745,2.15723598e-03
+103.7121,634.0464,2.22208048e-03
+104.2788,635.5184,2.32328125e-03
+104.8455,636.9903,2.76199495e-03
+105.4123,638.4622,2.87812646e-03
+105.9790,639.9341,3.05163371e-03
+106.5457,641.4061,3.08928941e-03
+107.1124,642.8780,3.14544886e-03
+107.6792,644.3499,3.45255760e-03
+108.2459,645.8218,3.70109081e-03
+108.8126,647.2938,4.26105084e-03
+109.3794,648.7657,4.41073813e-03
+109.9461,650.2377,4.83715069e-03
+110.5129,651.7096,5.26199536e-03
+111.0796,653.1815,5.11139119e-03
+111.6463,654.6534,5.53643098e-03
+112.2130,656.1254,5.75282471e-03
+112.7798,657.5973,6.20541442e-03
+113.3465,659.0692,6.35371963e-03
+113.9132,660.5411,6.74876478e-03
+114.4800,662.0131,6.80334726e-03
+115.0467,663.4850,6.96833059e-03
+115.6134,664.9569,7.39511801e-03
+116.1802,666.4288,7.66332820e-03
+116.7469,667.9008,7.70472689e-03
+117.3136,669.3727,8.02463572e-03
+117.8804,670.8447,8.09267443e-03
+118.4471,672.3166,7.91116524e-03
+119.0138,673.7885,8.11354164e-03
+119.5806,675.2604,7.76773179e-03
+120.1473,676.7324,7.59959919e-03
+120.7140,678.2043,7.58002372e-03
+121.2808,679.6762,7.47158192e-03
+121.8475,681.1481,7.23299803e-03
+122.4142,682.6201,6.87873783e-03
+122.9809,684.0920,6.46850560e-03
+123.5477,685.5640,6.20962679e-03
+124.1144,687.0359,5.67430118e-03
+124.6812,688.5078,5.42523433e-03
+125.2479,689.9797,4.94584953e-03
+125.8146,691.4517,3.81451147e-03
+126.3814,692.9236,3.74410651e-03
+126.9481,694.3955,3.31685529e-03
+127.5148,695.8674,2.90985825e-03
+128.0815,697.3394,2.14922521e-03
+128.6483,698.8113,2.16485444e-03
+129.2150,700.2832,1.52054301e-03
+129.7818,701.7552,1.35942735e-03
+130.3485,703.2271,1.05534401e-03
+130.9152,704.6990,8.05111835e-04
+131.4820,706.1710,5.57847845e-04
+132.0487,707.6429,2.54742452e-04
+132.6154,709.1148,3.05780297e-04
+133.1821,710.5867,2.30267411e-04
+133.7489,712.0587,0.00000000e+00
+134.3156,713.5306,2.69011914e-04
+134.8823,715.0025,4.25031722e-05
+135.4491,716.4744,0.00000000e+00
+136.0158,717.9464,0.00000000e+00
+136.5826,719.4183,0.00000000e+00
+137.1493,720.8903,5.52810307e-05
+137.7160,722.3622,6.94323899e-05
+138.2827,723.8341,9.19594167e-05
+138.8495,725.3060,0.00000000e+00
+139.4162,726.7780,0.00000000e+00
+139.9829,728.2499,0.00000000e+00
+140.5497,729.7218,1.20544952e-04
+141.1164,731.1937,0.00000000e+00
+141.6831,732.6656,0.00000000e+00
+142.2499,734.1376,4.06541913e-05
+142.8166,735.6095,1.98174937e-04
+143.3833,737.0815,0.00000000e+00
+143.9501,738.5534,5.58877036e-05
+144.5168,740.0253,2.08288169e-04
+145.0835,741.4973,0.00000000e+00
+145.6503,742.9692,0.00000000e+00
+146.2170,744.4411,4.82924224e-05
+146.7837,745.9130,1.05992149e-04
+147.3505,747.3849,0.00000000e+00
+147.9172,748.8569,0.00000000e+00
+148.4839,750.3288,0.00000000e+00
+149.0506,751.8007,0.00000000e+00
+149.6174,753.2726,0.00000000e+00
+150.1841,754.7446,1.27824051e-05
+150.7509,756.2166,0.00000000e+00
+151.3176,757.6885,1.37127296e-04
+151.8843,759.1604,0.00000000e+00
+152.4511,760.6323,2.58168111e-05
+153.0178,762.1042,0.00000000e+00
+153.5845,763.5762,2.26545919e-04
+154.1512,765.0481,0.00000000e+00
+154.7180,766.5200,1.19607808e-04
+155.2847,767.9919,0.00000000e+00
+155.8514,769.4639,0.00000000e+00
+156.4182,770.9359,2.93034391e-05
+156.9849,772.4078,1.67584702e-04
+157.5517,773.8797,1.09352031e-05
+158.1184,775.3516,1.65748716e-04
+158.6851,776.8235,2.09029648e-04
+159.2518,778.2955,1.47242987e-04
+159.8186,779.7674,1.39107970e-05
+160.3853,781.2393,0.00000000e+00
+160.9520,782.7112,0.00000000e+00
+161.5188,784.1832,0.00000000e+00
+162.0855,785.6551,3.30252078e-06
+162.6522,787.1270,4.62176722e-05
+163.2190,788.5990,0.00000000e+00
+163.7857,790.0709,1.16814714e-04
+164.3524,791.5428,1.63074772e-04
+164.9192,793.0148,1.36189687e-04
+165.4859,794.4867,1.80851457e-05
+166.0526,795.9586,0.00000000e+00
+166.6194,797.4305,0.00000000e+00
+167.1861,798.9025,6.26416004e-05
+167.7528,800.3744,3.59122962e-04
+168.3196,801.8463,1.37003037e-04
+168.8863,803.3182,0.00000000e+00
+169.4530,804.7902,0.00000000e+00
+170.0198,806.2621,0.00000000e+00
+170.5865,807.7341,0.00000000e+00
+171.1532,809.2060,8.13352672e-05
+171.7200,810.6779,1.60080643e-04
+172.2867,812.1498,0.00000000e+00
+172.8534,813.6218,0.00000000e+00
+173.4202,815.0937,5.40581896e-05
+173.9869,816.5656,0.00000000e+00
+174.5536,818.0375,7.75701992e-05
+175.1203,819.5095,7.63392309e-05
+175.6871,820.9814,1.42305740e-04
+176.2538,822.4533,0.00000000e+00
+176.8206,823.9253,0.00000000e+00
+177.3873,825.3972,0.00000000e+00
+177.9540,826.8691,0.00000000e+00
+178.5208,828.3411,0.00000000e+00
+179.0875,829.8130,0.00000000e+00
+179.6542,831.2849,2.38106382e-04
+180.2209,832.7568,7.74814835e-05
+180.7877,834.2288,1.60583630e-04
+181.3544,835.7007,0.00000000e+00
+181.9211,837.1726,1.17223601e-04
+182.4879,838.6445,0.00000000e+00
+183.0546,840.1165,8.14197410e-05
+183.6213,841.5884,0.00000000e+00
+184.1881,843.0604,0.00000000e+00
+184.7548,844.5323,0.00000000e+00
+185.3215,846.0042,0.00000000e+00
+185.8883,847.4761,2.82210822e-04
+186.4550,848.9481,0.00000000e+00
+187.0217,850.4200,0.00000000e+00
+187.5885,851.8919,6.59647339e-05
+188.1552,853.3638,5.36748521e-05
+188.7219,854.8358,7.46860460e-05
+189.2887,856.3077,6.44586980e-05
+189.8554,857.7797,8.06804621e-07
+190.4221,859.2516,1.57832183e-04
+190.9889,860.7235,7.45685611e-05
+191.5556,862.1954,1.15132652e-05
+192.1223,863.6674,2.07926569e-04
+192.6891,865.1393,0.00000000e+00
+193.2558,866.6112,0.00000000e+00
+193.8225,868.0831,0.00000000e+00
+194.3893,869.5551,4.89325394e-05
+194.9560,871.0270,0.00000000e+00
+195.5227,872.4989,0.00000000e+00
+196.0894,873.9708,8.26968680e-05
+196.6562,875.4428,3.18831531e-04
+197.2229,876.9147,0.00000000e+00
+197.7897,878.3867,2.13946012e-04
+198.3564,879.8586,0.00000000e+00
+198.9231,881.3305,6.05222122e-05
+199.4899,882.8024,0.00000000e+00
+200.0566,884.2744,3.98813318e-05
+200.6233,885.7463,2.00764189e-05
+201.1900,887.2182,5.86472997e-05
+201.7568,888.6901,0.00000000e+00
+202.3235,890.1620,0.00000000e+00
+202.8902,891.6340,1.19678305e-04
+203.4570,893.1060,0.00000000e+00
+204.0237,894.5779,0.00000000e+00
+204.5904,896.0498,1.71590218e-04
+205.1572,897.5217,0.00000000e+00
+205.7239,898.9937,1.18135242e-04
+206.2906,900.4656,2.08686921e-04
+206.8574,901.9375,0.00000000e+00
+207.4241,903.4094,0.00000000e+00
+207.9908,904.8813,0.00000000e+00
+208.5576,906.3533,3.73976800e-04
+209.1243,907.8252,1.48268286e-04
+209.6910,909.2971,0.00000000e+00
+210.2578,910.7691,0.00000000e+00
+210.8245,912.2410,3.30419483e-04
+211.3912,913.7130,1.25340855e-04
+211.9580,915.1849,0.00000000e+00
+212.5247,916.6568,4.75378692e-05
+213.0914,918.1287,5.60347144e-05
+213.6582,919.6006,0.00000000e+00
+214.2249,921.0726,1.93339773e-04
+214.7916,922.5445,1.02670216e-04
+215.3584,924.0164,0.00000000e+00
+215.9251,925.4883,1.78213129e-04
+216.4918,926.9603,0.00000000e+00
+217.0586,928.4323,0.00000000e+00
+217.6253,929.9042,1.02512877e-05
+218.1920,931.3761,8.32885416e-05
+218.7588,932.8480,0.00000000e+00
+219.3255,934.3199,2.08920028e-05
+219.8922,935.7919,0.00000000e+00
+220.4590,937.2638,0.00000000e+00
+221.0257,938.7357,3.02543282e-04
+221.5924,940.2076,0.00000000e+00
+222.1591,941.6796,8.29023556e-05
+222.7259,943.1515,0.00000000e+00
+223.2926,944.6235,0.00000000e+00
+223.8594,946.0954,1.12135756e-04
+224.4261,947.5673,2.61380424e-04
+224.9928,949.0392,0.00000000e+00
+225.5595,950.5112,2.04335229e-04
+226.1263,951.9831,1.72218293e-04
+226.6930,953.4550,0.00000000e+00
+227.2597,954.9269,1.69075633e-04
+227.8265,956.3989,0.00000000e+00
+228.3932,957.8708,0.00000000e+00
+228.9599,959.3427,1.13141636e-04
+229.5267,960.8146,0.00000000e+00
+230.0934,962.2866,0.00000000e+00
+230.6601,963.7585,0.00000000e+00
+231.2269,965.2305,0.00000000e+00
+231.7936,966.7024,0.00000000e+00
+232.3603,968.1743,0.00000000e+00
+232.9271,969.6462,0.00000000e+00
+233.4938,971.1182,0.00000000e+00
+234.0605,972.5901,1.79565832e-04
+234.6273,974.0620,0.00000000e+00
+235.1940,975.5339,6.29835704e-05
+235.7607,977.0059,0.00000000e+00
+236.3275,978.4778,0.00000000e+00
+236.8942,979.9498,0.00000000e+00
+237.4609,981.4217,1.02613500e-04
+238.0277,982.8936,2.94214144e-04
+238.5944,984.3655,2.20093370e-05
+239.1611,985.8375,6.72563765e-05
+239.7279,987.3094,6.76842828e-05
+240.2946,988.7813,2.14358210e-04
+240.8613,990.2532,0.00000000e+00
+241.4281,991.7252,0.00000000e+00
+241.9948,993.1971,8.61267617e-05
+242.5615,994.6690,3.82650796e-05
+243.1282,996.1409,0.00000000e+00
+243.6950,997.6129,0.00000000e+00
+244.2617,999.0848,5.56719442e-06
+244.8285,1000.5568,1.12234366e-05
+245.3952,1002.0287,0.00000000e+00
+245.9619,1003.5006,0.00000000e+00
+246.5286,1004.9725,6.50237562e-05
+247.0954,1006.4445,8.87470378e-05
+247.6621,1007.9164,0.00000000e+00
+248.2288,1009.3883,0.00000000e+00
+248.7956,1010.8602,0.00000000e+00
+249.3623,1012.3322,3.22781161e-05
+249.9291,1013.8041,2.59457775e-05
+250.4958,1015.2761,1.25149847e-04
+251.0625,1016.7480,0.00000000e+00
+251.6292,1018.2199,0.00000000e+00
+252.1960,1019.6918,0.00000000e+00
+252.7627,1021.1638,0.00000000e+00
+253.3294,1022.6357,0.00000000e+00
+253.8962,1024.1077,0.00000000e+00
+254.4629,1025.5796,2.93989524e-05
+255.0297,1027.0515,0.00000000e+00
+255.5964,1028.5234,0.00000000e+00
+256.1631,1029.9954,2.40576082e-06
+256.7298,1031.4673,1.00085439e-04
+257.2966,1032.9392,3.17933991e-05
+257.8633,1034.4111,0.00000000e+00
+258.4300,1035.8831,0.00000000e+00
+258.9968,1037.3550,0.00000000e+00
+259.5635,1038.8269,0.00000000e+00
+260.1302,1040.2988,1.89278217e-05
+260.6970,1041.7708,6.44249740e-05
+261.2637,1043.2427,1.15658564e-04
+261.8304,1044.7146,4.52368076e-05
+262.3972,1046.1865,0.00000000e+00
+262.9639,1047.6584,1.39295662e-04
+263.5306,1049.1304,4.58694049e-05
+264.0973,1050.6023,0.00000000e+00
+264.6641,1052.0742,5.38944332e-05
+265.2308,1053.5461,0.00000000e+00
+265.7975,1055.0181,0.00000000e+00
+266.3643,1056.4900,2.21250215e-04
+266.9310,1057.9620,1.27970823e-04
+267.4978,1059.4340,0.00000000e+00
+268.0645,1060.9059,0.00000000e+00
+268.6312,1062.3778,2.75329057e-05
+269.1980,1063.8497,0.00000000e+00
+269.7647,1065.3217,0.00000000e+00
+270.3314,1066.7936,2.11780753e-05
+270.8982,1068.2655,0.00000000e+00
+271.4649,1069.7374,0.00000000e+00
+272.0316,1071.2094,6.15378231e-05
+272.5983,1072.6813,3.77872420e-05
+273.1651,1074.1532,0.00000000e+00
+273.7318,1075.6251,0.00000000e+00
+274.2985,1077.0970,1.39426877e-04
+274.8653,1078.5690,0.00000000e+00
+275.4320,1080.0409,7.15642136e-06
+275.9987,1081.5128,1.07395078e-06
+276.5655,1082.9847,0.00000000e+00
+277.1322,1084.4567,0.00000000e+00
+277.6989,1085.9286,0.00000000e+00
+278.2657,1087.4005,0.00000000e+00
+278.8324,1088.8724,1.49222012e-06
+279.3991,1090.3444,0.00000000e+00
+279.9659,1091.8164,0.00000000e+00
+280.5326,1093.2883,0.00000000e+00
+281.0994,1094.7603,1.30252025e-04
+281.6661,1096.2322,0.00000000e+00
+282.2328,1097.7041,8.08125551e-05
+282.7995,1099.1760,0.00000000e+00
diff --git a/demo_data/tpd_FirstOrder_3.csv b/demo_data/tpd_FirstOrder_3.csv
new file mode 100644
index 0000000000000000000000000000000000000000..3c0cc350a32cbc6e58a3c6a35aec554326e7dc28
--- /dev/null
+++ b/demo_data/tpd_FirstOrder_3.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,0.00000000e+00
+0.0665,366.1553,0.00000000e+00
+0.1330,367.6273,0.00000000e+00
+0.1996,369.0992,1.84173521e-04
+0.2661,370.5711,0.00000000e+00
+0.3326,372.0431,7.60070165e-04
+0.3991,373.5150,0.00000000e+00
+0.4656,374.9869,0.00000000e+00
+0.5322,376.4588,0.00000000e+00
+0.5987,377.9308,2.12843312e-04
+0.6652,379.4027,3.99667129e-04
+0.7317,380.8746,1.15925613e-04
+0.7982,382.3466,0.00000000e+00
+0.8648,383.8185,0.00000000e+00
+0.9313,385.2904,0.00000000e+00
+0.9978,386.7624,0.00000000e+00
+1.0643,388.2343,5.50412842e-05
+1.1308,389.7062,3.86877917e-04
+1.1974,391.1781,0.00000000e+00
+1.2639,392.6501,0.00000000e+00
+1.3304,394.1220,0.00000000e+00
+1.3969,395.5939,7.00310702e-05
+1.4634,397.0659,0.00000000e+00
+1.5300,398.5378,2.61599023e-04
+1.5965,400.0097,0.00000000e+00
+1.6630,401.4816,0.00000000e+00
+1.7295,402.9536,0.00000000e+00
+1.7960,404.4255,5.50129334e-04
+1.8626,405.8974,0.00000000e+00
+1.9291,407.3694,1.10096310e-03
+1.9956,408.8413,0.00000000e+00
+2.0621,410.3132,4.81461830e-05
+2.1286,411.7852,1.93490050e-04
+2.1952,413.2571,0.00000000e+00
+2.2617,414.7290,5.57285151e-04
+2.3282,416.2009,3.16791091e-04
+2.3947,417.6729,0.00000000e+00
+2.4612,419.1448,8.38712149e-04
+2.5278,420.6167,0.00000000e+00
+2.5943,422.0887,6.90435350e-04
+2.6608,423.5606,0.00000000e+00
+2.7273,425.0325,0.00000000e+00
+2.7938,426.5044,0.00000000e+00
+2.8604,427.9763,4.36050032e-04
+2.9269,429.4483,8.22020520e-04
+2.9934,430.9202,0.00000000e+00
+3.0599,432.3922,5.76918101e-05
+3.1264,433.8641,0.00000000e+00
+3.1930,435.3360,1.98985930e-04
+3.2595,436.8079,0.00000000e+00
+3.3260,438.2799,8.54540267e-05
+3.3925,439.7518,1.33182170e-04
+3.4590,441.2237,4.25790873e-04
+3.5256,442.6956,0.00000000e+00
+3.5921,444.1676,2.50594283e-04
+3.6586,445.6395,0.00000000e+00
+3.7251,447.1115,0.00000000e+00
+3.7916,448.5834,0.00000000e+00
+3.8582,450.0553,0.00000000e+00
+3.9247,451.5272,9.36620228e-04
+3.9912,452.9991,0.00000000e+00
+4.0577,454.4711,3.00277497e-06
+4.1242,455.9430,3.63510888e-04
+4.1908,457.4149,0.00000000e+00
+4.2573,458.8869,0.00000000e+00
+4.3238,460.3588,0.00000000e+00
+4.3903,461.8307,4.16886440e-04
+4.4568,463.3027,0.00000000e+00
+4.5234,464.7746,3.27082562e-05
+4.5899,466.2465,0.00000000e+00
+4.6564,467.7184,3.14288831e-04
+4.7229,469.1904,9.26061475e-05
+4.7894,470.6623,0.00000000e+00
+4.8560,472.1342,0.00000000e+00
+4.9225,473.6062,1.49216838e-04
+4.9890,475.0781,3.87398264e-04
+5.0555,476.5500,9.22982290e-05
+5.1220,478.0219,2.38888693e-04
+5.1886,479.4939,0.00000000e+00
+5.2551,480.9658,0.00000000e+00
+5.3216,482.4377,6.14219403e-04
+5.3881,483.9097,4.88228368e-04
+5.4546,485.3816,0.00000000e+00
+5.5212,486.8535,0.00000000e+00
+5.5877,488.3254,0.00000000e+00
+5.6542,489.7974,1.00592217e-04
+5.7207,491.2693,5.90181560e-04
+5.7872,492.7412,0.00000000e+00
+5.8538,494.2132,0.00000000e+00
+5.9203,495.6851,0.00000000e+00
+5.9868,497.1570,0.00000000e+00
+6.0533,498.6290,2.34339881e-04
+6.1198,500.1009,0.00000000e+00
+6.1864,501.5728,0.00000000e+00
+6.2529,503.0447,0.00000000e+00
+6.3194,504.5167,1.72142711e-04
+6.3859,505.9886,0.00000000e+00
+6.4524,507.4605,0.00000000e+00
+6.5190,508.9325,0.00000000e+00
+6.5855,510.4044,0.00000000e+00
+6.6520,511.8763,0.00000000e+00
+6.7185,513.3483,0.00000000e+00
+6.7850,514.8202,1.22533448e-03
+6.8516,516.2921,3.64271291e-05
+6.9181,517.7640,0.00000000e+00
+6.9846,519.2360,5.45659102e-04
+7.0511,520.7079,0.00000000e+00
+7.1176,522.1798,0.00000000e+00
+7.1842,523.6517,3.14541539e-04
+7.2507,525.1237,3.91683512e-04
+7.3172,526.5956,0.00000000e+00
+7.3837,528.0675,1.75476700e-04
+7.4502,529.5395,0.00000000e+00
+7.5168,531.0114,0.00000000e+00
+7.5833,532.4833,2.69924378e-04
+7.6498,533.9553,0.00000000e+00
+7.7163,535.4272,0.00000000e+00
+7.7828,536.8991,0.00000000e+00
+7.8494,538.3710,4.09115630e-04
+7.9159,539.8430,0.00000000e+00
+7.9824,541.3149,0.00000000e+00
+8.0489,542.7868,6.26287656e-04
+8.1154,544.2587,2.30927126e-05
+8.1820,545.7307,0.00000000e+00
+8.2485,547.2026,0.00000000e+00
+8.3150,548.6746,4.32675079e-05
+8.3815,550.1465,0.00000000e+00
+8.4480,551.6184,3.99334094e-05
+8.5146,553.0903,5.81260829e-04
+8.5811,554.5623,0.00000000e+00
+8.6476,556.0342,1.19957993e-04
+8.7141,557.5061,2.85068672e-04
+8.7806,558.9780,3.93331808e-04
+8.8472,560.4500,0.00000000e+00
+8.9137,561.9219,3.67657485e-04
+8.9802,563.3939,1.16378440e-04
+9.0467,564.8658,0.00000000e+00
+9.1132,566.3377,0.00000000e+00
+9.1798,567.8096,6.86668500e-07
+9.2463,569.2816,0.00000000e+00
+9.3128,570.7535,6.31375297e-04
+9.3793,572.2254,4.58877155e-04
+9.4458,573.6973,4.29789856e-04
+9.5124,575.1693,0.00000000e+00
+9.5789,576.6412,1.97040034e-04
+9.6454,578.1131,8.89341027e-05
+9.7119,579.5850,0.00000000e+00
+9.7785,581.0570,0.00000000e+00
+9.8450,582.5289,3.16377322e-04
+9.9115,584.0009,2.88539013e-06
+9.9780,585.4728,0.00000000e+00
+10.0445,586.9447,0.00000000e+00
+10.1110,588.4166,4.29139473e-04
+10.1776,589.8885,0.00000000e+00
+10.2441,591.3605,9.57067707e-04
+10.3106,592.8324,2.34311126e-04
+10.3771,594.3043,1.16382267e-04
+10.4436,595.7762,1.77323367e-04
+10.5102,597.2482,3.85720457e-04
+10.5767,598.7202,2.24887001e-04
+10.6432,600.1921,7.23666395e-04
+10.7097,601.6640,2.43206712e-04
+10.7763,603.1359,1.73589884e-04
+10.8428,604.6078,1.03200809e-03
+10.9093,606.0798,1.80702598e-04
+10.9758,607.5517,4.84564749e-04
+11.0423,609.0236,1.27769948e-04
+11.1088,610.4955,1.88845035e-04
+11.1754,611.9675,9.02826025e-04
+11.2419,613.4394,3.19052691e-04
+11.3084,614.9113,6.38835481e-04
+11.3749,616.3833,7.26160186e-04
+11.4415,617.8552,6.09765644e-04
+11.5080,619.3271,9.30387178e-04
+11.5745,620.7991,1.45896140e-03
+11.6410,622.2710,1.52046292e-03
+11.7075,623.7429,2.11874023e-03
+11.7741,625.2148,1.01464696e-03
+11.8406,626.6868,1.53577037e-03
+11.9071,628.1587,2.45304126e-03
+11.9736,629.6306,2.23654998e-03
+12.0401,631.1025,2.44460907e-03
+12.1067,632.5745,2.41628080e-03
+12.1732,634.0464,2.52274261e-03
+12.2397,635.5184,2.57904432e-03
+12.3062,636.9903,2.87646707e-03
+12.3727,638.4622,2.24442547e-03
+12.4393,639.9341,3.45364469e-03
+12.5058,641.4061,3.52089829e-03
+12.5723,642.8780,3.82953091e-03
+12.6388,644.3499,4.87368880e-03
+12.7053,645.8218,4.22772812e-03
+12.7719,647.2938,4.71044565e-03
+12.8384,648.7657,5.47945779e-03
+12.9049,650.2377,5.65349543e-03
+12.9714,651.7096,6.21117745e-03
+13.0379,653.1815,6.64145639e-03
+13.1045,654.6534,7.43052876e-03
+13.1710,656.1254,8.10522027e-03
+13.2375,657.5973,8.84165522e-03
+13.3040,659.0692,9.92199779e-03
+13.3705,660.5411,1.08429063e-02
+13.4371,662.0131,1.10836206e-02
+13.5036,663.4850,1.17231570e-02
+13.5701,664.9569,1.23871127e-02
+13.6366,666.4288,1.37632005e-02
+13.7031,667.9008,1.50113199e-02
+13.7697,669.3727,1.54805873e-02
+13.8362,670.8447,1.61337666e-02
+13.9027,672.3166,1.83095895e-02
+13.9692,673.7885,1.90161392e-02
+14.0357,675.2604,2.09075008e-02
+14.1023,676.7324,2.16787420e-02
+14.1688,678.2043,2.28140838e-02
+14.2353,679.6762,2.45092157e-02
+14.3018,681.1481,2.56894156e-02
+14.3683,682.6201,2.75317244e-02
+14.4349,684.0920,2.95307804e-02
+14.5014,685.5640,3.13054286e-02
+14.5679,687.0359,3.29918489e-02
+14.6344,688.5078,3.54036279e-02
+14.7009,689.9797,3.72925699e-02
+14.7675,691.4517,3.86553742e-02
+14.8340,692.9236,3.97003554e-02
+14.9005,694.3955,4.24298830e-02
+14.9670,695.8674,4.52144109e-02
+15.0335,697.3394,4.64576930e-02
+15.1001,698.8113,4.84861396e-02
+15.1666,700.2832,5.01289256e-02
+15.2331,701.7552,5.26262186e-02
+15.2996,703.2271,5.37167229e-02
+15.3661,704.6990,5.56162782e-02
+15.4327,706.1710,5.65892309e-02
+15.4992,707.6429,5.79850487e-02
+15.5657,709.1148,5.93351088e-02
+15.6322,710.5867,5.92563562e-02
+15.6987,712.0587,5.99551685e-02
+15.7653,713.5306,6.06572405e-02
+15.8318,715.0025,6.07070811e-02
+15.8983,716.4744,6.06577508e-02
+15.9648,717.9464,5.97164258e-02
+16.0313,719.4183,5.95358200e-02
+16.0979,720.8903,5.87149523e-02
+16.1644,722.3622,5.68093918e-02
+16.2309,723.8341,5.40811680e-02
+16.2974,725.3060,5.25899194e-02
+16.3639,726.7780,5.10351434e-02
+16.4305,728.2499,4.72891852e-02
+16.4970,729.7218,4.44902144e-02
+16.5635,731.1937,4.13655750e-02
+16.6300,732.6656,3.87049727e-02
+16.6965,734.1376,3.55271101e-02
+16.7631,735.6095,3.14525515e-02
+16.8296,737.0815,2.94385850e-02
+16.8961,738.5534,2.49469690e-02
+16.9626,740.0253,2.24083830e-02
+17.0291,741.4973,1.90562699e-02
+17.0957,742.9692,1.62600074e-02
+17.1622,744.4411,1.27663892e-02
+17.2287,745.9130,1.04241725e-02
+17.2952,747.3849,9.59920138e-03
+17.3617,748.8569,6.37709303e-03
+17.4283,750.3288,5.87075204e-03
+17.4948,751.8007,4.43728035e-03
+17.5613,753.2726,2.65609822e-03
+17.6278,754.7446,2.79402127e-03
+17.6943,756.2166,1.51169533e-03
+17.7609,757.6885,1.47606363e-03
+17.8274,759.1604,7.97657762e-04
+17.8939,760.6323,7.38202594e-04
+17.9604,762.1042,8.18451284e-04
+18.0269,763.5762,6.77399337e-04
+18.0935,765.0481,0.00000000e+00
+18.1600,766.5200,5.19863330e-04
+18.2265,767.9919,5.11510239e-04
+18.2930,769.4639,0.00000000e+00
+18.3595,770.9359,4.47726052e-04
+18.4261,772.4078,0.00000000e+00
+18.4926,773.8797,0.00000000e+00
+18.5591,775.3516,2.57432461e-04
+18.6256,776.8235,0.00000000e+00
+18.6921,778.2955,4.14275797e-04
+18.7587,779.7674,0.00000000e+00
+18.8252,781.2393,5.31318510e-05
+18.8917,782.7112,6.37854275e-04
+18.9582,784.1832,0.00000000e+00
+19.0247,785.6551,4.25966165e-04
+19.0913,787.1270,6.31299336e-05
+19.1578,788.5990,6.18641905e-04
+19.2243,790.0709,1.46286126e-04
+19.2908,791.5428,0.00000000e+00
+19.3573,793.0148,3.29643430e-04
+19.4239,794.4867,4.92266205e-04
+19.4904,795.9586,0.00000000e+00
+19.5569,797.4305,0.00000000e+00
+19.6234,798.9025,8.44785944e-04
+19.6899,800.3744,2.13497857e-04
+19.7565,801.8463,3.15368554e-04
+19.8230,803.3182,0.00000000e+00
+19.8895,804.7902,0.00000000e+00
+19.9560,806.2621,4.32939714e-06
+20.0225,807.7341,8.83216489e-06
+20.0891,809.2060,0.00000000e+00
+20.1556,810.6779,1.31048844e-04
+20.2221,812.1498,0.00000000e+00
+20.2886,813.6218,0.00000000e+00
+20.3551,815.0937,0.00000000e+00
+20.4217,816.5656,1.02098589e-03
+20.4882,818.0375,6.14453820e-05
+20.5547,819.5095,3.79001467e-05
+20.6212,820.9814,1.56113500e-04
+20.6877,822.4533,0.00000000e+00
+20.7543,823.9253,2.15680062e-04
+20.8208,825.3972,0.00000000e+00
+20.8873,826.8691,4.18609154e-04
+20.9538,828.3411,5.91389944e-05
+21.0203,829.8130,0.00000000e+00
+21.0869,831.2849,4.61156218e-04
+21.1534,832.7568,5.16081287e-04
+21.2199,834.2288,3.24139255e-04
+21.2864,835.7007,2.57307081e-04
+21.3529,837.1726,0.00000000e+00
+21.4195,838.6445,1.89467828e-04
+21.4860,840.1165,0.00000000e+00
+21.5525,841.5884,5.72077930e-04
+21.6190,843.0604,1.17918818e-04
+21.6855,844.5323,0.00000000e+00
+21.7521,846.0042,5.10044338e-04
+21.8186,847.4761,5.47091418e-04
+21.8851,848.9481,6.87013235e-05
+21.9516,850.4200,5.32643870e-04
+22.0181,851.8919,6.46634959e-04
+22.0847,853.3638,0.00000000e+00
+22.1512,854.8358,0.00000000e+00
+22.2177,856.3077,2.60900910e-04
+22.2842,857.7797,5.88314615e-05
+22.3507,859.2516,3.81886384e-05
+22.4173,860.7235,0.00000000e+00
+22.4838,862.1954,6.71043119e-04
+22.5503,863.6674,7.43542390e-04
+22.6168,865.1393,0.00000000e+00
+22.6833,866.6112,0.00000000e+00
+22.7499,868.0831,9.09266178e-04
+22.8164,869.5551,4.78418835e-04
+22.8829,871.0270,0.00000000e+00
+22.9494,872.4989,0.00000000e+00
+23.0159,873.9708,1.93111300e-05
+23.0825,875.4428,4.82728705e-04
+23.1490,876.9147,0.00000000e+00
+23.2155,878.3867,0.00000000e+00
+23.2820,879.8586,4.16682422e-04
+23.3485,881.3305,7.46893202e-05
+23.4151,882.8024,1.96325163e-05
+23.4816,884.2744,0.00000000e+00
+23.5481,885.7463,2.38498964e-04
+23.6146,887.2182,1.98232607e-04
+23.6811,888.6901,0.00000000e+00
+23.7477,890.1620,0.00000000e+00
+23.8142,891.6340,5.00664057e-04
+23.8807,893.1060,0.00000000e+00
+23.9472,894.5779,6.33423799e-04
+24.0137,896.0498,1.23509481e-05
+24.0803,897.5217,2.59065186e-04
+24.1468,898.9937,3.29563220e-04
+24.2133,900.4656,0.00000000e+00
+24.2798,901.9375,0.00000000e+00
+24.3463,903.4094,1.00627658e-03
+24.4129,904.8813,2.33636412e-04
+24.4794,906.3533,0.00000000e+00
+24.5459,907.8252,1.88903912e-04
+24.6124,909.2971,6.16391131e-04
+24.6789,910.7691,0.00000000e+00
+24.7455,912.2410,0.00000000e+00
+24.8120,913.7130,7.99885747e-05
+24.8785,915.1849,5.31984668e-04
+24.9450,916.6568,4.20491066e-04
+25.0115,918.1287,0.00000000e+00
+25.0781,919.6006,0.00000000e+00
+25.1446,921.0726,2.69780285e-04
+25.2111,922.5445,9.35810604e-05
+25.2776,924.0164,1.70944419e-04
+25.3441,925.4883,0.00000000e+00
+25.4107,926.9603,0.00000000e+00
+25.4772,928.4323,2.95091013e-04
+25.5437,929.9042,5.63998008e-04
+25.6102,931.3761,1.56557071e-04
+25.6767,932.8480,0.00000000e+00
+25.7433,934.3199,0.00000000e+00
+25.8098,935.7919,0.00000000e+00
+25.8763,937.2638,1.87951635e-04
+25.9428,938.7357,0.00000000e+00
+26.0093,940.2076,0.00000000e+00
+26.0759,941.6796,0.00000000e+00
+26.1424,943.1515,0.00000000e+00
+26.2089,944.6235,0.00000000e+00
+26.2754,946.0954,1.81577328e-04
+26.3419,947.5673,5.73076031e-05
+26.4085,949.0392,0.00000000e+00
+26.4750,950.5112,0.00000000e+00
+26.5415,951.9831,0.00000000e+00
+26.6080,953.4550,0.00000000e+00
+26.6745,954.9269,0.00000000e+00
+26.7411,956.3989,1.61124946e-04
+26.8076,957.8708,9.03698907e-04
+26.8741,959.3427,8.12301354e-04
+26.9406,960.8146,3.32629541e-04
+27.0071,962.2866,4.70507308e-04
+27.0737,963.7585,0.00000000e+00
+27.1402,965.2305,2.42316019e-04
+27.2067,966.7024,2.44654017e-04
+27.2732,968.1743,0.00000000e+00
+27.3397,969.6462,5.58811123e-04
+27.4063,971.1182,0.00000000e+00
+27.4728,972.5901,3.76072239e-05
+27.5393,974.0620,3.63078783e-04
+27.6058,975.5339,4.88894701e-04
+27.6723,977.0059,0.00000000e+00
+27.7389,978.4778,6.49315043e-05
+27.8054,979.9498,2.11781444e-04
+27.8719,981.4217,6.70528563e-04
+27.9384,982.8936,3.06484144e-04
+28.0049,984.3655,1.16695110e-05
+28.0715,985.8375,3.80023324e-04
+28.1380,987.3094,1.53237015e-05
+28.2045,988.7813,0.00000000e+00
+28.2710,990.2532,1.34827933e-04
+28.3375,991.7252,0.00000000e+00
+28.4041,993.1971,0.00000000e+00
+28.4706,994.6690,3.01465188e-04
+28.5371,996.1409,0.00000000e+00
+28.6036,997.6129,1.86612175e-04
+28.6701,999.0848,0.00000000e+00
+28.7367,1000.5568,0.00000000e+00
+28.8032,1002.0287,0.00000000e+00
+28.8697,1003.5006,0.00000000e+00
+28.9362,1004.9725,0.00000000e+00
+29.0027,1006.4445,0.00000000e+00
+29.0693,1007.9164,0.00000000e+00
+29.1358,1009.3883,2.87918956e-04
+29.2023,1010.8602,0.00000000e+00
+29.2688,1012.3322,0.00000000e+00
+29.3353,1013.8041,5.37051121e-04
+29.4019,1015.2761,5.99179330e-05
+29.4684,1016.7480,0.00000000e+00
+29.5349,1018.2199,3.37825128e-04
+29.6014,1019.6918,0.00000000e+00
+29.6679,1021.1638,0.00000000e+00
+29.7345,1022.6357,0.00000000e+00
+29.8010,1024.1077,0.00000000e+00
+29.8675,1025.5796,9.73668648e-04
+29.9340,1027.0515,0.00000000e+00
+30.0005,1028.5234,3.79196747e-04
+30.0671,1029.9954,0.00000000e+00
+30.1336,1031.4673,3.95466835e-04
+30.2001,1032.9392,0.00000000e+00
+30.2666,1034.4111,0.00000000e+00
+30.3331,1035.8831,0.00000000e+00
+30.3997,1037.3550,0.00000000e+00
+30.4662,1038.8269,2.14104570e-04
+30.5327,1040.2988,0.00000000e+00
+30.5992,1041.7708,0.00000000e+00
+30.6657,1043.2427,0.00000000e+00
+30.7323,1044.7146,2.80319509e-04
+30.7988,1046.1865,9.44193220e-04
+30.8653,1047.6584,0.00000000e+00
+30.9318,1049.1304,0.00000000e+00
+30.9983,1050.6023,8.19858979e-05
+31.0649,1052.0742,5.57247608e-04
+31.1314,1053.5461,5.13865889e-05
+31.1979,1055.0181,8.61656663e-05
+31.2644,1056.4900,1.43352336e-05
+31.3310,1057.9620,0.00000000e+00
+31.3975,1059.4340,4.51086598e-05
+31.4640,1060.9059,3.74442374e-04
+31.5305,1062.3778,3.90589557e-04
+31.5970,1063.8497,0.00000000e+00
+31.6636,1065.3217,0.00000000e+00
+31.7301,1066.7936,0.00000000e+00
+31.7966,1068.2655,0.00000000e+00
+31.8631,1069.7374,0.00000000e+00
+31.9296,1071.2094,0.00000000e+00
+31.9961,1072.6813,0.00000000e+00
+32.0627,1074.1532,0.00000000e+00
+32.1292,1075.6251,3.58785386e-04
+32.1957,1077.0970,0.00000000e+00
+32.2622,1078.5690,0.00000000e+00
+32.3287,1080.0409,1.61655407e-04
+32.3953,1081.5128,0.00000000e+00
+32.4618,1082.9847,2.76961917e-04
+32.5283,1084.4567,0.00000000e+00
+32.5948,1085.9286,5.74287958e-04
+32.6613,1087.4005,1.19593039e-06
+32.7279,1088.8724,6.43487088e-04
+32.7944,1090.3444,0.00000000e+00
+32.8609,1091.8164,3.56198900e-04
+32.9274,1093.2883,3.14071833e-04
+32.9940,1094.7603,1.79414856e-04
+33.0605,1096.2322,2.37139015e-04
+33.1270,1097.7041,0.00000000e+00
+33.1935,1099.1760,2.70589982e-04
diff --git a/demo_data/tpd_FirstOrder_metadata.json b/demo_data/tpd_FirstOrder_metadata.json
new file mode 100644
index 0000000000000000000000000000000000000000..ff2d0cabde6883290f7b327dac98300b1e68e433
--- /dev/null
+++ b/demo_data/tpd_FirstOrder_metadata.json
@@ -0,0 +1,22 @@
+{
+ "mechanism": "FirstOrder",
+ "betas_Ks": [
+ 0.3162277638912201,
+ 2.597219944000244,
+ 22.127595901489258
+ ],
+ "n_rates": 3,
+ "true_params": {
+ "mechanism": "FirstOrder",
+ "Ed": 23369.582400663046,
+ "nu": 160197624009364.56,
+ "theta_0": 0.15471468757226675,
+ "T_start": 364.6834143679138,
+ "T_end": 1099.1759914138238
+ },
+ "csv_files": [
+ "tpd_FirstOrder_1.csv",
+ "tpd_FirstOrder_2.csv",
+ "tpd_FirstOrder_3.csv"
+ ]
+}
\ No newline at end of file
diff --git a/demo_data/tpd_LH_Surface_1.csv b/demo_data/tpd_LH_Surface_1.csv
new file mode 100644
index 0000000000000000000000000000000000000000..bfec774c3e502db140839a30c89573252bd30082
--- /dev/null
+++ b/demo_data/tpd_LH_Surface_1.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,8.44391889e-06
+4.6546,366.1553,0.00000000e+00
+9.3093,367.6273,0.00000000e+00
+13.9640,369.0992,9.69270695e-06
+18.6186,370.5711,5.41437544e-07
+23.2733,372.0431,1.60490399e-05
+27.9279,373.5150,7.16646446e-06
+32.5825,374.9869,4.42238752e-06
+37.2372,376.4588,0.00000000e+00
+41.8919,377.9308,0.00000000e+00
+46.5465,379.4027,0.00000000e+00
+51.2011,380.8746,0.00000000e+00
+55.8558,382.3466,5.24278876e-05
+60.5104,383.8185,0.00000000e+00
+65.1651,385.2904,1.26157638e-05
+69.8198,386.7624,9.89115870e-06
+74.4744,388.2343,1.43746565e-05
+79.1290,389.7062,1.25408051e-05
+83.7837,391.1781,0.00000000e+00
+88.4383,392.6501,7.18282251e-07
+93.0930,394.1220,0.00000000e+00
+97.7477,395.5939,0.00000000e+00
+102.4023,397.0659,1.90222891e-05
+107.0569,398.5378,0.00000000e+00
+111.7116,400.0097,0.00000000e+00
+116.3662,401.4816,0.00000000e+00
+121.0209,402.9536,3.13295504e-06
+125.6755,404.4255,0.00000000e+00
+130.3302,405.8974,2.70479777e-05
+134.9848,407.3694,1.33756284e-05
+139.6394,408.8413,1.83932516e-05
+144.2941,410.3132,2.27884448e-05
+148.9488,411.7852,1.72162981e-05
+153.6034,413.2571,2.42562255e-05
+158.2581,414.7290,0.00000000e+00
+162.9127,416.2009,4.29855481e-06
+167.5673,417.6729,0.00000000e+00
+172.2220,419.1448,3.40357437e-05
+176.8767,420.6167,5.05886419e-06
+181.5313,422.0887,1.06395155e-05
+186.1860,423.5606,0.00000000e+00
+190.8406,425.0325,0.00000000e+00
+195.4952,426.5044,0.00000000e+00
+200.1498,427.9763,0.00000000e+00
+204.8046,429.4483,0.00000000e+00
+209.4592,430.9202,1.77264428e-05
+214.1138,432.3922,0.00000000e+00
+218.7685,433.8641,4.74798708e-06
+223.4231,435.3360,3.07857277e-07
+228.0777,436.8079,0.00000000e+00
+232.7325,438.2799,0.00000000e+00
+237.3871,439.7518,1.43060606e-05
+242.0417,441.2237,5.06688252e-07
+246.6964,442.6956,0.00000000e+00
+251.3510,444.1676,0.00000000e+00
+256.0056,445.6395,0.00000000e+00
+260.6603,447.1115,0.00000000e+00
+265.3150,448.5834,2.24824653e-05
+269.9696,450.0553,0.00000000e+00
+274.6242,451.5272,2.90358639e-05
+279.2789,452.9991,0.00000000e+00
+283.9335,454.4711,0.00000000e+00
+288.5882,455.9430,3.90885762e-05
+293.2429,457.4149,0.00000000e+00
+297.8975,458.8869,0.00000000e+00
+302.5521,460.3588,0.00000000e+00
+307.2068,461.8307,0.00000000e+00
+311.8615,463.3027,5.04627224e-06
+316.5161,464.7746,1.69886007e-05
+321.1708,466.2465,1.90937208e-05
+325.8254,467.7184,0.00000000e+00
+330.4800,469.1904,2.96544499e-06
+335.1347,470.6623,0.00000000e+00
+339.7894,472.1342,9.19329432e-06
+344.4440,473.6062,0.00000000e+00
+349.0986,475.0781,2.65181079e-05
+353.7533,476.5500,0.00000000e+00
+358.4079,478.0219,1.26571604e-05
+363.0625,479.4939,3.46580168e-06
+367.7173,480.9658,0.00000000e+00
+372.3719,482.4377,3.67958964e-05
+377.0265,483.9097,0.00000000e+00
+381.6812,485.3816,3.80981874e-05
+386.3358,486.8535,0.00000000e+00
+390.9904,488.3254,4.36092478e-06
+395.6452,489.7974,0.00000000e+00
+400.2998,491.2693,0.00000000e+00
+404.9544,492.7412,3.28564374e-06
+409.6091,494.2132,0.00000000e+00
+414.2637,495.6851,0.00000000e+00
+418.9183,497.1570,0.00000000e+00
+423.5730,498.6290,0.00000000e+00
+428.2277,500.1009,0.00000000e+00
+432.8823,501.5728,4.59433613e-05
+437.5369,503.0447,0.00000000e+00
+442.1916,504.5167,5.83486269e-07
+446.8462,505.9886,8.32903697e-06
+451.5009,507.4605,0.00000000e+00
+456.1556,508.9325,7.27128645e-06
+460.8102,510.4044,0.00000000e+00
+465.4648,511.8763,0.00000000e+00
+470.1196,513.3483,0.00000000e+00
+474.7742,514.8202,0.00000000e+00
+479.4288,516.2921,1.27340481e-05
+484.0835,517.7640,0.00000000e+00
+488.7381,519.2360,0.00000000e+00
+493.3927,520.7079,0.00000000e+00
+498.0473,522.1798,1.99141796e-05
+502.7020,523.6517,0.00000000e+00
+507.3566,525.1237,5.41994814e-06
+512.0112,526.5956,5.89149386e-06
+516.6659,528.0675,2.95993823e-06
+521.3207,529.5395,0.00000000e+00
+525.9753,531.0114,0.00000000e+00
+530.6300,532.4833,0.00000000e+00
+535.2846,533.9553,1.61301341e-05
+539.9392,535.4272,0.00000000e+00
+544.5939,536.8991,0.00000000e+00
+549.2485,538.3710,1.26668383e-05
+553.9031,539.8430,0.00000000e+00
+558.5578,541.3149,0.00000000e+00
+563.2124,542.7868,0.00000000e+00
+567.8670,544.2587,2.03131185e-05
+572.5218,545.7307,0.00000000e+00
+577.1765,547.2026,0.00000000e+00
+581.8311,548.6746,1.48383360e-05
+586.4857,550.1465,0.00000000e+00
+591.1404,551.6184,0.00000000e+00
+595.7950,553.0903,0.00000000e+00
+600.4496,554.5623,5.81445329e-06
+605.1043,556.0342,3.05039302e-05
+609.7589,557.5061,0.00000000e+00
+614.4135,558.9780,0.00000000e+00
+619.0682,560.4500,0.00000000e+00
+623.7228,561.9219,1.22899792e-05
+628.3776,563.3939,9.40240807e-06
+633.0323,564.8658,0.00000000e+00
+637.6869,566.3377,3.96878386e-06
+642.3415,567.8096,3.11141375e-05
+646.9961,569.2816,0.00000000e+00
+651.6508,570.7535,3.33625940e-05
+656.3054,572.2254,3.55512384e-07
+660.9600,573.6973,1.01246951e-05
+665.6147,575.1693,3.31059127e-05
+670.2693,576.6412,2.52998179e-05
+674.9239,578.1131,0.00000000e+00
+679.5786,579.5850,4.89438462e-05
+684.2334,581.0570,4.26680526e-05
+688.8880,582.5289,6.30490977e-05
+693.5427,584.0009,2.27215987e-05
+698.1973,585.4728,7.06240753e-05
+702.8519,586.9447,5.43348251e-05
+707.5066,588.4166,9.73924907e-05
+712.1612,589.8885,4.64121222e-05
+716.8158,591.3605,5.85093294e-05
+721.4704,592.8324,7.47434970e-05
+726.1251,594.3043,6.76056225e-05
+730.7797,595.7762,1.07968117e-04
+735.4343,597.2482,1.12302005e-04
+740.0892,598.7202,7.71483756e-05
+744.7438,600.1921,1.17094402e-04
+749.3984,601.6640,1.46668215e-04
+754.0531,603.1359,1.55138478e-04
+758.7077,604.6078,1.46363658e-04
+763.3623,606.0798,1.79924682e-04
+768.0170,607.5517,1.94459484e-04
+772.6716,609.0236,2.03280506e-04
+777.3262,610.4955,2.30780759e-04
+781.9809,611.9675,2.32233535e-04
+786.6355,613.4394,2.84783309e-04
+791.2901,614.9113,2.81599059e-04
+795.9449,616.3833,3.34736484e-04
+800.5996,617.8552,2.94311583e-04
+805.2542,619.3271,3.60075152e-04
+809.9088,620.7991,3.93125229e-04
+814.5635,622.2710,4.24504367e-04
+819.2181,623.7429,4.35876951e-04
+823.8727,625.2148,4.94808715e-04
+828.5274,626.6868,5.10283920e-04
+833.1820,628.1587,5.40623150e-04
+837.8366,629.6306,5.93910052e-04
+842.4913,631.1025,6.26192195e-04
+847.1461,632.5745,6.49597205e-04
+851.8007,634.0464,6.73787494e-04
+856.4554,635.5184,7.08830601e-04
+861.1100,636.9903,7.56103545e-04
+865.7646,638.4622,7.79655704e-04
+870.4192,639.9341,7.87062745e-04
+875.0739,641.4061,8.38575594e-04
+879.7285,642.8780,8.31094396e-04
+884.3831,644.3499,8.77343409e-04
+889.0378,645.8218,8.97818420e-04
+893.6924,647.2938,9.16516990e-04
+898.3470,648.7657,9.18500766e-04
+903.0019,650.2377,9.20278137e-04
+907.6565,651.7096,9.66006133e-04
+912.3111,653.1815,9.10875970e-04
+916.9658,654.6534,9.21415805e-04
+921.6204,656.1254,9.26071429e-04
+926.2750,657.5973,8.82928900e-04
+930.9297,659.0692,8.67572147e-04
+935.5843,660.5411,8.60753527e-04
+940.2389,662.0131,8.17772991e-04
+944.8936,663.4850,7.66963698e-04
+949.5482,664.9569,7.21923250e-04
+954.2028,666.4288,6.84222032e-04
+958.8576,667.9008,6.84752711e-04
+963.5123,669.3727,5.82249952e-04
+968.1669,670.8447,5.38988679e-04
+972.8215,672.3166,5.13561477e-04
+977.4762,673.7885,4.21980338e-04
+982.1308,675.2604,3.80125537e-04
+986.7854,676.7324,3.33442906e-04
+991.4401,678.2043,2.94472440e-04
+996.0947,679.6762,2.35415733e-04
+1000.7493,681.1481,2.37103668e-04
+1005.4040,682.6201,1.70948100e-04
+1010.0586,684.0920,1.44559555e-04
+1014.7134,685.5640,1.02987644e-04
+1019.3680,687.0359,1.10169109e-04
+1024.0227,688.5078,3.66729582e-05
+1028.6773,689.9797,1.62651104e-05
+1033.3319,691.4517,2.75077000e-05
+1037.9866,692.9236,6.18812828e-06
+1042.6412,694.3955,1.29375612e-05
+1047.2958,695.8674,6.00443036e-06
+1051.9505,697.3394,4.77885442e-06
+1056.6051,698.8113,0.00000000e+00
+1061.2597,700.2832,0.00000000e+00
+1065.9146,701.7552,4.67528253e-06
+1070.5692,703.2271,0.00000000e+00
+1075.2238,704.6990,0.00000000e+00
+1079.8785,706.1710,5.29729869e-06
+1084.5331,707.6429,2.97761999e-05
+1089.1877,709.1148,1.41260416e-05
+1093.8423,710.5867,0.00000000e+00
+1098.4970,712.0587,0.00000000e+00
+1103.1516,713.5306,5.28716646e-06
+1107.8062,715.0025,7.33223897e-06
+1112.4609,716.4744,2.10560029e-05
+1117.1155,717.9464,0.00000000e+00
+1121.7703,719.4183,1.49999205e-05
+1126.4250,720.8903,3.49040056e-06
+1131.0796,722.3622,0.00000000e+00
+1135.7342,723.8341,0.00000000e+00
+1140.3889,725.3060,0.00000000e+00
+1145.0435,726.7780,0.00000000e+00
+1149.6981,728.2499,1.25344486e-05
+1154.3528,729.7218,1.49412308e-05
+1159.0074,731.1937,0.00000000e+00
+1163.6620,732.6656,1.93975047e-05
+1168.3167,734.1376,0.00000000e+00
+1172.9713,735.6095,7.25080736e-06
+1177.6261,737.0815,0.00000000e+00
+1182.2807,738.5534,0.00000000e+00
+1186.9354,740.0253,0.00000000e+00
+1191.5900,741.4973,0.00000000e+00
+1196.2446,742.9692,0.00000000e+00
+1200.8993,744.4411,6.52279186e-06
+1205.5539,745.9130,0.00000000e+00
+1210.2085,747.3849,0.00000000e+00
+1214.8632,748.8569,0.00000000e+00
+1219.5178,750.3288,0.00000000e+00
+1224.1724,751.8007,0.00000000e+00
+1228.8271,753.2726,3.32323434e-05
+1233.4819,754.7446,0.00000000e+00
+1238.1365,756.2166,1.33606663e-05
+1242.7911,757.6885,8.20163223e-06
+1247.4458,759.1604,1.33419535e-05
+1252.1004,760.6323,0.00000000e+00
+1256.7550,762.1042,1.03474049e-05
+1261.4097,763.5762,2.67226769e-05
+1266.0643,765.0481,2.23742736e-05
+1270.7189,766.5200,1.14272200e-06
+1275.3736,767.9919,1.72034506e-05
+1280.0282,769.4639,0.00000000e+00
+1284.6830,770.9359,2.54637434e-05
+1289.3377,772.4078,0.00000000e+00
+1293.9923,773.8797,0.00000000e+00
+1298.6469,775.3516,0.00000000e+00
+1303.3016,776.8235,0.00000000e+00
+1307.9562,778.2955,8.39480163e-06
+1312.6108,779.7674,1.51333282e-07
+1317.2655,781.2393,0.00000000e+00
+1321.9201,782.7112,8.78367473e-07
+1326.5747,784.1832,0.00000000e+00
+1331.2293,785.6551,3.36951707e-05
+1335.8840,787.1270,0.00000000e+00
+1340.5388,788.5990,1.81699470e-05
+1345.1934,790.0709,5.84306053e-06
+1349.8481,791.5428,0.00000000e+00
+1354.5027,793.0148,4.96869143e-06
+1359.1573,794.4867,0.00000000e+00
+1363.8120,795.9586,9.24473989e-06
+1368.4666,797.4305,0.00000000e+00
+1373.1212,798.9025,0.00000000e+00
+1377.7759,800.3744,1.15897683e-06
+1382.4305,801.8463,4.57314263e-06
+1387.0851,803.3182,0.00000000e+00
+1391.7398,804.7902,5.74256819e-06
+1396.3946,806.2621,0.00000000e+00
+1401.0492,807.7341,0.00000000e+00
+1405.7038,809.2060,1.47573573e-05
+1410.3585,810.6779,2.98739560e-05
+1415.0131,812.1498,8.35101673e-06
+1419.6677,813.6218,0.00000000e+00
+1424.3224,815.0937,0.00000000e+00
+1428.9770,816.5656,1.35548562e-05
+1433.6316,818.0375,6.56912061e-06
+1438.2863,819.5095,6.61294052e-06
+1442.9409,820.9814,1.50109536e-05
+1447.5955,822.4533,2.39397705e-05
+1452.2504,823.9253,0.00000000e+00
+1456.9050,825.3972,0.00000000e+00
+1461.5596,826.8691,0.00000000e+00
+1466.2143,828.3411,2.99522962e-05
+1470.8689,829.8130,2.84232883e-05
+1475.5235,831.2849,2.32999137e-05
+1480.1781,832.7568,0.00000000e+00
+1484.8328,834.2288,7.51978678e-06
+1489.4874,835.7007,0.00000000e+00
+1494.1420,837.1726,8.32753074e-07
+1498.7967,838.6445,0.00000000e+00
+1503.4513,840.1165,2.76749925e-05
+1508.1061,841.5884,0.00000000e+00
+1512.7608,843.0604,0.00000000e+00
+1517.4154,844.5323,1.53529691e-05
+1522.0700,846.0042,2.03807213e-05
+1526.7247,847.4761,0.00000000e+00
+1531.3793,848.9481,2.46010568e-05
+1536.0339,850.4200,0.00000000e+00
+1540.6886,851.8919,0.00000000e+00
+1545.3432,853.3638,6.34796334e-06
+1549.9978,854.8358,0.00000000e+00
+1554.6524,856.3077,1.72784785e-05
+1559.3073,857.7797,0.00000000e+00
+1563.9619,859.2516,9.53803692e-07
+1568.6165,860.7235,0.00000000e+00
+1573.2712,862.1954,0.00000000e+00
+1577.9258,863.6674,1.84304627e-05
+1582.5804,865.1393,1.89527673e-05
+1587.2351,866.6112,0.00000000e+00
+1591.8897,868.0831,1.90443407e-05
+1596.5443,869.5551,3.63292384e-06
+1601.1990,871.0270,0.00000000e+00
+1605.8536,872.4989,3.13762075e-06
+1610.5082,873.9708,3.73814546e-05
+1615.1630,875.4428,2.67327305e-05
+1619.8177,876.9147,0.00000000e+00
+1624.4723,878.3867,0.00000000e+00
+1629.1269,879.8586,3.74423479e-07
+1633.7816,881.3305,1.46188916e-06
+1638.4362,882.8024,0.00000000e+00
+1643.0908,884.2744,2.27019518e-05
+1647.7455,885.7463,1.48806748e-05
+1652.4001,887.2182,0.00000000e+00
+1657.0547,888.6901,0.00000000e+00
+1661.7094,890.1620,1.61547268e-05
+1666.3640,891.6340,1.31701036e-05
+1671.0188,893.1060,0.00000000e+00
+1675.6735,894.5779,0.00000000e+00
+1680.3281,896.0498,1.62578017e-05
+1684.9827,897.5217,0.00000000e+00
+1689.6374,898.9937,9.75600869e-06
+1694.2920,900.4656,7.84223903e-06
+1698.9466,901.9375,1.43284942e-05
+1703.6012,903.4094,0.00000000e+00
+1708.2559,904.8813,0.00000000e+00
+1712.9105,906.3533,1.94655768e-05
+1717.5651,907.8252,1.36141216e-05
+1722.2198,909.2971,2.18908717e-05
+1726.8746,910.7691,0.00000000e+00
+1731.5292,912.2410,4.73839009e-06
+1736.1839,913.7130,2.17606139e-05
+1740.8385,915.1849,0.00000000e+00
+1745.4931,916.6568,0.00000000e+00
+1750.1478,918.1287,0.00000000e+00
+1754.8024,919.6006,0.00000000e+00
+1759.4570,921.0726,3.77067090e-06
+1764.1117,922.5445,0.00000000e+00
+1768.7663,924.0164,1.35311438e-06
+1773.4209,925.4883,0.00000000e+00
+1778.0757,926.9603,0.00000000e+00
+1782.7304,928.4323,0.00000000e+00
+1787.3850,929.9042,4.51580377e-07
+1792.0396,931.3761,0.00000000e+00
+1796.6943,932.8480,0.00000000e+00
+1801.3489,934.3199,8.88432623e-06
+1806.0035,935.7919,0.00000000e+00
+1810.6582,937.2638,0.00000000e+00
+1815.3128,938.7357,4.21793584e-06
+1819.9674,940.2076,1.52517969e-05
+1824.6221,941.6796,0.00000000e+00
+1829.2767,943.1515,2.71193949e-05
+1833.9315,944.6235,9.19604463e-06
+1838.5862,946.0954,0.00000000e+00
+1843.2408,947.5673,0.00000000e+00
+1847.8954,949.0392,3.76797834e-06
+1852.5500,950.5112,1.24847293e-05
+1857.2047,951.9831,0.00000000e+00
+1861.8593,953.4550,0.00000000e+00
+1866.5139,954.9269,0.00000000e+00
+1871.1686,956.3989,3.26997942e-05
+1875.8232,957.8708,0.00000000e+00
+1880.4778,959.3427,2.69489169e-06
+1885.1325,960.8146,0.00000000e+00
+1889.7873,962.2866,3.02176632e-05
+1894.4419,963.7585,1.95337179e-06
+1899.0966,965.2305,0.00000000e+00
+1903.7512,966.7024,0.00000000e+00
+1908.4058,968.1743,0.00000000e+00
+1913.0605,969.6462,0.00000000e+00
+1917.7151,971.1182,3.24775965e-06
+1922.3697,972.5901,1.81214782e-05
+1927.0243,974.0620,0.00000000e+00
+1931.6790,975.5339,9.73261103e-06
+1936.3336,977.0059,1.26392915e-05
+1940.9882,978.4778,2.06627901e-05
+1945.6431,979.9498,0.00000000e+00
+1950.2977,981.4217,0.00000000e+00
+1954.9523,982.8936,0.00000000e+00
+1959.6070,984.3655,2.12857867e-05
+1964.2616,985.8375,0.00000000e+00
+1968.9162,987.3094,0.00000000e+00
+1973.5709,988.7813,5.61753295e-05
+1978.2255,990.2532,2.45751507e-05
+1982.8801,991.7252,5.80608412e-06
+1987.5348,993.1971,2.36824926e-05
+1992.1894,994.6690,0.00000000e+00
+1996.8440,996.1409,1.26700152e-05
+2001.4988,997.6129,0.00000000e+00
+2006.1535,999.0848,0.00000000e+00
+2010.8081,1000.5568,2.53742965e-05
+2015.4627,1002.0287,4.26730512e-05
+2020.1174,1003.5006,0.00000000e+00
+2024.7720,1004.9725,9.30472743e-06
+2029.4266,1006.4445,1.02775775e-05
+2034.0813,1007.9164,0.00000000e+00
+2038.7359,1009.3883,0.00000000e+00
+2043.3905,1010.8602,0.00000000e+00
+2048.0452,1012.3322,2.08894089e-05
+2052.7000,1013.8041,2.23685838e-05
+2057.3546,1015.2761,3.50086739e-05
+2062.0093,1016.7480,2.65572435e-05
+2066.6639,1018.2199,0.00000000e+00
+2071.3185,1019.6918,0.00000000e+00
+2075.9731,1021.1638,3.01790351e-05
+2080.6278,1022.6357,2.08613183e-05
+2085.2826,1024.1077,1.22504862e-05
+2089.9372,1025.5796,1.08701852e-05
+2094.5919,1027.0515,0.00000000e+00
+2099.2465,1028.5234,0.00000000e+00
+2103.9011,1029.9954,0.00000000e+00
+2108.5558,1031.4673,0.00000000e+00
+2113.2104,1032.9392,0.00000000e+00
+2117.8650,1034.4111,0.00000000e+00
+2122.5197,1035.8831,2.14415904e-05
+2127.1743,1037.3550,0.00000000e+00
+2131.8289,1038.8269,0.00000000e+00
+2136.4836,1040.2988,1.85906883e-05
+2141.1382,1041.7708,0.00000000e+00
+2145.7928,1043.2427,0.00000000e+00
+2150.4475,1044.7146,0.00000000e+00
+2155.1021,1046.1865,0.00000000e+00
+2159.7567,1047.6584,2.56854651e-06
+2164.4113,1049.1304,0.00000000e+00
+2169.0660,1050.6023,1.35582641e-05
+2173.7206,1052.0742,1.83561115e-05
+2178.3752,1053.5461,8.42392819e-06
+2183.0299,1055.0181,0.00000000e+00
+2187.6845,1056.4900,4.02393744e-06
+2192.3395,1057.9620,0.00000000e+00
+2196.9942,1059.4340,0.00000000e+00
+2201.6488,1060.9059,0.00000000e+00
+2206.3034,1062.3778,2.77419331e-05
+2210.9581,1063.8497,1.78422160e-05
+2215.6127,1065.3217,2.19891172e-05
+2220.2673,1066.7936,0.00000000e+00
+2224.9219,1068.2655,3.27779562e-05
+2229.5766,1069.7374,1.13603237e-05
+2234.2312,1071.2094,5.49875767e-06
+2238.8858,1072.6813,4.62045728e-06
+2243.5405,1074.1532,0.00000000e+00
+2248.1951,1075.6251,0.00000000e+00
+2252.8497,1077.0970,0.00000000e+00
+2257.5044,1078.5690,0.00000000e+00
+2262.1590,1080.0409,0.00000000e+00
+2266.8136,1081.5128,1.55932703e-05
+2271.4683,1082.9847,0.00000000e+00
+2276.1229,1084.4567,2.26473840e-05
+2280.7775,1085.9286,0.00000000e+00
+2285.4322,1087.4005,1.04910150e-05
+2290.0868,1088.8724,0.00000000e+00
+2294.7414,1090.3444,8.88813884e-06
+2299.3964,1091.8164,2.08983101e-06
+2304.0511,1093.2883,2.42800229e-06
+2308.7057,1094.7603,2.14815173e-05
+2313.3603,1096.2322,3.66219610e-05
+2318.0150,1097.7041,0.00000000e+00
+2322.6696,1099.1760,1.11475347e-05
diff --git a/demo_data/tpd_LH_Surface_2.csv b/demo_data/tpd_LH_Surface_2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..f88531d7ef55a7b6a550794050e3299cb2fc4a1c
--- /dev/null
+++ b/demo_data/tpd_LH_Surface_2.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,0.00000000e+00
+0.6652,366.1553,0.00000000e+00
+1.3304,367.6273,0.00000000e+00
+1.9956,369.0992,2.01215778e-04
+2.6608,370.5711,6.68135135e-06
+3.3260,372.0431,1.08867034e-05
+3.9912,373.5150,6.38693455e-05
+4.6564,374.9869,1.15530951e-04
+5.3216,376.4588,1.32519621e-04
+5.9868,377.9308,3.39755097e-05
+6.6520,379.4027,6.12012445e-05
+7.3172,380.8746,0.00000000e+00
+7.9824,382.3466,0.00000000e+00
+8.6476,383.8185,0.00000000e+00
+9.3128,385.2904,1.07673459e-05
+9.9780,386.7624,5.09268966e-06
+10.6432,388.2343,3.62040555e-05
+11.3084,389.7062,0.00000000e+00
+11.9736,391.1781,1.77719456e-04
+12.6388,392.6501,0.00000000e+00
+13.3040,394.1220,0.00000000e+00
+13.9692,395.5939,0.00000000e+00
+14.6344,397.0659,0.00000000e+00
+15.2996,398.5378,9.06609566e-05
+15.9648,400.0097,2.27365643e-04
+16.6300,401.4816,0.00000000e+00
+17.2952,402.9536,5.29030949e-05
+17.9604,404.4255,8.16167158e-05
+18.6256,405.8974,0.00000000e+00
+19.2908,407.3694,0.00000000e+00
+19.9560,408.8413,0.00000000e+00
+20.6212,410.3132,0.00000000e+00
+21.2864,411.7852,0.00000000e+00
+21.9516,413.2571,1.12512513e-04
+22.6168,414.7290,1.63557546e-04
+23.2820,416.2009,4.08054620e-05
+23.9472,417.6729,0.00000000e+00
+24.6124,419.1448,8.70388540e-05
+25.2776,420.6167,0.00000000e+00
+25.9428,422.0887,0.00000000e+00
+26.6080,423.5606,1.17600044e-04
+27.2732,425.0325,1.73882130e-04
+27.9384,426.5044,0.00000000e+00
+28.6036,427.9763,0.00000000e+00
+29.2688,429.4483,2.51889251e-05
+29.9340,430.9202,0.00000000e+00
+30.5992,432.3922,0.00000000e+00
+31.2644,433.8641,1.41903671e-04
+31.9296,435.3360,8.53291349e-05
+32.5948,436.8079,0.00000000e+00
+33.2600,438.2799,4.48681749e-05
+33.9252,439.7518,0.00000000e+00
+34.5904,441.2237,0.00000000e+00
+35.2556,442.6956,1.10908455e-04
+35.9208,444.1676,0.00000000e+00
+36.5860,445.6395,2.82928377e-05
+37.2512,447.1115,0.00000000e+00
+37.9164,448.5834,8.16517422e-05
+38.5816,450.0553,7.21405959e-05
+39.2468,451.5272,7.96426539e-05
+39.9120,452.9991,2.17360604e-04
+40.5772,454.4711,3.87472537e-05
+41.2424,455.9430,1.72253218e-04
+41.9076,457.4149,2.48261640e-05
+42.5728,458.8869,1.38095056e-04
+43.2380,460.3588,1.76672474e-04
+43.9032,461.8307,0.00000000e+00
+44.5685,463.3027,0.00000000e+00
+45.2336,464.7746,0.00000000e+00
+45.8988,466.2465,2.66008108e-04
+46.5640,467.7184,3.43059910e-05
+47.2292,469.1904,6.02238688e-05
+47.8944,470.6623,9.80184705e-05
+48.5597,472.1342,0.00000000e+00
+49.2249,473.6062,2.89088475e-05
+49.8901,475.0781,0.00000000e+00
+50.5552,476.5500,4.15972900e-05
+51.2204,478.0219,0.00000000e+00
+51.8856,479.4939,2.27673099e-05
+52.5509,480.9658,0.00000000e+00
+53.2161,482.4377,0.00000000e+00
+53.8813,483.9097,0.00000000e+00
+54.5465,485.3816,5.93140066e-05
+55.2117,486.8535,0.00000000e+00
+55.8768,488.3254,0.00000000e+00
+56.5421,489.7974,2.98656360e-05
+57.2073,491.2693,0.00000000e+00
+57.8725,492.7412,1.58835566e-04
+58.5377,494.2132,0.00000000e+00
+59.2029,495.6851,7.73262436e-05
+59.8681,497.1570,6.16538746e-05
+60.5333,498.6290,2.40753088e-05
+61.1985,500.1009,0.00000000e+00
+61.8637,501.5728,1.52698762e-04
+62.5289,503.0447,3.00267311e-05
+63.1941,504.5167,0.00000000e+00
+63.8593,505.9886,1.48071427e-04
+64.5245,507.4605,0.00000000e+00
+65.1897,508.9325,3.36029298e-05
+65.8549,510.4044,0.00000000e+00
+66.5201,511.8763,9.44301792e-05
+67.1853,513.3483,0.00000000e+00
+67.8505,514.8202,2.80437293e-04
+68.5157,516.2921,0.00000000e+00
+69.1809,517.7640,0.00000000e+00
+69.8461,519.2360,1.42934514e-04
+70.5113,520.7079,0.00000000e+00
+71.1765,522.1798,1.35756112e-04
+71.8417,523.6517,0.00000000e+00
+72.5069,525.1237,0.00000000e+00
+73.1721,526.5956,0.00000000e+00
+73.8373,528.0675,0.00000000e+00
+74.5025,529.5395,3.16781625e-05
+75.1677,531.0114,1.71368301e-04
+75.8329,532.4833,0.00000000e+00
+76.4981,533.9553,0.00000000e+00
+77.1633,535.4272,7.12354085e-05
+77.8285,536.8991,1.33495283e-04
+78.4937,538.3710,0.00000000e+00
+79.1589,539.8430,0.00000000e+00
+79.8241,541.3149,2.03491378e-04
+80.4893,542.7868,2.16190980e-04
+81.1545,544.2587,0.00000000e+00
+81.8197,545.7307,0.00000000e+00
+82.4849,547.2026,4.05888968e-05
+83.1501,548.6746,1.74557470e-04
+83.8153,550.1465,1.58131967e-04
+84.4805,551.6184,1.21653335e-04
+85.1457,553.0903,3.62428946e-05
+85.8109,554.5623,1.23057926e-05
+86.4761,556.0342,8.82042805e-05
+87.1413,557.5061,0.00000000e+00
+87.8065,558.9780,1.36130140e-04
+88.4717,560.4500,5.50424011e-05
+89.1369,561.9219,0.00000000e+00
+89.8021,563.3939,0.00000000e+00
+90.4673,564.8658,3.46882734e-05
+91.1325,566.3377,0.00000000e+00
+91.7977,567.8096,1.04858336e-04
+92.4629,569.2816,9.91595662e-05
+93.1281,570.7535,5.17425760e-05
+93.7933,572.2254,1.00684039e-04
+94.4585,573.6973,0.00000000e+00
+95.1237,575.1693,5.52421407e-05
+95.7889,576.6412,2.02049836e-04
+96.4541,578.1131,0.00000000e+00
+97.1193,579.5850,0.00000000e+00
+97.7845,581.0570,2.29908946e-05
+98.4497,582.5289,9.27442597e-05
+99.1149,584.0009,1.11779838e-04
+99.7801,585.4728,0.00000000e+00
+100.4453,586.9447,1.65676640e-04
+101.1105,588.4166,6.07298352e-05
+101.7757,589.8885,5.23279705e-05
+102.4409,591.3605,1.32062065e-04
+103.1061,592.8324,0.00000000e+00
+103.7713,594.3043,1.70017534e-04
+104.4365,595.7762,8.32952283e-05
+105.1017,597.2482,9.16550489e-05
+105.7669,598.7202,4.27053426e-04
+106.4321,600.1921,9.45668071e-05
+107.0973,601.6640,3.60714155e-04
+107.7625,603.1359,1.26535859e-04
+108.4277,604.6078,3.08486982e-04
+109.0929,606.0798,4.73976455e-04
+109.7581,607.5517,2.27710363e-04
+110.4233,609.0236,1.65877864e-04
+111.0885,610.4955,2.63772206e-04
+111.7537,611.9675,1.60673575e-04
+112.4189,613.4394,3.53027426e-04
+113.0841,614.9113,1.86127756e-04
+113.7493,616.3833,3.30372335e-04
+114.4145,617.8552,4.76154120e-04
+115.0797,619.3271,2.66953197e-04
+115.7449,620.7991,3.05740250e-04
+116.4101,622.2710,4.46073245e-04
+117.0753,623.7429,5.08699100e-04
+117.7405,625.2148,6.62109058e-04
+118.4057,626.6868,5.72873396e-04
+119.0709,628.1587,5.65390917e-04
+119.7361,629.6306,9.60894162e-04
+120.4013,631.1025,9.32272407e-04
+121.0665,632.5745,9.22386593e-04
+121.7317,634.0464,9.38711455e-04
+122.3969,635.5184,1.22612319e-03
+123.0621,636.9903,1.24811428e-03
+123.7273,638.4622,1.31373364e-03
+124.3925,639.9341,1.26613898e-03
+125.0577,641.4061,1.23113068e-03
+125.7229,642.8780,1.39808585e-03
+126.3881,644.3499,1.51590025e-03
+127.0533,645.8218,1.88599946e-03
+127.7185,647.2938,1.92245760e-03
+128.3837,648.7657,2.18467251e-03
+129.0489,650.2377,2.44747987e-03
+129.7141,651.7096,2.24558706e-03
+130.3793,653.1815,2.51617027e-03
+131.0445,654.6534,2.62324419e-03
+131.7097,656.1254,2.93021183e-03
+132.3749,657.5973,2.99965031e-03
+133.0401,659.0692,3.28163081e-03
+133.7053,660.5411,3.30106658e-03
+134.3705,662.0131,3.42687592e-03
+135.0357,663.4850,3.78461718e-03
+135.7009,664.9569,4.03505797e-03
+136.3661,666.4288,4.12520673e-03
+137.0313,667.9008,4.46822308e-03
+137.6965,669.3727,4.63510538e-03
+138.3617,670.8447,4.62959288e-03
+139.0269,672.3166,4.96805413e-03
+139.6921,673.7885,4.89364518e-03
+140.3573,675.2604,4.99663595e-03
+141.0225,676.7324,5.25273709e-03
+141.6877,678.2043,5.46739390e-03
+142.3529,679.6762,5.60448784e-03
+143.0181,681.1481,5.67212841e-03
+143.6833,682.6201,5.71408588e-03
+144.3485,684.0920,5.89305302e-03
+145.0138,685.5640,5.85440267e-03
+145.6789,687.0359,6.04787562e-03
+146.3441,688.5078,6.04519434e-03
+147.0093,689.9797,5.49491867e-03
+147.6745,691.4517,5.78082912e-03
+148.3397,692.9236,5.74204884e-03
+149.0049,694.3955,5.67759015e-03
+149.6701,695.8674,5.27710654e-03
+150.3353,697.3394,5.45422640e-03
+151.0005,698.8113,5.03826234e-03
+151.6657,700.2832,4.95729502e-03
+152.3310,701.7552,4.70305886e-03
+152.9962,703.2271,4.43823449e-03
+153.6614,704.6990,4.12585726e-03
+154.3266,706.1710,3.72394873e-03
+154.9918,707.6429,3.57269449e-03
+155.6570,709.1148,3.28888162e-03
+156.3221,710.5867,2.75581237e-03
+156.9873,712.0587,2.81768665e-03
+157.6525,713.5306,2.36833189e-03
+158.3177,715.0025,2.00974196e-03
+158.9829,716.4744,1.80559058e-03
+159.6481,717.9464,1.55869778e-03
+160.3134,719.4183,1.37113663e-03
+160.9786,720.8903,1.16677349e-03
+161.6438,722.3622,9.89511143e-04
+162.3090,723.8341,6.69324654e-04
+162.9742,725.3060,5.05967124e-04
+163.6394,726.7780,3.83801205e-04
+164.3046,728.2499,4.49114537e-04
+164.9698,729.7218,2.17587207e-04
+165.6350,731.1937,1.25165068e-04
+166.3002,732.6656,1.69386360e-04
+166.9653,734.1376,2.55592982e-04
+167.6305,735.6095,3.35261429e-05
+168.2958,737.0815,8.70345393e-05
+168.9610,738.5534,1.95656219e-04
+169.6262,740.0253,0.00000000e+00
+170.2914,741.4973,0.00000000e+00
+170.9566,742.9692,4.46555750e-05
+171.6218,744.4411,8.91074451e-05
+172.2870,745.9130,0.00000000e+00
+172.9522,747.3849,0.00000000e+00
+173.6174,748.8569,0.00000000e+00
+174.2826,750.3288,0.00000000e+00
+174.9478,751.8007,0.00000000e+00
+175.6130,753.2726,1.04197807e-05
+176.2782,754.7446,0.00000000e+00
+176.9434,756.2166,1.11479560e-04
+177.6086,757.6885,0.00000000e+00
+178.2738,759.1604,2.09878581e-05
+178.9390,760.6323,0.00000000e+00
+179.6042,762.1042,1.84167307e-04
+180.2694,763.5762,0.00000000e+00
+180.9346,765.0481,9.72334892e-05
+181.5998,766.5200,0.00000000e+00
+182.2650,767.9919,0.00000000e+00
+182.9302,769.4639,2.38218108e-05
+183.5954,770.9359,1.36235598e-04
+184.2606,772.4078,8.88965496e-06
+184.9258,773.8797,1.34743081e-04
+185.5910,775.3516,1.69927691e-04
+186.2562,776.8235,1.19699092e-04
+186.9214,778.2955,1.13085835e-05
+187.5866,779.7674,0.00000000e+00
+188.2518,781.2393,0.00000000e+00
+188.9170,782.7112,0.00000000e+00
+189.5822,784.1832,2.68473741e-06
+190.2474,785.6551,3.75720010e-05
+190.9126,787.1270,0.00000000e+00
+191.5778,788.5990,9.49628593e-05
+192.2430,790.0709,1.32569345e-04
+192.9082,791.5428,1.10713489e-04
+193.5734,793.0148,1.47020965e-05
+194.2386,794.4867,0.00000000e+00
+194.9038,795.9586,0.00000000e+00
+195.5690,797.4305,5.09235979e-05
+196.2342,798.9025,2.91943870e-04
+196.8994,800.3744,1.11374655e-04
+197.5646,801.8463,0.00000000e+00
+198.2298,803.3182,0.00000000e+00
+198.8950,804.7902,0.00000000e+00
+199.5602,806.2621,0.00000000e+00
+200.2254,807.7341,6.61203449e-05
+200.8906,809.2060,1.30135275e-04
+201.5558,810.6779,0.00000000e+00
+202.2210,812.1498,0.00000000e+00
+202.8862,813.6218,4.39458308e-05
+203.5514,815.0937,0.00000000e+00
+204.2166,816.5656,6.30595823e-05
+204.8818,818.0375,6.20588835e-05
+205.5470,819.5095,1.15685420e-04
+206.2122,820.9814,0.00000000e+00
+206.8774,822.4533,0.00000000e+00
+207.5426,823.9253,0.00000000e+00
+208.2078,825.3972,0.00000000e+00
+208.8730,826.8691,0.00000000e+00
+209.5382,828.3411,0.00000000e+00
+210.2034,829.8130,1.93565182e-04
+210.8686,831.2849,6.29874630e-05
+211.5338,832.7568,1.30544169e-04
+212.1990,834.2288,0.00000000e+00
+212.8642,835.7007,9.52952469e-05
+213.5294,837.1726,0.00000000e+00
+214.1946,838.6445,6.61890153e-05
+214.8598,840.1165,0.00000000e+00
+215.5250,841.5884,0.00000000e+00
+216.1902,843.0604,0.00000000e+00
+216.8554,844.5323,0.00000000e+00
+217.5206,846.0042,2.29419238e-04
+218.1858,847.4761,0.00000000e+00
+218.8510,848.9481,0.00000000e+00
+219.5162,850.4200,5.36250845e-05
+220.1814,851.8919,4.36342016e-05
+220.8466,853.3638,6.07149559e-05
+221.5118,854.8358,5.24007737e-05
+222.1770,856.3077,6.55880285e-07
+222.8422,857.7797,1.28307423e-04
+223.5074,859.2516,6.06194480e-05
+224.1726,860.7235,9.35954449e-06
+224.8378,862.1954,1.69030929e-04
+225.5030,863.6674,0.00000000e+00
+226.1682,865.1393,0.00000000e+00
+226.8334,866.6112,0.00000000e+00
+227.4986,868.0831,3.97790100e-05
+228.1638,869.5551,0.00000000e+00
+228.8290,871.0270,0.00000000e+00
+229.4942,872.4989,6.72272363e-05
+230.1594,873.9708,2.59189546e-04
+230.8246,875.4428,0.00000000e+00
+231.4898,876.9147,1.73924345e-04
+232.1550,878.3867,0.00000000e+00
+232.8202,879.8586,4.92006657e-05
+233.4854,881.3305,0.00000000e+00
+234.1506,882.8024,3.24209577e-05
+234.8158,884.2744,1.63208388e-05
+235.4810,885.7463,4.76764835e-05
+236.1462,887.2182,0.00000000e+00
+236.8114,888.6901,0.00000000e+00
+237.4766,890.1620,9.72907656e-05
+238.1418,891.6340,0.00000000e+00
+238.8070,893.1060,0.00000000e+00
+239.4722,894.5779,1.39491807e-04
+240.1374,896.0498,0.00000000e+00
+240.8026,897.5217,9.60363541e-05
+241.4678,898.9937,1.69649051e-04
+242.1330,900.4656,0.00000000e+00
+242.7982,901.9375,0.00000000e+00
+243.4634,903.4094,0.00000000e+00
+244.1286,904.8813,3.04019108e-04
+244.7938,906.3533,1.20532590e-04
+245.4590,907.8252,0.00000000e+00
+246.1242,909.2971,0.00000000e+00
+246.7894,910.7691,2.68609816e-04
+247.4546,912.2410,1.01894060e-04
+248.1198,913.7130,0.00000000e+00
+248.7850,915.1849,3.86452302e-05
+249.4502,916.6568,4.55526206e-05
+250.1154,918.1287,0.00000000e+00
+250.7806,919.6006,1.57172806e-04
+251.4458,921.0726,8.34642851e-05
+252.1110,922.5445,0.00000000e+00
+252.7762,924.0164,1.44875812e-04
+253.4414,925.4883,0.00000000e+00
+254.1067,926.9603,0.00000000e+00
+254.7719,928.4323,8.33363720e-06
+255.4371,929.9042,6.77082280e-05
+256.1023,931.3761,0.00000000e+00
+256.7674,932.8480,1.69838549e-05
+257.4326,934.3199,0.00000000e+00
+258.0978,935.7919,0.00000000e+00
+258.7630,937.2638,2.45948235e-04
+259.4282,938.7357,0.00000000e+00
+260.0934,940.2076,6.73942850e-05
+260.7586,941.6796,0.00000000e+00
+261.4238,943.1515,0.00000000e+00
+262.0891,944.6235,9.11591633e-05
+262.7543,946.0954,2.12485480e-04
+263.4195,947.5673,0.00000000e+00
+264.0847,949.0392,1.66111393e-04
+264.7499,950.5112,1.40002405e-04
+265.4151,951.9831,0.00000000e+00
+266.0803,953.4550,1.37447627e-04
+266.7455,954.9269,0.00000000e+00
+267.4106,956.3989,0.00000000e+00
+268.0758,957.8708,9.19768718e-05
+268.7410,959.3427,0.00000000e+00
+269.4062,960.8146,0.00000000e+00
+270.0715,962.2866,0.00000000e+00
+270.7367,963.7585,0.00000000e+00
+271.4019,965.2305,0.00000000e+00
+272.0671,966.7024,0.00000000e+00
+272.7323,968.1743,0.00000000e+00
+273.3975,969.6462,0.00000000e+00
+274.0627,971.1182,1.45975486e-04
+274.7279,972.5901,0.00000000e+00
+275.3931,974.0620,5.12015940e-05
+276.0583,975.5339,0.00000000e+00
+276.7235,977.0059,0.00000000e+00
+277.3887,978.4778,0.00000000e+00
+278.0539,979.9498,8.34181774e-05
+278.7191,981.4217,2.39177170e-04
+279.3843,982.8936,1.78921746e-05
+280.0495,984.3655,5.46751107e-05
+280.7147,985.8375,5.50229670e-05
+281.3799,987.3094,1.74259432e-04
+282.0451,988.7813,0.00000000e+00
+282.7103,990.2532,0.00000000e+00
+283.3755,991.7252,7.00155215e-05
+284.0407,993.1971,3.11070507e-05
+284.7059,994.6690,0.00000000e+00
+285.3711,996.1409,0.00000000e+00
+286.0363,997.6129,4.52577115e-06
+286.7015,999.0848,9.12393261e-06
+287.3667,1000.5568,0.00000000e+00
+288.0319,1002.0287,0.00000000e+00
+288.6971,1003.5006,5.28601340e-05
+289.3623,1004.9725,7.21456381e-05
+290.0275,1006.4445,0.00000000e+00
+290.6927,1007.9164,0.00000000e+00
+291.3579,1009.3883,0.00000000e+00
+292.0231,1010.8602,2.62400335e-05
+292.6883,1012.3322,2.10922499e-05
+293.3535,1013.8041,1.01738777e-04
+294.0187,1015.2761,0.00000000e+00
+294.6839,1016.7480,0.00000000e+00
+295.3491,1018.2199,0.00000000e+00
+296.0143,1019.6918,0.00000000e+00
+296.6795,1021.1638,0.00000000e+00
+297.3447,1022.6357,0.00000000e+00
+298.0099,1024.1077,2.38994580e-05
+298.6751,1025.5796,0.00000000e+00
+299.3403,1027.0515,0.00000000e+00
+300.0055,1028.5234,1.95572875e-06
+300.6707,1029.9954,8.13630322e-05
+301.3359,1031.4673,2.58459913e-05
+302.0011,1032.9392,0.00000000e+00
+302.6663,1034.4111,0.00000000e+00
+303.3315,1035.8831,0.00000000e+00
+303.9967,1037.3550,0.00000000e+00
+304.6619,1038.8269,1.53871024e-05
+305.3271,1040.2988,5.23733615e-05
+305.9923,1041.7708,9.40229802e-05
+306.6575,1043.2427,3.67746143e-05
+307.3227,1044.7146,0.00000000e+00
+307.9879,1046.1865,1.13238420e-04
+308.6531,1047.6584,3.72888790e-05
+309.3183,1049.1304,0.00000000e+00
+309.9835,1050.6023,4.38127063e-05
+310.6487,1052.0742,0.00000000e+00
+311.3139,1053.5461,0.00000000e+00
+311.9791,1055.0181,1.79862196e-04
+312.6443,1056.4900,1.04032049e-04
+313.3095,1057.9620,0.00000000e+00
+313.9747,1059.4340,0.00000000e+00
+314.6399,1060.9059,2.23824809e-05
+315.3051,1062.3778,0.00000000e+00
+315.9703,1063.8497,0.00000000e+00
+316.6355,1065.3217,1.72164127e-05
+317.3007,1066.7936,0.00000000e+00
+317.9659,1068.2655,0.00000000e+00
+318.6311,1069.7374,5.00262977e-05
+319.2963,1071.2094,3.07185983e-05
+319.9615,1072.6813,0.00000000e+00
+320.6267,1074.1532,0.00000000e+00
+321.2919,1075.6251,1.13345093e-04
+321.9571,1077.0970,0.00000000e+00
+322.6223,1078.5690,5.81771019e-06
+323.2875,1080.0409,8.73052898e-07
+323.9527,1081.5128,0.00000000e+00
+324.6179,1082.9847,0.00000000e+00
+325.2831,1084.4567,0.00000000e+00
+325.9483,1085.9286,0.00000000e+00
+326.6135,1087.4005,1.21307880e-06
+327.2787,1088.8724,0.00000000e+00
+327.9439,1090.3444,0.00000000e+00
+328.6091,1091.8164,0.00000000e+00
+329.2743,1093.2883,1.05886524e-04
+329.9395,1094.7603,0.00000000e+00
+330.6047,1096.2322,6.56954071e-05
+331.2699,1097.7041,0.00000000e+00
+331.9351,1099.1760,3.70572707e-05
diff --git a/demo_data/tpd_LH_Surface_3.csv b/demo_data/tpd_LH_Surface_3.csv
new file mode 100644
index 0000000000000000000000000000000000000000..e9d4506a8a8b15e1a7f6e89ced486c9bfb3c480b
--- /dev/null
+++ b/demo_data/tpd_LH_Surface_3.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,0.00000000e+00
+0.0874,366.1553,0.00000000e+00
+0.1747,367.6273,2.23468596e-04
+0.2621,369.0992,0.00000000e+00
+0.3495,370.5711,9.22237930e-04
+0.4369,372.0431,0.00000000e+00
+0.5242,373.5150,0.00000000e+00
+0.6116,374.9869,0.00000000e+00
+0.6990,376.4588,2.58255342e-04
+0.7864,377.9308,4.84939694e-04
+0.8737,379.4027,1.40659380e-04
+0.9611,380.8746,0.00000000e+00
+1.0485,382.3466,0.00000000e+00
+1.1359,383.8185,0.00000000e+00
+1.2232,385.2904,0.00000000e+00
+1.3106,386.7624,6.67848362e-05
+1.3980,388.2343,4.69421822e-04
+1.4854,389.7062,0.00000000e+00
+1.5727,391.1781,0.00000000e+00
+1.6601,392.6501,0.00000000e+00
+1.7475,394.1220,8.49728312e-05
+1.8349,395.5939,0.00000000e+00
+1.9222,397.0659,3.17413535e-04
+2.0096,398.5378,0.00000000e+00
+2.0970,400.0097,0.00000000e+00
+2.1844,401.4816,0.00000000e+00
+2.2717,402.9536,6.67504384e-04
+2.3591,404.4255,0.00000000e+00
+2.4465,405.8974,1.33586349e-03
+2.5339,407.3694,0.00000000e+00
+2.6212,408.8413,5.84185982e-05
+2.7086,410.3132,2.34772902e-04
+2.7960,411.7852,0.00000000e+00
+2.8833,413.2571,6.76186988e-04
+2.9707,414.7290,3.84381332e-04
+3.0581,416.2009,0.00000000e+00
+3.1455,417.6729,1.01765897e-03
+3.2328,419.1448,0.00000000e+00
+3.3202,420.6167,8.37745960e-04
+3.4076,422.0887,0.00000000e+00
+3.4950,423.5606,0.00000000e+00
+3.5823,425.0325,0.00000000e+00
+3.6697,426.5044,5.29085170e-04
+3.7571,427.9763,9.97405848e-04
+3.8445,429.4483,0.00000000e+00
+3.9318,430.9202,7.00008022e-05
+4.0192,432.3922,0.00000000e+00
+4.1066,433.8641,2.41441274e-04
+4.1940,435.3360,0.00000000e+00
+4.2813,436.8079,1.03686267e-04
+4.3687,438.2799,1.61597607e-04
+4.4561,439.7518,5.16636996e-04
+4.5435,441.2237,0.00000000e+00
+4.6308,442.6956,3.04060522e-04
+4.7182,444.1676,0.00000000e+00
+4.8056,445.6395,0.00000000e+00
+4.8930,447.1115,0.00000000e+00
+4.9803,448.5834,0.00000000e+00
+5.0677,450.0553,1.13645592e-03
+5.1551,451.5272,0.00000000e+00
+5.2424,452.9991,3.64246694e-06
+5.3298,454.4711,4.41068056e-04
+5.4172,455.9430,0.00000000e+00
+5.5046,457.4149,0.00000000e+00
+5.5919,458.8869,0.00000000e+00
+5.6793,460.3588,5.05830743e-04
+5.7667,461.8307,0.00000000e+00
+5.8541,463.3027,3.96838113e-05
+5.9414,464.7746,0.00000000e+00
+6.0288,466.2465,3.81341000e-04
+6.1162,467.7184,1.12359623e-04
+6.2036,469.1904,0.00000000e+00
+6.2909,470.6623,0.00000000e+00
+6.3783,472.1342,1.81045834e-04
+6.4657,473.6062,4.70044150e-04
+6.5531,475.0781,1.11980378e-04
+6.6404,476.5500,2.89845513e-04
+6.7278,478.0219,0.00000000e+00
+6.8152,479.4939,0.00000000e+00
+6.9026,480.9658,7.45249505e-04
+6.9899,482.4377,5.92374185e-04
+7.0773,483.9097,0.00000000e+00
+7.1647,485.3816,0.00000000e+00
+7.2521,486.8535,0.00000000e+00
+7.3394,488.3254,1.22015001e-04
+7.4268,489.7974,7.16056558e-04
+7.5142,491.2693,0.00000000e+00
+7.6016,492.7412,0.00000000e+00
+7.6889,494.2132,0.00000000e+00
+7.7763,495.6851,0.00000000e+00
+7.8637,497.1570,2.84246722e-04
+7.9511,498.6290,0.00000000e+00
+8.0384,500.1009,0.00000000e+00
+8.1258,501.5728,0.00000000e+00
+8.2132,503.0447,2.08712707e-04
+8.3005,504.5167,0.00000000e+00
+8.3879,505.9886,0.00000000e+00
+8.4753,507.4605,0.00000000e+00
+8.5627,508.9325,0.00000000e+00
+8.6500,510.4044,0.00000000e+00
+8.7374,511.8763,0.00000000e+00
+8.8248,513.3483,1.48637185e-03
+8.9122,514.8202,4.37454837e-05
+8.9995,516.2921,0.00000000e+00
+9.0869,517.7640,6.61494327e-04
+9.1743,519.2360,0.00000000e+00
+9.2617,520.7079,0.00000000e+00
+9.3490,522.1798,3.80796060e-04
+9.4364,523.6517,4.74283239e-04
+9.5238,525.1237,0.00000000e+00
+9.6112,526.5956,2.11674618e-04
+9.6985,528.0675,0.00000000e+00
+9.7859,529.5395,0.00000000e+00
+9.8733,531.0114,3.25724744e-04
+9.9607,532.4833,0.00000000e+00
+10.0480,533.9553,0.00000000e+00
+10.1354,535.4272,0.00000000e+00
+10.2228,536.8991,4.93514293e-04
+10.3102,538.3710,0.00000000e+00
+10.3975,539.8430,0.00000000e+00
+10.4849,541.3149,7.55801680e-04
+10.5723,542.7868,2.34034887e-05
+10.6596,544.2587,0.00000000e+00
+10.7470,545.7307,0.00000000e+00
+10.8344,547.2026,4.59829207e-05
+10.9218,548.6746,0.00000000e+00
+11.0091,550.1465,4.02791848e-05
+11.0965,551.6184,6.96130737e-04
+11.1839,553.0903,0.00000000e+00
+11.2713,554.5623,1.34118076e-04
+11.3586,556.0342,3.33118369e-04
+11.4460,557.5061,4.62993863e-04
+11.5334,558.9780,0.00000000e+00
+11.6208,560.4500,4.28360159e-04
+11.7081,561.9219,1.21437843e-04
+11.7955,563.3939,0.00000000e+00
+11.8829,564.8658,0.00000000e+00
+11.9703,566.3377,0.00000000e+00
+12.0576,567.8096,0.00000000e+00
+12.1450,569.2816,7.32378452e-04
+12.2324,570.7535,5.19342953e-04
+12.3198,572.2254,4.79925249e-04
+12.4071,573.6973,0.00000000e+00
+12.4945,575.1693,1.87936806e-04
+12.5819,576.6412,5.12223633e-05
+12.6693,578.1131,0.00000000e+00
+12.7566,579.5850,0.00000000e+00
+12.8440,581.0570,3.06933071e-04
+12.9314,582.5289,0.00000000e+00
+13.0188,584.0009,0.00000000e+00
+13.1061,585.4728,0.00000000e+00
+13.1935,586.9447,4.05884348e-04
+13.2809,588.4166,0.00000000e+00
+13.3682,589.8885,1.02143828e-03
+13.4556,591.3605,1.30109314e-04
+13.5430,592.8324,0.00000000e+00
+13.6304,594.3043,2.79285814e-05
+13.7177,595.7762,2.61857233e-04
+13.8051,597.2482,4.59726580e-05
+13.8925,598.7202,6.28470269e-04
+13.9799,600.1921,2.06602417e-05
+14.0672,601.6640,0.00000000e+00
+14.1546,603.1359,9.20893217e-04
+14.2420,604.6078,0.00000000e+00
+14.3294,606.0798,1.88758422e-04
+14.4167,607.5517,0.00000000e+00
+14.5041,609.0236,0.00000000e+00
+14.5915,610.4955,5.69337863e-04
+14.6789,611.9675,0.00000000e+00
+14.7662,613.4394,1.44192149e-04
+14.8536,614.9113,1.90628431e-04
+14.9410,616.3833,0.00000000e+00
+15.0284,617.8552,3.03177600e-04
+15.1157,619.3271,8.67905444e-04
+15.2031,620.7991,8.59260093e-04
+15.2905,622.2710,1.49474037e-03
+15.3779,623.7429,5.68910618e-05
+15.4652,625.2148,5.82662877e-04
+15.5526,626.6868,1.58010586e-03
+15.6400,628.1587,1.19219860e-03
+15.7273,629.6306,1.30899670e-03
+15.8147,631.1025,1.12776016e-03
+15.9021,632.5745,1.09802606e-03
+15.9895,634.0464,9.94497444e-04
+16.0768,635.5184,1.16966350e-03
+16.1642,636.9903,2.02189549e-04
+16.2516,638.4622,1.45290908e-03
+16.3390,639.9341,1.30098930e-03
+16.4263,641.4061,1.42375752e-03
+16.5137,642.8780,2.41956604e-03
+16.6011,644.3499,1.34395505e-03
+16.6885,645.8218,1.61579647e-03
+16.7758,647.2938,2.21158075e-03
+16.8632,648.7657,2.06056330e-03
+16.9506,650.2377,2.34866096e-03
+17.0380,651.7096,2.45424709e-03
+17.1253,653.1815,2.96567008e-03
+17.2127,654.6534,3.30718723e-03
+17.3001,656.1254,3.69086605e-03
+17.3875,657.5973,4.45743371e-03
+17.4748,659.0692,4.99451719e-03
+17.5622,660.5411,4.66863252e-03
+17.6496,662.0131,4.78744321e-03
+17.7370,663.4850,4.89515392e-03
+17.8243,664.9569,5.82479499e-03
+17.9117,666.4288,6.55573513e-03
+17.9991,667.9008,6.29708543e-03
+18.0865,669.3727,6.21609390e-03
+18.1738,670.8447,7.93644320e-03
+18.2612,672.3166,7.82747287e-03
+18.3486,673.7885,9.10950825e-03
+18.4360,675.2604,8.98621790e-03
+18.5233,676.7324,9.25937109e-03
+18.6107,678.2043,1.01678316e-02
+18.6981,679.6762,1.04096448e-02
+18.7854,681.1481,1.14157796e-02
+18.8728,682.6201,1.25766583e-02
+18.9602,684.0920,1.34343207e-02
+19.0476,685.5640,1.41595267e-02
+19.1349,687.0359,1.57460757e-02
+19.2223,688.5078,1.66872684e-02
+19.3097,689.9797,1.69881899e-02
+19.3971,691.4517,1.69120748e-02
+19.4844,692.9236,1.89003814e-02
+19.5718,694.3955,2.09892541e-02
+19.6592,695.8674,2.12567113e-02
+19.7466,697.3394,2.25418676e-02
+19.8339,698.8113,2.34418735e-02
+19.9213,700.2832,2.54806373e-02
+20.0087,701.7552,2.59347353e-02
+20.0961,703.2271,2.75141243e-02
+20.1834,704.6990,2.81349234e-02
+20.2708,706.1710,2.94569843e-02
+20.3582,707.6429,3.09341252e-02
+20.4456,709.1148,3.09100747e-02
+20.5329,710.5867,3.20826955e-02
+20.6203,712.0587,3.35313752e-02
+20.7077,713.5306,3.44771333e-02
+20.7951,715.0025,3.56040262e-02
+20.8824,716.4744,3.59589010e-02
+20.9698,717.9464,3.75509299e-02
+21.0572,719.4183,3.86782177e-02
+21.1446,720.8903,3.87929864e-02
+21.2319,722.3622,3.81975435e-02
+21.3193,723.8341,3.93677168e-02
+21.4067,725.3060,4.06945348e-02
+21.4940,726.7780,3.95576656e-02
+21.5814,728.2499,3.97188105e-02
+21.6688,729.7218,3.95811871e-02
+21.7562,731.1937,4.00449373e-02
+21.8435,732.6656,3.98573726e-02
+21.9309,734.1376,3.84939350e-02
+22.0183,735.6095,3.94786559e-02
+22.1057,737.0815,3.72430384e-02
+22.1930,738.5534,3.71057093e-02
+22.2804,740.0253,3.56593505e-02
+22.3678,741.4973,3.45240273e-02
+22.4552,742.9692,3.21484022e-02
+22.5425,744.4411,3.07569243e-02
+22.6299,745.9130,3.07874084e-02
+22.7173,747.3849,2.74968706e-02
+22.8047,748.8569,2.71076765e-02
+22.8920,750.3288,2.52289791e-02
+22.9794,751.8007,2.26020273e-02
+23.0668,753.2726,2.20221896e-02
+23.1542,754.7446,1.94868445e-02
+23.2415,756.2166,1.82830486e-02
+23.3289,757.6885,1.61688924e-02
+23.4163,759.1604,1.47236194e-02
+23.5037,760.6323,1.34100877e-02
+23.5910,762.1042,1.18295243e-02
+23.6784,763.5762,9.35558323e-03
+23.7658,765.0481,8.95170681e-03
+23.8531,766.5200,7.71294534e-03
+23.9405,767.9919,5.41667920e-03
+24.0279,769.4639,5.48545970e-03
+24.1153,770.9359,3.72157572e-03
+24.2026,772.4078,2.99541652e-03
+24.2900,773.8797,2.87950365e-03
+24.3774,775.3516,1.31527707e-03
+24.4648,776.8235,2.02688272e-03
+24.5521,778.2955,9.67073545e-04
+24.6395,779.7674,9.02718864e-04
+24.7269,781.2393,1.37635390e-03
+24.8143,782.7112,0.00000000e+00
+24.9016,784.1832,8.07301258e-04
+24.9890,785.6551,2.70976627e-04
+25.0764,787.1270,8.77331826e-04
+25.1638,788.5990,2.57817592e-04
+25.2511,790.0709,0.00000000e+00
+25.3385,791.5428,4.29499225e-04
+25.4259,793.0148,6.14359917e-04
+25.5133,794.4867,0.00000000e+00
+25.6006,795.9586,0.00000000e+00
+25.6880,797.4305,1.02769502e-03
+25.7754,798.9025,2.60379660e-04
+25.8628,800.3744,3.83291830e-04
+25.9501,801.8463,0.00000000e+00
+26.0375,803.3182,0.00000000e+00
+26.1249,804.7902,5.30650414e-06
+26.2123,806.2621,1.07378155e-05
+26.2996,807.7341,0.00000000e+00
+26.3870,809.2060,1.59012256e-04
+26.4744,810.6779,0.00000000e+00
+26.5617,812.1498,0.00000000e+00
+26.6491,813.6218,0.00000000e+00
+26.7365,815.0937,1.23882235e-03
+26.8239,816.5656,7.45552970e-05
+26.9112,818.0375,4.59864750e-05
+26.9986,819.5095,1.89421713e-04
+27.0860,820.9814,0.00000000e+00
+27.1734,822.4533,2.61697394e-04
+27.2607,823.9253,0.00000000e+00
+27.3481,825.3972,5.07923367e-04
+27.4355,826.8691,7.17569565e-05
+27.5229,828.3411,0.00000000e+00
+27.6102,829.8130,5.59548091e-04
+27.6976,831.2849,6.26191846e-04
+27.7850,832.7568,3.93297290e-04
+27.8724,834.2288,3.12205870e-04
+27.9597,835.7007,0.00000000e+00
+28.0471,837.1726,2.29892496e-04
+28.1345,838.6445,0.00000000e+00
+28.2219,840.1165,6.94135902e-04
+28.3092,841.5884,1.43077865e-04
+28.3966,843.0604,0.00000000e+00
+28.4840,844.5323,6.18866936e-04
+28.5714,846.0042,6.63818268e-04
+28.6587,847.4761,8.33593731e-05
+28.7461,848.9481,6.46288216e-04
+28.8335,850.4200,7.84600328e-04
+28.9209,851.8919,0.00000000e+00
+29.0082,853.3638,0.00000000e+00
+29.0956,854.8358,3.16566497e-04
+29.1830,856.3077,7.13836926e-05
+29.2703,857.7797,4.63365323e-05
+29.3577,859.2516,0.00000000e+00
+29.4451,860.7235,8.14216211e-04
+29.5325,862.1954,9.02183820e-04
+29.6198,863.6674,0.00000000e+00
+29.7072,865.1393,0.00000000e+00
+29.7946,866.6112,1.10326626e-03
+29.8820,868.0831,5.80493826e-04
+29.9693,869.5551,0.00000000e+00
+30.0567,871.0270,0.00000000e+00
+30.1441,872.4989,2.34313338e-05
+30.2315,873.9708,5.85723203e-04
+30.3188,875.4428,0.00000000e+00
+30.4062,876.9147,0.00000000e+00
+30.4936,878.3867,5.05585340e-04
+30.5810,879.8586,9.06249625e-05
+30.6683,881.3305,2.38212888e-05
+30.7557,882.8024,0.00000000e+00
+30.8431,884.2744,2.89384858e-04
+30.9305,885.7463,2.40527312e-04
+31.0178,887.2182,0.00000000e+00
+31.1052,888.6901,0.00000000e+00
+31.1926,890.1620,6.07485243e-04
+31.2800,891.6340,0.00000000e+00
+31.3673,893.1060,7.68570462e-04
+31.4547,894.5779,1.49861344e-05
+31.5421,896.0498,3.14339064e-04
+31.6295,897.5217,3.99878511e-04
+31.7168,898.9937,0.00000000e+00
+31.8042,900.4656,0.00000000e+00
+31.8916,901.9375,1.22097472e-03
+31.9789,903.4094,2.83484842e-04
+32.0663,904.8813,0.00000000e+00
+32.1537,906.3533,2.29208250e-04
+32.2411,907.8252,7.47903716e-04
+32.3284,909.2971,0.00000000e+00
+32.4158,910.7691,0.00000000e+00
+32.5032,912.2410,9.70548572e-05
+32.5906,913.7130,6.45488384e-04
+32.6779,915.1849,5.10206621e-04
+32.7653,916.6568,0.00000000e+00
+32.8527,918.1287,0.00000000e+00
+32.9401,919.6006,3.27340356e-04
+33.0274,921.0726,1.13547423e-04
+33.1148,922.5445,2.07416961e-04
+33.2022,924.0164,0.00000000e+00
+33.2896,925.4883,0.00000000e+00
+33.3769,926.9603,3.58051329e-04
+33.4643,928.4323,6.84332103e-04
+33.5517,929.9042,1.89959930e-04
+33.6391,931.3761,0.00000000e+00
+33.7264,932.8480,0.00000000e+00
+33.8138,934.3199,0.00000000e+00
+33.9012,935.7919,2.28052799e-04
+33.9886,937.2638,0.00000000e+00
+34.0759,938.7357,0.00000000e+00
+34.1633,940.2076,0.00000000e+00
+34.2507,941.6796,0.00000000e+00
+34.3380,943.1515,0.00000000e+00
+34.4254,944.6235,2.20318485e-04
+34.5128,946.0954,6.95346971e-05
+34.6002,947.5673,0.00000000e+00
+34.6875,949.0392,0.00000000e+00
+34.7749,950.5112,0.00000000e+00
+34.8623,951.9831,0.00000000e+00
+34.9497,953.4550,0.00000000e+00
+35.0370,954.9269,1.95502405e-04
+35.1244,956.3989,1.09651126e-03
+35.2118,957.8708,9.85613093e-04
+35.2992,959.3427,4.03599028e-04
+35.3865,960.8146,5.70894277e-04
+35.4739,962.2866,0.00000000e+00
+35.5613,963.7585,2.94016325e-04
+35.6487,965.2305,2.96853163e-04
+35.7360,966.7024,0.00000000e+00
+35.8234,968.1743,6.78038516e-04
+35.9108,969.6462,0.00000000e+00
+35.9982,971.1182,4.56310663e-05
+36.0855,972.5901,4.40544885e-04
+36.1729,974.0620,5.93204750e-04
+36.2603,975.5339,0.00000000e+00
+36.3477,977.0059,7.87852259e-05
+36.4350,978.4778,2.56966916e-04
+36.5224,979.9498,8.13591876e-04
+36.6098,981.4217,3.71875300e-04
+36.6972,982.8936,1.41593073e-05
+36.7845,984.3655,4.61104733e-04
+36.8719,985.8375,1.85931513e-05
+36.9593,987.3094,0.00000000e+00
+37.0466,988.7813,1.63594683e-04
+37.1340,990.2532,0.00000000e+00
+37.2214,991.7252,0.00000000e+00
+37.3088,993.1971,3.65785498e-04
+37.3961,994.6690,0.00000000e+00
+37.4835,996.1409,2.26427554e-04
+37.5709,997.6129,0.00000000e+00
+37.6583,999.0848,0.00000000e+00
+37.7456,1000.5568,0.00000000e+00
+37.8330,1002.0287,0.00000000e+00
+37.9204,1003.5006,0.00000000e+00
+38.0078,1004.9725,0.00000000e+00
+38.0951,1006.4445,0.00000000e+00
+38.1825,1007.9164,3.49349051e-04
+38.2699,1009.3883,0.00000000e+00
+38.3573,1010.8602,0.00000000e+00
+38.4446,1012.3322,6.51635812e-04
+38.5320,1013.8041,7.27019651e-05
+38.6194,1015.2761,0.00000000e+00
+38.7068,1016.7480,4.09903150e-04
+38.7941,1018.2199,0.00000000e+00
+38.8815,1019.6918,0.00000000e+00
+38.9689,1021.1638,0.00000000e+00
+39.0563,1022.6357,0.00000000e+00
+39.1436,1024.1077,1.18140969e-03
+39.2310,1025.5796,0.00000000e+00
+39.3184,1027.0515,4.60101757e-04
+39.4058,1028.5234,0.00000000e+00
+39.4931,1029.9954,4.79843264e-04
+39.5805,1031.4673,0.00000000e+00
+39.6679,1032.9392,0.00000000e+00
+39.7552,1034.4111,0.00000000e+00
+39.8426,1035.8831,0.00000000e+00
+39.9300,1037.3550,2.59785709e-04
+40.0174,1038.8269,0.00000000e+00
+40.1047,1040.2988,0.00000000e+00
+40.1921,1041.7708,0.00000000e+00
+40.2795,1043.2427,3.40128230e-04
+40.3669,1044.7146,1.14564539e-03
+40.4542,1046.1865,0.00000000e+00
+40.5416,1047.6584,0.00000000e+00
+40.6290,1049.1304,9.94783259e-05
+40.7164,1050.6023,6.76141353e-04
+40.8037,1052.0742,6.23503802e-05
+40.8911,1053.5461,1.04549887e-04
+40.9785,1055.0181,1.73937842e-05
+41.0659,1056.4900,0.00000000e+00
+41.1532,1057.9620,5.47329983e-05
+41.2406,1059.4340,4.54333029e-04
+41.3280,1060.9059,4.73925349e-04
+41.4154,1062.3778,0.00000000e+00
+41.5027,1063.8497,0.00000000e+00
+41.5901,1065.3217,0.00000000e+00
+41.6775,1066.7936,0.00000000e+00
+41.7649,1068.2655,0.00000000e+00
+41.8522,1069.7374,0.00000000e+00
+41.9396,1071.2094,0.00000000e+00
+42.0270,1072.6813,0.00000000e+00
+42.1144,1074.1532,4.35335474e-04
+42.2017,1075.6251,0.00000000e+00
+42.2891,1077.0970,0.00000000e+00
+42.3765,1078.5690,1.96146051e-04
+42.4638,1080.0409,0.00000000e+00
+42.5512,1081.5128,3.36054247e-04
+42.6386,1082.9847,0.00000000e+00
+42.7260,1084.4567,6.96817413e-04
+42.8133,1085.9286,1.45109288e-06
+42.9007,1087.4005,7.80780858e-04
+42.9881,1088.8724,0.00000000e+00
+43.0755,1090.3444,4.32197150e-04
+43.1628,1091.8164,3.81081889e-04
+43.2502,1093.2883,2.17694629e-04
+43.3376,1094.7603,2.87734758e-04
+43.4250,1096.2322,0.00000000e+00
+43.5123,1097.7041,3.28322785e-04
+43.5997,1099.1760,1.84182893e-04
diff --git a/demo_data/tpd_LH_Surface_metadata.json b/demo_data/tpd_LH_Surface_metadata.json
new file mode 100644
index 0000000000000000000000000000000000000000..1cbb0b0b7370e45b6c981cb3525d639fda660eb0
--- /dev/null
+++ b/demo_data/tpd_LH_Surface_metadata.json
@@ -0,0 +1,23 @@
+{
+ "mechanism": "LH_Surface",
+ "betas_Ks": [
+ 0.3162277638912201,
+ 2.212759494781494,
+ 16.846271514892578
+ ],
+ "n_rates": 3,
+ "true_params": {
+ "mechanism": "LH_Surface",
+ "Ea": 23369.582400663046,
+ "nu": 160197624009364.56,
+ "theta_A0": 0.15471468757226675,
+ "theta_B0": 0.4329933131596252,
+ "T_start": 364.6834143679138,
+ "T_end": 1099.1759914138238
+ },
+ "csv_files": [
+ "tpd_LH_Surface_1.csv",
+ "tpd_LH_Surface_2.csv",
+ "tpd_LH_Surface_3.csv"
+ ]
+}
\ No newline at end of file
diff --git a/demo_data/tpd_MvK_1.csv b/demo_data/tpd_MvK_1.csv
new file mode 100644
index 0000000000000000000000000000000000000000..a42cdccfce1909c5de5c4f7d88e2e56626b2308c
--- /dev/null
+++ b/demo_data/tpd_MvK_1.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,0.00000000e+00
+4.6546,366.1553,9.67943115e+01
+9.3093,367.6273,5.40696001e+00
+13.9640,369.0992,1.60270584e+02
+18.6186,370.5711,7.15664902e+01
+23.2733,372.0431,4.41633034e+01
+27.9279,373.5150,0.00000000e+00
+32.5825,374.9869,0.00000000e+00
+37.2372,376.4588,0.00000000e+00
+41.8919,377.9308,0.00000000e+00
+46.5465,379.4027,5.23560791e+02
+51.2011,380.8746,0.00000000e+00
+55.8558,382.3466,1.25984848e+02
+60.5104,383.8185,9.87761154e+01
+65.1651,385.2904,1.43549683e+02
+69.8198,386.7624,1.25236290e+02
+74.4744,388.2343,0.00000000e+00
+79.1290,389.7062,7.17298317e+00
+83.7837,391.1781,0.00000000e+00
+88.4383,392.6501,0.00000000e+00
+93.0930,394.1220,1.89962357e+02
+97.7477,395.5939,0.00000000e+00
+102.4023,397.0659,0.00000000e+00
+107.0569,398.5378,0.00000000e+00
+111.7116,400.0097,3.12866344e+01
+116.3662,401.4816,0.00000000e+00
+121.0209,402.9536,2.70109314e+02
+125.6755,404.4255,1.33573090e+02
+130.3302,405.8974,1.83680573e+02
+134.9848,407.3694,2.27572311e+02
+139.6394,408.8413,1.71927155e+02
+144.2941,410.3132,2.42230011e+02
+148.9488,411.7852,0.00000000e+00
+153.6034,413.2571,4.29266281e+01
+158.2581,414.7290,0.00000000e+00
+162.9127,416.2009,3.39891205e+02
+167.5673,417.6729,5.05192719e+01
+172.2220,419.1448,1.06249329e+02
+176.8767,420.6167,0.00000000e+00
+181.5313,422.0887,0.00000000e+00
+186.1860,423.5606,0.00000000e+00
+190.8406,425.0325,0.00000000e+00
+195.4952,426.5044,0.00000000e+00
+200.1498,427.9763,1.77021332e+02
+204.8046,429.4483,0.00000000e+00
+209.4592,430.9202,4.74144020e+01
+214.1138,432.3922,3.07383561e+00
+218.7685,433.8641,0.00000000e+00
+223.4231,435.3360,0.00000000e+00
+228.0777,436.8079,1.42863770e+02
+232.7325,438.2799,5.05887747e+00
+237.3871,439.7518,0.00000000e+00
+242.0417,441.2237,0.00000000e+00
+246.6964,442.6956,0.00000000e+00
+251.3510,444.1676,0.00000000e+00
+256.0056,445.6395,2.24514191e+02
+260.6603,447.1115,0.00000000e+00
+265.3150,448.5834,2.89957397e+02
+269.9696,450.0553,0.00000000e+00
+274.6242,451.5272,0.00000000e+00
+279.2789,452.9991,3.90344513e+02
+283.9335,454.4711,0.00000000e+00
+288.5882,455.9430,0.00000000e+00
+293.2429,457.4149,0.00000000e+00
+297.8975,458.8869,0.00000000e+00
+302.5521,460.3588,5.03803101e+01
+307.2068,461.8307,1.69637726e+02
+311.8615,463.3027,1.90657425e+02
+316.5161,464.7746,0.00000000e+00
+321.1708,466.2465,2.95887966e+01
+325.8254,467.7184,0.00000000e+00
+330.4800,469.1904,9.17728729e+01
+335.1347,470.6623,0.00000000e+00
+339.7894,472.1342,2.64771484e+02
+344.4440,473.6062,0.00000000e+00
+349.0986,475.0781,1.26335411e+02
+353.7533,476.5500,3.45375328e+01
+358.4079,478.0219,0.00000000e+00
+363.0625,479.4939,3.67356689e+02
+367.7173,480.9658,0.00000000e+00
+372.3719,482.4377,3.80328217e+02
+377.0265,483.9097,0.00000000e+00
+381.6812,485.3816,4.33732300e+01
+386.3358,486.8535,0.00000000e+00
+390.9904,488.3254,0.00000000e+00
+395.6452,489.7974,3.25407410e+01
+400.2998,491.2693,0.00000000e+00
+404.9544,492.7412,0.00000000e+00
+409.6091,494.2132,0.00000000e+00
+414.2637,495.6851,0.00000000e+00
+418.9183,497.1570,0.00000000e+00
+423.5730,498.6290,4.58180389e+02
+428.2277,500.1009,0.00000000e+00
+432.8823,501.5728,5.00798464e+00
+437.5369,503.0447,8.22392960e+01
+442.1916,504.5167,0.00000000e+00
+446.8462,505.9886,7.13893204e+01
+451.5009,507.4605,0.00000000e+00
+456.1556,508.9325,0.00000000e+00
+460.8102,510.4044,0.00000000e+00
+465.4648,511.8763,0.00000000e+00
+470.1196,513.3483,1.24810905e+02
+474.7742,514.8202,0.00000000e+00
+479.4288,516.2921,0.00000000e+00
+484.0835,517.7640,0.00000000e+00
+488.7381,519.2360,1.94945755e+02
+493.3927,520.7079,0.00000000e+00
+498.0473,522.1798,4.90833473e+01
+502.7020,523.6517,5.31246109e+01
+507.3566,525.1237,2.30975456e+01
+512.0112,526.5956,0.00000000e+00
+516.6659,528.0675,0.00000000e+00
+521.3207,529.5395,0.00000000e+00
+525.9753,531.0114,1.50556244e+02
+530.6300,532.4833,0.00000000e+00
+535.2846,533.9553,0.00000000e+00
+539.9392,535.4272,1.11427971e+02
+544.5939,536.8991,0.00000000e+00
+549.2485,538.3710,0.00000000e+00
+553.9031,539.8430,0.00000000e+00
+558.5578,541.3149,1.78763672e+02
+563.2124,542.7868,0.00000000e+00
+567.8670,544.2587,0.00000000e+00
+572.5218,545.7307,1.14158821e+02
+577.1765,547.2026,0.00000000e+00
+581.8311,548.6746,0.00000000e+00
+586.4857,550.1465,0.00000000e+00
+591.1404,551.6184,4.62888908e+00
+595.7950,553.0903,2.44893127e+02
+600.4496,554.5623,0.00000000e+00
+605.1043,556.0342,0.00000000e+00
+609.7589,557.5061,0.00000000e+00
+614.4135,558.9780,3.00702019e+01
+619.0682,560.4500,0.00000000e+00
+623.7228,561.9219,0.00000000e+00
+628.3776,563.3939,0.00000000e+00
+633.0323,564.8658,1.68364929e+02
+637.6869,566.3377,0.00000000e+00
+642.3415,567.8096,1.57381912e+02
+646.9961,569.2816,0.00000000e+00
+651.6508,570.7535,0.00000000e+00
+656.3054,572.2254,9.04996567e+01
+660.9600,573.6973,0.00000000e+00
+665.6147,575.1693,0.00000000e+00
+670.2693,576.6412,1.62678864e+02
+674.9239,578.1131,6.54496841e+01
+679.5786,579.5850,2.31027527e+02
+684.2334,581.0570,0.00000000e+00
+688.8880,582.5289,2.19359726e+02
+693.5427,584.0009,6.66668177e+00
+698.1973,585.4728,3.81906006e+02
+702.8519,586.9447,0.00000000e+00
+707.5066,588.4166,0.00000000e+00
+712.1612,589.8885,0.00000000e+00
+716.8158,591.3605,0.00000000e+00
+721.4704,592.8324,1.28535446e+02
+726.1251,594.3043,7.97819366e+01
+730.7797,595.7762,0.00000000e+00
+735.4343,597.2482,0.00000000e+00
+740.0892,598.7202,9.73353119e+01
+744.7438,600.1921,5.50708580e+01
+749.3984,601.6640,0.00000000e+00
+754.0531,603.1359,1.81801128e+01
+758.7077,604.6078,4.71101046e+00
+763.3623,606.0798,0.00000000e+00
+768.0170,607.5517,1.49163418e+01
+772.6716,609.0236,0.00000000e+00
+777.3262,610.4955,1.51915985e+02
+781.9809,611.9675,0.00000000e+00
+786.6355,613.4394,1.96421494e+02
+791.2901,614.9113,0.00000000e+00
+795.9449,616.3833,0.00000000e+00
+800.5996,617.8552,0.00000000e+00
+805.2542,619.3271,2.80805073e+01
+809.9088,620.7991,0.00000000e+00
+814.5635,622.2710,1.26495895e+02
+819.2181,623.7429,0.00000000e+00
+823.8727,625.2148,0.00000000e+00
+828.5274,626.6868,1.45411774e+02
+833.1820,628.1587,1.33888290e+02
+837.8366,629.6306,3.24266052e+01
+842.4913,631.1025,0.00000000e+00
+847.1461,632.5745,0.00000000e+00
+851.8007,634.0464,1.12374466e+02
+856.4554,635.5184,3.83484688e+01
+861.1100,636.9903,0.00000000e+00
+865.7646,638.4622,5.92495995e+01
+870.4192,639.9341,0.00000000e+00
+875.0739,641.4061,0.00000000e+00
+879.7285,642.8780,0.00000000e+00
+884.3831,644.3499,2.17976189e+01
+889.0378,645.8218,0.00000000e+00
+893.6924,647.2938,0.00000000e+00
+898.3470,648.7657,3.06129944e+02
+903.0019,650.2377,0.00000000e+00
+907.6565,651.7096,0.00000000e+00
+912.3111,653.1815,1.28786316e+02
+916.9658,654.6534,0.00000000e+00
+921.6204,656.1254,0.00000000e+00
+926.2750,657.5973,1.54741867e+02
+930.9297,659.0692,4.83441010e+01
+935.5843,660.5411,0.00000000e+00
+940.2389,662.0131,0.00000000e+00
+944.8936,663.4850,0.00000000e+00
+949.5482,664.9569,4.05010681e+02
+954.2028,666.4288,0.00000000e+00
+958.8576,667.9008,0.00000000e+00
+963.5123,669.3727,2.17529556e+02
+968.1669,670.8447,0.00000000e+00
+972.8215,672.3166,0.00000000e+00
+977.4762,673.7885,0.00000000e+00
+982.1308,675.2604,3.76115036e+01
+986.7854,676.7324,0.00000000e+00
+991.4401,678.2043,3.27131104e+02
+996.0947,679.6762,4.16517563e+01
+1000.7493,681.1481,1.11145592e+02
+1005.4040,682.6201,0.00000000e+00
+1010.0586,684.0920,3.02102692e+02
+1014.7134,685.5640,0.00000000e+00
+1019.3680,687.0359,0.00000000e+00
+1024.0227,688.5078,0.00000000e+00
+1028.6773,689.9797,0.00000000e+00
+1033.3319,691.4517,0.00000000e+00
+1037.9866,692.9236,0.00000000e+00
+1042.6412,694.3955,0.00000000e+00
+1047.2958,695.8674,0.00000000e+00
+1051.9505,697.3394,0.00000000e+00
+1056.6051,698.8113,3.74799614e+01
+1061.2597,700.2832,0.00000000e+00
+1065.9146,701.7552,0.00000000e+00
+1070.5692,703.2271,5.23162804e+01
+1075.2238,704.6990,2.97426971e+02
+1079.8785,706.1710,1.41458038e+02
+1084.5331,707.6429,0.00000000e+00
+1089.1877,709.1148,0.00000000e+00
+1093.8423,710.5867,5.35017471e+01
+1098.4970,712.0587,7.39791794e+01
+1103.1516,713.5306,2.11082764e+02
+1107.8062,715.0025,0.00000000e+00
+1112.4609,716.4744,1.50720139e+02
+1117.1155,717.9464,3.58454247e+01
+1121.7703,719.4183,0.00000000e+00
+1126.4250,720.8903,0.00000000e+00
+1131.0796,722.3622,0.00000000e+00
+1135.7342,723.8341,0.00000000e+00
+1140.3889,725.3060,1.26540413e+02
+1145.0435,726.7780,1.50665588e+02
+1149.6981,728.2499,0.00000000e+00
+1154.3528,729.7218,1.95364944e+02
+1159.0074,731.1937,0.00000000e+00
+1163.6620,732.6656,7.42868347e+01
+1168.3167,734.1376,0.00000000e+00
+1172.9713,735.6095,0.00000000e+00
+1177.6261,737.0815,0.00000000e+00
+1182.2807,738.5534,0.00000000e+00
+1186.9354,740.0253,0.00000000e+00
+1191.5900,741.4973,6.78630676e+01
+1196.2446,742.9692,0.00000000e+00
+1200.8993,744.4411,0.00000000e+00
+1205.5539,745.9130,0.00000000e+00
+1210.2085,747.3849,0.00000000e+00
+1214.8632,748.8569,0.00000000e+00
+1219.5178,750.3288,3.35784973e+02
+1224.1724,751.8007,0.00000000e+00
+1228.8271,753.2726,1.37835495e+02
+1233.4819,754.7446,8.65846710e+01
+1238.1365,756.2166,1.38201538e+02
+1242.7911,757.6885,0.00000000e+00
+1247.4458,759.1604,1.08913994e+02
+1252.1004,760.6323,2.72777008e+02
+1256.7550,762.1042,2.29705673e+02
+1261.4097,763.5762,1.80536327e+01
+1266.0643,765.0481,1.78834183e+02
+1270.7189,766.5200,0.00000000e+00
+1275.3736,767.9919,2.62176239e+02
+1280.0282,769.4639,0.00000000e+00
+1284.6830,770.9359,0.00000000e+00
+1289.3377,772.4078,0.00000000e+00
+1293.9923,773.8797,0.00000000e+00
+1298.6469,775.3516,9.42894745e+01
+1303.3016,776.8235,1.25668859e+01
+1307.9562,778.2955,0.00000000e+00
+1312.6108,779.7674,2.11225395e+01
+1317.2655,781.2393,0.00000000e+00
+1321.9201,782.7112,3.50276215e+02
+1326.5747,784.1832,0.00000000e+00
+1331.2293,785.6551,1.96825317e+02
+1335.8840,787.1270,7.45818787e+01
+1340.5388,788.5990,0.00000000e+00
+1345.1934,790.0709,6.76978149e+01
+1349.8481,791.5428,0.00000000e+00
+1354.5027,793.0148,1.12440994e+02
+1359.1573,794.4867,0.00000000e+00
+1363.8120,795.9586,0.00000000e+00
+1368.4666,797.4305,3.51598587e+01
+1373.1212,798.9025,7.05278473e+01
+1377.7759,800.3744,0.00000000e+00
+1382.4305,801.8463,8.49455414e+01
+1387.0851,803.3182,0.00000000e+00
+1391.7398,804.7902,0.00000000e+00
+1396.3946,806.2621,1.79607513e+02
+1401.0492,807.7341,3.32266144e+02
+1405.7038,809.2060,1.19113861e+02
+1410.3585,810.6779,0.00000000e+00
+1415.0131,812.1498,3.66278419e+01
+1419.6677,813.6218,1.76961548e+02
+1424.3224,815.0937,1.09351151e+02
+1428.9770,816.5656,1.12042603e+02
+1433.6316,818.0375,1.98268570e+02
+1438.2863,819.5095,2.89906982e+02
+1442.9409,820.9814,0.00000000e+00
+1447.5955,822.4533,0.00000000e+00
+1452.2504,823.9253,2.76418304e+01
+1456.9050,825.3972,3.61055756e+02
+1461.5596,826.8691,3.48893494e+02
+1466.2143,828.3411,3.00980286e+02
+1470.8689,829.8130,0.00000000e+00
+1475.5235,831.2849,1.50350677e+02
+1480.1781,832.7568,0.00000000e+00
+1484.8328,834.2288,9.11768112e+01
+1489.4874,835.7007,0.00000000e+00
+1494.1420,837.1726,3.67540741e+02
+1498.7967,838.6445,4.48245583e+01
+1503.4513,840.1165,0.00000000e+00
+1508.1061,841.5884,2.58404053e+02
+1512.7608,843.0604,3.13669983e+02
+1517.4154,844.5323,0.00000000e+00
+1522.0700,846.0042,3.66610168e+02
+1526.7247,847.4761,4.28907623e+01
+1531.3793,848.9481,0.00000000e+00
+1536.0339,850.4200,2.02361221e+02
+1540.6886,851.8919,0.00000000e+00
+1545.3432,853.3638,3.24881409e+02
+1549.9978,854.8358,1.17154076e+02
+1554.6524,856.3077,1.76398605e+02
+1559.3073,857.7797,0.00000000e+00
+1563.9619,859.2516,1.33549805e+01
+1568.6165,860.7235,3.75146881e+02
+1573.2712,862.1954,3.89129761e+02
+1577.9258,863.6674,6.98924408e+01
+1582.5804,865.1393,4.08699066e+02
+1587.2351,866.6112,2.64712463e+02
+1591.8897,868.0831,1.81390091e+02
+1596.5443,869.5551,2.80852509e+02
+1601.1990,871.0270,6.34023315e+02
+1605.8536,872.4989,5.39344177e+02
+1610.5082,873.9708,1.51537048e+02
+1615.1630,875.4428,1.47710541e+02
+1619.8177,876.9147,3.14048462e+02
+1624.4723,878.3867,3.38591217e+02
+1629.1269,879.8586,3.28286621e+02
+1633.7816,881.3305,5.79744568e+02
+1638.4362,882.8024,5.17040527e+02
+1643.0908,884.2744,3.57307312e+02
+1647.7455,885.7463,2.60729462e+02
+1652.4001,887.2182,5.79747925e+02
+1657.0547,888.6901,5.67940125e+02
+1661.7094,890.1620,3.63460205e+02
+1666.3640,891.6340,3.46918762e+02
+1671.0188,893.1060,6.57117554e+02
+1675.6735,894.5779,2.98095398e+02
+1680.3281,896.0498,6.34970398e+02
+1684.9827,897.5217,6.38498596e+02
+1689.6374,898.9937,7.26783264e+02
+1694.2920,900.4656,4.05781799e+02
+1698.9466,901.9375,6.27242737e+02
+1703.6012,903.4094,8.54151978e+02
+1708.2559,904.8813,8.23025818e+02
+1712.9105,906.3533,9.34020325e+02
+1717.5651,907.8252,6.97458801e+02
+1722.2198,909.2971,8.22649048e+02
+1726.8746,910.7691,1.02429004e+03
+1731.5292,912.2410,6.43901978e+02
+1736.1839,913.7130,7.44773560e+02
+1740.8385,915.1849,8.95180725e+02
+1745.4931,916.6568,7.71045288e+02
+1750.1478,918.1287,1.02139117e+03
+1754.8024,919.6006,8.80067322e+02
+1759.4570,921.0726,1.07737012e+03
+1764.1117,922.5445,8.74387085e+02
+1768.7663,924.0164,9.61342468e+02
+1773.4209,925.4883,1.04882178e+03
+1778.0757,926.9603,1.24678516e+03
+1782.7304,928.4323,1.26693140e+03
+1787.3850,929.9042,1.03816992e+03
+1792.0396,931.3761,1.48231641e+03
+1796.6943,932.8480,1.38825708e+03
+1801.3489,934.3199,1.48970239e+03
+1806.0035,935.7919,1.60370105e+03
+1810.6582,937.2638,1.77386548e+03
+1815.3128,938.7357,1.45623840e+03
+1819.9674,940.2076,2.01868689e+03
+1824.6221,941.6796,1.90616309e+03
+1829.2767,943.1515,1.82539490e+03
+1833.9315,944.6235,1.76791016e+03
+1838.5862,946.0954,2.06542822e+03
+1843.2408,947.5673,2.22857056e+03
+1847.8954,949.0392,2.12045361e+03
+1852.5500,950.5112,1.99228564e+03
+1857.2047,951.9831,2.04814478e+03
+1861.8593,953.4550,2.76157837e+03
+1866.5139,954.9269,2.46338525e+03
+1871.1686,956.3989,2.64472437e+03
+1875.8232,957.8708,2.71234937e+03
+1880.4778,959.3427,3.11477661e+03
+1885.1325,960.8146,2.93501172e+03
+1889.7873,962.2866,2.53770898e+03
+1894.4419,963.7585,2.96275708e+03
+1899.0966,965.2305,3.20355176e+03
+1903.7512,966.7024,3.03949902e+03
+1908.4058,968.1743,3.51327344e+03
+1913.0605,969.6462,3.78618848e+03
+1917.7151,971.1182,3.56175073e+03
+1922.3697,972.5901,3.96338525e+03
+1927.0243,974.0620,4.12923682e+03
+1931.6790,975.5339,4.35057520e+03
+1936.3336,977.0059,4.25457910e+03
+1940.9882,978.4778,4.33745801e+03
+1945.6431,979.9498,4.37227100e+03
+1950.2977,981.4217,4.96809668e+03
+1954.9523,982.8936,4.61738525e+03
+1959.6070,984.3655,5.08188965e+03
+1964.2616,985.8375,5.82754248e+03
+1968.9162,987.3094,5.69308838e+03
+1973.5709,988.7813,5.69240625e+03
+1978.2255,990.2532,6.06347021e+03
+1982.8801,991.7252,5.91841504e+03
+1987.5348,993.1971,6.35660938e+03
+1992.1894,994.6690,6.27387598e+03
+1996.8440,996.1409,6.63452197e+03
+2001.4988,997.6129,7.13572119e+03
+2006.1535,999.0848,7.53927148e+03
+2010.8081,1000.5568,7.28240186e+03
+2015.4627,1002.0287,7.68882178e+03
+2020.1174,1003.5006,7.95089453e+03
+2024.7720,1004.9725,7.88393066e+03
+2029.4266,1006.4445,8.25393262e+03
+2034.0813,1007.9164,8.52350000e+03
+2038.7359,1009.3883,9.14408887e+03
+2043.3905,1010.8602,9.45115820e+03
+2048.0452,1012.3322,9.87831445e+03
+2052.7000,1013.8041,1.01037031e+04
+2057.3546,1015.2761,1.00106436e+04
+2062.0093,1016.7480,1.03059287e+04
+2066.6639,1018.2199,1.11247178e+04
+2071.3185,1019.6918,1.13792520e+04
+2075.9731,1021.1638,1.16509121e+04
+2080.6278,1022.6357,1.20051035e+04
+2085.2826,1024.1077,1.19526631e+04
+2089.9372,1025.5796,1.26181797e+04
+2094.5919,1027.0515,1.28155986e+04
+2099.2465,1028.5234,1.33186953e+04
+2103.9011,1029.9954,1.36611523e+04
+2108.5558,1031.4673,1.43128809e+04
+2113.2104,1032.9392,1.49985459e+04
+2117.8650,1034.4111,1.52294971e+04
+2122.5197,1035.8831,1.56806445e+04
+2127.1743,1037.3550,1.63909219e+04
+2131.8289,1038.8269,1.65995801e+04
+2136.4836,1040.2988,1.70015547e+04
+2141.1382,1041.7708,1.75249551e+04
+2145.7928,1043.2427,1.82700137e+04
+2150.4475,1044.7146,1.88749785e+04
+2155.1021,1046.1865,1.94094199e+04
+2159.7567,1047.6584,2.01470352e+04
+2164.4113,1049.1304,2.08000039e+04
+2169.0660,1050.6023,2.13223184e+04
+2173.7206,1052.0742,2.17066113e+04
+2178.3752,1053.5461,2.25723086e+04
+2183.0299,1055.0181,2.31687422e+04
+2187.6845,1056.4900,2.37316758e+04
+2192.3395,1057.9620,2.43934336e+04
+2196.9942,1059.4340,2.56122832e+04
+2201.6488,1060.9059,2.62615527e+04
+2206.3034,1062.3778,2.70709316e+04
+2210.9581,1063.8497,2.73386074e+04
+2215.6127,1065.3217,2.87759746e+04
+2220.2673,1066.7936,2.93923809e+04
+2224.9219,1068.2655,3.01858789e+04
+2229.5766,1069.7374,3.10513848e+04
+2234.2312,1071.2094,3.16672324e+04
+2238.8858,1072.6813,3.27858867e+04
+2243.5405,1074.1532,3.37444727e+04
+2248.1951,1075.6251,3.44715625e+04
+2252.8497,1077.0970,3.57224258e+04
+2257.5044,1078.5690,3.69030703e+04
+2262.1590,1080.0409,3.76618242e+04
+2266.8136,1081.5128,3.90898555e+04
+2271.4683,1082.9847,3.99160586e+04
+2276.1229,1084.4567,4.11936680e+04
+2280.7775,1085.9286,4.19948750e+04
+2285.4322,1087.4005,4.35166406e+04
+2290.0868,1088.8724,4.46624922e+04
+2294.7414,1090.3444,4.59099688e+04
+2299.3964,1091.8164,4.73753750e+04
+2304.0511,1093.2883,4.88334141e+04
+2308.7057,1094.7603,4.95242266e+04
+2313.3603,1096.2322,5.12906094e+04
+2318.0150,1097.7041,5.23173672e+04
+2322.6696,1099.1760,5.38677266e+04
diff --git a/demo_data/tpd_MvK_2.csv b/demo_data/tpd_MvK_2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..d39aa45e0c722259cbb9d0b23300d4a28369b0f5
--- /dev/null
+++ b/demo_data/tpd_MvK_2.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,0.00000000e+00
+0.2646,366.1553,1.82899438e+03
+0.5292,367.6273,6.07315903e+01
+0.7939,369.0992,9.89570465e+01
+1.0585,370.5711,5.80554260e+02
+1.3231,372.0431,1.05014355e+03
+1.5878,373.5150,1.20456567e+03
+1.8524,374.9869,3.08827759e+02
+2.1170,376.4588,5.56302002e+02
+2.3816,377.9308,0.00000000e+00
+2.6463,379.4027,0.00000000e+00
+2.9109,380.8746,0.00000000e+00
+3.1755,382.3466,9.78721237e+01
+3.4401,383.8185,4.62911034e+01
+3.7048,385.2904,3.29084625e+02
+3.9694,386.7624,0.00000000e+00
+4.2340,388.2343,1.61541943e+03
+4.4986,389.7062,0.00000000e+00
+4.7633,391.1781,0.00000000e+00
+5.0279,392.6501,0.00000000e+00
+5.2925,394.1220,0.00000000e+00
+5.5571,395.5939,8.24082397e+02
+5.8218,397.0659,2.06668921e+03
+6.0864,398.5378,0.00000000e+00
+6.3510,400.0097,4.80874146e+02
+6.6156,401.4816,7.41872864e+02
+6.8803,402.9536,0.00000000e+00
+7.1449,404.4255,0.00000000e+00
+7.4095,405.8974,0.00000000e+00
+7.6742,407.3694,0.00000000e+00
+7.9388,408.8413,0.00000000e+00
+8.2034,410.3132,1.02270679e+03
+8.4680,411.7852,1.48669165e+03
+8.7327,413.2571,3.70910065e+02
+8.9973,414.7290,0.00000000e+00
+9.2619,416.2009,7.91158386e+02
+9.5265,417.6729,0.00000000e+00
+9.7912,419.1448,0.00000000e+00
+10.0558,420.6167,1.06895093e+03
+10.3204,422.0887,1.58053918e+03
+10.5850,423.5606,0.00000000e+00
+10.8497,425.0325,0.00000000e+00
+11.1143,426.5044,2.28959961e+02
+11.3789,427.9763,0.00000000e+00
+11.6435,429.4483,0.00000000e+00
+11.9082,430.9202,1.28986365e+03
+12.1728,432.3922,7.75617188e+02
+12.4374,433.8641,0.00000000e+00
+12.7020,435.3360,4.07838287e+02
+12.9667,436.8079,0.00000000e+00
+13.2313,438.2799,0.00000000e+00
+13.4959,439.7518,1.00812531e+03
+13.7605,441.2237,0.00000000e+00
+14.0252,442.6956,2.57172241e+02
+14.2898,444.1676,0.00000000e+00
+14.5544,445.6395,7.42188843e+02
+14.8191,447.1115,6.55734863e+02
+15.0837,448.5834,7.23925903e+02
+15.3483,450.0553,1.97574243e+03
+15.6129,451.5272,3.52197021e+02
+15.8776,452.9991,1.56572754e+03
+16.1422,454.4711,2.25656479e+02
+16.4068,455.9430,1.25523743e+03
+16.6714,457.4149,1.60589404e+03
+16.9361,458.8869,0.00000000e+00
+17.2007,460.3588,0.00000000e+00
+17.4653,461.8307,0.00000000e+00
+17.7299,463.3027,2.41792163e+03
+17.9946,464.7746,3.11812256e+02
+18.2592,466.2465,5.47395142e+02
+18.5238,467.7184,8.90933472e+02
+18.7884,469.1904,0.00000000e+00
+19.0531,470.6623,2.62736969e+02
+19.3177,472.1342,0.00000000e+00
+19.5823,473.6062,3.78058411e+02
+19.8469,475.0781,0.00000000e+00
+20.1116,476.5500,2.06881927e+02
+20.3762,478.0219,0.00000000e+00
+20.6408,479.4939,0.00000000e+00
+20.9054,480.9658,0.00000000e+00
+21.1701,482.4377,5.39027466e+02
+21.4347,483.9097,0.00000000e+00
+21.6993,485.3816,0.00000000e+00
+21.9639,486.8535,2.71284882e+02
+22.2286,488.3254,0.00000000e+00
+22.4932,489.7974,1.44352380e+03
+22.7578,491.2693,0.00000000e+00
+23.0225,492.7412,7.02547058e+02
+23.2871,494.2132,5.60040771e+02
+23.5517,495.6851,2.18406372e+02
+23.8163,497.1570,0.00000000e+00
+24.0810,498.6290,1.38742053e+03
+24.3456,500.1009,2.72283569e+02
+24.6102,501.5728,0.00000000e+00
+24.8748,503.0447,1.34507446e+03
+25.1395,504.5167,0.00000000e+00
+25.4041,505.9886,3.04327026e+02
+25.6687,507.4605,0.00000000e+00
+25.9333,508.9325,8.56892700e+02
+26.1980,510.4044,0.00000000e+00
+26.4626,511.8763,2.54721191e+03
+26.7272,513.3483,0.00000000e+00
+26.9918,514.8202,0.00000000e+00
+27.2565,516.2921,1.29646313e+03
+27.5211,517.7640,0.00000000e+00
+27.7857,519.2360,1.23041333e+03
+28.0503,520.7079,0.00000000e+00
+28.3150,522.1798,0.00000000e+00
+28.5796,523.6517,0.00000000e+00
+28.8442,525.1237,0.00000000e+00
+29.1088,526.5956,2.81293335e+02
+29.3735,528.0675,1.55017163e+03
+29.6381,529.5395,0.00000000e+00
+29.9027,531.0114,0.00000000e+00
+30.1674,532.4833,6.36702515e+02
+30.4320,533.9553,1.20125342e+03
+30.6966,535.4272,0.00000000e+00
+30.9612,536.8991,0.00000000e+00
+31.2259,538.3710,1.83230615e+03
+31.4905,539.8430,1.94558435e+03
+31.7551,541.3149,0.00000000e+00
+32.0197,542.7868,0.00000000e+00
+32.2844,544.2587,3.41298859e+02
+32.5490,545.7307,1.55568018e+03
+32.8136,547.2026,1.40263599e+03
+33.0782,548.6746,1.06688708e+03
+33.3429,550.1465,2.85888153e+02
+33.6075,551.6184,6.31397247e+01
+33.8721,553.0903,7.47288025e+02
+34.1367,554.5623,0.00000000e+00
+34.4014,556.0342,1.16943213e+03
+34.6660,557.5061,4.24484833e+02
+34.9306,558.9780,0.00000000e+00
+35.1952,560.4500,0.00000000e+00
+35.4599,561.9219,2.10264969e+02
+35.7245,563.3939,0.00000000e+00
+35.9891,564.8658,8.22980591e+02
+36.2538,566.3377,7.56579041e+02
+36.5184,567.8096,3.09422638e+02
+36.7830,569.2816,7.36434814e+02
+37.0476,570.7535,0.00000000e+00
+37.3123,572.2254,2.81880341e+02
+37.5769,573.6973,1.59228711e+03
+37.8415,575.1693,0.00000000e+00
+38.1061,576.6412,0.00000000e+00
+38.3708,578.1131,0.00000000e+00
+38.6354,579.5850,4.75348083e+02
+38.9000,581.0570,6.09356506e+02
+39.1646,582.5289,0.00000000e+00
+39.4293,584.0009,1.00915857e+03
+39.6939,585.4728,3.37779212e+00
+39.9585,586.9447,0.00000000e+00
+40.2231,588.4166,5.32351196e+02
+40.4878,589.8885,0.00000000e+00
+40.7524,591.3605,7.33676575e+02
+41.0170,592.8324,0.00000000e+00
+41.2816,594.3043,0.00000000e+00
+41.5463,595.7762,2.79892163e+03
+41.8109,597.2482,0.00000000e+00
+42.0755,598.7202,1.97005554e+03
+42.3401,600.1921,0.00000000e+00
+42.6048,601.6640,1.22580066e+03
+42.8694,603.1359,2.57657471e+03
+43.1340,604.6078,1.70745224e+02
+43.3986,606.0798,0.00000000e+00
+43.6633,607.5517,1.17669701e+02
+43.9279,609.0236,0.00000000e+00
+44.1925,610.4955,4.78075226e+02
+44.4571,611.9675,0.00000000e+00
+44.7218,613.4394,0.00000000e+00
+44.9864,614.9113,7.64503540e+02
+45.2510,616.3833,0.00000000e+00
+45.5157,617.8552,0.00000000e+00
+45.7803,619.3271,0.00000000e+00
+46.0449,620.7991,0.00000000e+00
+46.3095,622.2710,5.36722229e+02
+46.5742,623.7429,0.00000000e+00
+46.8388,625.2148,0.00000000e+00
+47.1034,626.6868,1.69702502e+03
+47.3680,628.1587,8.37781006e+02
+47.6327,629.6306,1.04728813e+02
+47.8973,631.1025,0.00000000e+00
+48.1619,632.5745,1.43763818e+03
+48.4265,634.0464,8.48209717e+02
+48.6912,635.5184,6.02212219e+02
+48.9558,636.9903,0.00000000e+00
+49.2204,638.4622,0.00000000e+00
+49.4850,639.9341,0.00000000e+00
+49.7497,641.4061,0.00000000e+00
+50.0143,642.8780,7.29832397e+02
+50.2789,644.3499,0.00000000e+00
+50.5435,645.8218,9.89345215e+02
+50.8082,647.2938,2.05774683e+03
+51.0728,648.7657,0.00000000e+00
+51.3374,650.2377,0.00000000e+00
+51.6021,651.7096,0.00000000e+00
+51.8667,653.1815,5.77043823e+02
+52.1313,654.6534,0.00000000e+00
+52.3959,656.1254,5.29530518e+02
+52.6606,657.5973,0.00000000e+00
+52.9252,659.0692,0.00000000e+00
+53.1898,660.5411,0.00000000e+00
+53.4544,662.0131,5.18671814e+02
+53.7191,663.4850,0.00000000e+00
+53.9837,664.9569,9.90315369e+02
+54.2483,666.4288,8.08159912e+02
+54.5129,667.9008,0.00000000e+00
+54.7776,669.3727,5.77817505e+02
+55.0422,670.8447,0.00000000e+00
+55.3068,672.3166,0.00000000e+00
+55.5714,673.7885,0.00000000e+00
+55.8361,675.2604,0.00000000e+00
+56.1007,676.7324,0.00000000e+00
+56.3653,678.2043,0.00000000e+00
+56.6299,679.6762,0.00000000e+00
+56.8946,681.1481,3.09480621e+02
+57.1592,682.6201,0.00000000e+00
+57.4238,684.0920,1.29295789e+03
+57.6884,685.5640,1.39150195e+03
+57.9531,687.0359,0.00000000e+00
+58.2177,688.5078,0.00000000e+00
+58.4823,689.9797,4.19937988e+02
+58.7469,691.4517,9.05184021e+02
+59.0116,692.9236,0.00000000e+00
+59.2762,694.3955,1.70803455e+03
+59.5408,695.8674,0.00000000e+00
+59.8054,697.3394,8.75510620e+02
+60.0701,698.8113,6.87685913e+02
+60.3347,700.2832,5.64197083e+02
+60.5993,701.7552,1.45437363e+02
+60.8640,703.2271,0.00000000e+00
+61.1286,704.6990,2.62549408e+02
+61.3932,706.1710,3.48579803e+02
+61.6578,707.6429,0.00000000e+00
+61.9225,709.1148,1.42599939e+03
+62.1871,710.5867,0.00000000e+00
+62.4517,712.0587,0.00000000e+00
+62.7163,713.5306,0.00000000e+00
+62.9810,715.0025,0.00000000e+00
+63.2456,716.4744,3.78017792e+02
+63.5102,717.9464,4.98716187e+02
+63.7748,719.4183,6.73479736e+02
+64.0395,720.8903,0.00000000e+00
+64.3041,722.3622,0.00000000e+00
+64.5687,723.8341,0.00000000e+00
+64.8333,725.3060,8.91939941e+02
+65.0980,726.7780,0.00000000e+00
+65.3626,728.2499,0.00000000e+00
+65.6272,729.7218,3.02059052e+02
+65.8918,731.1937,1.46614783e+03
+66.1565,732.6656,0.00000000e+00
+66.4211,734.1376,4.14974243e+02
+66.6857,735.6095,1.54124414e+03
+66.9504,737.0815,0.00000000e+00
+67.2150,738.5534,0.00000000e+00
+67.4796,740.0253,3.59412750e+02
+67.7442,741.4973,7.85938599e+02
+68.0089,742.9692,0.00000000e+00
+68.2735,744.4411,0.00000000e+00
+68.5381,745.9130,0.00000000e+00
+68.8027,747.3849,0.00000000e+00
+69.0674,748.8569,0.00000000e+00
+69.3320,750.3288,9.83711472e+01
+69.5966,751.8007,0.00000000e+00
+69.8612,753.2726,1.01769482e+03
+70.1259,754.7446,0.00000000e+00
+70.3905,756.2166,1.95735062e+02
+70.6551,757.6885,0.00000000e+00
+70.9197,759.1604,1.67961060e+03
+71.1844,760.6323,0.00000000e+00
+71.4490,762.1042,8.90094727e+02
+71.7136,763.5762,0.00000000e+00
+71.9782,765.0481,0.00000000e+00
+72.2429,766.5200,2.23984360e+02
+72.5075,767.9919,1.24623120e+03
+72.7721,769.4639,8.91536789e+01
+73.0368,770.9359,1.23361194e+03
+73.3014,772.4078,1.55394263e+03
+73.5660,773.8797,1.09791907e+03
+73.8306,775.3516,1.13249046e+02
+74.0953,776.8235,0.00000000e+00
+74.3599,778.2955,0.00000000e+00
+74.6245,779.7674,0.00000000e+00
+74.8891,781.2393,3.74544373e+01
+75.1538,782.7112,3.55305603e+02
+75.4184,784.1832,0.00000000e+00
+75.6830,785.6551,8.78560974e+02
+75.9476,787.1270,1.22124963e+03
+76.2123,788.5990,1.02348682e+03
+76.4769,790.0709,1.51717346e+02
+76.7415,791.5428,0.00000000e+00
+77.0061,793.0148,0.00000000e+00
+77.2708,794.4867,4.84101044e+02
+77.5354,795.9586,2.67606152e+03
+77.8000,797.4305,1.03595093e+03
+78.0646,798.9025,0.00000000e+00
+78.3293,800.3744,0.00000000e+00
+78.5939,801.8463,0.00000000e+00
+78.8585,803.3182,0.00000000e+00
+79.1231,804.7902,6.31631592e+02
+79.3878,806.2621,1.21512964e+03
+79.6524,807.7341,0.00000000e+00
+79.9170,809.2060,2.81412487e+01
+80.1816,810.6779,4.37042786e+02
+80.4463,812.1498,0.00000000e+00
+80.7109,813.6218,6.14793274e+02
+80.9755,815.0937,6.07848511e+02
+81.2401,816.5656,1.09755225e+03
+81.5048,818.0375,0.00000000e+00
+81.7694,819.5095,0.00000000e+00
+82.0340,820.9814,0.00000000e+00
+82.2986,822.4533,0.00000000e+00
+82.5633,823.9253,0.00000000e+00
+82.8279,825.3972,0.00000000e+00
+83.0925,826.8691,1.82450342e+03
+83.3572,828.3411,6.40839355e+02
+83.6218,829.8130,1.25831055e+03
+83.8864,831.2849,0.00000000e+00
+84.1510,832.7568,9.45181458e+02
+84.4157,834.2288,0.00000000e+00
+84.6803,835.7007,6.88564026e+02
+84.9449,837.1726,0.00000000e+00
+85.2095,838.6445,0.00000000e+00
+85.4742,840.1165,0.00000000e+00
+85.7388,841.5884,0.00000000e+00
+86.0034,843.0604,2.19549878e+03
+86.2680,844.5323,0.00000000e+00
+86.5327,846.0042,0.00000000e+00
+86.7973,847.4761,6.14130005e+02
+87.0619,848.9481,5.29323059e+02
+87.3265,850.4200,6.90851257e+02
+87.5912,851.8919,6.21818726e+02
+87.8558,853.3638,1.58296051e+02
+88.1204,854.8358,1.32572986e+03
+88.3850,856.3077,7.17888245e+02
+88.6497,857.7797,2.59690247e+02
+88.9143,859.2516,1.71912732e+03
+89.1789,860.7235,2.27456360e+01
+89.4436,862.1954,1.60132751e+01
+89.7082,863.6674,1.82419281e+02
+89.9728,865.1393,5.80097473e+02
+90.2374,866.6112,2.07585526e+02
+90.5021,868.0831,0.00000000e+00
+90.7667,869.5551,8.60596863e+02
+91.0313,871.0270,2.61668115e+03
+91.2959,872.4989,0.00000000e+00
+91.5606,873.9708,1.86544739e+03
+91.8252,875.4428,0.00000000e+00
+92.0898,876.9147,7.57530518e+02
+92.3544,878.3867,0.00000000e+00
+92.6191,879.8586,6.32926270e+02
+92.8837,881.3305,5.01388855e+02
+93.1483,882.8024,8.01804443e+02
+93.4129,884.2744,0.00000000e+00
+93.6776,885.7463,6.44271545e+01
+93.9422,887.2182,1.30276843e+03
+94.2068,888.6901,3.31799927e+02
+94.4714,890.1620,3.54573181e+02
+94.7361,891.6340,1.74250623e+03
+95.0007,893.1060,2.89862518e+02
+95.2653,894.5779,1.38869067e+03
+95.5299,896.0498,2.07960693e+03
+95.7946,897.5217,0.00000000e+00
+96.0592,898.9937,0.00000000e+00
+96.3238,900.4656,1.04385101e+02
+96.5884,901.9375,3.39690112e+03
+96.8531,903.4094,1.75537097e+03
+97.1177,904.8813,4.44992676e+01
+97.3823,906.3533,3.97640472e+02
+97.6469,907.8252,3.18640698e+03
+97.9116,909.2971,1.70151929e+03
+98.1762,910.7691,4.59534210e+02
+98.4408,912.2410,1.19108813e+03
+98.7055,913.7130,1.28792383e+03
+98.9701,915.1849,5.56370911e+02
+99.2347,916.6568,2.37443896e+03
+99.4993,918.1287,1.74240393e+03
+99.7640,919.6006,7.05448364e+02
+100.0286,921.0726,2.38073877e+03
+100.2932,922.5445,0.00000000e+00
+100.5578,924.0164,5.97609070e+02
+100.8225,925.4883,1.27102710e+03
+101.0871,926.9603,1.85772534e+03
+101.3517,928.4323,7.02329224e+02
+101.6163,929.9042,1.49575977e+03
+101.8810,931.3761,3.95766296e+02
+102.1456,932.8480,1.02447864e+03
+102.4102,934.3199,3.73923584e+03
+102.6748,935.7919,5.00998657e+02
+102.9395,937.2638,2.23415259e+03
+103.2041,938.7357,6.78315063e+02
+103.4687,940.2076,1.73964661e+03
+103.7333,941.6796,2.64294067e+03
+103.9980,943.1515,3.81452539e+03
+104.2626,944.6235,9.56425964e+02
+104.5272,946.0954,3.53770679e+03
+104.7919,947.5673,3.37647754e+03
+105.0565,949.0392,1.57594849e+03
+105.3211,950.5112,3.51330908e+03
+105.5857,951.9831,1.04456543e+03
+105.8504,953.4550,2.41006396e+03
+106.1150,954.9269,3.36095850e+03
+106.3796,956.3989,2.09655151e+03
+106.6442,957.8708,1.01332886e+03
+106.9089,959.3427,2.69345117e+03
+107.1735,960.8146,1.98639587e+03
+107.4381,962.2866,1.94694080e+03
+107.7027,963.7585,2.92925122e+03
+107.9674,965.2305,2.17488428e+03
+108.2320,966.7024,2.00162146e+03
+108.4966,968.1743,4.80771729e+03
+108.7612,969.6462,2.57924438e+03
+109.0259,971.1182,4.19904297e+03
+109.2905,972.5901,2.20550439e+03
+109.5551,974.0620,1.41846436e+03
+109.8197,975.5339,3.82755615e+03
+110.0844,977.0059,5.04820703e+03
+110.3490,978.4778,6.61438281e+03
+110.6136,979.9498,4.75811084e+03
+110.8783,981.4217,5.25251270e+03
+111.1429,982.8936,5.42077832e+03
+111.4075,984.3655,6.67489844e+03
+111.6721,985.8375,3.04256567e+03
+111.9368,987.3094,4.87739209e+03
+112.2014,988.7813,6.27084717e+03
+112.4660,990.2532,6.10972510e+03
+112.7306,991.7252,4.77849121e+03
+112.9953,993.1971,5.07308105e+03
+113.2599,994.6690,6.48212158e+03
+113.5245,996.1409,6.74127295e+03
+113.7891,997.6129,6.43518457e+03
+114.0538,999.0848,7.08849512e+03
+114.3184,1000.5568,7.83140625e+03
+114.5830,1002.0287,8.25168652e+03
+114.8476,1003.5006,7.21981885e+03
+115.1123,1004.9725,7.63231152e+03
+115.3769,1006.4445,8.24602930e+03
+115.6415,1007.9164,8.89010938e+03
+115.9061,1009.3883,9.12720410e+03
+116.1708,1010.8602,1.01525557e+04
+116.4354,1012.3322,8.76779883e+03
+116.7000,1013.8041,8.65076367e+03
+116.9646,1015.2761,9.38260840e+03
+117.2293,1016.7480,9.73563086e+03
+117.4939,1018.2199,9.61114453e+03
+117.7585,1019.6918,1.10495996e+04
+118.0231,1021.1638,1.17458154e+04
+118.2878,1022.6357,1.07758438e+04
+118.5524,1024.1077,1.11493643e+04
+118.8170,1025.5796,1.26823203e+04
+119.0817,1027.0515,1.38046699e+04
+119.3463,1028.5234,1.37120137e+04
+119.6109,1029.9954,1.32471904e+04
+119.8755,1031.4673,1.39236562e+04
+120.1402,1032.9392,1.40140576e+04
+120.4048,1034.4111,1.45754248e+04
+120.6694,1035.8831,1.58583857e+04
+120.9340,1037.3550,1.66813301e+04
+121.1987,1038.8269,1.75602305e+04
+121.4633,1040.2988,1.75540801e+04
+121.7279,1041.7708,1.61433672e+04
+121.9925,1043.2427,1.93206309e+04
+122.2572,1044.7146,1.91882754e+04
+122.5218,1046.1865,1.91255059e+04
+122.7864,1047.6584,2.04098828e+04
+123.0510,1049.1304,1.97839004e+04
+123.3157,1050.6023,2.05296602e+04
+123.5803,1052.0742,2.35114375e+04
+123.8449,1053.5461,2.34777480e+04
+124.1095,1055.0181,2.07154062e+04
+124.3742,1056.4900,2.08837656e+04
+124.6388,1057.9620,2.48099453e+04
+124.9034,1059.4340,2.43454609e+04
+125.1681,1060.9059,2.46721211e+04
+125.4327,1062.3778,2.70078359e+04
+125.6973,1063.8497,2.65195195e+04
+125.9619,1065.3217,2.75374551e+04
+126.2266,1066.7936,2.97336602e+04
+126.4912,1068.2655,3.04101914e+04
+126.7558,1069.7374,2.99666719e+04
+127.0204,1071.2094,3.18296543e+04
+127.2851,1072.6813,3.38528594e+04
+127.5497,1074.1532,3.17874258e+04
+127.8143,1075.6251,3.47880469e+04
+128.0789,1077.0970,3.57364648e+04
+128.3436,1078.5690,3.54528516e+04
+128.6082,1080.0409,3.62651406e+04
+128.8728,1081.5128,3.88352227e+04
+129.1374,1082.9847,3.91724062e+04
+129.4021,1084.4567,4.10999297e+04
+129.6667,1085.9286,4.16292148e+04
+129.9313,1087.4005,4.26328164e+04
+130.1959,1088.8724,4.42589727e+04
+130.4606,1090.3444,4.68481992e+04
+130.7252,1091.8164,4.65800352e+04
+130.9898,1093.2883,4.90648516e+04
+131.2545,1094.7603,4.86036992e+04
+131.5191,1096.2322,5.15161289e+04
+131.7837,1097.7041,5.24500703e+04
+132.0483,1099.1760,5.33570469e+04
diff --git a/demo_data/tpd_MvK_3.csv b/demo_data/tpd_MvK_3.csv
new file mode 100644
index 0000000000000000000000000000000000000000..150004474978a963264f9ddec2f25c09eb38f7dc
--- /dev/null
+++ b/demo_data/tpd_MvK_3.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,3.79564850e+02
+0.0465,366.1553,0.00000000e+00
+0.0931,367.6273,1.56643530e+03
+0.1396,369.0992,0.00000000e+00
+0.1862,370.5711,0.00000000e+00
+0.2327,372.0431,0.00000000e+00
+0.2793,373.5150,4.38650665e+02
+0.3258,374.9869,8.23677551e+02
+0.3724,376.4588,2.38912125e+02
+0.4189,377.9308,0.00000000e+00
+0.4655,379.4027,0.00000000e+00
+0.5120,380.8746,0.00000000e+00
+0.5586,382.3466,0.00000000e+00
+0.6051,383.8185,1.13435074e+02
+0.6517,385.2904,7.97320190e+02
+0.6982,386.7624,0.00000000e+00
+0.7447,388.2343,0.00000000e+00
+0.7913,389.7062,0.00000000e+00
+0.8378,391.1781,1.44327667e+02
+0.8844,392.6501,0.00000000e+00
+0.9309,394.1220,5.39131775e+02
+0.9775,395.5939,0.00000000e+00
+1.0240,397.0659,0.00000000e+00
+1.0706,398.5378,0.00000000e+00
+1.1171,400.0097,1.13376648e+03
+1.1637,401.4816,0.00000000e+00
+1.2102,402.9536,2.26898462e+03
+1.2568,404.4255,0.00000000e+00
+1.3033,405.8974,9.92248917e+01
+1.3498,407.3694,3.98765381e+02
+1.3964,408.8413,0.00000000e+00
+1.4429,410.3132,1.14851404e+03
+1.4895,411.7852,6.52877625e+02
+1.5360,413.2571,0.00000000e+00
+1.5826,414.7290,1.72850940e+03
+1.6291,416.2009,0.00000000e+00
+1.6757,417.6729,1.42292432e+03
+1.7222,419.1448,0.00000000e+00
+1.7688,420.6167,0.00000000e+00
+1.8153,422.0887,0.00000000e+00
+1.8619,423.5606,8.98659241e+02
+1.9084,425.0325,1.69410925e+03
+1.9550,426.5044,0.00000000e+00
+2.0015,427.9763,1.18897392e+02
+2.0480,429.4483,0.00000000e+00
+2.0946,430.9202,4.10091614e+02
+2.1411,432.3922,0.00000000e+00
+2.1877,433.8641,1.76112595e+02
+2.2342,435.3360,2.74475891e+02
+2.2808,436.8079,8.77515747e+02
+2.3273,438.2799,0.00000000e+00
+2.3739,439.7518,5.16451294e+02
+2.4204,441.2237,0.00000000e+00
+2.4670,442.6956,0.00000000e+00
+2.5135,444.1676,0.00000000e+00
+2.5601,445.6395,0.00000000e+00
+2.6066,447.1115,1.93028735e+03
+2.6531,448.5834,0.00000000e+00
+2.6997,450.0553,6.18606806e+00
+2.7462,451.5272,7.49160034e+02
+2.7928,452.9991,0.00000000e+00
+2.8393,454.4711,0.00000000e+00
+2.8859,455.9430,0.00000000e+00
+2.9324,457.4149,8.59159546e+02
+2.9790,458.8869,0.00000000e+00
+3.0255,460.3588,6.74012985e+01
+3.0721,461.8307,0.00000000e+00
+3.1186,463.3027,6.47710449e+02
+3.1652,464.7746,1.90840897e+02
+3.2117,466.2465,0.00000000e+00
+3.2583,467.7184,0.00000000e+00
+3.3048,469.1904,3.07503326e+02
+3.3513,470.6623,7.98370422e+02
+3.3979,472.1342,1.90192490e+02
+3.4444,473.6062,4.92297882e+02
+3.4910,475.0781,0.00000000e+00
+3.5375,476.5500,0.00000000e+00
+3.5841,478.0219,1.26580322e+03
+3.6306,479.4939,1.00613989e+03
+3.6772,480.9658,0.00000000e+00
+3.7237,482.4377,0.00000000e+00
+3.7703,483.9097,0.00000000e+00
+3.8168,485.3816,2.07214371e+02
+3.8634,486.8535,1.21619849e+03
+3.9099,488.3254,0.00000000e+00
+3.9565,489.7974,0.00000000e+00
+4.0030,491.2693,0.00000000e+00
+4.0495,492.7412,0.00000000e+00
+4.0961,494.2132,4.82727264e+02
+4.1426,495.6851,0.00000000e+00
+4.1892,497.1570,0.00000000e+00
+4.2357,498.6290,0.00000000e+00
+4.2823,500.1009,3.54380127e+02
+4.3288,501.5728,0.00000000e+00
+4.3754,503.0447,0.00000000e+00
+4.4219,504.5167,0.00000000e+00
+4.4685,505.9886,0.00000000e+00
+4.5150,507.4605,0.00000000e+00
+4.5616,508.9325,0.00000000e+00
+4.6081,510.4044,2.52431641e+03
+4.6546,511.8763,7.39503937e+01
+4.7012,513.3483,0.00000000e+00
+4.7477,514.8202,1.12310266e+03
+4.7943,516.2921,0.00000000e+00
+4.8408,517.7640,0.00000000e+00
+4.8874,519.2360,6.46120605e+02
+4.9339,520.7079,8.04820557e+02
+4.9805,522.1798,0.00000000e+00
+5.0270,523.6517,3.58561310e+02
+5.0736,525.1237,0.00000000e+00
+5.1201,526.5956,0.00000000e+00
+5.1667,528.0675,5.51843628e+02
+5.2132,529.5395,0.00000000e+00
+5.2598,531.0114,0.00000000e+00
+5.3063,532.4833,0.00000000e+00
+5.3528,533.9553,8.35965393e+02
+5.3994,535.4272,0.00000000e+00
+5.4459,536.8991,0.00000000e+00
+5.4925,538.3710,1.28049414e+03
+5.5390,539.8430,3.61014175e+01
+5.5856,541.3149,0.00000000e+00
+5.6321,542.7868,0.00000000e+00
+5.6787,544.2587,7.29366989e+01
+5.7252,545.7307,0.00000000e+00
+5.7718,547.2026,6.19224777e+01
+5.8183,548.6746,1.17511719e+03
+5.8649,550.1465,0.00000000e+00
+5.9114,551.6184,2.18696304e+02
+5.9580,553.0903,5.55626892e+02
+6.0045,554.5623,7.75027771e+02
+6.0510,556.0342,0.00000000e+00
+6.0976,557.5061,7.13400574e+02
+6.1441,558.9780,1.90452271e+02
+6.1907,560.4500,0.00000000e+00
+6.2372,561.9219,0.00000000e+00
+6.2838,563.3939,0.00000000e+00
+6.3303,564.8658,0.00000000e+00
+6.3769,566.3377,1.21688770e+03
+6.4234,567.8096,8.52021179e+02
+6.4700,569.2816,7.81727966e+02
+6.5165,570.7535,0.00000000e+00
+6.5631,572.2254,2.78010101e+02
+6.6096,573.6973,4.12965889e+01
+6.6561,575.1693,0.00000000e+00
+6.7027,576.6412,0.00000000e+00
+6.7492,578.1131,4.59144440e+02
+6.7958,579.5850,0.00000000e+00
+6.8423,581.0570,0.00000000e+00
+6.8889,582.5289,0.00000000e+00
+6.9354,584.0009,5.96322937e+02
+6.9820,585.4728,0.00000000e+00
+7.0285,586.9447,1.62140112e+03
+7.0751,588.4166,9.57066040e+01
+7.1216,589.8885,0.00000000e+00
+7.1682,591.3605,0.00000000e+00
+7.2147,592.8324,2.76879181e+02
+7.2613,594.3043,0.00000000e+00
+7.3078,595.7762,8.63897156e+02
+7.3543,597.2482,0.00000000e+00
+7.4009,598.7202,0.00000000e+00
+7.4474,600.1921,1.29332996e+03
+7.4940,601.6640,0.00000000e+00
+7.5405,603.1359,0.00000000e+00
+7.5871,604.6078,0.00000000e+00
+7.6336,606.0798,0.00000000e+00
+7.6802,607.5517,5.35308289e+02
+7.7267,609.0236,0.00000000e+00
+7.7733,610.4955,0.00000000e+00
+7.8198,611.9675,0.00000000e+00
+7.8664,613.4394,0.00000000e+00
+7.9129,614.9113,0.00000000e+00
+7.9594,616.3833,7.30116394e+02
+8.0060,617.8552,6.46082825e+02
+8.0525,619.3271,1.65004797e+03
+8.0991,620.7991,0.00000000e+00
+8.1456,622.2710,0.00000000e+00
+8.1922,623.7429,1.52738989e+03
+8.2387,625.2148,7.63616089e+02
+8.2853,626.6868,8.48205627e+02
+8.3318,628.1587,4.17001740e+02
+8.3784,629.6306,2.32812210e+02
+8.4249,631.1025,0.00000000e+00
+8.4715,632.5745,5.29703255e+01
+8.5180,634.0464,0.00000000e+00
+8.5646,635.5184,1.81143585e+02
+8.6111,636.9903,0.00000000e+00
+8.6576,638.4622,0.00000000e+00
+8.7042,639.9341,1.17979712e+03
+8.7507,641.4061,0.00000000e+00
+8.7973,642.8780,0.00000000e+00
+8.8438,644.3499,1.89503899e+01
+8.8904,645.8218,0.00000000e+00
+8.9369,647.2938,0.00000000e+00
+8.9835,648.7657,0.00000000e+00
+9.0300,650.2377,0.00000000e+00
+9.0766,651.7096,6.74859543e+01
+9.1231,653.1815,2.72388062e+02
+9.1697,654.6534,1.09539771e+03
+9.2162,656.1254,1.49448914e+03
+9.2628,657.5973,3.91717621e+02
+9.3093,659.0692,6.15681982e+00
+9.3558,660.5411,0.00000000e+00
+9.4024,662.0131,4.70805298e+02
+9.4489,663.4850,9.98169739e+02
+9.4955,664.9569,0.00000000e+00
+9.5420,666.4288,0.00000000e+00
+9.5886,667.9008,9.13571533e+02
+9.6351,669.3727,0.00000000e+00
+9.6817,670.8447,1.02620544e+03
+9.7282,672.3166,0.00000000e+00
+9.7748,673.7885,0.00000000e+00
+9.8213,675.2604,0.00000000e+00
+9.8679,676.7324,0.00000000e+00
+9.9144,678.2043,0.00000000e+00
+9.9609,679.6762,0.00000000e+00
+10.0075,681.1481,0.00000000e+00
+10.0540,682.6201,0.00000000e+00
+10.1006,684.0920,8.94337219e+02
+10.1471,685.5640,9.14470154e+02
+10.1937,687.0359,0.00000000e+00
+10.2402,688.5078,0.00000000e+00
+10.2868,689.9797,0.00000000e+00
+10.3333,691.4517,1.33287585e+03
+10.3799,692.9236,0.00000000e+00
+10.4264,694.3955,2.31288834e+02
+10.4730,695.8674,0.00000000e+00
+10.5195,697.3394,1.34653796e+03
+10.5661,698.8113,1.47139084e+02
+10.6126,700.2832,8.49515015e+02
+10.6591,701.7552,0.00000000e+00
+10.7057,703.2271,2.02815125e+02
+10.7522,704.6990,7.68959778e+02
+10.7988,706.1710,0.00000000e+00
+10.8453,707.6429,0.00000000e+00
+10.8919,709.1148,0.00000000e+00
+10.9384,710.5867,0.00000000e+00
+10.9850,712.0587,0.00000000e+00
+11.0315,713.5306,0.00000000e+00
+11.0781,715.0025,2.84747284e+02
+11.1246,716.4744,9.77406433e+02
+11.1712,717.9464,1.10332649e+02
+11.2177,719.4183,0.00000000e+00
+11.2642,720.8903,0.00000000e+00
+11.3108,722.3622,1.25687122e+03
+11.3573,723.8341,0.00000000e+00
+11.4039,725.3060,0.00000000e+00
+11.4504,726.7780,0.00000000e+00
+11.4970,728.2499,3.79702515e+02
+11.5435,729.7218,7.06049255e+02
+11.5901,731.1937,0.00000000e+00
+11.6366,732.6656,2.07678027e+03
+11.6832,734.1376,0.00000000e+00
+11.7297,735.6095,1.00656104e+03
+11.7763,737.0815,3.67989014e+02
+11.8228,738.5534,4.68776825e+02
+11.8694,740.0253,0.00000000e+00
+11.9159,741.4973,0.00000000e+00
+11.9624,742.9692,1.32440613e+03
+12.0090,744.4411,0.00000000e+00
+12.0555,745.9130,6.11814209e+02
+12.1021,747.3849,3.41251556e+02
+12.1486,748.8569,0.00000000e+00
+12.1952,750.3288,9.06460327e+02
+12.2417,751.8007,0.00000000e+00
+12.2883,753.2726,6.06891418e+02
+12.3348,754.7446,0.00000000e+00
+12.3814,756.2166,4.21597015e+02
+12.4279,757.6885,9.79675415e+02
+12.4745,759.1604,9.56168213e+02
+12.5210,760.6323,0.00000000e+00
+12.5676,762.1042,9.19843750e+02
+12.6141,763.5762,9.71747620e+02
+12.6606,765.0481,0.00000000e+00
+12.7072,766.5200,9.04919312e+02
+12.7537,767.9919,0.00000000e+00
+12.8003,769.4639,0.00000000e+00
+12.8468,770.9359,5.36626282e+02
+12.8934,772.4078,0.00000000e+00
+12.9399,773.8797,8.63183167e+02
+12.9865,775.3516,0.00000000e+00
+13.0330,776.8235,1.20489182e+02
+13.0796,778.2955,1.32622607e+03
+13.1261,779.7674,0.00000000e+00
+13.1727,781.2393,8.90929871e+02
+13.2192,782.7112,1.43895233e+02
+13.2657,784.1832,1.28952979e+03
+13.3123,785.6551,3.16862000e+02
+13.3588,787.1270,0.00000000e+00
+13.4054,788.5990,6.96502014e+02
+13.4519,790.0709,1.03259961e+03
+13.4985,791.5428,0.00000000e+00
+13.5450,793.0148,0.00000000e+00
+13.5916,794.4867,1.76225098e+03
+13.6381,795.9586,4.62378204e+02
+13.6847,797.4305,6.73536926e+02
+13.7312,798.9025,0.00000000e+00
+13.7778,800.3744,0.00000000e+00
+13.8243,801.8463,3.65262146e+01
+13.8709,803.3182,4.72783012e+01
+13.9174,804.7902,0.00000000e+00
+13.9639,806.2621,3.02321045e+02
+14.0105,807.7341,0.00000000e+00
+14.0570,809.2060,0.00000000e+00
+14.1036,810.6779,0.00000000e+00
+14.1501,812.1498,2.14370996e+03
+14.1967,813.6218,1.68237366e+02
+14.2432,815.0937,1.21864090e+02
+14.2898,816.5656,3.67744873e+02
+14.3363,818.0375,2.37174702e+01
+14.3829,819.5095,4.95339630e+02
+14.4294,820.9814,0.00000000e+00
+14.4760,822.4533,9.18857544e+02
+14.5225,823.9253,1.80859467e+02
+14.5691,825.3972,2.68172951e+01
+14.6156,826.8691,1.01545648e+03
+14.6621,828.3411,1.13190247e+03
+14.7087,829.8130,7.39727295e+02
+14.7552,831.2849,6.05547913e+02
+14.8018,832.7568,0.00000000e+00
+14.8483,834.2288,4.73342346e+02
+14.8949,835.7007,0.00000000e+00
+14.9414,837.1726,1.27017615e+03
+14.9880,838.6445,3.38632629e+02
+15.0345,840.1165,7.33918610e+01
+15.0811,841.5884,1.15624536e+03
+15.1276,843.0604,1.23765344e+03
+15.1742,844.5323,2.57015930e+02
+15.2207,846.0042,1.21867297e+03
+15.2672,847.4761,1.45935388e+03
+15.3138,848.9481,0.00000000e+00
+15.3603,850.4200,0.00000000e+00
+15.4069,851.8919,6.83208618e+02
+15.4534,853.3638,2.73585602e+02
+15.5000,854.8358,2.38160156e+02
+15.5465,856.3077,0.00000000e+00
+15.5931,857.7797,1.55757849e+03
+15.6396,859.2516,1.71506226e+03
+15.6862,860.7235,8.19122391e+01
+15.7327,862.1954,0.00000000e+00
+15.7793,863.6674,2.08291846e+03
+15.8258,865.1393,1.20450037e+03
+15.8724,866.6112,7.01903076e+01
+15.9189,868.0831,0.00000000e+00
+15.9654,869.5551,2.89324036e+02
+16.0120,871.0270,1.25558691e+03
+16.0585,872.4989,0.00000000e+00
+16.1051,873.9708,1.87986237e+02
+16.1516,875.4428,1.15591016e+03
+16.1982,876.9147,4.64243622e+02
+16.2447,878.3867,3.64459564e+02
+16.2913,879.8586,0.00000000e+00
+16.3378,881.3305,8.44567078e+02
+16.3844,882.8024,7.76983398e+02
+16.4309,884.2744,2.62549103e+02
+16.4775,885.7463,0.00000000e+00
+16.5240,887.2182,1.45025146e+03
+16.5705,888.6901,0.00000000e+00
+16.6171,890.1620,1.76056042e+03
+16.6636,891.6340,5.00024841e+02
+16.7102,893.1060,1.02867847e+03
+16.7567,894.5779,1.19495276e+03
+16.8033,896.0498,5.36781250e+02
+16.8498,897.5217,0.00000000e+00
+16.8964,898.9937,2.65754541e+03
+16.9429,900.4656,1.08961719e+03
+16.9895,901.9375,3.50300751e+02
+17.0360,903.4094,1.04908325e+03
+17.0826,904.8813,1.95740369e+03
+17.1291,906.3533,0.00000000e+00
+17.1757,907.8252,5.14762939e+02
+17.2222,909.2971,9.40186035e+02
+17.2687,910.7691,1.90336060e+03
+17.3153,912.2410,1.70641333e+03
+17.3618,913.7130,4.70980377e+02
+17.4084,915.1849,6.56594055e+02
+17.4549,916.6568,1.50178101e+03
+17.5015,918.1287,1.17660498e+03
+17.5480,919.6006,1.37538733e+03
+17.5946,921.0726,9.06325806e+02
+17.6411,922.5445,6.11630310e+02
+17.6877,924.0164,1.75806909e+03
+17.7342,925.4883,2.35763086e+03
+17.7808,926.9603,1.56493237e+03
+17.8273,928.4323,1.48947144e+02
+17.8739,929.9042,1.13158350e+03
+17.9204,931.3761,7.77146606e+02
+17.9669,932.8480,1.83501819e+03
+18.0135,934.3199,1.00183887e+03
+18.0600,935.7919,1.46504712e+03
+18.1066,937.2638,1.60747681e+03
+18.1531,938.7357,1.06962622e+03
+18.1997,940.2076,1.22384082e+03
+18.2462,941.6796,2.18855005e+03
+18.2928,943.1515,2.00120422e+03
+18.3393,944.6235,1.68565454e+03
+18.3859,946.0954,1.53433728e+03
+18.4324,947.5673,1.59663171e+03
+18.4790,949.0392,1.89506763e+03
+18.5255,950.5112,1.47249365e+03
+18.5720,951.9831,2.68013916e+03
+18.6186,953.4550,4.29747656e+03
+18.6651,954.9269,4.19900000e+03
+18.7117,956.3989,3.30333887e+03
+18.7582,957.8708,3.68349463e+03
+18.8048,959.3427,1.26657361e+03
+18.8513,960.8146,3.41490332e+03
+18.8979,962.2866,3.52560181e+03
+18.9444,963.7585,2.05315527e+03
+18.9910,965.2305,4.39538232e+03
+19.0375,966.7024,3.10354980e+03
+19.0841,968.1743,3.55835278e+03
+19.1306,969.6462,4.35350146e+03
+19.1772,971.1182,4.74120850e+03
+19.2237,972.5901,3.67770679e+03
+19.2702,974.0620,4.13684229e+03
+19.3168,975.5339,4.58070020e+03
+19.3633,977.0059,5.67186426e+03
+19.4099,978.4778,5.07197217e+03
+19.4564,979.9498,4.61953174e+03
+19.5030,981.4217,5.53873096e+03
+19.5495,982.8936,4.95222217e+03
+19.5961,984.3655,3.18752490e+03
+19.6426,985.8375,5.54443408e+03
+19.6892,987.3094,4.88780713e+03
+19.7357,988.7813,5.35714746e+03
+19.7823,990.2532,6.44826953e+03
+19.8288,991.7252,3.86204688e+03
+19.8753,993.1971,6.61468066e+03
+19.9219,994.6690,6.15285254e+03
+19.9684,996.1409,6.03076025e+03
+20.0150,997.6129,5.95393115e+03
+20.0615,999.0848,6.77051855e+03
+20.1081,1000.5568,6.93441113e+03
+20.1546,1002.0287,6.21534033e+03
+20.2012,1003.5006,7.72627539e+03
+20.2477,1004.9725,8.70157422e+03
+20.2943,1006.4445,8.27081641e+03
+20.3408,1007.9164,8.37390430e+03
+20.3874,1009.3883,1.00423018e+04
+20.4339,1010.8602,9.35127051e+03
+20.4805,1012.3322,9.40947070e+03
+20.5270,1013.8041,1.05347285e+04
+20.5735,1015.2761,9.98320215e+03
+20.6201,1016.7480,9.46526172e+03
+20.6666,1018.2199,1.02079697e+04
+20.7132,1019.6918,1.05663164e+04
+20.7597,1021.1638,1.35352256e+04
+20.8063,1022.6357,1.11314268e+04
+20.8528,1024.1077,1.30566143e+04
+20.8994,1025.5796,1.24085879e+04
+20.9459,1027.0515,1.38801309e+04
+20.9925,1028.5234,1.22412129e+04
+21.0390,1029.9954,1.27681230e+04
+21.0856,1031.4673,1.34538135e+04
+21.1321,1032.9392,1.36888555e+04
+21.1787,1034.4111,1.56862695e+04
+21.2252,1035.8831,1.54292939e+04
+21.2717,1037.3550,1.61744014e+04
+21.3183,1038.8269,1.59473066e+04
+21.3648,1040.2988,1.77975273e+04
+21.4114,1041.7708,1.96941738e+04
+21.4579,1043.2427,1.82642773e+04
+21.5045,1044.7146,1.83344297e+04
+21.5510,1046.1865,1.95916152e+04
+21.5976,1047.6584,2.11600820e+04
+21.6441,1049.1304,2.07226035e+04
+21.6907,1050.6023,2.14157832e+04
+21.7372,1052.0742,2.19060898e+04
+21.7838,1053.5461,2.16507480e+04
+21.8303,1055.0181,2.32983379e+04
+21.8768,1056.4900,2.46683789e+04
+21.9234,1057.9620,2.54114688e+04
+21.9699,1059.4340,2.44555742e+04
+22.0165,1060.9059,2.56789863e+04
+22.0630,1062.3778,2.62805664e+04
+22.1096,1063.8497,2.72254941e+04
+22.1561,1065.3217,2.78287109e+04
+22.2027,1066.7936,2.89121406e+04
+22.2492,1068.2655,2.98371836e+04
+22.2958,1069.7374,3.07971328e+04
+22.3423,1071.2094,3.26417070e+04
+22.3889,1072.6813,3.18763008e+04
+22.4354,1074.1532,3.34106484e+04
+22.4820,1075.6251,3.50683242e+04
+22.5285,1077.0970,3.44507266e+04
+22.5750,1078.5690,3.73181523e+04
+22.6216,1080.0409,3.77776836e+04
+22.6681,1081.5128,4.00472539e+04
+22.7147,1082.9847,3.99648594e+04
+22.7612,1084.4567,4.24150781e+04
+22.8078,1085.9286,4.18312656e+04
+22.8543,1087.4005,4.41619844e+04
+22.9009,1088.8724,4.52889023e+04
+22.9474,1090.3444,4.62554883e+04
+22.9940,1091.8164,4.76495859e+04
+23.0405,1093.2883,4.84201016e+04
+23.0871,1094.7603,5.03646094e+04
+23.1336,1096.2322,5.14921289e+04
+23.1801,1097.7041,5.22738203e+04
+23.2267,1099.1760,5.28775117e+04
diff --git a/demo_data/tpd_MvK_metadata.json b/demo_data/tpd_MvK_metadata.json
new file mode 100644
index 0000000000000000000000000000000000000000..a15ce0e96db8daface26dbc04faa6dac8180bc93
--- /dev/null
+++ b/demo_data/tpd_MvK_metadata.json
@@ -0,0 +1,23 @@
+{
+ "mechanism": "MvK",
+ "betas_Ks": [
+ 0.3162277638912201,
+ 5.5623016357421875,
+ 31.62277603149414
+ ],
+ "n_rates": 3,
+ "true_params": {
+ "mechanism": "MvK",
+ "Ea_red": 23369.582400663046,
+ "Ea_reox": 20495.5314596839,
+ "nu_red": 160197624009364.56,
+ "theta_O0": 0.6207785223026974,
+ "T_start": 364.6834143679138,
+ "T_end": 1099.1759914138238
+ },
+ "csv_files": [
+ "tpd_MvK_1.csv",
+ "tpd_MvK_2.csv",
+ "tpd_MvK_3.csv"
+ ]
+}
\ No newline at end of file
diff --git a/demo_data/tpd_SecondOrder_1.csv b/demo_data/tpd_SecondOrder_1.csv
new file mode 100644
index 0000000000000000000000000000000000000000..20128b09e4ffb2629b078fe737f804231925a7b5
--- /dev/null
+++ b/demo_data/tpd_SecondOrder_1.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,0.00000000e+00
+4.6546,366.1553,6.13290410e-07
+9.3093,367.6273,0.00000000e+00
+13.9640,369.0992,0.00000000e+00
+18.6186,370.5711,7.03991134e-07
+23.2733,372.0431,3.93251618e-08
+27.9279,373.5150,1.16565798e-06
+32.5825,374.9869,5.20507569e-07
+37.2372,376.4588,3.21202492e-07
+41.8919,377.9308,0.00000000e+00
+46.5465,379.4027,0.00000000e+00
+51.2011,380.8746,0.00000000e+00
+55.8558,382.3466,0.00000000e+00
+60.5104,383.8185,3.80789061e-06
+65.1651,385.2904,0.00000000e+00
+69.8198,386.7624,9.16295733e-07
+74.4744,388.2343,7.18404863e-07
+79.1290,389.7062,1.04404592e-06
+83.7837,391.1781,9.10851440e-07
+88.4383,392.6501,0.00000000e+00
+93.0930,394.1220,5.21696251e-08
+97.7477,395.5939,0.00000000e+00
+102.4023,397.0659,0.00000000e+00
+107.0569,398.5378,1.38160829e-06
+111.7116,400.0097,0.00000000e+00
+116.3662,401.4816,0.00000000e+00
+121.0209,402.9536,0.00000000e+00
+125.6755,404.4255,2.27549975e-07
+130.3302,405.8974,0.00000000e+00
+134.9848,407.3694,1.96452243e-06
+139.6394,408.8413,9.71485974e-07
+144.2941,410.3132,1.33592107e-06
+148.9488,411.7852,1.65514871e-06
+153.6034,413.2571,1.25043812e-06
+158.2581,414.7290,1.76175536e-06
+162.9127,416.2009,0.00000000e+00
+167.5673,417.6729,3.12210005e-07
+172.2220,419.1448,0.00000000e+00
+176.8767,420.6167,2.47205298e-06
+181.5313,422.0887,3.67433330e-07
+186.1860,423.5606,7.72762291e-07
+190.8406,425.0325,0.00000000e+00
+195.4952,426.5044,0.00000000e+00
+200.1498,427.9763,0.00000000e+00
+204.8046,429.4483,0.00000000e+00
+209.4592,430.9202,0.00000000e+00
+214.1138,432.3922,1.28750025e-06
+218.7685,433.8641,0.00000000e+00
+223.4231,435.3360,3.44866550e-07
+228.0777,436.8079,2.23785168e-08
+232.7325,438.2799,0.00000000e+00
+237.3871,439.7518,0.00000000e+00
+242.0417,441.2237,1.03909531e-06
+246.6964,442.6956,3.68389941e-08
+251.3510,444.1676,0.00000000e+00
+256.0056,445.6395,0.00000000e+00
+260.6603,447.1115,0.00000000e+00
+265.3150,448.5834,0.00000000e+00
+269.9696,450.0553,1.63301365e-06
+274.6242,451.5272,0.00000000e+00
+279.2789,452.9991,2.10902931e-06
+283.9335,454.4711,0.00000000e+00
+288.5882,455.9430,0.00000000e+00
+293.2429,457.4149,2.83924874e-06
+297.8975,458.8869,0.00000000e+00
+302.5521,460.3588,0.00000000e+00
+307.2068,461.8307,0.00000000e+00
+311.8615,463.3027,0.00000000e+00
+316.5161,464.7746,3.66977304e-07
+321.1708,466.2465,1.23443999e-06
+325.8254,467.7184,1.38742939e-06
+330.4800,469.1904,0.00000000e+00
+335.1347,470.6623,2.16248054e-07
+339.7894,472.1342,0.00000000e+00
+344.4440,473.6062,6.68895211e-07
+349.0986,475.0781,0.00000000e+00
+353.7533,476.5500,1.92763287e-06
+358.4079,478.0219,0.00000000e+00
+363.0625,479.4939,9.21457968e-07
+367.7173,480.9658,2.54226450e-07
+372.3719,482.4377,0.00000000e+00
+377.0265,483.9097,2.67588416e-06
+381.6812,485.3816,0.00000000e+00
+386.3358,486.8535,2.77160916e-06
+390.9904,488.3254,0.00000000e+00
+395.6452,489.7974,3.22739567e-07
+400.2998,491.2693,0.00000000e+00
+404.9544,492.7412,0.00000000e+00
+409.6091,494.2132,2.47826023e-07
+414.2637,495.6851,0.00000000e+00
+418.9183,497.1570,0.00000000e+00
+423.5730,498.6290,0.00000000e+00
+428.2277,500.1009,0.00000000e+00
+432.8823,501.5728,0.00000000e+00
+437.5369,503.0447,3.35796153e-06
+442.1916,504.5167,0.00000000e+00
+446.8462,505.9886,6.99503175e-08
+451.5009,507.4605,6.36464677e-07
+456.1556,508.9325,0.00000000e+00
+460.8102,510.4044,5.69213967e-07
+465.4648,511.8763,0.00000000e+00
+470.1196,513.3483,0.00000000e+00
+474.7742,514.8202,0.00000000e+00
+479.4288,516.2921,0.00000000e+00
+484.0835,517.7640,1.00360160e-06
+488.7381,519.2360,0.00000000e+00
+493.3927,520.7079,0.00000000e+00
+498.0473,522.1798,0.00000000e+00
+502.7020,523.6517,1.57705529e-06
+507.3566,525.1237,0.00000000e+00
+512.0112,526.5956,5.61296986e-07
+516.6659,528.0675,6.17589308e-07
+521.3207,529.5395,4.29461863e-07
+525.9753,531.0114,0.00000000e+00
+530.6300,532.4833,0.00000000e+00
+535.2846,533.9553,0.00000000e+00
+539.9392,535.4272,1.51976883e-06
+544.5939,536.8991,0.00000000e+00
+549.2485,538.3710,0.00000000e+00
+553.9031,539.8430,1.41738099e-06
+558.5578,541.3149,0.00000000e+00
+563.2124,542.7868,1.46181492e-07
+567.8670,544.2587,1.56886358e-07
+572.5218,545.7307,2.26823613e-06
+577.1765,547.2026,5.71210705e-07
+581.8311,548.6746,6.84043869e-07
+586.4857,550.1465,2.19516301e-06
+591.1404,551.6184,1.23298207e-06
+595.7950,553.0903,0.00000000e+00
+600.4496,554.5623,0.00000000e+00
+605.1043,556.0342,2.17290221e-06
+609.7589,557.5061,4.17108549e-06
+614.4135,558.9780,5.69698386e-08
+619.0682,560.4500,6.10168399e-07
+623.7228,561.9219,1.84363853e-06
+628.3776,563.3939,3.91975618e-06
+633.0323,564.8658,4.05446963e-06
+637.6869,566.3377,2.47890580e-06
+642.3415,567.8096,4.46343256e-06
+646.9961,569.2816,6.90199340e-06
+651.6508,570.7535,4.88989599e-06
+656.3054,572.2254,8.15181193e-06
+660.9600,573.6973,6.38416032e-06
+665.6147,575.1693,7.78853882e-06
+670.2693,576.6412,1.02239419e-05
+674.9239,578.1131,1.05014733e-05
+679.5786,579.5850,9.17474517e-06
+684.2334,581.0570,1.41727651e-05
+688.8880,582.5289,1.48432227e-05
+693.5427,584.0009,1.75616642e-05
+698.1973,585.4728,1.59928732e-05
+702.8519,586.9447,2.09654445e-05
+707.5066,588.4166,2.14207503e-05
+712.1612,589.8885,2.63443617e-05
+716.8158,591.3605,2.46095806e-05
+721.4704,592.8324,2.76426999e-05
+726.1251,594.3043,3.11787044e-05
+730.7797,595.7762,3.32365889e-05
+735.4343,597.2482,3.89820525e-05
+740.0892,598.7202,4.23676502e-05
+744.7438,600.1921,4.31627122e-05
+749.3984,601.6640,4.97116052e-05
+754.0531,603.1359,5.58294414e-05
+758.7077,604.6078,6.07610200e-05
+763.3623,606.0798,6.48119967e-05
+768.0170,607.5517,7.23363555e-05
+772.6716,609.0236,7.89049082e-05
+777.3262,610.4955,8.55130711e-05
+781.9809,611.9675,9.39618840e-05
+786.6355,613.4394,1.01032703e-04
+791.2901,614.9113,1.12358903e-04
+795.9449,616.3833,1.20211582e-04
+800.5996,617.8552,1.32759524e-04
+805.2542,619.3271,1.39145821e-04
+809.9088,620.7991,1.53906745e-04
+814.5635,622.2710,1.66980040e-04
+819.2181,623.7429,1.80644318e-04
+823.8727,625.2148,1.93588596e-04
+828.5274,626.6868,2.10737009e-04
+833.1820,628.1587,2.25490905e-04
+837.8366,629.6306,2.42092210e-04
+842.4913,631.1025,2.61127134e-04
+847.1461,632.5745,2.79394502e-04
+851.8007,634.0464,2.97757215e-04
+856.4554,635.5184,3.16888851e-04
+861.1100,636.9903,3.37481149e-04
+865.7646,638.4622,3.59582395e-04
+870.4192,639.9341,3.80516576e-04
+875.0739,641.4061,4.00755293e-04
+879.7285,642.8780,4.24581754e-04
+884.3831,644.3499,4.44400386e-04
+889.0378,645.8218,4.68277256e-04
+893.6924,647.2938,4.90302977e-04
+898.3470,648.7657,5.12073399e-04
+903.0019,650.2377,5.32345497e-04
+907.6565,651.7096,5.52151585e-04
+912.3111,653.1815,5.74525737e-04
+916.9658,654.6534,5.88773983e-04
+921.6204,656.1254,6.06814865e-04
+926.2750,657.5973,6.23278320e-04
+930.9297,659.0692,6.34953962e-04
+935.5843,660.5411,6.47175999e-04
+940.2389,662.0131,6.58404897e-04
+944.8936,663.4850,6.65269792e-04
+949.5482,664.9569,6.69723901e-04
+954.2028,666.4288,6.72672119e-04
+958.8576,667.9008,6.74169161e-04
+963.5123,669.3727,6.76423660e-04
+968.1669,670.8447,6.69164350e-04
+972.8215,672.3166,6.64190098e-04
+977.4762,673.7885,6.58528821e-04
+982.1308,675.2604,6.46136934e-04
+986.7854,676.7324,6.35506876e-04
+991.4401,678.2043,6.22769701e-04
+996.0947,679.6762,6.08945207e-04
+1000.7493,681.1481,5.92137163e-04
+1005.4040,682.6201,5.78351261e-04
+1010.0586,684.0920,5.58393251e-04
+1014.7134,685.5640,5.40232868e-04
+1019.3680,687.0359,5.20039641e-04
+1024.0227,688.5078,5.02622977e-04
+1028.6773,689.9797,4.78750007e-04
+1033.3319,691.4517,4.58303315e-04
+1037.9866,692.9236,4.39889322e-04
+1042.6412,694.3955,4.19000367e-04
+1047.2958,695.8674,4.00186051e-04
+1051.9505,697.3394,3.80546437e-04
+1056.6051,698.8113,3.61606944e-04
+1061.2597,700.2832,3.41674924e-04
+1065.9146,701.7552,3.24443827e-04
+1070.5692,703.2271,3.07679991e-04
+1075.2238,704.6990,2.88968557e-04
+1079.8785,706.1710,2.73986079e-04
+1084.5331,707.6429,2.59003195e-04
+1089.1877,709.1148,2.45845033e-04
+1093.8423,710.5867,2.30442776e-04
+1098.4970,712.0587,2.15405293e-04
+1103.1516,713.5306,2.02257652e-04
+1107.8062,715.0025,1.90997525e-04
+1112.4609,716.4744,1.79509079e-04
+1117.1155,717.9464,1.69491977e-04
+1121.7703,719.4183,1.55198795e-04
+1126.4250,720.8903,1.48815394e-04
+1131.0796,722.3622,1.38713644e-04
+1135.7342,723.8341,1.29425272e-04
+1140.3889,725.3060,1.19993500e-04
+1145.0435,726.7780,1.13118738e-04
+1149.6981,728.2499,1.06409840e-04
+1154.3528,729.7218,1.00640442e-04
+1159.0074,731.1937,9.44243511e-05
+1163.6620,732.6656,8.60904838e-05
+1168.3167,734.1376,8.31385332e-05
+1172.9713,735.6095,7.57060916e-05
+1177.6261,737.0815,7.20674652e-05
+1182.2807,738.5534,6.41017759e-05
+1186.9354,740.0253,6.20965366e-05
+1191.5900,741.4973,5.72270583e-05
+1196.2446,742.9692,5.41084482e-05
+1200.8993,744.4411,5.09444908e-05
+1205.5539,745.9130,4.84391057e-05
+1210.2085,747.3849,4.44509169e-05
+1214.8632,748.8569,4.02046571e-05
+1219.5178,750.3288,3.85118001e-05
+1224.1724,751.8007,3.44660621e-05
+1228.8271,753.2726,3.22819433e-05
+1233.4819,754.7446,3.46371598e-05
+1238.1365,756.2166,2.97012521e-05
+1242.7911,757.6885,2.92164805e-05
+1247.4458,759.1604,2.70463461e-05
+1252.1004,760.6323,2.57418396e-05
+1256.7550,762.1042,2.06787863e-05
+1261.4097,763.5762,2.24907581e-05
+1266.0643,765.0481,2.23102961e-05
+1270.7189,766.5200,2.07140183e-05
+1275.3736,767.9919,1.79749150e-05
+1280.0282,769.4639,1.80222596e-05
+1284.6830,770.9359,1.46813327e-05
+1289.3377,772.4078,1.65971196e-05
+1293.9923,773.8797,1.27852836e-05
+1298.6469,775.3516,1.06006328e-05
+1303.3016,776.8235,1.18820890e-05
+1307.9562,778.2955,9.93573394e-06
+1312.6108,779.7674,1.13342467e-05
+1317.2655,781.2393,1.00791249e-05
+1321.9201,782.7112,8.84106612e-06
+1326.5747,784.1832,8.94222831e-06
+1331.2293,785.6551,7.13128429e-06
+1335.8840,787.1270,1.02825852e-05
+1340.5388,788.5990,7.22901632e-06
+1345.1934,790.0709,8.23968730e-06
+1349.8481,791.5428,6.92952563e-06
+1354.5027,793.0148,3.78725281e-06
+1359.1573,794.4867,6.11278529e-06
+1363.8120,795.9586,5.21515676e-06
+1368.4666,797.4305,5.76129514e-06
+1373.1212,798.9025,3.83074121e-06
+1377.7759,800.3744,4.04151433e-06
+1382.4305,801.8463,4.32721117e-06
+1387.0851,803.3182,4.32702291e-06
+1391.7398,804.7902,3.31111050e-06
+1396.3946,806.2621,3.96039150e-06
+1401.0492,807.7341,2.98744749e-06
+1405.7038,809.2060,1.00260240e-06
+1410.3585,810.6779,4.03597096e-06
+1415.0131,812.1498,4.96378379e-06
+1419.6677,813.6218,3.24069924e-06
+1424.3224,815.0937,1.58993498e-06
+1428.9770,816.5656,2.32149159e-06
+1433.6316,818.0375,3.19445121e-06
+1438.2863,819.5095,2.56222575e-06
+1442.9409,820.9814,2.44798980e-06
+1447.5955,822.4533,2.94749043e-06
+1452.2504,823.9253,3.49207471e-06
+1456.9050,825.3972,0.00000000e+00
+1461.5596,826.8691,8.12392045e-07
+1466.2143,828.3411,1.24891767e-06
+1470.8689,829.8130,3.57066710e-06
+1475.5235,831.2849,3.38277050e-06
+1480.1781,832.7568,2.93827293e-06
+1484.8328,834.2288,3.89927322e-07
+1489.4874,835.7007,1.65969925e-06
+1494.1420,837.1726,4.67498637e-07
+1498.7967,838.6445,1.05637025e-06
+1503.4513,840.1165,0.00000000e+00
+1508.1061,841.5884,2.90137905e-06
+1512.7608,843.0604,4.74107679e-07
+1517.4154,844.5323,0.00000000e+00
+1522.0700,846.0042,1.87079797e-06
+1526.7247,847.4761,2.19576714e-06
+1531.3793,848.9481,0.00000000e+00
+1536.0339,850.4200,2.42853184e-06
+1540.6886,851.8919,0.00000000e+00
+1545.3432,853.3638,0.00000000e+00
+1549.9978,854.8358,1.00687009e-06
+1554.6524,856.3077,0.00000000e+00
+1559.3073,857.7797,1.74534443e-06
+1563.9619,859.2516,1.57320670e-07
+1568.6165,860.7235,5.10174573e-07
+1573.2712,862.1954,0.00000000e+00
+1577.9258,863.6674,0.00000000e+00
+1582.5804,865.1393,1.71496583e-06
+1587.2351,866.6112,1.73367550e-06
+1591.8897,868.0831,0.00000000e+00
+1596.5443,869.5551,1.70493104e-06
+1601.1990,871.0270,5.69300141e-07
+1605.8536,872.4989,0.00000000e+00
+1610.5082,873.9708,5.03323463e-07
+1615.1630,875.4428,2.97667430e-06
+1619.8177,876.9147,2.19016624e-06
+1624.4723,878.3867,0.00000000e+00
+1629.1269,879.8586,0.00000000e+00
+1633.7816,881.3305,2.40493250e-07
+1638.4362,882.8024,3.08941765e-07
+1643.0908,884.2744,1.20475534e-07
+1647.7455,885.7463,1.83218049e-06
+1652.4001,887.2182,1.25514111e-06
+1657.0547,888.6901,0.00000000e+00
+1661.7094,890.1620,0.00000000e+00
+1666.3640,891.6340,1.32344951e-06
+1671.0188,893.1060,1.09941425e-06
+1675.6735,894.5779,0.00000000e+00
+1680.3281,896.0498,0.00000000e+00
+1684.9827,897.5217,1.30405090e-06
+1689.6374,898.9937,0.00000000e+00
+1694.2920,900.4656,8.20341199e-07
+1698.9466,901.9375,6.76034460e-07
+1703.6012,903.4094,1.14209706e-06
+1708.2559,904.8813,0.00000000e+00
+1712.9105,906.3533,4.69038568e-08
+1717.5651,907.8252,1.50155165e-06
+1722.2198,909.2971,1.07244853e-06
+1726.8746,910.7691,1.66969483e-06
+1731.5292,912.2410,0.00000000e+00
+1736.1839,913.7130,4.16656718e-07
+1740.8385,915.1849,1.64964524e-06
+1745.4931,916.6568,0.00000000e+00
+1750.1478,918.1287,0.00000000e+00
+1754.8024,919.6006,0.00000000e+00
+1759.4570,921.0726,0.00000000e+00
+1764.1117,922.5445,3.28555444e-07
+1768.7663,924.0164,0.00000000e+00
+1773.4209,925.4883,1.48115433e-07
+1778.0757,926.9603,0.00000000e+00
+1782.7304,928.4323,0.00000000e+00
+1787.3850,929.9042,0.00000000e+00
+1792.0396,931.3761,7.42559578e-08
+1796.6943,932.8480,0.00000000e+00
+1801.3489,934.3199,0.00000000e+00
+1806.0035,935.7919,6.81439644e-07
+1810.6582,937.2638,0.00000000e+00
+1815.3128,938.7357,0.00000000e+00
+1819.9674,940.2076,3.37933898e-07
+1824.6221,941.6796,1.13794817e-06
+1829.2767,943.1515,0.00000000e+00
+1833.9315,944.6235,1.99732199e-06
+1838.5862,946.0954,6.94329174e-07
+1843.2408,947.5673,0.00000000e+00
+1847.8954,949.0392,0.00000000e+00
+1852.5500,950.5112,2.96800579e-07
+1857.2047,951.9831,9.28911845e-07
+1861.8593,953.4550,0.00000000e+00
+1866.5139,954.9269,0.00000000e+00
+1871.1686,956.3989,0.00000000e+00
+1875.8232,957.8708,2.39360520e-06
+1880.4778,959.3427,0.00000000e+00
+1885.1325,960.8146,2.12777181e-07
+1889.7873,962.2866,5.66630476e-09
+1894.4419,963.7585,2.21037817e-06
+1899.0966,965.2305,1.56857737e-07
+1903.7512,966.7024,0.00000000e+00
+1908.4058,968.1743,0.00000000e+00
+1913.0605,969.6462,0.00000000e+00
+1917.7151,971.1182,0.00000000e+00
+1922.3697,972.5901,2.48002323e-07
+1927.0243,974.0620,1.32779564e-06
+1931.6790,975.5339,0.00000000e+00
+1936.3336,977.0059,7.17568867e-07
+1940.9882,978.4778,9.28246948e-07
+1945.6431,979.9498,1.51058384e-06
+1950.2977,981.4217,0.00000000e+00
+1954.9523,982.8936,0.00000000e+00
+1959.6070,984.3655,0.00000000e+00
+1964.2616,985.8375,1.55433418e-06
+1968.9162,987.3094,0.00000000e+00
+1973.5709,988.7813,0.00000000e+00
+1978.2255,990.2532,4.08743381e-06
+1982.8801,991.7252,1.79198685e-06
+1987.5348,993.1971,4.28489045e-07
+1992.1894,994.6690,1.72660123e-06
+1996.8440,996.1409,0.00000000e+00
+2001.4988,997.6129,9.26248390e-07
+2006.1535,999.0848,0.00000000e+00
+2010.8081,1000.5568,0.00000000e+00
+2015.4627,1002.0287,1.84829207e-06
+2020.1174,1003.5006,3.10450991e-06
+2024.7720,1004.9725,0.00000000e+00
+2029.4266,1006.4445,6.80543678e-07
+2034.0813,1007.9164,7.51019343e-07
+2038.7359,1009.3883,0.00000000e+00
+2043.3905,1010.8602,0.00000000e+00
+2048.0452,1012.3322,0.00000000e+00
+2052.7000,1013.8041,1.52110624e-06
+2057.3546,1015.2761,1.62839160e-06
+2062.0093,1016.7480,2.54631141e-06
+2066.6639,1018.2199,1.93233859e-06
+2071.3185,1019.6918,0.00000000e+00
+2075.9731,1021.1638,0.00000000e+00
+2080.6278,1022.6357,2.19501499e-06
+2085.2826,1024.1077,1.51814379e-06
+2089.9372,1025.5796,8.92618857e-07
+2094.5919,1027.0515,7.92259357e-07
+2099.2465,1028.5234,0.00000000e+00
+2103.9011,1029.9954,0.00000000e+00
+2108.5558,1031.4673,0.00000000e+00
+2113.2104,1032.9392,0.00000000e+00
+2117.8650,1034.4111,0.00000000e+00
+2122.5197,1035.8831,0.00000000e+00
+2127.1743,1037.3550,1.55943303e-06
+2131.8289,1038.8269,0.00000000e+00
+2136.4836,1040.2988,0.00000000e+00
+2141.1382,1041.7708,1.35214600e-06
+2145.7928,1043.2427,0.00000000e+00
+2150.4475,1044.7146,0.00000000e+00
+2155.1021,1046.1865,0.00000000e+00
+2159.7567,1047.6584,0.00000000e+00
+2164.4113,1049.1304,1.88124076e-07
+2169.0660,1050.6023,0.00000000e+00
+2173.7206,1052.0742,9.86207851e-07
+2178.3752,1053.5461,1.33462834e-06
+2183.0299,1055.0181,6.13193606e-07
+2187.6845,1056.4900,0.00000000e+00
+2192.3395,1057.9620,2.93523271e-07
+2196.9942,1059.4340,0.00000000e+00
+2201.6488,1060.9059,0.00000000e+00
+2206.3034,1062.3778,0.00000000e+00
+2210.9581,1063.8497,2.01601688e-06
+2215.6127,1065.3217,1.29695206e-06
+2220.2673,1066.7936,1.59810884e-06
+2224.9219,1068.2655,0.00000000e+00
+2229.5766,1069.7374,2.38164353e-06
+2234.2312,1071.2094,8.26026280e-07
+2238.8858,1072.6813,4.00263190e-07
+2243.5405,1074.1532,3.36440877e-07
+2248.1951,1075.6251,0.00000000e+00
+2252.8497,1077.0970,0.00000000e+00
+2257.5044,1078.5690,0.00000000e+00
+2262.1590,1080.0409,0.00000000e+00
+2266.8136,1081.5128,0.00000000e+00
+2271.4683,1082.9847,1.13324688e-06
+2276.1229,1084.4567,0.00000000e+00
+2280.7775,1085.9286,1.64554808e-06
+2285.4322,1087.4005,0.00000000e+00
+2290.0868,1088.8724,7.62575951e-07
+2294.7414,1090.3444,0.00000000e+00
+2299.3964,1091.8164,6.46117712e-07
+2304.0511,1093.2883,1.52330870e-07
+2308.7057,1094.7603,1.76874437e-07
+2313.3603,1096.2322,1.56073304e-06
+2318.0150,1097.7041,2.66038228e-06
+2322.6696,1099.1760,0.00000000e+00
diff --git a/demo_data/tpd_SecondOrder_2.csv b/demo_data/tpd_SecondOrder_2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..3da931572ac4da7be7307fb39e9be51882a2ab6c
--- /dev/null
+++ b/demo_data/tpd_SecondOrder_2.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,0.00000000e+00
+0.5667,366.1553,0.00000000e+00
+1.1335,367.6273,0.00000000e+00
+1.7002,369.0992,0.00000000e+00
+2.2669,370.5711,1.52273424e-04
+2.8337,372.0431,5.05622529e-06
+3.4004,373.5150,8.23869595e-06
+3.9671,374.9869,4.83342046e-05
+4.5339,376.4588,8.74299876e-05
+5.1006,377.9308,1.00286452e-04
+5.6673,379.4027,2.57115389e-05
+6.2341,380.8746,4.63150755e-05
+6.8008,382.3466,0.00000000e+00
+7.3675,383.8185,0.00000000e+00
+7.9343,385.2904,0.00000000e+00
+8.5010,386.7624,8.14837040e-06
+9.0677,388.2343,3.85397834e-06
+9.6345,389.7062,2.73980295e-05
+10.2012,391.1781,0.00000000e+00
+10.7679,392.6501,1.34492191e-04
+11.3347,394.1220,0.00000000e+00
+11.9014,395.5939,0.00000000e+00
+12.4681,397.0659,0.00000000e+00
+13.0348,398.5378,0.00000000e+00
+13.6016,400.0097,6.86092026e-05
+14.1683,401.4816,1.72062777e-04
+14.7351,402.9536,0.00000000e+00
+15.3018,404.4255,4.00353056e-05
+15.8685,405.8974,6.17648257e-05
+16.4352,407.3694,0.00000000e+00
+17.0020,408.8413,0.00000000e+00
+17.5687,410.3132,0.00000000e+00
+18.1354,411.7852,0.00000000e+00
+18.7022,413.2571,0.00000000e+00
+19.2689,414.7290,8.51457371e-05
+19.8356,416.2009,1.23774924e-04
+20.4024,417.6729,3.08802228e-05
+20.9691,419.1448,0.00000000e+00
+21.5358,420.6167,6.58681092e-05
+22.1026,422.0887,0.00000000e+00
+22.6693,423.5606,0.00000000e+00
+23.2360,425.0325,8.89958101e-05
+23.8028,426.5044,1.31588211e-04
+24.3695,427.9763,0.00000000e+00
+24.9362,429.4483,0.00000000e+00
+25.5030,430.9202,1.90621340e-05
+26.0697,432.3922,0.00000000e+00
+26.6364,433.8641,0.00000000e+00
+27.2032,435.3360,1.07387976e-04
+27.7699,436.8079,6.45742402e-05
+28.3366,438.2799,0.00000000e+00
+28.9034,439.7518,3.39547187e-05
+29.4701,441.2237,0.00000000e+00
+30.0368,442.6956,0.00000000e+00
+30.6036,444.1676,8.39317945e-05
+31.1703,445.6395,0.00000000e+00
+31.7370,447.1115,2.14110205e-05
+32.3038,448.5834,0.00000000e+00
+32.8705,450.0553,6.17912447e-05
+33.4372,451.5272,5.45935145e-05
+34.0039,452.9991,6.02708024e-05
+34.5707,454.4711,1.64491154e-04
+35.1374,455.9430,2.93224693e-05
+35.7042,457.4149,1.30355314e-04
+36.2709,458.8869,1.87873848e-05
+36.8376,460.3588,1.04505481e-04
+37.4043,461.8307,1.33699548e-04
+37.9711,463.3027,0.00000000e+00
+38.5378,464.7746,0.00000000e+00
+39.1045,466.2465,0.00000000e+00
+39.6713,467.7184,2.01305505e-04
+40.2380,469.1904,2.59609096e-05
+40.8047,470.6623,4.55745794e-05
+41.3715,472.1342,7.41761323e-05
+41.9382,473.6062,0.00000000e+00
+42.5049,475.0781,2.18758996e-05
+43.0717,476.5500,0.00000000e+00
+43.6384,478.0219,3.14776044e-05
+44.2051,479.4939,0.00000000e+00
+44.7719,480.9658,1.72270429e-05
+45.3386,482.4377,0.00000000e+00
+45.9053,483.9097,0.00000000e+00
+46.4721,485.3816,0.00000000e+00
+47.0388,486.8535,4.48823375e-05
+47.6055,488.3254,0.00000000e+00
+48.1723,489.7974,0.00000000e+00
+48.7390,491.2693,2.25942986e-05
+49.3057,492.7412,0.00000000e+00
+49.8725,494.2132,1.20192119e-04
+50.4392,495.6851,0.00000000e+00
+51.0059,497.1570,5.85055059e-05
+51.5727,498.6290,4.66433048e-05
+52.1394,500.1009,1.82029471e-05
+52.7061,501.5728,0.00000000e+00
+53.2729,503.0447,1.15535666e-04
+53.8396,504.5167,2.26983448e-05
+54.4063,505.9886,0.00000000e+00
+54.9731,507.4605,1.12022877e-04
+55.5398,508.9325,0.00000000e+00
+56.1065,510.4044,2.53868257e-05
+56.6733,511.8763,0.00000000e+00
+57.2400,513.3483,7.14058478e-05
+57.8067,514.8202,0.00000000e+00
+58.3735,516.2921,2.12153100e-04
+58.9402,517.7640,0.00000000e+00
+59.5069,519.2360,0.00000000e+00
+60.0736,520.7079,1.08061096e-04
+60.6404,522.1798,0.00000000e+00
+61.2071,523.6517,1.02597602e-04
+61.7738,525.1237,0.00000000e+00
+62.3406,526.5956,0.00000000e+00
+62.9073,528.0675,0.00000000e+00
+63.4741,529.5395,0.00000000e+00
+64.0408,531.0114,2.37146796e-05
+64.6075,532.4833,1.29393724e-04
+65.1742,533.9553,0.00000000e+00
+65.7410,535.4272,0.00000000e+00
+66.3077,536.8991,5.34876817e-05
+66.8744,538.3710,1.00550038e-04
+67.4412,539.8430,0.00000000e+00
+68.0079,541.3149,0.00000000e+00
+68.5746,542.7868,1.53316927e-04
+69.1414,544.2587,1.62842742e-04
+69.7081,545.7307,0.00000000e+00
+70.2748,547.2026,0.00000000e+00
+70.8416,548.6746,2.96335529e-05
+71.4083,550.1465,1.30884291e-04
+71.9750,551.6184,1.18306452e-04
+72.5418,553.0903,9.05361230e-05
+73.1085,554.5623,2.57170068e-05
+73.6752,556.0342,7.39802817e-06
+74.2420,557.5061,6.46082408e-05
+74.8087,558.9780,0.00000000e+00
+75.3754,560.4500,1.00343139e-04
+75.9421,561.9219,3.86664105e-05
+76.5089,563.3939,0.00000000e+00
+77.0756,564.8658,0.00000000e+00
+77.6424,566.3377,2.21049340e-05
+78.2091,567.8096,0.00000000e+00
+78.7758,569.2816,7.42103075e-05
+79.3426,570.7535,6.93174952e-05
+79.9093,572.2254,3.27918970e-05
+80.4760,573.6973,6.91191817e-05
+81.0427,575.1693,0.00000000e+00
+81.6095,576.6412,3.30786097e-05
+82.1762,578.1131,1.43220735e-04
+82.7429,579.5850,0.00000000e+00
+83.3097,581.0570,0.00000000e+00
+83.8764,582.5289,4.21071127e-06
+84.4432,584.0009,5.55839324e-05
+85.0099,585.4728,6.84330007e-05
+85.5766,586.9447,0.00000000e+00
+86.1433,588.4166,1.05624938e-04
+86.7101,589.8885,2.41354246e-05
+87.2768,591.3605,1.55045618e-05
+87.8435,592.8324,7.33502311e-05
+88.4103,594.3043,0.00000000e+00
+88.9770,595.7762,9.63377242e-05
+89.5437,597.2482,2.74227968e-05
+90.1105,598.7202,3.01510863e-05
+90.6772,600.1921,2.80032546e-04
+91.2439,601.6640,2.41130238e-05
+91.8107,603.1359,2.20820933e-04
+92.3774,604.6078,3.84667292e-05
+92.9441,606.0798,1.70557556e-04
+93.5109,607.5517,2.89684744e-04
+94.0776,609.0236,9.66624793e-05
+94.6443,610.4955,4.26237966e-05
+95.2111,611.9675,1.08825770e-04
+95.7778,613.4394,2.22392919e-05
+96.3445,614.9113,1.58506853e-04
+96.9113,616.3833,2.21151349e-05
+97.4780,617.8552,1.20342927e-04
+98.0447,619.3271,2.18831454e-04
+98.6115,620.7991,4.77176291e-05
+99.1782,622.2710,6.32470910e-05
+99.7449,623.7429,1.54533162e-04
+100.3117,625.2148,1.85857687e-04
+100.8784,626.6868,2.84663227e-04
+101.4451,628.1587,1.98555208e-04
+102.0118,629.6306,1.72962697e-04
+102.5786,631.1025,4.50920430e-04
+103.1453,632.5745,4.06437961e-04
+103.7121,634.0464,3.74601455e-04
+104.2788,635.5184,3.61017184e-04
+104.8455,636.9903,5.50956524e-04
+105.4123,638.4622,5.38375287e-04
+105.9790,639.9341,5.57130377e-04
+106.5457,641.4061,4.88521997e-04
+107.1124,642.8780,4.27762861e-04
+107.6792,644.3499,5.18199056e-04
+108.2459,645.8218,5.69858821e-04
+108.8126,647.2938,8.10935104e-04
+109.3794,648.7657,7.98134075e-04
+109.9461,650.2377,9.54941614e-04
+110.5129,651.7096,1.11115258e-03
+111.0796,653.1815,9.14886361e-04
+111.6463,654.6534,1.07565254e-03
+112.2130,656.1254,1.11249788e-03
+112.7798,657.5973,1.30082935e-03
+113.3465,659.0692,1.31007668e-03
+113.9132,660.5411,1.48135715e-03
+114.4800,662.0131,1.45572377e-03
+115.0467,663.4850,1.51300873e-03
+115.6134,664.9569,1.74894172e-03
+116.1802,666.4288,1.90757366e-03
+116.7469,667.9008,1.94962847e-03
+117.3136,669.3727,2.18864810e-03
+117.8804,670.8447,2.30089319e-03
+118.4471,672.3166,2.29013688e-03
+119.0138,673.7885,2.54810625e-03
+119.5806,675.2604,2.50300253e-03
+120.1473,676.7324,2.60245614e-03
+120.7140,678.2043,2.82897847e-03
+121.2808,679.6762,3.03616701e-03
+121.8475,681.1481,3.19743273e-03
+122.4142,682.6201,3.31954751e-03
+122.9809,684.0920,3.43613955e-03
+123.5477,685.5640,3.67068010e-03
+124.1144,687.0359,3.75497737e-03
+124.6812,688.5078,4.02936991e-03
+125.2479,689.9797,4.16953769e-03
+125.8146,691.4517,3.90909472e-03
+126.3814,692.9236,4.29459382e-03
+126.9481,694.3955,4.44665551e-03
+127.5148,695.8674,4.59047593e-03
+128.0815,697.3394,4.48989961e-03
+128.6483,698.8113,4.83483216e-03
+129.2150,700.2832,4.73765284e-03
+129.7818,701.7552,4.89884568e-03
+130.3485,703.2271,4.93176794e-03
+130.9152,704.6990,4.95739654e-03
+131.4820,706.1710,4.94551798e-03
+132.0487,707.6429,4.86204540e-03
+132.6154,709.1148,4.96205408e-03
+133.1821,710.5867,4.95315576e-03
+133.7489,712.0587,4.74467501e-03
+134.3156,713.5306,4.97317454e-03
+134.8823,715.0025,4.79935063e-03
+135.4491,716.4744,4.67675086e-03
+136.0158,717.9464,4.65176255e-03
+136.5826,719.4183,4.57365485e-03
+137.1493,720.8903,4.51850984e-03
+137.7160,722.3622,4.42795409e-03
+138.2827,723.8341,4.33490705e-03
+138.8495,725.3060,4.11088066e-03
+139.4162,726.7780,3.98339378e-03
+139.9829,728.2499,3.86609533e-03
+140.5497,729.7218,3.87128629e-03
+141.1164,731.1937,3.63441696e-03
+141.6831,732.6656,3.48764076e-03
+142.2499,734.1376,3.43150878e-03
+142.8166,735.6095,3.39685730e-03
+143.3833,737.0815,3.12104030e-03
+143.9501,738.5534,3.04816384e-03
+144.5168,740.0253,3.01343692e-03
+145.0835,741.4973,2.72614625e-03
+145.6503,742.9692,2.52937200e-03
+146.2170,744.4411,2.54335417e-03
+146.7837,745.9130,2.46073212e-03
+147.3505,747.3849,2.25882488e-03
+147.9172,748.8569,2.13903235e-03
+148.4839,750.3288,2.04476644e-03
+149.0506,751.8007,1.90825970e-03
+149.6174,753.2726,1.78617204e-03
+150.1841,754.7446,1.76994083e-03
+150.7509,756.2166,1.63492898e-03
+151.3176,757.6885,1.66604226e-03
+151.8843,759.1604,1.47913944e-03
+152.4511,760.6323,1.43257505e-03
+153.0178,762.1042,1.20681606e-03
+153.5845,763.5762,1.40598032e-03
+154.1512,765.0481,1.15012215e-03
+154.7180,766.5200,1.20429497e-03
+155.2847,767.9919,9.64064908e-04
+155.8514,769.4639,9.98429954e-04
+156.4182,770.9359,9.69594344e-04
+156.9849,772.4078,1.00106443e-03
+157.5517,773.8797,8.53945909e-04
+158.1184,775.3516,9.01171705e-04
+158.6851,776.8235,8.82392225e-04
+159.2518,778.2955,8.01464834e-04
+159.8186,779.7674,6.78894750e-04
+160.3853,781.2393,6.13684941e-04
+160.9520,782.7112,5.43751928e-04
+161.5188,784.1832,5.12616301e-04
+162.0855,785.6551,5.31666155e-04
+162.6522,787.1270,5.27727359e-04
+163.2190,788.5990,4.10520035e-04
+163.7857,790.0709,5.15587220e-04
+164.3524,791.5428,5.18632703e-04
+164.9192,793.0148,4.78145346e-04
+165.4859,794.4867,3.82924511e-04
+166.0526,795.9586,3.01379769e-04
+166.6194,797.4305,2.79684900e-04
+167.1861,798.9025,3.50201473e-04
+167.7528,800.3744,5.14837157e-04
+168.3196,801.8463,3.61462095e-04
+168.8863,803.3182,9.72816633e-05
+169.4530,804.7902,2.24136937e-04
+170.0198,806.2621,1.85802623e-04
+170.5865,807.7341,1.57972652e-04
+171.1532,809.2060,2.57117528e-04
+171.7200,810.6779,2.93895078e-04
+172.2867,812.1498,8.57527848e-05
+172.8534,813.6218,1.73445718e-04
+173.4202,815.0937,1.97586050e-04
+173.9869,816.5656,3.46101297e-05
+174.5536,818.0375,1.94220134e-04
+175.1203,819.5095,1.85314610e-04
+175.6871,820.9814,2.18220361e-04
+176.2538,822.4533,8.68274146e-05
+176.8206,823.9253,4.25658509e-05
+177.3873,825.3972,2.64227492e-05
+177.9540,826.8691,5.33778184e-05
+178.5208,828.3411,6.97669457e-05
+179.0875,829.8130,3.93795199e-06
+179.6542,831.2849,2.34464664e-04
+180.2209,832.7568,1.30863395e-04
+180.7877,834.2288,1.77475944e-04
+181.3544,835.7007,0.00000000e+00
+181.9211,837.1726,1.42529985e-04
+182.4879,838.6445,4.42270903e-05
+183.0546,840.1165,1.13141330e-04
+183.6213,841.5884,0.00000000e+00
+184.1881,843.0604,0.00000000e+00
+184.7548,844.5323,3.91650574e-05
+185.3215,846.0042,0.00000000e+00
+185.8883,847.4761,2.21589609e-04
+186.4550,848.9481,0.00000000e+00
+187.0217,850.4200,3.18250604e-05
+187.5885,851.8919,8.13761726e-05
+188.1552,853.3638,7.16821523e-05
+188.7219,854.8358,8.25924508e-05
+189.2887,856.3077,7.43953424e-05
+189.8554,857.7797,3.34356191e-05
+190.4221,859.2516,1.28335494e-04
+190.9889,860.7235,7.55016372e-05
+191.5556,862.1954,3.51874187e-05
+192.1223,863.6674,1.54581474e-04
+192.6891,865.1393,1.12862681e-05
+193.2558,866.6112,8.70708209e-06
+193.8225,868.0831,2.05811048e-05
+194.3893,869.5551,5.17432127e-05
+194.9560,871.0270,1.88115082e-05
+195.5227,872.4989,0.00000000e+00
+196.0894,873.9708,6.94089467e-05
+196.6562,875.4428,2.13752210e-04
+197.2229,876.9147,0.00000000e+00
+197.7897,878.3867,1.47515777e-04
+198.3564,879.8586,0.00000000e+00
+198.9231,881.3305,5.15935280e-05
+199.4899,882.8024,0.00000000e+00
+200.0566,884.2744,3.75160125e-05
+200.6233,885.7463,2.46957097e-05
+201.1900,887.2182,4.78213296e-05
+201.7568,888.6901,0.00000000e+00
+202.3235,890.1620,0.00000000e+00
+202.8902,891.6340,8.37382759e-05
+203.4570,893.1060,9.13262738e-07
+204.0237,894.5779,7.88494617e-07
+204.5904,896.0498,1.14283044e-04
+205.1572,897.5217,0.00000000e+00
+205.7239,898.9937,8.05836462e-05
+206.2906,900.4656,1.35915005e-04
+206.8574,901.9375,0.00000000e+00
+207.4241,903.4094,0.00000000e+00
+207.9908,904.8813,0.00000000e+00
+208.5576,906.3533,2.36276523e-04
+209.1243,907.8252,9.71290137e-05
+209.6910,909.2971,0.00000000e+00
+210.2578,910.7691,0.00000000e+00
+210.8245,912.2410,2.08399710e-04
+211.3912,913.7130,8.19972192e-05
+211.9580,915.1849,0.00000000e+00
+212.5247,916.6568,3.36919220e-05
+213.0914,918.1287,3.87148903e-05
+213.6582,919.6006,0.00000000e+00
+214.2249,921.0726,1.22806057e-04
+214.7916,922.5445,6.68499342e-05
+215.3584,924.0164,0.00000000e+00
+215.9251,925.4883,1.12997288e-04
+216.4918,926.9603,0.00000000e+00
+217.0586,928.4323,0.00000000e+00
+217.6253,929.9042,9.23292828e-06
+218.1920,931.3761,5.40346409e-05
+218.7588,932.8480,0.00000000e+00
+219.3255,934.3199,1.54044519e-05
+219.8922,935.7919,0.00000000e+00
+220.4590,937.2638,0.00000000e+00
+221.0257,938.7357,1.88353064e-04
+221.5924,940.2076,0.00000000e+00
+222.1591,941.6796,5.30378747e-05
+222.7259,943.1515,0.00000000e+00
+223.2926,944.6235,1.17778268e-06
+223.8594,946.0954,7.07672662e-05
+224.4261,947.5673,1.62505719e-04
+224.9928,949.0392,0.00000000e+00
+225.5595,950.5112,1.27267311e-04
+226.1263,951.9831,1.07441789e-04
+226.6930,953.4550,0.00000000e+00
+227.2597,954.9269,1.05383275e-04
+227.8265,956.3989,0.00000000e+00
+228.3932,957.8708,0.00000000e+00
+228.9599,959.3427,7.08053194e-05
+229.5267,960.8146,0.00000000e+00
+230.0934,962.2866,0.00000000e+00
+230.6601,963.7585,0.00000000e+00
+231.2269,965.2305,0.00000000e+00
+231.7936,966.7024,0.00000000e+00
+232.3603,968.1743,0.00000000e+00
+232.9271,969.6462,0.00000000e+00
+233.4938,971.1182,0.00000000e+00
+234.0605,972.5901,1.11286427e-04
+234.6273,974.0620,0.00000000e+00
+235.1940,975.5339,3.94987546e-05
+235.7607,977.0059,0.00000000e+00
+236.3275,978.4778,0.00000000e+00
+236.8942,979.9498,0.00000000e+00
+237.4609,981.4217,6.37637422e-05
+238.0277,982.8936,1.81611191e-04
+238.5944,984.3655,1.41253595e-05
+239.1611,985.8375,4.19378484e-05
+239.7279,987.3094,4.21784862e-05
+240.2946,988.7813,1.32391055e-04
+240.8613,990.2532,0.00000000e+00
+241.4281,991.7252,0.00000000e+00
+241.9948,993.1971,5.34431965e-05
+242.5615,994.6690,2.39803776e-05
+243.1282,996.1409,0.00000000e+00
+243.6950,997.6129,0.00000000e+00
+244.2617,999.0848,3.81448649e-06
+244.8285,1000.5568,7.27891938e-06
+245.3952,1002.0287,0.00000000e+00
+245.9619,1003.5006,0.00000000e+00
+246.5286,1004.9725,4.03348458e-05
+247.0954,1006.4445,5.49165670e-05
+247.6621,1007.9164,0.00000000e+00
+248.2288,1009.3883,0.00000000e+00
+248.7956,1010.8602,0.00000000e+00
+249.3623,1012.3322,2.01302228e-05
+249.9291,1013.8041,1.62240940e-05
+250.4958,1015.2761,7.72446801e-05
+251.0625,1016.7480,0.00000000e+00
+251.6292,1018.2199,0.00000000e+00
+252.1960,1019.6918,0.00000000e+00
+252.7627,1021.1638,0.00000000e+00
+253.3294,1022.6357,0.00000000e+00
+253.8962,1024.1077,0.00000000e+00
+254.4629,1025.5796,1.82787826e-05
+255.0297,1027.0515,0.00000000e+00
+255.5964,1028.5234,0.00000000e+00
+256.1631,1029.9954,1.65172071e-06
+256.7298,1031.4673,6.17381520e-05
+257.2966,1032.9392,1.97185691e-05
+257.8633,1034.4111,0.00000000e+00
+258.4300,1035.8831,0.00000000e+00
+258.9968,1037.3550,0.00000000e+00
+259.5635,1038.8269,0.00000000e+00
+260.1302,1040.2988,1.17764312e-05
+260.6970,1041.7708,3.97615877e-05
+261.2637,1043.2427,7.12760084e-05
+261.8304,1044.7146,2.79478973e-05
+262.3972,1046.1865,0.00000000e+00
+262.9639,1047.6584,8.58047788e-05
+263.5306,1049.1304,2.83247355e-05
+264.0973,1050.6023,0.00000000e+00
+264.6641,1052.0742,3.32542986e-05
+265.2308,1053.5461,0.00000000e+00
+265.7975,1055.0181,0.00000000e+00
+266.3643,1056.4900,1.36201881e-04
+266.9310,1057.9620,7.88130201e-05
+267.4978,1059.4340,0.00000000e+00
+268.0645,1060.9059,0.00000000e+00
+268.6312,1062.3778,1.70146504e-05
+269.1980,1063.8497,0.00000000e+00
+269.7647,1065.3217,0.00000000e+00
+270.3314,1066.7936,1.30973949e-05
+270.8982,1068.2655,0.00000000e+00
+271.4649,1069.7374,0.00000000e+00
+272.0316,1071.2094,3.79199155e-05
+272.5983,1072.6813,2.33063565e-05
+273.1651,1074.1532,0.00000000e+00
+273.7318,1075.6251,0.00000000e+00
+274.2985,1077.0970,8.58294079e-05
+274.8653,1078.5690,0.00000000e+00
+275.4320,1080.0409,4.45264595e-06
+275.9987,1081.5128,7.08989148e-07
+276.5655,1082.9847,0.00000000e+00
+277.1322,1084.4567,0.00000000e+00
+277.6989,1085.9286,0.00000000e+00
+278.2657,1087.4005,0.00000000e+00
+278.8324,1088.8724,9.58675059e-07
+279.3991,1090.3444,0.00000000e+00
+279.9659,1091.8164,0.00000000e+00
+280.5326,1093.2883,0.00000000e+00
+281.0994,1094.7603,8.01668939e-05
+281.6661,1096.2322,0.00000000e+00
+282.2328,1097.7041,4.97492729e-05
+282.7995,1099.1760,0.00000000e+00
diff --git a/demo_data/tpd_SecondOrder_3.csv b/demo_data/tpd_SecondOrder_3.csv
new file mode 100644
index 0000000000000000000000000000000000000000..c4ce1fce8e4a69e3695170ffdb9364719ca787f4
--- /dev/null
+++ b/demo_data/tpd_SecondOrder_3.csv
@@ -0,0 +1,501 @@
+Time (s),Temperature (K),Signal
+0.0000,364.6834,0.00000000e+00
+0.0665,366.1553,0.00000000e+00
+0.1330,367.6273,0.00000000e+00
+0.1996,369.0992,1.12575923e-04
+0.2661,370.5711,0.00000000e+00
+0.3326,372.0431,4.64592275e-04
+0.3991,373.5150,0.00000000e+00
+0.4656,374.9869,0.00000000e+00
+0.5322,376.4588,0.00000000e+00
+0.5987,377.9308,1.30100307e-04
+0.6652,379.4027,2.44296214e-04
+0.7317,380.8746,7.08594380e-05
+0.7982,382.3466,0.00000000e+00
+0.8648,383.8185,0.00000000e+00
+0.9313,385.2904,0.00000000e+00
+0.9978,386.7624,0.00000000e+00
+1.0643,388.2343,3.36439407e-05
+1.1308,389.7062,2.36478838e-04
+1.1974,391.1781,0.00000000e+00
+1.2639,392.6501,0.00000000e+00
+1.3304,394.1220,0.00000000e+00
+1.3969,395.5939,4.28064377e-05
+1.4634,397.0659,0.00000000e+00
+1.5300,398.5378,1.59902193e-04
+1.5965,400.0097,0.00000000e+00
+1.6630,401.4816,0.00000000e+00
+1.7295,402.9536,0.00000000e+00
+1.7960,404.4255,3.36266152e-04
+1.8626,405.8974,0.00000000e+00
+1.9291,407.3694,6.72962808e-04
+1.9956,408.8413,0.00000000e+00
+2.0621,410.3132,2.94293150e-05
+2.1286,411.7852,1.18270647e-04
+2.1952,413.2571,0.00000000e+00
+2.2617,414.7290,3.40640137e-04
+2.3282,416.2009,1.93638320e-04
+2.3947,417.6729,0.00000000e+00
+2.4612,419.1448,5.12662169e-04
+2.5278,420.6167,0.00000000e+00
+2.5943,422.0887,4.22028068e-04
+2.6608,423.5606,0.00000000e+00
+2.7273,425.0325,0.00000000e+00
+2.7938,426.5044,0.00000000e+00
+2.8604,427.9763,2.66535208e-04
+2.9269,429.4483,5.02459356e-04
+2.9934,430.9202,0.00000000e+00
+3.0599,432.3922,3.52640382e-05
+3.1264,433.8641,0.00000000e+00
+3.1930,435.3360,1.21629942e-04
+3.2595,436.8079,0.00000000e+00
+3.3260,438.2799,5.22336231e-05
+3.3925,439.7518,8.14074010e-05
+3.4590,441.2237,2.60264234e-04
+3.5256,442.6956,0.00000000e+00
+3.5921,444.1676,1.53175410e-04
+3.6586,445.6395,0.00000000e+00
+3.7251,447.1115,0.00000000e+00
+3.7916,448.5834,0.00000000e+00
+3.8582,450.0553,0.00000000e+00
+3.9247,451.5272,5.72508026e-04
+3.9912,452.9991,0.00000000e+00
+4.0577,454.4711,1.83491716e-06
+4.1242,455.9430,2.22195114e-04
+4.1908,457.4149,0.00000000e+00
+4.2573,458.8869,0.00000000e+00
+4.3238,460.3588,0.00000000e+00
+4.3903,461.8307,2.54820305e-04
+4.4568,463.3027,0.00000000e+00
+4.5234,464.7746,1.99912483e-05
+4.5899,466.2465,0.00000000e+00
+4.6564,467.7184,1.92106541e-04
+4.7229,469.1904,5.66027920e-05
+4.7894,470.6623,0.00000000e+00
+4.8560,472.1342,0.00000000e+00
+4.9225,473.6062,9.12044707e-05
+4.9890,475.0781,2.36791995e-04
+5.0555,476.5500,5.64115180e-05
+5.1220,478.0219,1.46013903e-04
+5.1886,479.4939,0.00000000e+00
+5.2551,480.9658,0.00000000e+00
+5.3216,482.4377,3.75430740e-04
+5.3881,483.9097,2.98417173e-04
+5.4546,485.3816,0.00000000e+00
+5.5212,486.8535,0.00000000e+00
+5.5877,488.3254,0.00000000e+00
+5.6542,489.7974,6.14654200e-05
+5.7207,491.2693,3.60723236e-04
+5.7872,492.7412,0.00000000e+00
+5.8538,494.2132,0.00000000e+00
+5.9203,495.6851,0.00000000e+00
+5.9868,497.1570,0.00000000e+00
+6.0533,498.6290,1.43190031e-04
+6.1198,500.1009,0.00000000e+00
+6.1864,501.5728,0.00000000e+00
+6.2529,503.0447,0.00000000e+00
+6.3194,504.5167,1.05135630e-04
+6.3859,505.9886,0.00000000e+00
+6.4524,507.4605,0.00000000e+00
+6.5190,508.9325,0.00000000e+00
+6.5855,510.4044,0.00000000e+00
+6.6520,511.8763,0.00000000e+00
+6.7185,513.3483,0.00000000e+00
+6.7850,514.8202,7.48766237e-04
+6.8516,516.2921,2.20173770e-05
+6.9181,517.7640,0.00000000e+00
+6.9846,519.2360,3.33212287e-04
+7.0511,520.7079,0.00000000e+00
+7.1176,522.1798,0.00000000e+00
+7.1842,523.6517,1.91793457e-04
+7.2507,525.1237,2.38883818e-04
+7.3172,526.5956,0.00000000e+00
+7.3837,528.0675,1.06577674e-04
+7.4502,529.5395,0.00000000e+00
+7.5168,531.0114,0.00000000e+00
+7.5833,532.4833,1.64006211e-04
+7.6498,533.9553,0.00000000e+00
+7.7163,535.4272,0.00000000e+00
+7.7828,536.8991,0.00000000e+00
+7.8494,538.3710,2.48480064e-04
+7.9159,539.8430,0.00000000e+00
+7.9824,541.3149,0.00000000e+00
+8.0489,542.7868,3.80552228e-04
+8.1154,544.2587,1.15700113e-05
+8.1820,545.7307,0.00000000e+00
+8.2485,547.2026,0.00000000e+00
+8.3150,548.6746,2.28511453e-05
+8.3815,550.1465,0.00000000e+00
+8.4480,551.6184,1.98954440e-05
+8.5146,553.0903,3.50242713e-04
+8.5811,554.5623,0.00000000e+00
+8.6476,556.0342,6.70051450e-05
+8.7141,557.5061,1.67187391e-04
+8.7806,558.9780,2.32539212e-04
+8.8472,560.4500,0.00000000e+00
+8.9137,561.9219,2.14915359e-04
+8.9802,563.3939,6.01948414e-05
+9.0467,564.8658,0.00000000e+00
+9.1132,566.3377,0.00000000e+00
+9.1798,567.8096,0.00000000e+00
+9.2463,569.2816,0.00000000e+00
+9.3128,570.7535,3.67249828e-04
+9.3793,572.2254,2.59736436e-04
+9.4458,573.6973,2.39664980e-04
+9.5124,575.1693,0.00000000e+00
+9.5789,576.6412,9.20716557e-05
+9.6454,578.1131,2.29094476e-05
+9.7119,579.5850,0.00000000e+00
+9.7785,581.0570,0.00000000e+00
+9.8450,582.5289,1.50662061e-04
+9.9115,584.0009,0.00000000e+00
+9.9780,585.4728,0.00000000e+00
+10.0445,586.9447,0.00000000e+00
+10.1110,588.4166,1.98500726e-04
+10.1776,589.8885,0.00000000e+00
+10.2441,591.3605,5.07259625e-04
+10.3106,592.8324,5.74680598e-05
+10.3771,594.3043,0.00000000e+00
+10.4436,595.7762,4.21595541e-06
+10.5102,597.2482,1.21039702e-04
+10.5767,598.7202,1.11630216e-05
+10.6432,600.1921,3.03375477e-04
+10.7097,601.6640,0.00000000e+00
+10.7763,603.1359,0.00000000e+00
+10.8428,604.6078,4.46242426e-04
+10.9093,606.0798,0.00000000e+00
+10.9758,607.5517,7.37062655e-05
+11.0423,609.0236,0.00000000e+00
+11.1088,610.4955,0.00000000e+00
+11.1754,611.9675,2.58459535e-04
+11.2419,613.4394,0.00000000e+00
+11.3084,614.9113,3.85057137e-05
+11.3749,616.3833,5.86098467e-05
+11.4415,617.8552,0.00000000e+00
+11.5080,619.3271,1.07819207e-04
+11.5745,620.7991,3.88059358e-04
+11.6410,622.2710,3.79079604e-04
+11.7075,623.7429,6.94184797e-04
+11.7741,625.2148,0.00000000e+00
+11.8406,626.6868,2.23313793e-04
+11.9071,628.1587,7.19352975e-04
+11.9736,629.6306,5.16955683e-04
+12.0401,631.1025,5.68227377e-04
+12.1067,632.5745,4.68731771e-04
+12.1732,634.0464,4.44885110e-04
+12.2397,635.5184,3.83142557e-04
+12.3062,636.9903,4.61025978e-04
+12.3727,638.4622,0.00000000e+00
+12.4393,639.9341,5.80471766e-04
+12.5058,641.4061,4.90943261e-04
+12.5723,642.8780,5.38798806e-04
+12.6388,644.3499,1.02540734e-03
+12.7053,645.8218,4.67387028e-04
+12.7719,647.2938,5.86986775e-04
+12.8384,648.7657,8.68532807e-04
+12.9049,650.2377,7.72555999e-04
+12.9714,651.7096,8.96417885e-04
+13.0379,653.1815,9.26901819e-04
+13.1045,654.6534,1.16033852e-03
+13.1710,656.1254,1.30663218e-03
+13.2375,657.5973,1.47256488e-03
+13.3040,659.0692,1.82973896e-03
+13.3705,660.5411,2.06962740e-03
+13.4371,662.0131,1.87307689e-03
+13.5036,663.4850,1.89883320e-03
+13.5701,664.9569,1.91728806e-03
+13.6366,666.4288,2.34811800e-03
+13.7031,667.9008,2.67721154e-03
+13.7697,669.3727,2.50622118e-03
+13.8362,670.8447,2.42327363e-03
+13.9027,672.3166,3.24647035e-03
+13.9692,673.7885,3.14699416e-03
+14.0357,675.2604,3.74737196e-03
+14.1023,676.7324,3.63919791e-03
+14.1688,678.2043,3.73049825e-03
+14.2353,679.6762,4.14202875e-03
+14.3018,681.1481,4.21841443e-03
+14.3683,682.6201,4.68112109e-03
+14.4349,684.0920,5.22375386e-03
+14.5014,685.5640,5.61640365e-03
+14.5679,687.0359,5.94600616e-03
+14.6344,688.5078,6.71423879e-03
+14.7009,689.9797,7.16324849e-03
+14.7675,691.4517,7.29691144e-03
+14.8340,692.9236,7.24929618e-03
+14.9005,694.3955,8.25194735e-03
+14.9670,695.8674,9.31731984e-03
+15.0335,697.3394,9.47912503e-03
+15.1001,698.8113,1.01697175e-02
+15.1666,700.2832,1.06846532e-02
+15.2331,701.7552,1.17940418e-02
+15.2996,703.2271,1.21284705e-02
+15.3661,704.6990,1.30558079e-02
+15.4327,706.1710,1.35290492e-02
+15.4992,707.6429,1.43872397e-02
+15.5657,709.1148,1.53581426e-02
+15.6322,710.5867,1.56103037e-02
+15.6987,712.0587,1.65057033e-02
+15.7653,713.5306,1.75833683e-02
+15.8318,715.0025,1.84535440e-02
+15.8983,716.4744,1.94632988e-02
+15.9648,717.9464,2.01346818e-02
+16.0313,719.4183,2.14817356e-02
+16.0979,720.8903,2.26486064e-02
+16.1644,722.3622,2.33603995e-02
+16.2309,723.8341,2.37699486e-02
+16.2974,725.3060,2.51244642e-02
+16.3639,726.7780,2.66127605e-02
+16.4305,728.2499,2.69134976e-02
+16.4970,729.7218,2.79196873e-02
+16.5635,731.1937,2.88242120e-02
+16.6300,732.6656,3.00770830e-02
+16.6965,734.1376,3.10430676e-02
+16.7631,735.6095,3.14530320e-02
+16.8296,737.0815,3.30767035e-02
+16.8961,738.5534,3.31026576e-02
+16.9626,740.0253,3.42034511e-02
+17.0291,741.4973,3.46552730e-02
+17.0957,742.9692,3.52664851e-02
+17.1622,744.4411,3.52474228e-02
+17.2287,745.9130,3.57102416e-02
+17.2952,747.3849,3.68668362e-02
+17.3617,748.8569,3.63190770e-02
+17.4283,750.3288,3.71927805e-02
+17.4948,751.8007,3.72672528e-02
+17.5613,753.2726,3.69073451e-02
+17.6278,754.7446,3.75129841e-02
+17.6943,756.2166,3.70598882e-02
+17.7609,757.6885,3.71965580e-02
+17.8274,759.1604,3.67868207e-02
+17.8939,760.6323,3.66202369e-02
+17.9604,762.1042,3.64210904e-02
+18.0269,763.5762,3.59844118e-02
+18.0935,765.0481,3.49917561e-02
+18.1600,766.5200,3.49343866e-02
+18.2265,767.9919,3.43486741e-02
+18.2930,769.4639,3.31237391e-02
+18.3595,770.9359,3.29865180e-02
+18.4261,772.4078,3.18266153e-02
+18.4926,773.8797,3.10957208e-02
+18.5591,775.3516,3.05854436e-02
+18.6256,776.8235,2.92668026e-02
+18.6921,778.2955,2.90247854e-02
+18.7587,779.7674,2.78299768e-02
+18.8252,781.2393,2.70859413e-02
+18.8917,782.7112,2.65718941e-02
+18.9582,784.1832,2.48862021e-02
+19.0247,785.6551,2.46936865e-02
+19.0913,787.1270,2.36014780e-02
+19.1578,788.5990,2.30772886e-02
+19.2243,790.0709,2.19341982e-02
+19.2908,791.5428,2.06655413e-02
+19.3573,793.0148,2.03750860e-02
+19.4239,794.4867,1.96616892e-02
+19.4904,795.9586,1.85217503e-02
+19.5569,797.4305,1.76995583e-02
+19.6234,798.9025,1.75487194e-02
+19.6899,800.3744,1.64271910e-02
+19.7565,801.8463,1.57754477e-02
+19.8230,803.3182,1.45822000e-02
+19.8895,804.7902,1.40391830e-02
+19.9560,806.2621,1.35778608e-02
+20.0225,807.7341,1.29571063e-02
+20.0891,809.2060,1.23384399e-02
+20.1556,810.6779,1.18533215e-02
+20.2221,812.1498,1.07452823e-02
+20.2886,813.6218,1.04245422e-02
+20.3551,815.0937,9.65550449e-03
+20.4217,816.5656,1.03076342e-02
+20.4882,818.0375,9.25212260e-03
+20.5547,819.5095,8.78910907e-03
+20.6212,820.9814,8.43255315e-03
+20.6877,822.4533,7.92022049e-03
+20.7543,823.9253,7.66837923e-03
+20.8208,825.3972,7.13467970e-03
+20.8873,826.8691,7.06377160e-03
+20.9538,828.3411,6.50512241e-03
+21.0203,829.8130,6.13571843e-03
+21.0869,831.2849,6.12064358e-03
+21.1534,832.7568,5.86167676e-03
+21.2199,834.2288,5.46603650e-03
+21.2864,835.7007,5.16049098e-03
+21.3529,837.1726,4.66348697e-03
+21.4195,838.6445,4.62816237e-03
+21.4860,840.1165,4.18404071e-03
+21.5525,841.5884,4.41879220e-03
+21.6190,843.0604,3.93608306e-03
+21.6855,844.5323,3.66126443e-03
+21.7521,846.0042,3.79605871e-03
+21.8186,847.4761,3.64313833e-03
+21.8851,848.9481,3.18407477e-03
+21.9516,850.4200,3.30949482e-03
+22.0181,851.8919,3.22907371e-03
+22.0847,853.3638,2.25418597e-03
+22.1512,854.8358,2.11355207e-03
+22.2177,856.3077,2.58749654e-03
+22.2842,857.7797,2.34233122e-03
+22.3507,859.2516,2.21430254e-03
+22.4173,860.7235,1.96165103e-03
+22.4838,862.1954,2.38777883e-03
+22.5503,863.6674,2.33355910e-03
+22.6168,865.1393,1.75320858e-03
+22.6833,866.6112,1.33575022e-03
+22.7499,868.0831,2.16857460e-03
+22.8164,869.5551,1.82540575e-03
+22.8829,871.0270,1.41031446e-03
+22.9494,872.4989,1.22755836e-03
+23.0159,873.9708,1.32904109e-03
+23.0825,875.4428,1.54762180e-03
+23.1490,876.9147,1.09634514e-03
+23.2155,878.3867,1.10429246e-03
+23.2820,879.8586,1.33234262e-03
+23.3485,881.3305,1.07083190e-03
+23.4151,882.8024,9.87376668e-04
+23.4816,884.2744,2.57725944e-04
+23.5481,885.7463,1.02900341e-03
+23.6146,887.2182,9.61780373e-04
+23.6811,888.6901,7.63994060e-04
+23.7477,890.1620,4.86199395e-04
+23.8142,891.6340,1.03127665e-03
+23.8807,893.1060,3.85325984e-04
+23.9472,894.5779,1.04485510e-03
+24.0137,896.0498,6.33954711e-04
+24.0803,897.5217,7.55049870e-04
+24.1468,898.9937,7.69913429e-04
+24.2133,900.4656,5.41415415e-04
+24.2798,901.9375,2.24205753e-04
+24.3463,903.4094,1.10700494e-03
+24.4129,904.8813,6.11695461e-04
+24.4794,906.3533,3.63004685e-04
+24.5459,907.8252,5.41633694e-04
+24.6124,909.2971,7.83135998e-04
+24.6789,910.7691,0.00000000e+00
+24.7455,912.2410,3.01393797e-04
+24.8120,913.7130,4.01485217e-04
+24.8785,915.1849,6.61559578e-04
+24.9450,916.6568,5.77987696e-04
+25.0115,918.1287,1.86794146e-04
+25.0781,919.6006,2.17406836e-04
+25.1446,921.0726,4.43930505e-04
+25.2111,922.5445,3.23573884e-04
+25.2776,924.0164,3.58813850e-04
+25.3441,925.4883,1.96127279e-04
+25.4107,926.9603,8.52640951e-05
+25.4772,928.4323,4.01895930e-04
+25.5437,929.9042,5.56353829e-04
+25.6102,931.3761,2.97863735e-04
+25.6767,932.8480,0.00000000e+00
+25.7433,934.3199,1.22373633e-04
+25.8098,935.7919,0.00000000e+00
+25.8763,937.2638,2.83528701e-04
+25.9428,938.7357,1.23899372e-05
+26.0093,940.2076,1.25511258e-04
+26.0759,941.6796,1.43218640e-04
+26.1424,943.1515,0.00000000e+00
+26.2089,944.6235,0.00000000e+00
+26.2754,946.0954,2.39961053e-04
+26.3419,947.5673,1.58417271e-04
+26.4085,949.0392,3.84027153e-05
+26.4750,950.5112,0.00000000e+00
+26.5415,951.9831,0.00000000e+00
+26.6080,953.4550,1.82179792e-05
+26.6745,954.9269,0.00000000e+00
+26.7411,956.3989,1.93343032e-04
+26.8076,957.8708,6.43211999e-04
+26.8741,959.3427,5.83498098e-04
+26.9406,960.8146,2.86624883e-04
+27.0071,962.2866,3.67393252e-04
+27.0737,963.7585,0.00000000e+00
+27.1402,965.2305,2.21356386e-04
+27.2067,966.7024,2.19725276e-04
+27.2732,968.1743,0.00000000e+00
+27.3397,969.6462,4.06034378e-04
+27.4063,971.1182,0.00000000e+00
+27.4728,972.5901,8.22236616e-05
+27.5393,974.0620,2.78726307e-04
+27.6058,975.5339,3.53296607e-04
+27.6723,977.0059,0.00000000e+00
+27.7389,978.4778,8.97816280e-05
+27.8054,979.9498,1.77501133e-04
+27.8719,981.4217,4.55956120e-04
+27.9384,982.8936,2.31564918e-04
+28.0049,984.3655,4.95710265e-05
+28.0715,985.8375,2.73015292e-04
+28.1380,987.3094,4.84546763e-05
+28.2045,988.7813,0.00000000e+00
+28.2710,990.2532,1.18432246e-04
+28.3375,991.7252,0.00000000e+00
+28.4041,993.1971,0.00000000e+00
+28.4706,994.6690,2.16157816e-04
+28.5371,996.1409,0.00000000e+00
+28.6036,997.6129,1.43482786e-04
+28.6701,999.0848,0.00000000e+00
+28.7367,1000.5568,0.00000000e+00
+28.8032,1002.0287,0.00000000e+00
+28.8697,1003.5006,0.00000000e+00
+28.9362,1004.9725,0.00000000e+00
+29.0027,1006.4445,0.00000000e+00
+29.0693,1007.9164,0.00000000e+00
+29.1358,1009.3883,1.97386922e-04
+29.2023,1010.8602,0.00000000e+00
+29.2688,1012.3322,0.00000000e+00
+29.3353,1013.8041,3.47294816e-04
+29.4019,1015.2761,5.49200849e-05
+29.4684,1016.7480,0.00000000e+00
+29.5349,1018.2199,2.23423471e-04
+29.6014,1019.6918,0.00000000e+00
+29.6679,1021.1638,0.00000000e+00
+29.7345,1022.6357,0.00000000e+00
+29.8010,1024.1077,0.00000000e+00
+29.8675,1025.5796,6.09120063e-04
+29.9340,1027.0515,0.00000000e+00
+30.0005,1028.5234,2.44724477e-04
+30.0671,1029.9954,0.00000000e+00
+30.1336,1031.4673,2.53724604e-04
+30.2001,1032.9392,0.00000000e+00
+30.2666,1034.4111,0.00000000e+00
+30.3331,1035.8831,0.00000000e+00
+30.3997,1037.3550,0.00000000e+00
+30.4662,1038.8269,1.40812888e-04
+30.5327,1040.2988,0.00000000e+00
+30.5992,1041.7708,7.07459549e-08
+30.6657,1043.2427,0.00000000e+00
+30.7323,1044.7146,1.79914830e-04
+30.7988,1046.1865,5.85396832e-04
+30.8653,1047.6584,0.00000000e+00
+30.9318,1049.1304,0.00000000e+00
+30.9983,1050.6023,5.75123886e-05
+31.0649,1052.0742,3.47750552e-04
+31.1314,1053.5461,3.82883882e-05
+31.1979,1055.0181,5.93017940e-05
+31.2644,1056.4900,1.51595686e-05
+31.3310,1057.9620,0.00000000e+00
+31.3975,1059.4340,3.35244804e-05
+31.4640,1060.9059,2.34619365e-04
+31.5305,1062.3778,2.44287134e-04
+31.5970,1063.8497,0.00000000e+00
+31.6636,1065.3217,0.00000000e+00
+31.7301,1066.7936,0.00000000e+00
+31.7966,1068.2655,0.00000000e+00
+31.8631,1069.7374,0.00000000e+00
+31.9296,1071.2094,0.00000000e+00
+31.9961,1072.6813,0.00000000e+00
+32.0627,1074.1532,0.00000000e+00
+32.1292,1075.6251,2.23335810e-04
+32.1957,1077.0970,0.00000000e+00
+32.2622,1078.5690,0.00000000e+00
+32.3287,1080.0409,1.02440310e-04
+32.3953,1081.5128,0.00000000e+00
+32.4618,1082.9847,1.72678483e-04
+32.5283,1084.4567,0.00000000e+00
+32.5948,1085.9286,3.54193297e-04
+32.6613,1087.4005,3.78459367e-06
+32.7279,1088.8724,3.96281772e-04
+32.7944,1090.3444,0.00000000e+00
+32.8609,1091.8164,2.20482456e-04
+32.9274,1093.2883,1.94640219e-04
+32.9940,1094.7603,1.12242429e-04
+33.0605,1096.2322,1.47440631e-04
+33.1270,1097.7041,0.00000000e+00
+33.1935,1099.1760,1.67725259e-04
diff --git a/demo_data/tpd_SecondOrder_metadata.json b/demo_data/tpd_SecondOrder_metadata.json
new file mode 100644
index 0000000000000000000000000000000000000000..2ad64a074d1263359d9e79c460e85416c76c3bbf
--- /dev/null
+++ b/demo_data/tpd_SecondOrder_metadata.json
@@ -0,0 +1,22 @@
+{
+ "mechanism": "SecondOrder",
+ "betas_Ks": [
+ 0.3162277638912201,
+ 2.597219944000244,
+ 22.127595901489258
+ ],
+ "n_rates": 3,
+ "true_params": {
+ "mechanism": "SecondOrder",
+ "Ed": 23369.582400663046,
+ "nu": 160197624009364.56,
+ "theta_0": 0.15471468757226675,
+ "T_start": 364.6834143679138,
+ "T_end": 1099.1759914138238
+ },
+ "csv_files": [
+ "tpd_SecondOrder_1.csv",
+ "tpd_SecondOrder_2.csv",
+ "tpd_SecondOrder_3.csv"
+ ]
+}
\ No newline at end of file
diff --git a/digitizer.py b/digitizer.py
new file mode 100644
index 0000000000000000000000000000000000000000..4e869c6ed88bc45e9f010fab367da9bd89c42cb6
--- /dev/null
+++ b/digitizer.py
@@ -0,0 +1,247 @@
+"""
+Image digitizer for extracting data from plot images.
+
+Uses OpenCV to trace curves from uploaded plot images, mapping pixel
+coordinates to data coordinates via user-provided axis ranges.
+Supports automatic axis-range detection via OCR (easyocr).
+"""
+
+import re
+import numpy as np
+
+
+def auto_detect_axis_bounds(image_array):
+ """Detect axis bounds from a plot image using OCR.
+
+ Reads numeric tick labels, clusters them by position into x-axis
+ (similar y-coordinate, bottom half) and y-axis (similar x-coordinate,
+ left half), and returns the inferred data ranges.
+
+ Args:
+ image_array: numpy array (H, W, 3) RGB image
+
+ Returns:
+ dict with keys 'x_min', 'x_max', 'y_min', 'y_max' (all float),
+ or None if detection fails.
+ """
+ try:
+ import easyocr
+ except ImportError:
+ return None
+
+ if image_array.ndim == 3 and image_array.shape[2] == 4:
+ image_array = image_array[:, :, :3]
+
+ H, W = image_array.shape[:2]
+
+ reader = easyocr.Reader(["en"], gpu=False, verbose=False)
+ results = reader.readtext(image_array, detail=1)
+
+ _NUM_RE = re.compile(
+ r"^[−\-–]?\d+\.?\d*(?:[eE][+\-]?\d+)?$"
+ )
+
+ # Collect all numeric detections with their centroids
+ detections = [] # (cx, cy, value)
+ for bbox, text, conf in results:
+ text = text.strip().replace(" ", "").replace("−", "-").replace("–", "-")
+ if not _NUM_RE.match(text):
+ continue
+ try:
+ val = float(text)
+ except ValueError:
+ continue
+ if conf < 0.2:
+ continue
+
+ cx = np.mean([p[0] for p in bbox])
+ cy = np.mean([p[1] for p in bbox])
+ detections.append((cx, cy, val))
+
+ if len(detections) < 4:
+ return None
+
+ # Cluster into x-axis (bottom) and y-axis (left) by position.
+ # X-axis ticks: in the bottom 35% of the image, share similar cy.
+ # Y-axis ticks: in the left 30% of the image, share similar cx.
+ x_candidates = [(cx, cy, v) for cx, cy, v in detections if cy > H * 0.65]
+ y_candidates = [(cx, cy, v) for cx, cy, v in detections if cx < W * 0.30]
+
+ # For x-axis candidates, find the dominant cy (tightest cluster)
+ x_vals = _extract_axis_values(x_candidates, axis="x")
+ # For y-axis candidates, find the dominant cx (tightest cluster)
+ y_vals = _extract_axis_values(y_candidates, axis="y")
+
+ if len(x_vals) < 2 or len(y_vals) < 2:
+ return None
+
+ return {
+ "x_min": float(min(x_vals)),
+ "x_max": float(max(x_vals)),
+ "y_min": float(min(y_vals)),
+ "y_max": float(max(y_vals)),
+ }
+
+
+def _extract_axis_values(candidates, axis="x"):
+ """From a list of (cx, cy, val) candidates, extract values that form a
+ consistent set of tick labels along one axis.
+
+ For x-axis: ticks have similar cy values.
+ For y-axis: ticks have similar cx values.
+ """
+ if len(candidates) < 2:
+ return []
+
+ # Coordinate used for clustering: cy for x-axis, cx for y-axis
+ idx = 1 if axis == "x" else 0
+ coords = np.array([c[idx] for c in candidates])
+
+ # Find the mode position (most ticks cluster at the same coordinate)
+ # Use a tolerance of 5% of image dimension
+ best_vals = []
+ for ref in coords:
+ cluster = [c for c in candidates if abs(c[idx] - ref) < 30]
+ if len(cluster) > len(best_vals):
+ best_vals = [c[2] for c in cluster]
+
+ return best_vals
+
+
+def digitize_plot(image_array, x_min, x_max, y_min, y_max,
+ threshold=128, min_contour_length=50):
+ """
+ Extract (x, y) data points from a plot image.
+
+ Args:
+ image_array: numpy array (H, W, 3) RGB image
+ x_min, x_max: data-space x-axis range
+ y_min, y_max: data-space y-axis range
+ threshold: binarization threshold (0-255)
+ min_contour_length: minimum contour length to consider
+
+ Returns:
+ x_data, y_data: 1-D arrays of extracted data points sorted by x
+ """
+ try:
+ import cv2
+ except ImportError:
+ raise ImportError("opencv-python-headless is required for image digitization")
+
+ if image_array.ndim == 3 and image_array.shape[2] == 4:
+ image_array = image_array[:, :, :3]
+
+ gray = cv2.cvtColor(image_array, cv2.COLOR_RGB2GRAY)
+
+ _, binary = cv2.threshold(gray, threshold, 255, cv2.THRESH_BINARY_INV)
+
+ kernel = np.ones((3, 3), np.uint8)
+ binary = cv2.morphologyEx(binary, cv2.MORPH_CLOSE, kernel, iterations=1)
+ binary = cv2.morphologyEx(binary, cv2.MORPH_OPEN, kernel, iterations=1)
+
+ contours, _ = cv2.findContours(binary, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE)
+
+ if not contours:
+ raise ValueError("No curves detected in image. Try adjusting the threshold.")
+
+ contours = [c for c in contours if len(c) >= min_contour_length]
+ if not contours:
+ raise ValueError(
+ f"No contours with >= {min_contour_length} points. "
+ "Try lowering the threshold or min_contour_length."
+ )
+
+ largest = max(contours, key=len)
+
+ H, W = gray.shape
+ points = largest.squeeze() # [N, 2] where columns are (x_pixel, y_pixel)
+
+ x_pixel = points[:, 0].astype(np.float64)
+ y_pixel = points[:, 1].astype(np.float64)
+
+ # Detect plot area boundaries (exclude axes/margins)
+ px_left = x_pixel.min()
+ px_right = x_pixel.max()
+ py_top = y_pixel.min()
+ py_bottom = y_pixel.max()
+
+ px_range = px_right - px_left
+ py_range = py_bottom - py_top
+
+ if px_range < 10 or py_range < 10:
+ raise ValueError("Detected curve region is too small. Check image quality.")
+
+ x_data = x_min + (x_pixel - px_left) / px_range * (x_max - x_min)
+ y_data = y_max - (y_pixel - py_top) / py_range * (y_max - y_min)
+
+ sort_idx = np.argsort(x_data)
+ x_data = x_data[sort_idx]
+ y_data = y_data[sort_idx]
+
+ # Average duplicate x values (from contour tracing both sides of a thick line)
+ x_unique, inverse = np.unique(np.round(x_data, decimals=6), return_inverse=True)
+ y_averaged = np.zeros_like(x_unique)
+ counts = np.zeros_like(x_unique)
+ for i, inv in enumerate(inverse):
+ y_averaged[inv] += y_data[i]
+ counts[inv] += 1
+ y_averaged /= np.maximum(counts, 1)
+
+ return x_unique.astype(np.float32), y_averaged.astype(np.float32)
+
+
+def digitize_multiple_curves(image_array, x_min, x_max, y_min, y_max,
+ n_curves=1, threshold=128, min_contour_length=50):
+ """
+ Extract multiple curves from a plot image.
+
+ Returns:
+ list of (x_data, y_data) tuples, one per detected curve,
+ sorted by curve length (longest first), limited to n_curves.
+ """
+ try:
+ import cv2
+ except ImportError:
+ raise ImportError("opencv-python-headless is required for image digitization")
+
+ if image_array.ndim == 3 and image_array.shape[2] == 4:
+ image_array = image_array[:, :, :3]
+
+ gray = cv2.cvtColor(image_array, cv2.COLOR_RGB2GRAY)
+ _, binary = cv2.threshold(gray, threshold, 255, cv2.THRESH_BINARY_INV)
+
+ kernel = np.ones((3, 3), np.uint8)
+ binary = cv2.morphologyEx(binary, cv2.MORPH_CLOSE, kernel, iterations=1)
+ binary = cv2.morphologyEx(binary, cv2.MORPH_OPEN, kernel, iterations=1)
+
+ contours, _ = cv2.findContours(binary, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE)
+ contours = [c for c in contours if len(c) >= min_contour_length]
+ contours = sorted(contours, key=len, reverse=True)[:n_curves]
+
+ if not contours:
+ raise ValueError("No curves detected. Try adjusting the threshold.")
+
+ H, W = gray.shape
+ results = []
+
+ for contour in contours:
+ points = contour.squeeze()
+ x_pixel = points[:, 0].astype(np.float64)
+ y_pixel = points[:, 1].astype(np.float64)
+
+ px_left, px_right = x_pixel.min(), x_pixel.max()
+ py_top, py_bottom = y_pixel.min(), y_pixel.max()
+ px_range = px_right - px_left
+ py_range = py_bottom - py_top
+
+ if px_range < 5 or py_range < 5:
+ continue
+
+ x_data = x_min + (x_pixel - px_left) / px_range * (x_max - x_min)
+ y_data = y_max - (y_pixel - py_top) / py_range * (y_max - y_min)
+
+ sort_idx = np.argsort(x_data)
+ results.append((x_data[sort_idx].astype(np.float32),
+ y_data[sort_idx].astype(np.float32)))
+
+ return results
diff --git a/evaluate_reconstruction.py b/evaluate_reconstruction.py
new file mode 100644
index 0000000000000000000000000000000000000000..88a88a862cc1720beb26465ca500a5f896969064
--- /dev/null
+++ b/evaluate_reconstruction.py
@@ -0,0 +1,931 @@
+"""
+Signal reconstruction evaluation for Multi-Mechanism Normalizing Flow.
+
+For each test sample:
+ 1. Infer mechanism + parameter posterior
+ 2. Reconstruct signals from posterior mean, MAP, and random samples
+ 3. Compare reconstructed signals with observed signals
+
+This validates whether the inferred posteriors produce physically consistent
+predictions, even when individual parameters have poor R² (due to compensation).
+
+Usage:
+ python evaluate_reconstruction.py --checkpoint outputs/multi_mechanism_multiscan/.../best.pt
+ python evaluate_reconstruction.py --checkpoint outputs/tpd_multiheat/.../best.pt --domain tpd
+"""
+
+import os
+import sys
+import json
+import glob
+import signal
+import argparse
+import time as time_module
+from pathlib import Path
+from collections import defaultdict
+
+import numpy as np
+import torch
+from tqdm import tqdm
+import matplotlib
+matplotlib.use('Agg')
+import matplotlib.pyplot as plt
+
+
+class _Timeout:
+ """Context manager that raises TimeoutError after `seconds` seconds.
+
+ Uses POSIX signal.alarm in the main thread; falls back to a no-op in
+ worker threads (e.g. Gradio request handlers) where signals are unavailable.
+ """
+ def __init__(self, seconds):
+ self.seconds = seconds
+ self._use_signal = False
+
+ def _handler(self, signum, frame):
+ raise TimeoutError(f"Reconstruction timed out after {self.seconds}s")
+
+ def __enter__(self):
+ import threading
+ if threading.current_thread() is threading.main_thread():
+ self._use_signal = True
+ self._old = signal.signal(signal.SIGALRM, self._handler)
+ signal.alarm(self.seconds)
+ return self
+
+ def __exit__(self, *args):
+ if self._use_signal:
+ signal.alarm(0)
+ signal.signal(signal.SIGALRM, self._old)
+
+
+def parse_args():
+ parser = argparse.ArgumentParser(description="Evaluate signal reconstruction")
+ parser.add_argument("--checkpoint", type=str, required=True)
+ parser.add_argument("--domain", type=str, default="ec", choices=["ec", "tpd"])
+ parser.add_argument("--split", type=str, default="test", choices=["train", "val", "test"])
+ parser.add_argument("--data_dir", type=str, default=None,
+ help="Override data directory (e.g. for clean test set)")
+ parser.add_argument("--max_samples", type=int, default=200)
+ parser.add_argument("--n_posterior_samples", type=int, default=100,
+ help="Posterior samples for reconstruction")
+ parser.add_argument("--n_recon_samples", type=int, default=10,
+ help="Number of random posterior samples to reconstruct per test sample")
+ parser.add_argument("--n_visualize", type=int, default=20)
+ parser.add_argument("--batch_size", type=int, default=16)
+ parser.add_argument("--temperature", type=float, default=1.0,
+ help="Base distribution temperature for sampling (>1 broadens posteriors)")
+ return parser.parse_args()
+
+
+# =============================================================================
+# EC reconstruction
+# =============================================================================
+
+def _safe_pow10(val):
+ """Compute 10**val, clamping to avoid OverflowError for extreme values."""
+ val = np.clip(val, -300, 300)
+ return 10.0 ** val
+
+
+def theta_to_ec_params(theta, mechanism, base_params):
+ """
+ Convert model output (log-space) back to physical simulator parameters.
+
+ Args:
+ theta: [D] numpy array of inferred parameters
+ mechanism: str mechanism name
+ base_params: dict of fixed parameters from the original sample
+ """
+ from flow_model import MECHANISM_PARAMS
+ names = MECHANISM_PARAMS[mechanism]['names']
+ p = dict(base_params)
+ p['kinetics'] = mechanism
+
+ for i, name in enumerate(names):
+ val = float(theta[i])
+ if name.startswith('log10(') and name.endswith(')'):
+ phys_name = name[6:-1]
+ p[phys_name] = _safe_pow10(val)
+ elif name == 'alpha':
+ p['alpha'] = val
+ elif name == 'E0_offset':
+ pass
+
+ return p
+
+
+def reconstruct_ec_signal(theta, mechanism, base_params, sigmas, n_spatial=64):
+ """
+ Reconstruct CV signal(s) from inferred parameters.
+
+ Args:
+ theta: [D] inferred parameters (model output space)
+ mechanism: str
+ base_params: dict with fixed params (theta_i, theta_v, dA, etc.)
+ sigmas: list of scan rates
+ n_spatial: spatial grid points
+
+ Returns:
+ list of dicts with 'potential', 'flux', 'time',
+ 'c_ox_surface', 'c_red_surface' per scan rate
+ """
+ import warnings
+ from generate_dataset_diffec import _run_single_cv
+
+ phys = theta_to_ec_params(theta, mechanism, base_params)
+ K0_at_1 = phys.get('K0', 1.0)
+ kc_at_1 = phys.get('kc', 1.0)
+
+ results = []
+ for sigma in sigmas:
+ p = dict(phys)
+ p['sigma'] = float(sigma)
+ if mechanism in ('BV', 'MHC', 'EC', 'LH'):
+ p['K0'] = K0_at_1 / np.sqrt(sigma)
+ elif mechanism == 'Ads':
+ p['K0'] = K0_at_1 / sigma
+ if mechanism == 'EC':
+ p['kc'] = kc_at_1 / sigma
+
+ try:
+ with _Timeout(30), warnings.catch_warnings():
+ warnings.simplefilter("ignore", RuntimeWarning)
+ result = _run_single_cv(p, n_spatial)
+ entry = {
+ 'potential': result['potential'],
+ 'flux': result['flux'],
+ 'time': result['time'],
+ 'success': True,
+ }
+ if 'c_ox' in result and 'c_red' in result:
+ entry['c_ox_surface'] = result['c_ox'][:, -1]
+ entry['c_red_surface'] = result['c_red'][:, 0]
+ results.append(entry)
+ except Exception as e:
+ results.append({'success': False, 'error': str(e)})
+
+ return results
+
+
+# =============================================================================
+# TPD reconstruction
+# =============================================================================
+
+def theta_to_tpd_params(theta, mechanism, base_params):
+ """Convert model output back to physical TPD simulator parameters."""
+ from generate_tpd_data import TPD_MECHANISM_PARAMS
+ names = TPD_MECHANISM_PARAMS[mechanism]['names']
+ p = dict(base_params)
+ p['mechanism'] = mechanism
+
+ for i, name in enumerate(names):
+ val = float(theta[i])
+ if name.startswith('log10(') and name.endswith(')'):
+ phys_name = name[6:-1]
+ p[phys_name] = _safe_pow10(val)
+ else:
+ p[name] = val
+
+ return p
+
+
+def reconstruct_tpd_signal(theta, mechanism, base_params, betas):
+ """
+ Reconstruct TPD signal(s) from inferred parameters.
+
+ Args:
+ theta: [D] inferred parameters
+ mechanism: str
+ base_params: dict with T_start, T_end, etc.
+ betas: list of heating rates
+
+ Returns:
+ list of dicts with 'temperature', 'rate', 'time' per heating rate
+ """
+ import warnings
+ from generate_tpd_data import _run_single_tpd
+
+ phys = theta_to_tpd_params(theta, mechanism, base_params)
+
+ results = []
+ for beta in betas:
+ p = dict(phys)
+ p['beta'] = float(beta)
+
+ try:
+ with _Timeout(30), warnings.catch_warnings():
+ warnings.simplefilter("ignore", RuntimeWarning)
+ result = _run_single_tpd(p)
+ results.append({
+ 'temperature': result['temperature'],
+ 'rate': result['rate'],
+ 'time': result['time'],
+ 'success': True,
+ })
+ except Exception as e:
+ results.append({'success': False, 'error': str(e)})
+
+ return results
+
+
+# =============================================================================
+# Metrics
+# =============================================================================
+
+def _valid_signal(arr):
+ """Check that a signal array contains no NaN/Inf/extreme values."""
+ if not np.all(np.isfinite(arr)):
+ return False
+ if np.max(np.abs(arr)) > 1e30:
+ return False
+ return True
+
+
+def signal_rmse(observed, reconstructed, length=None):
+ """RMSE between two signals, optionally truncated to valid length."""
+ min_len = min(len(observed), len(reconstructed))
+ if length is not None:
+ min_len = min(min_len, length)
+ o = observed[:min_len]
+ r = reconstructed[:min_len]
+ if not (_valid_signal(o) and _valid_signal(r)):
+ return float('nan')
+ return float(np.sqrt(np.mean((o - r) ** 2)))
+
+
+def signal_nrmse(observed, reconstructed, length=None):
+ """Normalized RMSE (by peak-to-peak range of observed signal)."""
+ min_len = min(len(observed), len(reconstructed))
+ if length is not None:
+ min_len = min(min_len, length)
+ o = observed[:min_len]
+ r = reconstructed[:min_len]
+ if not (_valid_signal(o) and _valid_signal(r)):
+ return float('nan')
+ ptp = np.ptp(o)
+ if ptp < 1e-20:
+ return float('inf')
+ return float(np.sqrt(np.mean((o - r) ** 2)) / ptp)
+
+
+def signal_r2(observed, reconstructed, length=None):
+ """R² between observed and reconstructed signals."""
+ min_len = min(len(observed), len(reconstructed))
+ if length is not None:
+ min_len = min(min_len, length)
+ o = observed[:min_len]
+ r = reconstructed[:min_len]
+ if not (_valid_signal(o) and _valid_signal(r)):
+ return float('nan')
+ ss_res = np.sum((o - r) ** 2)
+ ss_tot = np.sum((o - np.mean(o)) ** 2)
+ if ss_tot < 1e-20:
+ return 0.0
+ return float(1 - ss_res / ss_tot)
+
+
+# =============================================================================
+# EC evaluation
+# =============================================================================
+
+def evaluate_ec(args):
+ from multi_mechanism_model import MultiMechanismFlow
+ from flow_model import MECHANISM_LIST, MECHANISM_PARAMS
+ from dataset import DiffECDataset, collate_fn
+ from torch.utils.data import DataLoader
+
+ ckpt_path = os.path.expanduser(args.checkpoint)
+ checkpoint = torch.load(ckpt_path, map_location='cpu', weights_only=False)
+ ckpt_args = checkpoint['args']
+ device = 'cuda' if torch.cuda.is_available() else 'cpu'
+
+ model = MultiMechanismFlow(
+ d_context=ckpt_args.get('d_context', 128),
+ d_model=ckpt_args.get('d_model', 128),
+ n_coupling_layers=ckpt_args.get('n_coupling_layers', 6),
+ hidden_dim=ckpt_args.get('hidden_dim', 96),
+ coupling_type=ckpt_args.get('coupling_type', 'spline'),
+ n_bins=ckpt_args.get('n_bins', 8),
+ tail_bound=ckpt_args.get('tail_bound', 5.0),
+ )
+
+ ckpt_dir = Path(ckpt_path).parent.parent
+ theta_stats_path = ckpt_dir / "theta_stats.json"
+ with open(theta_stats_path) as f:
+ theta_stats = json.load(f)
+ for mech in MECHANISM_LIST:
+ if mech in theta_stats:
+ model.set_theta_stats(
+ mech,
+ torch.tensor(theta_stats[mech]['mean']),
+ torch.tensor(theta_stats[mech]['std']),
+ )
+
+ norm_stats_path = ckpt_dir / "norm_stats.json"
+ with open(norm_stats_path) as f:
+ norm_stats = json.load(f)
+
+ model.load_state_dict(checkpoint['model_state_dict'], strict=False)
+ for m in model.modules():
+ if hasattr(m, '_initialized') and not m.initialized:
+ m.initialized = True
+ model = model.to(device)
+ model.eval()
+
+ if args.data_dir:
+ data_dir = os.path.expanduser(args.data_dir)
+ else:
+ data_dir = os.path.expanduser(ckpt_args.get('data_dir', '~/DiffEC/data'))
+
+ # Support raw per-mechanism directory structure:
+ # {data_dir}/{Mechanism}/{split}/sample_*.npz
+ # as well as the assembled flat structure:
+ # {data_dir}/{split}/sample_*.npz
+ split_dir = os.path.join(data_dir, args.split)
+ raw_per_mechanism = False
+ if not os.path.exists(split_dir) or not glob.glob(os.path.join(split_dir, "sample_*.npz")):
+ # Try raw per-mechanism structure
+ mech_dirs = [d for d in os.listdir(data_dir)
+ if os.path.isdir(os.path.join(data_dir, d, args.split))]
+ if mech_dirs:
+ raw_per_mechanism = True
+ print(f"Detected raw per-mechanism directory structure in {data_dir}")
+ print(f" Mechanisms found: {sorted(mech_dirs)}")
+
+ # Create a temporary flat directory with symlinks
+ import tempfile
+ tmp_dir = tempfile.mkdtemp(prefix="ecflow_recon_")
+ flat_dir = os.path.join(tmp_dir, args.split)
+ os.makedirs(flat_dir, exist_ok=True)
+ file_idx = 0
+ for mech_name in sorted(mech_dirs):
+ mech_split = os.path.join(data_dir, mech_name, args.split)
+ for f in sorted(glob.glob(os.path.join(mech_split, "sample_*.npz"))):
+ dst = os.path.join(flat_dir, f"sample_{file_idx:06d}.npz")
+ os.symlink(os.path.abspath(f), dst)
+ file_idx += 1
+ split_dir = flat_dir
+ print(f" Linked {file_idx} samples into temporary flat directory")
+
+ print(f"Loading data from: {split_dir}")
+ dataset = DiffECDataset(split_dir, max_samples=args.max_samples, normalize_input=True)
+ dataset.potential_mean = norm_stats['potential'][0]
+ dataset.potential_std = norm_stats['potential'][1]
+ dataset.flux_mean = norm_stats['flux'][0]
+ dataset.flux_std = norm_stats['flux'][1]
+ dataset.time_mean = norm_stats['time'][0]
+ dataset.time_std = norm_stats['time'][1]
+
+ raw_dataset = DiffECDataset(split_dir, max_samples=args.max_samples, normalize_input=False)
+
+ loader = DataLoader(dataset, batch_size=1, shuffle=False, collate_fn=collate_fn)
+
+ eval_dir = ckpt_dir / f"eval_recon_{args.split}"
+ if raw_per_mechanism:
+ eval_dir = ckpt_dir / f"eval_recon_clean_{args.split}"
+ eval_dir.mkdir(exist_ok=True)
+
+ per_mech_nrmse_mean = defaultdict(list)
+ per_mech_nrmse_map = defaultdict(list)
+ per_mech_nrmse_samples = defaultdict(list)
+ per_mech_r2_mean = defaultdict(list)
+ per_mech_r2_map = defaultdict(list)
+ n_failed = 0
+ vis_count = defaultdict(int)
+
+ print(f"Evaluating signal reconstruction on {len(dataset)} samples...")
+
+ for idx, batch in enumerate(tqdm(loader, desc="Reconstructing")):
+ x = batch['input'].to(device)
+ scan_mask = batch['scan_mask'].to(device)
+ sigmas_tensor = batch['sigmas'].to(device)
+ flux_scales = batch['flux_scales'].to(device)
+ mech_id = batch['mechanism_id'].item()
+
+ if mech_id < 0 or mech_id >= len(MECHANISM_LIST):
+ continue
+ mech = MECHANISM_LIST[mech_id]
+
+ raw_data = np.load(raw_dataset.sample_files[idx], allow_pickle=True)
+ raw_params = raw_data['params'].item()
+ raw_flux = raw_data['flux'].astype(np.float32)
+ raw_potential = raw_data['potential'].astype(np.float32)
+
+ if 'sigmas' in raw_data:
+ scan_rates = raw_data['sigmas'].astype(np.float64)
+ lengths = raw_data['lengths'].astype(int)
+ else:
+ scan_rates = np.array([raw_params.get('sigma', 1.0)])
+ lengths = np.array([len(raw_potential)])
+ raw_flux = raw_flux[np.newaxis, :]
+ raw_potential = raw_potential[np.newaxis, :]
+
+ with torch.no_grad():
+ pred = model.predict(x, scan_mask=scan_mask, sigmas=sigmas_tensor,
+ flux_scales=flux_scales,
+ n_samples=args.n_posterior_samples,
+ temperature=args.temperature)
+
+ if pred['stats'][mech] is None:
+ continue
+
+ theta_mean = pred['stats'][mech]['mean'][0].cpu().numpy()
+ samples = pred['samples'][mech][0].cpu().numpy()
+
+ # MAP estimate via 1D KDE
+ from scipy.stats import gaussian_kde
+ theta_map = np.zeros_like(theta_mean)
+ for d in range(len(theta_mean)):
+ s = samples[:, d]
+ if np.std(s) < 1e-10:
+ theta_map[d] = np.mean(s)
+ else:
+ try:
+ kde = gaussian_kde(s)
+ grid = np.linspace(s.min(), s.max(), 200)
+ theta_map[d] = grid[np.argmax(kde(grid))]
+ except Exception:
+ theta_map[d] = np.median(s)
+
+ base_params = dict(raw_params)
+
+ # Reconstruct from mean
+ recon_mean = reconstruct_ec_signal(theta_mean, mech, base_params, scan_rates)
+ # Reconstruct from MAP
+ recon_map = reconstruct_ec_signal(theta_map, mech, base_params, scan_rates)
+
+ # Compute metrics per scan rate
+ nrmse_mean_list = []
+ nrmse_map_list = []
+ r2_mean_list = []
+ r2_map_list = []
+
+ for s_idx in range(len(scan_rates)):
+ obs_flux = raw_flux[s_idx]
+ length = lengths[s_idx]
+
+ if recon_mean[s_idx]['success']:
+ v = signal_nrmse(obs_flux, recon_mean[s_idx]['flux'], length)
+ r = signal_r2(obs_flux, recon_mean[s_idx]['flux'], length)
+ if np.isfinite(v):
+ nrmse_mean_list.append(v)
+ if np.isfinite(r):
+ r2_mean_list.append(r)
+ if recon_map[s_idx]['success']:
+ v = signal_nrmse(obs_flux, recon_map[s_idx]['flux'], length)
+ r = signal_r2(obs_flux, recon_map[s_idx]['flux'], length)
+ if np.isfinite(v):
+ nrmse_map_list.append(v)
+ if np.isfinite(r):
+ r2_map_list.append(r)
+
+ if nrmse_mean_list:
+ per_mech_nrmse_mean[mech].append(np.mean(nrmse_mean_list))
+ if r2_mean_list:
+ per_mech_r2_mean[mech].append(np.mean(r2_mean_list))
+ if nrmse_map_list:
+ per_mech_nrmse_map[mech].append(np.mean(nrmse_map_list))
+ if r2_map_list:
+ per_mech_r2_map[mech].append(np.mean(r2_map_list))
+
+ # Reconstruct from random posterior samples
+ sample_nrmses = []
+ n_recon = min(args.n_recon_samples, samples.shape[0])
+ sample_indices = np.random.choice(samples.shape[0], n_recon, replace=False)
+ for si in sample_indices:
+ recon_s = reconstruct_ec_signal(samples[si], mech, base_params, scan_rates)
+ nrmses = []
+ for s_idx in range(len(scan_rates)):
+ if recon_s[s_idx]['success']:
+ v = signal_nrmse(raw_flux[s_idx], recon_s[s_idx]['flux'], lengths[s_idx])
+ if np.isfinite(v):
+ nrmses.append(v)
+ if nrmses:
+ sample_nrmses.append(np.mean(nrmses))
+ if sample_nrmses:
+ per_mech_nrmse_samples[mech].append(np.median(sample_nrmses))
+
+ # Visualization
+ if vis_count[mech] < args.n_visualize and recon_mean[0]['success']:
+ fig, axes = plt.subplots(1, len(scan_rates), figsize=(5 * len(scan_rates), 4))
+ if len(scan_rates) == 1:
+ axes = [axes]
+ for s_idx, ax in enumerate(axes):
+ length = lengths[s_idx]
+ obs_pot = raw_potential[s_idx, :length]
+ obs_flux_s = raw_flux[s_idx, :length]
+ ax.plot(obs_pot, obs_flux_s, 'k-', lw=1.5, label='Observed', alpha=0.8)
+
+ if recon_mean[s_idx]['success']:
+ r_pot = recon_mean[s_idx]['potential']
+ r_flux = recon_mean[s_idx]['flux']
+ min_len = min(length, len(r_pot))
+ nrmse_val = signal_nrmse(obs_flux_s, r_flux[:length] if length <= len(r_flux) else r_flux, length)
+ lbl = f'Mean (NRMSE={nrmse_val:.3f})' if np.isfinite(nrmse_val) else 'Mean (NRMSE=N/A)'
+ ax.plot(r_pot[:min_len], r_flux[:min_len], 'r--', lw=1.2, label=lbl)
+
+ if recon_map[s_idx]['success']:
+ r_pot = recon_map[s_idx]['potential']
+ r_flux = recon_map[s_idx]['flux']
+ min_len = min(length, len(r_pot))
+ nrmse_val = signal_nrmse(obs_flux_s, r_flux[:length] if length <= len(r_flux) else r_flux, length)
+ lbl = f'MAP (NRMSE={nrmse_val:.3f})' if np.isfinite(nrmse_val) else 'MAP (NRMSE=N/A)'
+ ax.plot(r_pot[:min_len], r_flux[:min_len], 'b:', lw=1.2, label=lbl)
+
+ # Plot a few posterior samples
+ for si in sample_indices[:3]:
+ recon_s = reconstruct_ec_signal(samples[si], mech, base_params, [scan_rates[s_idx]])
+ if recon_s[0]['success']:
+ r_pot = recon_s[0]['potential']
+ r_flux = recon_s[0]['flux']
+ min_len = min(length, len(r_pot))
+ ax.plot(r_pot[:min_len], r_flux[:min_len], '-', lw=0.5,
+ alpha=0.3, color='gray')
+
+ ax.set_xlabel('Potential (θ)')
+ ax.set_ylabel('Flux')
+ ax.set_title(f'σ={scan_rates[s_idx]:.2f}')
+ ax.legend(fontsize=7)
+
+ fig.suptitle(f'{mech} sample {idx}', fontsize=12)
+ plt.tight_layout()
+ plt.savefig(eval_dir / f"recon_{mech}_{vis_count[mech]:03d}.png", dpi=150)
+ plt.close(fig)
+ vis_count[mech] += 1
+
+ # Print and save results
+ print("\n" + "=" * 60)
+ print("SIGNAL RECONSTRUCTION METRICS")
+ print("=" * 60)
+
+ results = {}
+ for mech in MECHANISM_LIST:
+ if not per_mech_nrmse_mean[mech]:
+ continue
+
+ nrmse_mean = np.array(per_mech_nrmse_mean[mech])
+ nrmse_map = np.array(per_mech_nrmse_map[mech])
+ nrmse_samp = np.array(per_mech_nrmse_samples[mech]) if per_mech_nrmse_samples[mech] else np.array([])
+ r2_mean = np.array(per_mech_r2_mean[mech])
+ r2_map = np.array(per_mech_r2_map[mech])
+
+ results[mech] = {
+ 'n_samples': len(nrmse_mean),
+ 'nrmse_mean': {'median': float(np.median(nrmse_mean)),
+ 'mean': float(np.mean(nrmse_mean)),
+ 'std': float(np.std(nrmse_mean)),
+ 'q25': float(np.percentile(nrmse_mean, 25)),
+ 'q75': float(np.percentile(nrmse_mean, 75))},
+ 'nrmse_map': {'median': float(np.median(nrmse_map)),
+ 'mean': float(np.mean(nrmse_map)),
+ 'std': float(np.std(nrmse_map))},
+ 'r2_signal_mean': {'median': float(np.median(r2_mean)),
+ 'mean': float(np.mean(r2_mean))},
+ 'r2_signal_map': {'median': float(np.median(r2_map)),
+ 'mean': float(np.mean(r2_map))},
+ }
+ if len(nrmse_samp) > 0:
+ results[mech]['nrmse_posterior_median'] = {
+ 'median': float(np.median(nrmse_samp)),
+ 'mean': float(np.mean(nrmse_samp)),
+ }
+
+ print(f"\n{mech} ({len(nrmse_mean)} samples):")
+ print(f" Signal NRMSE (mean est): median={np.median(nrmse_mean):.4f} "
+ f"mean={np.mean(nrmse_mean):.4f} ± {np.std(nrmse_mean):.4f}")
+ print(f" Signal NRMSE (MAP est): median={np.median(nrmse_map):.4f} "
+ f"mean={np.mean(nrmse_map):.4f} ± {np.std(nrmse_map):.4f}")
+ if len(nrmse_samp) > 0:
+ print(f" Signal NRMSE (post. med): median={np.median(nrmse_samp):.4f} "
+ f"mean={np.mean(nrmse_samp):.4f}")
+ print(f" Signal R² (mean est): median={np.median(r2_mean):.4f}")
+ print(f" Signal R² (MAP est): median={np.median(r2_map):.4f}")
+
+ with open(eval_dir / "reconstruction_results.json", "w") as f:
+ json.dump(results, f, indent=2)
+
+ if raw_per_mechanism:
+ import shutil
+ shutil.rmtree(tmp_dir, ignore_errors=True)
+
+ print(f"\nResults saved to {eval_dir}")
+ print(f"Visualizations: {sum(vis_count.values())} plots saved")
+
+
+# =============================================================================
+# TPD evaluation
+# =============================================================================
+
+def evaluate_tpd(args):
+ from tpd_model import MultiMechanismFlowTPD
+ from generate_tpd_data import TPD_MECHANISM_LIST, TPD_MECHANISM_PARAMS
+ from dataset_tpd import TPDDataset, collate_fn
+ from torch.utils.data import DataLoader
+
+ ckpt_path = os.path.expanduser(args.checkpoint)
+ checkpoint = torch.load(ckpt_path, map_location='cpu', weights_only=False)
+ ckpt_args = checkpoint['args']
+ device = 'cuda' if torch.cuda.is_available() else 'cpu'
+
+ model = MultiMechanismFlowTPD(
+ d_context=ckpt_args.get('d_context', 128),
+ d_model=ckpt_args.get('d_model', 128),
+ n_coupling_layers=ckpt_args.get('n_coupling_layers', 6),
+ hidden_dim=ckpt_args.get('hidden_dim', 96),
+ coupling_type=ckpt_args.get('coupling_type', 'spline'),
+ n_bins=ckpt_args.get('n_bins', 8),
+ tail_bound=ckpt_args.get('tail_bound', 5.0),
+ )
+
+ ckpt_dir = Path(ckpt_path).parent.parent
+ theta_stats_path = ckpt_dir / "theta_stats.json"
+ with open(theta_stats_path) as f:
+ theta_stats = json.load(f)
+ for mech in TPD_MECHANISM_LIST:
+ if mech in theta_stats:
+ model.set_theta_stats(
+ mech,
+ torch.tensor(theta_stats[mech]['mean']),
+ torch.tensor(theta_stats[mech]['std']),
+ )
+
+ norm_stats_path = ckpt_dir / "norm_stats.json"
+ with open(norm_stats_path) as f:
+ norm_stats = json.load(f)
+
+ model.load_state_dict(checkpoint['model_state_dict'], strict=False)
+ for m in model.modules():
+ if hasattr(m, '_initialized') and not m.initialized:
+ m.initialized = True
+ model = model.to(device)
+ model.eval()
+
+ if args.data_dir:
+ data_dir = os.path.expanduser(args.data_dir)
+ else:
+ data_dir = os.path.expanduser(ckpt_args.get('data_dir', '~/ECFlow/data_tpd_multiheat'))
+
+ split_dir = os.path.join(data_dir, args.split)
+ raw_per_mechanism = False
+ if not os.path.exists(split_dir) or not glob.glob(os.path.join(split_dir, "sample_*.npz")):
+ mech_dirs = [d for d in os.listdir(data_dir)
+ if os.path.isdir(os.path.join(data_dir, d, args.split))]
+ if mech_dirs:
+ raw_per_mechanism = True
+ print(f"Detected raw per-mechanism directory structure in {data_dir}")
+ print(f" Mechanisms found: {sorted(mech_dirs)}")
+
+ import tempfile
+ tmp_dir = tempfile.mkdtemp(prefix="ecflow_recon_tpd_")
+ flat_dir = os.path.join(tmp_dir, args.split)
+ os.makedirs(flat_dir, exist_ok=True)
+ file_idx = 0
+ for mech_name in sorted(mech_dirs):
+ mech_split = os.path.join(data_dir, mech_name, args.split)
+ for f in sorted(glob.glob(os.path.join(mech_split, "sample_*.npz"))):
+ dst = os.path.join(flat_dir, f"sample_{file_idx:06d}.npz")
+ os.symlink(os.path.abspath(f), dst)
+ file_idx += 1
+ split_dir = flat_dir
+ print(f" Linked {file_idx} samples into temporary flat directory")
+
+ print(f"Loading data from: {split_dir}")
+ dataset = TPDDataset(split_dir, max_samples=args.max_samples, normalize_input=True)
+ dataset.temperature_mean = norm_stats['temperature'][0]
+ dataset.temperature_std = norm_stats['temperature'][1]
+ dataset.rate_mean = norm_stats['rate'][0]
+ dataset.rate_std = norm_stats['rate'][1]
+
+ raw_dataset = TPDDataset(split_dir, max_samples=args.max_samples, normalize_input=False)
+
+ loader = DataLoader(dataset, batch_size=1, shuffle=False, collate_fn=collate_fn)
+
+ eval_dir = ckpt_dir / f"eval_recon_{args.split}"
+ if raw_per_mechanism:
+ eval_dir = ckpt_dir / f"eval_recon_clean_{args.split}"
+ eval_dir.mkdir(exist_ok=True)
+
+ per_mech_nrmse_mean = defaultdict(list)
+ per_mech_nrmse_map = defaultdict(list)
+ per_mech_nrmse_samples = defaultdict(list)
+ per_mech_r2_mean = defaultdict(list)
+ per_mech_r2_map = defaultdict(list)
+ vis_count = defaultdict(int)
+
+ print(f"Evaluating TPD signal reconstruction on {len(dataset)} samples...")
+
+ for idx, batch in enumerate(tqdm(loader, desc="Reconstructing")):
+ x = batch['input'].to(device)
+ scan_mask = batch['scan_mask'].to(device)
+ sigmas_tensor = batch['sigmas'].to(device)
+ flux_scales = batch['flux_scales'].to(device)
+ mech_id = batch['mechanism_id'].item()
+
+ if mech_id < 0 or mech_id >= len(TPD_MECHANISM_LIST):
+ continue
+ mech = TPD_MECHANISM_LIST[mech_id]
+
+ raw_data = np.load(raw_dataset.sample_files[idx], allow_pickle=True)
+ raw_params = raw_data['params'].item()
+ raw_rate = raw_data['rate'].astype(np.float32)
+ raw_temp = raw_data['temperature'].astype(np.float32)
+
+ if 'heating_rates' in raw_data:
+ betas = raw_data['heating_rates'].astype(np.float64)
+ lengths = raw_data['lengths'].astype(int)
+ else:
+ betas = np.array([raw_params.get('beta', 1.0)])
+ lengths = np.array([len(raw_rate)])
+ raw_rate = raw_rate[np.newaxis, :]
+ raw_temp = raw_temp[np.newaxis, :]
+
+ with torch.no_grad():
+ pred = model.predict(x, scan_mask=scan_mask, sigmas=sigmas_tensor,
+ flux_scales=flux_scales,
+ n_samples=args.n_posterior_samples,
+ temperature=args.temperature)
+
+ if pred['stats'][mech] is None:
+ continue
+
+ theta_mean = pred['stats'][mech]['mean'][0].cpu().numpy()
+ samples = pred['samples'][mech][0].cpu().numpy()
+
+ from scipy.stats import gaussian_kde
+ theta_map = np.zeros_like(theta_mean)
+ for d in range(len(theta_mean)):
+ s = samples[:, d]
+ if np.std(s) < 1e-10:
+ theta_map[d] = np.mean(s)
+ else:
+ try:
+ kde = gaussian_kde(s)
+ grid = np.linspace(s.min(), s.max(), 200)
+ theta_map[d] = grid[np.argmax(kde(grid))]
+ except Exception:
+ theta_map[d] = np.median(s)
+
+ base_params = dict(raw_params)
+
+ recon_mean = reconstruct_tpd_signal(theta_mean, mech, base_params, betas)
+ recon_map = reconstruct_tpd_signal(theta_map, mech, base_params, betas)
+
+ nrmse_mean_list = []
+ nrmse_map_list = []
+ r2_mean_list = []
+ r2_map_list = []
+
+ for s_idx in range(len(betas)):
+ obs_rate = raw_rate[s_idx]
+ length = lengths[s_idx]
+
+ if recon_mean[s_idx]['success']:
+ v = signal_nrmse(obs_rate, recon_mean[s_idx]['rate'], length)
+ r = signal_r2(obs_rate, recon_mean[s_idx]['rate'], length)
+ if np.isfinite(v):
+ nrmse_mean_list.append(v)
+ if np.isfinite(r):
+ r2_mean_list.append(r)
+ if recon_map[s_idx]['success']:
+ v = signal_nrmse(obs_rate, recon_map[s_idx]['rate'], length)
+ r = signal_r2(obs_rate, recon_map[s_idx]['rate'], length)
+ if np.isfinite(v):
+ nrmse_map_list.append(v)
+ if np.isfinite(r):
+ r2_map_list.append(r)
+
+ if nrmse_mean_list:
+ per_mech_nrmse_mean[mech].append(np.mean(nrmse_mean_list))
+ if r2_mean_list:
+ per_mech_r2_mean[mech].append(np.mean(r2_mean_list))
+ if nrmse_map_list:
+ per_mech_nrmse_map[mech].append(np.mean(nrmse_map_list))
+ if r2_map_list:
+ per_mech_r2_map[mech].append(np.mean(r2_map_list))
+
+ sample_nrmses = []
+ n_recon = min(args.n_recon_samples, samples.shape[0])
+ sample_indices = np.random.choice(samples.shape[0], n_recon, replace=False)
+ for si in sample_indices:
+ recon_s = reconstruct_tpd_signal(samples[si], mech, base_params, betas)
+ nrmses = []
+ for s_idx in range(len(betas)):
+ if recon_s[s_idx]['success']:
+ v = signal_nrmse(raw_rate[s_idx], recon_s[s_idx]['rate'], lengths[s_idx])
+ if np.isfinite(v):
+ nrmses.append(v)
+ if nrmses:
+ sample_nrmses.append(np.mean(nrmses))
+ if sample_nrmses:
+ per_mech_nrmse_samples[mech].append(np.median(sample_nrmses))
+
+ # Visualization
+ if vis_count[mech] < args.n_visualize and recon_mean[0]['success']:
+ fig, axes = plt.subplots(1, len(betas), figsize=(5 * len(betas), 4))
+ if len(betas) == 1:
+ axes = [axes]
+ for s_idx, ax in enumerate(axes):
+ length = lengths[s_idx]
+ obs_temp = raw_temp[s_idx, :length]
+ obs_rate_s = raw_rate[s_idx, :length]
+ ax.plot(obs_temp, obs_rate_s, 'k-', lw=1.5, label='Observed', alpha=0.8)
+
+ if recon_mean[s_idx]['success']:
+ r_temp = recon_mean[s_idx]['temperature']
+ r_rate = recon_mean[s_idx]['rate']
+ min_len = min(length, len(r_temp))
+ nrmse_val = signal_nrmse(obs_rate_s, r_rate[:length] if length <= len(r_rate) else r_rate, length)
+ lbl = f'Mean (NRMSE={nrmse_val:.3f})' if np.isfinite(nrmse_val) else 'Mean (NRMSE=N/A)'
+ ax.plot(r_temp[:min_len], r_rate[:min_len], 'r--', lw=1.2, label=lbl)
+
+ if recon_map[s_idx]['success']:
+ r_temp = recon_map[s_idx]['temperature']
+ r_rate = recon_map[s_idx]['rate']
+ min_len = min(length, len(r_temp))
+ nrmse_val = signal_nrmse(obs_rate_s, r_rate[:length] if length <= len(r_rate) else r_rate, length)
+ lbl = f'MAP (NRMSE={nrmse_val:.3f})' if np.isfinite(nrmse_val) else 'MAP (NRMSE=N/A)'
+ ax.plot(r_temp[:min_len], r_rate[:min_len], 'b:', lw=1.2, label=lbl)
+
+ for si in sample_indices[:3]:
+ recon_s = reconstruct_tpd_signal(samples[si], mech, base_params, [betas[s_idx]])
+ if recon_s[0]['success']:
+ r_temp = recon_s[0]['temperature']
+ r_rate = recon_s[0]['rate']
+ min_len = min(length, len(r_temp))
+ ax.plot(r_temp[:min_len], r_rate[:min_len], '-', lw=0.5,
+ alpha=0.3, color='gray')
+
+ ax.set_xlabel('Temperature (K)')
+ ax.set_ylabel('Rate')
+ ax.set_title(f'β={betas[s_idx]:.2f} K/s')
+ ax.legend(fontsize=7)
+
+ fig.suptitle(f'{mech} sample {idx}', fontsize=12)
+ plt.tight_layout()
+ plt.savefig(eval_dir / f"recon_{mech}_{vis_count[mech]:03d}.png", dpi=150)
+ plt.close(fig)
+ vis_count[mech] += 1
+
+ print("\n" + "=" * 60)
+ print("SIGNAL RECONSTRUCTION METRICS (TPD)")
+ print("=" * 60)
+
+ results = {}
+ for mech in TPD_MECHANISM_LIST:
+ if not per_mech_nrmse_mean[mech]:
+ continue
+
+ nrmse_mean = np.array(per_mech_nrmse_mean[mech])
+ nrmse_map = np.array(per_mech_nrmse_map[mech])
+ nrmse_samp = np.array(per_mech_nrmse_samples[mech]) if per_mech_nrmse_samples[mech] else np.array([])
+ r2_mean = np.array(per_mech_r2_mean[mech])
+ r2_map = np.array(per_mech_r2_map[mech])
+
+ results[mech] = {
+ 'n_samples': len(nrmse_mean),
+ 'nrmse_mean': {'median': float(np.median(nrmse_mean)),
+ 'mean': float(np.mean(nrmse_mean)),
+ 'std': float(np.std(nrmse_mean))},
+ 'nrmse_map': {'median': float(np.median(nrmse_map)),
+ 'mean': float(np.mean(nrmse_map)),
+ 'std': float(np.std(nrmse_map))},
+ 'r2_signal_mean': {'median': float(np.median(r2_mean)),
+ 'mean': float(np.mean(r2_mean))},
+ 'r2_signal_map': {'median': float(np.median(r2_map)),
+ 'mean': float(np.mean(r2_map))},
+ }
+ if len(nrmse_samp) > 0:
+ results[mech]['nrmse_posterior_median'] = {
+ 'median': float(np.median(nrmse_samp)),
+ 'mean': float(np.mean(nrmse_samp)),
+ }
+
+ print(f"\n{mech} ({len(nrmse_mean)} samples):")
+ print(f" Signal NRMSE (mean est): median={np.median(nrmse_mean):.4f} "
+ f"mean={np.mean(nrmse_mean):.4f} ± {np.std(nrmse_mean):.4f}")
+ print(f" Signal NRMSE (MAP est): median={np.median(nrmse_map):.4f} "
+ f"mean={np.mean(nrmse_map):.4f} ± {np.std(nrmse_map):.4f}")
+ if len(nrmse_samp) > 0:
+ print(f" Signal NRMSE (post. med): median={np.median(nrmse_samp):.4f} "
+ f"mean={np.mean(nrmse_samp):.4f}")
+ print(f" Signal R² (mean est): median={np.median(r2_mean):.4f}")
+ print(f" Signal R² (MAP est): median={np.median(r2_map):.4f}")
+
+ with open(eval_dir / "reconstruction_results.json", "w") as f:
+ json.dump(results, f, indent=2)
+
+ if raw_per_mechanism:
+ import shutil
+ shutil.rmtree(tmp_dir, ignore_errors=True)
+
+ print(f"\nResults saved to {eval_dir}")
+ print(f"Visualizations: {sum(vis_count.values())} plots saved")
+
+
+if __name__ == "__main__":
+ args = parse_args()
+ if args.domain == "ec":
+ evaluate_ec(args)
+ else:
+ evaluate_tpd(args)
diff --git a/flow_model.py b/flow_model.py
new file mode 100644
index 0000000000000000000000000000000000000000..f04e57a578f6525016aeb7aa51e862c8d4aab34e
--- /dev/null
+++ b/flow_model.py
@@ -0,0 +1,626 @@
+"""
+Conditional Normalizing Flow for Electrochemical Parameter Inference.
+
+Models p(theta | x) where:
+ theta = simulator parameters (variable dimension per mechanism)
+ x = (E(t), j(t), t) -- observed electrochemical signal [3, T]
+
+Supports two coupling layer types:
+ - Affine: simple scale+shift (original RealNVP)
+ - Spline: rational-quadratic spline (Neural Spline Flows, Durkan et al. 2019)
+
+Architecture:
+ 1. SignalEncoder: 1D CNN + global pooling -> fixed-size context vector
+ 2. ConditionalFlow: Coupling layers (affine or spline) conditioned on context
+
+Training objective: Negative log-likelihood (NLL)
+ L = -E[log q_phi(theta | x)]
+ = -E[log p_z(f^{-1}(theta; x)) + log |det df^{-1}/d_theta|]
+"""
+
+import torch
+import torch.nn as nn
+import torch.nn.functional as F
+import math
+
+
+# =============================================================================
+# Signal Encoder: x -> context vector
+# =============================================================================
+
+class SignalEncoder(nn.Module):
+ """
+ Encode variable-length electrochemical waveform into a fixed-size context vector.
+
+ Architecture: 1D CNN -> Global Average Pooling -> MLP
+ Input: [B, 3, T] (potential, flux, time)
+ Output: [B, d_context]
+ """
+ def __init__(self, in_channels=3, d_model=128, d_context=128):
+ super().__init__()
+ self.conv = nn.Sequential(
+ nn.Conv1d(in_channels, d_model // 2, kernel_size=7, padding=3),
+ nn.GELU(),
+ nn.Conv1d(d_model // 2, d_model, kernel_size=5, padding=2),
+ nn.GELU(),
+ nn.Conv1d(d_model, d_model, kernel_size=3, padding=1),
+ nn.GELU(),
+ )
+ self.pool_proj = nn.Sequential(
+ nn.Linear(d_model, d_context),
+ nn.GELU(),
+ nn.Linear(d_context, d_context),
+ )
+
+ def forward(self, x, mask=None):
+ h = self.conv(x)
+ if mask is not None:
+ mask_expanded = mask.unsqueeze(1).float()
+ h = (h * mask_expanded).sum(dim=-1) / mask_expanded.sum(dim=-1).clamp(min=1)
+ else:
+ h = h.mean(dim=-1)
+ context = self.pool_proj(h)
+ return context
+
+
+# =============================================================================
+# Normalizing Flow Components
+# =============================================================================
+
+class ActNorm(nn.Module):
+ """Activation normalization (from Glow) with data-dependent init."""
+ def __init__(self, dim):
+ super().__init__()
+ self.log_scale = nn.Parameter(torch.zeros(dim))
+ self.bias = nn.Parameter(torch.zeros(dim))
+ self.register_buffer('_initialized', torch.tensor(False))
+
+ @property
+ def initialized(self):
+ return bool(self._initialized.item())
+
+ @initialized.setter
+ def initialized(self, value):
+ self._initialized.fill_(value)
+
+ def initialize(self, x):
+ with torch.no_grad():
+ self.bias.data = -x.mean(dim=0)
+ if x.shape[0] > 1:
+ std = x.std(dim=0).clamp(min=0.1)
+ self.log_scale.data = -torch.log(std)
+ else:
+ self.log_scale.data.zero_()
+ self.initialized = True
+
+ def forward(self, x):
+ if not self.initialized:
+ self.initialize(x)
+ y = (x + self.bias) * torch.exp(self.log_scale)
+ log_det = self.log_scale.sum()
+ return y, log_det
+
+ def inverse(self, y):
+ x = y * torch.exp(-self.log_scale) - self.bias
+ return x
+
+
+class ConditionalAffineCoupling(nn.Module):
+ """
+ Conditional affine coupling layer.
+
+ Forward (z -> theta): theta_b = z_b * exp(s) + t
+ Inverse (theta -> z): z_b = (theta_b - t) * exp(-s)
+
+ The log-scale s is soft-clamped to [-s_clamp, s_clamp]. With s_clamp=2.0
+ each layer can scale by up to exp(2)≈7.4x per dimension, giving the flow
+ enough dynamic range to produce both narrow (identifiable) and wide
+ (non-identifiable) posteriors.
+ """
+ def __init__(self, dim, d_context, hidden_dim=128, mask_type='even', s_clamp=2.0):
+ super().__init__()
+ self.dim = dim
+ self.s_clamp = s_clamp
+
+ if mask_type == 'even':
+ self.register_buffer('mask', torch.arange(dim) % 2 == 0)
+ else:
+ self.register_buffer('mask', torch.arange(dim) % 2 == 1)
+
+ n_a = self.mask.sum().item()
+ n_b = dim - n_a
+
+ self.net = nn.Sequential(
+ nn.Linear(n_a + d_context, hidden_dim),
+ nn.GELU(),
+ nn.Linear(hidden_dim, hidden_dim),
+ nn.GELU(),
+ nn.Linear(hidden_dim, 2 * n_b),
+ )
+ nn.init.zeros_(self.net[-1].weight)
+ nn.init.zeros_(self.net[-1].bias)
+
+ def _clamp_s(self, s_raw):
+ """Soft-clamp log-scale using 2*tanh(s/2) for smooth gradients everywhere."""
+ return self.s_clamp * torch.tanh(s_raw / self.s_clamp)
+
+ def forward(self, z, context):
+ z_a = z[:, self.mask]
+ z_b = z[:, ~self.mask]
+
+ st = self.net(torch.cat([z_a, context], dim=-1))
+ s, t = st.chunk(2, dim=-1)
+ s = self._clamp_s(s)
+
+ theta_b = z_b * torch.exp(s) + t
+ log_det = s.sum(dim=-1)
+
+ theta = torch.empty_like(z)
+ theta[:, self.mask] = z_a
+ theta[:, ~self.mask] = theta_b
+ return theta, log_det
+
+ def inverse(self, theta, context):
+ theta_a = theta[:, self.mask]
+ theta_b = theta[:, ~self.mask]
+
+ st = self.net(torch.cat([theta_a, context], dim=-1))
+ s, t = st.chunk(2, dim=-1)
+ s = self._clamp_s(s)
+
+ z_b = (theta_b - t) * torch.exp(-s)
+ log_det = -s.sum(dim=-1)
+
+ z = torch.empty_like(theta)
+ z[:, self.mask] = theta_a
+ z[:, ~self.mask] = z_b
+ return z, log_det
+
+
+# =============================================================================
+# Rational-Quadratic Spline Transform (Durkan et al. 2019)
+# =============================================================================
+
+MIN_BIN_FRACTION = 1e-2 # each bin gets at least 1% of the total width/height
+MIN_DERIVATIVE = 1e-2
+
+
+def _prepare_spline_params(widths, heights, derivatives, tail_bound):
+ """Shared preprocessing for forward and inverse spline transforms.
+
+ Enforces minimum bin width/height (following nflows convention) to prevent
+ degenerate near-step-function splines that break invertibility.
+ """
+ K = widths.shape[-1]
+ total = 2 * tail_bound
+
+ widths = F.softmax(widths, dim=-1)
+ widths = MIN_BIN_FRACTION + (1 - K * MIN_BIN_FRACTION) * widths
+ widths = widths * total
+
+ heights = F.softmax(heights, dim=-1)
+ heights = MIN_BIN_FRACTION + (1 - K * MIN_BIN_FRACTION) * heights
+ heights = heights * total
+
+ derivatives = F.softplus(derivatives) + MIN_DERIVATIVE
+
+ cumwidths = torch.cumsum(widths, dim=-1)
+ cumwidths = F.pad(cumwidths, (1, 0), value=0.0) - tail_bound
+ cumheights = torch.cumsum(heights, dim=-1)
+ cumheights = F.pad(cumheights, (1, 0), value=0.0) - tail_bound
+
+ return widths, heights, derivatives, cumwidths, cumheights
+
+
+def rational_quadratic_spline_forward(x, widths, heights, derivatives, tail_bound=5.0):
+ """
+ Apply monotonic rational-quadratic spline transform (forward direction).
+
+ Uses identity transform outside [-tail_bound, tail_bound].
+
+ Args:
+ x: [B, D] input values
+ widths: [B, D, K] bin widths (pre-softmax)
+ heights: [B, D, K] bin heights (pre-softmax)
+ derivatives: [B, D, K+1] knot derivatives (pre-softplus)
+ Returns:
+ y: [B, D] transformed values
+ log_det: [B, D] log absolute derivative per dimension
+ """
+ K = widths.shape[-1]
+ widths, heights, derivatives, cumwidths, cumheights = \
+ _prepare_spline_params(widths, heights, derivatives, tail_bound)
+
+ inside = (x >= -tail_bound) & (x <= tail_bound)
+
+ # Default: identity (for tails)
+ y = x.clone()
+ log_det = torch.zeros_like(x)
+
+ if not inside.any():
+ return y, log_det
+
+ x_in = x[inside]
+
+ # Bin lookup on the interior cumwidths
+ # Flatten the relevant cumwidths for searchsorted
+ cw_in = cumwidths[inside] # [N_inside, K+1]
+ bin_idx = torch.searchsorted(cw_in[:, 1:].contiguous(), x_in.unsqueeze(-1)).squeeze(-1)
+ bin_idx = bin_idx.clamp(0, K - 1)
+
+ idx = bin_idx.unsqueeze(-1)
+ w_k = widths[inside].gather(-1, idx).squeeze(-1)
+ h_k = heights[inside].gather(-1, idx).squeeze(-1)
+ d_k = derivatives[inside].gather(-1, idx).squeeze(-1)
+ d_k1 = derivatives[inside].gather(-1, idx + 1).squeeze(-1)
+ cw_k = cw_in.gather(-1, idx).squeeze(-1)
+ ch_k = cumheights[inside].gather(-1, idx).squeeze(-1)
+
+ xi = (x_in - cw_k) / w_k
+ xi = xi.clamp(1e-6, 1.0 - 1e-6)
+
+ s_k = h_k / w_k
+ numer = h_k * (s_k * xi.pow(2) + d_k * xi * (1 - xi))
+ denom = s_k + (d_k + d_k1 - 2 * s_k) * xi * (1 - xi)
+ y[inside] = ch_k + numer / denom
+
+ deriv_numer = s_k.pow(2) * (d_k1 * xi.pow(2) + 2 * s_k * xi * (1 - xi) + d_k * (1 - xi).pow(2))
+ log_det[inside] = torch.log(deriv_numer.clamp(min=1e-8)) - 2 * torch.log(denom.abs().clamp(min=1e-8))
+
+ log_det = log_det.clamp(-20.0, 20.0)
+ return y, log_det
+
+
+def rational_quadratic_spline_inverse(y, widths, heights, derivatives, tail_bound=5.0):
+ """
+ Apply inverse rational-quadratic spline transform.
+
+ Uses identity transform outside [-tail_bound, tail_bound].
+ """
+ K = widths.shape[-1]
+ widths, heights, derivatives, cumwidths, cumheights = \
+ _prepare_spline_params(widths, heights, derivatives, tail_bound)
+
+ inside = (y >= -tail_bound) & (y <= tail_bound)
+
+ x = y.clone()
+ log_det = torch.zeros_like(y)
+
+ if not inside.any():
+ return x, log_det
+
+ y_in = y[inside]
+
+ ch_in = cumheights[inside]
+ bin_idx = torch.searchsorted(ch_in[:, 1:].contiguous(), y_in.unsqueeze(-1)).squeeze(-1)
+ bin_idx = bin_idx.clamp(0, K - 1)
+
+ idx = bin_idx.unsqueeze(-1)
+ w_k = widths[inside].gather(-1, idx).squeeze(-1)
+ h_k = heights[inside].gather(-1, idx).squeeze(-1)
+ d_k = derivatives[inside].gather(-1, idx).squeeze(-1)
+ d_k1 = derivatives[inside].gather(-1, idx + 1).squeeze(-1)
+ cw_k = cumwidths[inside].gather(-1, idx).squeeze(-1)
+ ch_k = ch_in.gather(-1, idx).squeeze(-1)
+
+ s_k = h_k / w_k
+ y_rel = y_in - ch_k
+
+ a = h_k * (s_k - d_k) + y_rel * (d_k + d_k1 - 2 * s_k)
+ b = h_k * d_k - y_rel * (d_k + d_k1 - 2 * s_k)
+ c = -s_k * y_rel
+
+ discriminant = b.pow(2) - 4 * a * c
+ sqrt_disc = torch.sqrt(discriminant.clamp(min=1e-8))
+ xi = (2 * c) / (-b - sqrt_disc).clamp(max=-1e-8)
+ xi = xi.clamp(1e-6, 1.0 - 1e-6)
+
+ x[inside] = cw_k + w_k * xi
+
+ deriv_numer = s_k.pow(2) * (d_k1 * xi.pow(2) + 2 * s_k * xi * (1 - xi) + d_k * (1 - xi).pow(2))
+ denom = s_k + (d_k + d_k1 - 2 * s_k) * xi * (1 - xi)
+ log_det[inside] = torch.log(deriv_numer.clamp(min=1e-8)) - 2 * torch.log(denom.abs().clamp(min=1e-8))
+
+ log_det = log_det.clamp(-20.0, 20.0)
+ return x, -log_det
+
+
+class ConditionalSplineCoupling(nn.Module):
+ """
+ Conditional Neural Spline coupling layer (Durkan et al. 2019).
+
+ Same interface as ConditionalAffineCoupling but uses rational-quadratic
+ splines instead of affine transforms. Much more expressive per layer.
+
+ Args:
+ dim: parameter dimension
+ d_context: context vector dimension
+ hidden_dim: hidden layer size in conditioner network
+ mask_type: 'even' or 'odd'
+ n_bins: number of spline bins (K)
+ tail_bound: spline domain [-B, B]
+ """
+ def __init__(self, dim, d_context, hidden_dim=128, mask_type='even',
+ n_bins=8, tail_bound=5.0):
+ super().__init__()
+ self.dim = dim
+ self.n_bins = n_bins
+ self.tail_bound = tail_bound
+
+ if mask_type == 'even':
+ self.register_buffer('mask', torch.arange(dim) % 2 == 0)
+ else:
+ self.register_buffer('mask', torch.arange(dim) % 2 == 1)
+
+ n_a = self.mask.sum().item()
+ n_b = dim - n_a
+ self.n_b = n_b
+
+ # Output: K widths + K heights + (K+1) derivatives per transformed dim
+ n_out = n_b * (3 * n_bins + 1)
+
+ self.net = nn.Sequential(
+ nn.Linear(n_a + d_context, hidden_dim),
+ nn.GELU(),
+ nn.Linear(hidden_dim, hidden_dim),
+ nn.GELU(),
+ nn.Linear(hidden_dim, n_out),
+ )
+ nn.init.zeros_(self.net[-1].weight)
+ nn.init.zeros_(self.net[-1].bias)
+
+ def _get_spline_params(self, z_a, context):
+ """Compute spline parameters from conditioner network."""
+ raw = self.net(torch.cat([z_a, context], dim=-1)) # [B, n_b*(3K+1)]
+ raw = raw.view(-1, self.n_b, 3 * self.n_bins + 1)
+ K = self.n_bins
+ widths = raw[..., :K]
+ heights = raw[..., K:2*K]
+ derivatives = raw[..., 2*K:]
+ # Bound raw outputs to prevent extreme spline configurations.
+ # softmax(widths/heights) is shift-invariant so bounding doesn't
+ # reduce expressiveness, it just prevents near-one-hot bin allocations.
+ # softplus(derivatives) with bounded input caps the knot slopes.
+ widths = widths.clamp(-5.0, 5.0)
+ heights = heights.clamp(-5.0, 5.0)
+ derivatives = derivatives.clamp(-5.0, 5.0)
+ return widths, heights, derivatives
+
+ def forward(self, z, context):
+ z_a = z[:, self.mask]
+ z_b = z[:, ~self.mask]
+
+ widths, heights, derivatives = self._get_spline_params(z_a, context)
+ theta_b, log_det_per_dim = rational_quadratic_spline_forward(
+ z_b, widths, heights, derivatives, self.tail_bound)
+ log_det = log_det_per_dim.sum(dim=-1)
+
+ theta = torch.empty_like(z)
+ theta[:, self.mask] = z_a
+ theta[:, ~self.mask] = theta_b
+ return theta, log_det
+
+ def inverse(self, theta, context):
+ theta_a = theta[:, self.mask]
+ theta_b = theta[:, ~self.mask]
+
+ widths, heights, derivatives = self._get_spline_params(theta_a, context)
+ z_b, log_det_per_dim = rational_quadratic_spline_inverse(
+ theta_b, widths, heights, derivatives, self.tail_bound)
+ log_det = log_det_per_dim.sum(dim=-1)
+
+ z = torch.empty_like(theta)
+ z[:, self.mask] = theta_a
+ z[:, ~self.mask] = z_b
+ return z, log_det
+
+
+# =============================================================================
+# Full Conditional Normalizing Flow
+# =============================================================================
+
+class ConditionalFlow(nn.Module):
+ """
+ Conditional normalizing flow for p(theta | x).
+
+ Maps between base distribution z ~ N(0, I) and parameter space theta,
+ conditioned on the observed signal x.
+
+ Supports both affine and spline coupling layers.
+ """
+ def __init__(
+ self,
+ theta_dim=3,
+ d_context=128,
+ n_coupling_layers=8,
+ hidden_dim=128,
+ d_model=128,
+ coupling_type='spline',
+ n_bins=8,
+ tail_bound=5.0,
+ ):
+ super().__init__()
+ self.theta_dim = theta_dim
+ self.d_context = d_context
+ self.coupling_type = coupling_type
+ self.tail_bound = tail_bound
+
+ self.encoder = SignalEncoder(
+ in_channels=3, d_model=d_model, d_context=d_context
+ )
+
+ self.flows = nn.ModuleList()
+ for i in range(n_coupling_layers):
+ mask_type = 'even' if i % 2 == 0 else 'odd'
+ self.flows.append(ActNorm(theta_dim))
+ if coupling_type == 'spline':
+ self.flows.append(
+ ConditionalSplineCoupling(
+ dim=theta_dim,
+ d_context=d_context,
+ hidden_dim=hidden_dim,
+ mask_type=mask_type,
+ n_bins=n_bins,
+ tail_bound=tail_bound,
+ )
+ )
+ else:
+ self.flows.append(
+ ConditionalAffineCoupling(
+ dim=theta_dim,
+ d_context=d_context,
+ hidden_dim=hidden_dim,
+ mask_type=mask_type,
+ )
+ )
+
+ self.register_buffer('theta_mean', torch.zeros(theta_dim))
+ self.register_buffer('theta_std', torch.ones(theta_dim))
+
+ def set_theta_stats(self, mean, std):
+ self.theta_mean.copy_(torch.as_tensor(mean, dtype=torch.float32))
+ self.theta_std.copy_(torch.as_tensor(std, dtype=torch.float32))
+
+ def normalize_theta(self, theta):
+ return (theta - self.theta_mean) / self.theta_std
+
+ def denormalize_theta(self, theta_norm):
+ return theta_norm * self.theta_std + self.theta_mean
+
+ def encode_signal(self, x, mask=None):
+ return self.encoder(x, mask=mask)
+
+ def forward_flow(self, z, context):
+ total_log_det = torch.zeros(z.shape[0], device=z.device)
+ h = z
+ for layer in self.flows:
+ if isinstance(layer, ActNorm):
+ h, ld = layer(h)
+ total_log_det += ld
+ else:
+ h, ld = layer(h, context)
+ total_log_det += ld
+ return h, total_log_det
+
+ def inverse_flow(self, theta_norm, context):
+ total_log_det = torch.zeros(theta_norm.shape[0], device=theta_norm.device)
+ h = theta_norm
+ for layer in reversed(self.flows):
+ if isinstance(layer, ActNorm):
+ h = layer.inverse(h)
+ total_log_det -= layer.log_scale.sum()
+ else:
+ h, ld = layer.inverse(h, context)
+ total_log_det += ld
+ return h, total_log_det
+
+ def log_prob(self, theta, x, mask=None):
+ context = self.encode_signal(x, mask=mask)
+ theta_norm = self.normalize_theta(theta)
+ theta_norm = theta_norm.clamp(-self.tail_bound, self.tail_bound)
+ z, log_det = self.inverse_flow(theta_norm, context)
+ log_pz = -0.5 * (z ** 2 + math.log(2 * math.pi)).sum(dim=-1)
+ log_det_norm = -torch.log(self.theta_std).sum()
+ log_p = log_pz + log_det + log_det_norm
+ return log_p.clamp(min=-50.0, max=50.0)
+
+ @torch.no_grad()
+ def sample(self, x, mask=None, n_samples=100):
+ B = x.shape[0]
+ context = self.encode_signal(x, mask=mask)
+ context_rep = context.unsqueeze(1).expand(-1, n_samples, -1)
+ context_rep = context_rep.reshape(B * n_samples, -1)
+ z = torch.randn(B * n_samples, self.theta_dim, device=x.device)
+ theta_norm, _ = self.forward_flow(z, context_rep)
+ theta = self.denormalize_theta(theta_norm)
+ return theta.reshape(B, n_samples, self.theta_dim)
+
+ @torch.no_grad()
+ def posterior_stats(self, x, mask=None, n_samples=1000):
+ samples = self.sample(x, mask=mask, n_samples=n_samples)
+ return {
+ 'mean': samples.mean(dim=1),
+ 'std': samples.std(dim=1),
+ 'median': samples.median(dim=1).values,
+ 'q05': samples.quantile(0.05, dim=1),
+ 'q95': samples.quantile(0.95, dim=1),
+ 'samples': samples,
+ }
+
+
+# Backward-compatible alias
+ConditionalRealNVP = ConditionalFlow
+
+
+# =============================================================================
+# Helper
+# =============================================================================
+
+THETA_NAMES = ['log10(K0)', 'alpha', 'log10(dB)']
+
+# Per-mechanism parameter definitions (variable dim per mechanism)
+MECHANISM_PARAMS = {
+ 'Nernst': {
+ 'names': ['E0_offset', 'log10(dA)', 'log10(dB)'],
+ 'dim': 3,
+ },
+ 'BV': {
+ 'names': ['log10(K0)', 'alpha', 'log10(dB)'],
+ 'dim': 3,
+ },
+ 'MHC': {
+ 'names': ['log10(K0)', 'log10(reorg_e)', 'log10(dB)'],
+ 'dim': 3,
+ },
+ 'Ads': {
+ 'names': ['log10(K0)', 'alpha', 'log10(Gamma_sat)'],
+ 'dim': 3,
+ },
+ 'EC': {
+ 'names': ['log10(K0)', 'alpha', 'log10(kc)', 'log10(dB)'],
+ 'dim': 4,
+ },
+ 'LH': {
+ 'names': ['log10(K0)', 'alpha', 'log10(KA_eq)', 'log10(KB_eq)', 'log10(dB)'],
+ 'dim': 5,
+ },
+}
+
+MECHANISM_LIST = ['Nernst', 'BV', 'MHC', 'Ads', 'EC', 'LH']
+
+
+def count_parameters(model):
+ return sum(p.numel() for p in model.parameters() if p.requires_grad)
+
+
+if __name__ == "__main__":
+ B, T = 4, 800
+ theta_dim = 3
+
+ x = torch.randn(B, 3, T)
+ theta = torch.randn(B, theta_dim)
+ mask = torch.ones(B, T, dtype=torch.bool)
+
+ for coupling_type in ['affine', 'spline']:
+ print(f"\n{'=' * 50}")
+ print(f"Testing ConditionalFlow (coupling={coupling_type})")
+ print(f"{'=' * 50}")
+
+ model = ConditionalFlow(
+ theta_dim=theta_dim,
+ d_context=128,
+ n_coupling_layers=8,
+ hidden_dim=128,
+ d_model=128,
+ coupling_type=coupling_type,
+ )
+
+ print(f"Parameters: {count_parameters(model):,}")
+
+ log_q = model.log_prob(theta, x, mask=mask)
+ print(f"log_prob shape: {log_q.shape}, values: {log_q}")
+
+ samples = model.sample(x, mask=mask, n_samples=100)
+ print(f"Samples shape: {samples.shape}")
+ print(f"Sample mean: {samples.mean(dim=1)}")
+ print(f"Sample std: {samples.std(dim=1)}")
diff --git a/generate_dataset_diffec.py b/generate_dataset_diffec.py
new file mode 100644
index 0000000000000000000000000000000000000000..d542e3cea20fdbe31bec736a81397d5feea94714
--- /dev/null
+++ b/generate_dataset_diffec.py
@@ -0,0 +1,1781 @@
+"""
+Dataset Generation Script for DiffEC Flow Matching Model
+
+This script generates simulated electrochemical datasets using DiffEC simulators.
+Each sample contains:
+- Input: current (flux) and potential profiles over time
+- Output: 1D temporal concentration distribution for oxidized/reduced species
+
+The data format is designed for training flow matching models that learn to
+generate concentration profiles from electrochemical measurements.
+
+Supports multiprocessing for fast parallel dataset generation.
+"""
+
+import os
+import sys
+import json
+import argparse
+import numpy as np
+from tqdm import tqdm
+from multiprocessing import Pool, cpu_count
+from functools import partial
+
+# Pure NumPy/SciPy backend — no JAX dependency for data generation
+import warnings
+import scipy.linalg
+
+warnings.filterwarnings("ignore", message=".*[Ii]ll.conditioned.*")
+
+
+# =============================================================================
+# Simulation Hyperparameters (from DiffEC)
+# =============================================================================
+CYCLES = 1
+DELTA_X = 2e-6 # Initial space step
+DELTA_THETA = 5e-2 # Potential step
+EXPANDING_GRID_FACTOR = 1.05
+SIMULATION_SPACE_MULTIPLE = 6.0
+
+
+# =============================================================================
+# Grid and Coefficient Functions (adapted from DiffEC)
+# =============================================================================
+
+def calc_n(Xi, deltaX, maxX, expanding_grid_factor):
+ """Calculate number of grid points."""
+ current_X = Xi
+ n = 0
+ dX = deltaX
+ while current_X < maxX:
+ current_X += dX
+ dX = dX * expanding_grid_factor
+ n += 1
+ return n + 1
+
+
+def gen_grid(Xi, deltaX, maxX, expanding_grid_factor):
+ """Generate expanding spatial grid."""
+ n = calc_n(Xi, deltaX, maxX, expanding_grid_factor)
+ X_grid = np.zeros(n)
+ X_grid[0] = Xi
+ dX = deltaX
+ for i in range(1, n):
+ X_grid[i] = X_grid[i-1] + dX
+ dX = dX * expanding_grid_factor
+ return X_grid, n
+
+
+def ini_conc(n, C_A_bulk, C_B_bulk):
+ """Initialize concentration arrays."""
+ conc = np.zeros(2 * n)
+ conc[:n] = C_A_bulk
+ conc[n:] = C_B_bulk
+ conc_d = conc.copy()
+ return conc, conc_d
+
+
+def ini_coeff(n):
+ """Initialize coefficient arrays."""
+ A_matrix = np.zeros((2*n, 2*n))
+ aA = np.zeros(n)
+ bA = np.zeros(n)
+ cA = np.zeros(n)
+ aB = np.zeros(n)
+ bB = np.zeros(n)
+ cB = np.zeros(n)
+ return A_matrix, aA, bA, cA, aB, bB, cB
+
+
+def calc_abc_linear(n, X_grid, deltaT, a, b, c, D):
+ """Calculate coefficients for linear diffusion."""
+ for i in range(1, n-1):
+ deltaX_m = X_grid[i] - X_grid[i-1]
+ deltaX_p = X_grid[i+1] - X_grid[i]
+ a[i] = D * (-2.0 * deltaT) / (deltaX_m * (deltaX_m + deltaX_p))
+ c[i] = D * (-2.0 * deltaT) / (deltaX_p * (deltaX_m + deltaX_p))
+ b[i] = 1.0 - a[i] - c[i]
+ return a, b, c
+
+
+def update_d(Theta, conc, conc_d, n, C_A_bulk, C_B_bulk, kinetics, **kw):
+ """Update RHS vector."""
+ conc_d[:] = conc[:]
+ if kinetics == 'Nernst':
+ conc_d[n-1] = 1.0 / (1.0 + np.exp(-Theta))
+ conc_d[n] = 0.0
+ elif kinetics in ('BV', 'MHC'):
+ conc_d[n-1] = 0.0
+ conc_d[n] = 0.0
+ elif kinetics == 'Ads':
+ conc_d[n-1] = 0.0
+ conc_d[n] = 0.0
+ conc_d[0] = C_A_bulk
+ conc_d[2*n-1] = C_B_bulk
+ return conc_d
+
+
+# =============================================================================
+# Marcus-Hush-Chidsey (MHC) rate constants
+# =============================================================================
+
+def _mhc_integrand_red(Theta_effective, reorg_e, hermgauss_degree=50):
+ """Gauss-Hermite quadrature for MHC reduction rate integral."""
+ pts, wts = np.polynomial.hermite.hermgauss(hermgauss_degree)
+ y = 2 * np.sqrt(reorg_e) / (
+ 1.0 + np.exp(-(reorg_e * (pts * 2.0 / np.sqrt(reorg_e) - 1.0) - Theta_effective))
+ )
+ return np.sum(wts * y)
+
+
+def _mhc_integrand_ox(Theta_effective, reorg_e, hermgauss_degree=50):
+ """Gauss-Hermite quadrature for MHC oxidation rate integral."""
+ pts, wts = np.polynomial.hermite.hermgauss(hermgauss_degree)
+ y = -2.0 * np.sqrt(reorg_e) / (
+ 1.0 + np.exp(-reorg_e * (pts * 2.0 / np.sqrt(reorg_e) - 1.0) - Theta_effective)
+ )
+ return np.sum(wts * y)
+
+
+def calc_mhc_rates(Theta, K0, reorg_e):
+ """Compute MHC reduction and oxidation rate constants."""
+ I_red = _mhc_integrand_red(Theta, reorg_e)
+ I_red0 = _mhc_integrand_red(0.0, reorg_e)
+ I_ox = _mhc_integrand_ox(Theta, reorg_e)
+ I_ox0 = _mhc_integrand_ox(0.0, reorg_e)
+ K_red = K0 * I_red / I_red0
+ K_ox = K0 * I_ox / I_ox0
+ return K_red, K_ox
+
+
+def calc_matrix(A_matrix, X_grid, Theta, kinetics, n, aA, bA, cA, dA, aB, bB, cB, dB, K0, alpha, beta, **kw):
+ """Build the coefficient matrix for all supported kinetics."""
+ # Interior points for species A (reversed row indices)
+ rows_A = np.arange(n-2, 0, -1)
+ A_matrix[rows_A, rows_A - 1] = cA[1:n-1]
+ A_matrix[rows_A, rows_A] = bA[1:n-1]
+ A_matrix[rows_A, rows_A + 1] = aA[1:n-1]
+
+ # Interior points for species B
+ rows_B = np.arange(n+1, 2*n-1)
+ A_matrix[rows_B, rows_B - 1] = aB[1:n-1]
+ A_matrix[rows_B, rows_B] = bB[1:n-1]
+ A_matrix[rows_B, rows_B + 1] = cB[1:n-1]
+
+ X0 = X_grid[1] - X_grid[0]
+
+ if kinetics == 'Nernst':
+ A_matrix[n-1, n-2] = 0.0
+ A_matrix[n-1, n-1] = 1.0
+ A_matrix[n-1, n] = 0.0
+ A_matrix[n, n-2] = -dA
+ A_matrix[n, n-1] = dA
+ A_matrix[n, n] = dB
+ A_matrix[n, n+1] = -dB
+
+ elif kinetics == 'BV':
+ K_red = K0 * np.exp(-alpha * Theta)
+ K_ox = K0 * np.exp(beta * Theta)
+
+ A_matrix[n-1, n-2] = -1.0
+ A_matrix[n-1, n-1] = 1.0 + X0/dA * K_red
+ A_matrix[n-1, n] = -X0/dA * K_ox
+
+ A_matrix[n, n-1] = -X0/dB * K_red
+ A_matrix[n, n] = 1.0 + X0/dB * K_ox
+ A_matrix[n, n+1] = -1.0
+
+ elif kinetics == 'MHC':
+ reorg_e = kw.get('reorg_e', 20.0)
+ K_red, K_ox = calc_mhc_rates(Theta, K0, reorg_e)
+
+ A_matrix[n-1, n-2] = -1.0
+ A_matrix[n-1, n-1] = 1.0 + X0/dA * K_red
+ A_matrix[n-1, n] = -X0/dA * K_ox
+
+ A_matrix[n, n-1] = -X0/dB * K_red
+ A_matrix[n, n] = 1.0 + X0/dB * K_ox
+ A_matrix[n, n+1] = -1.0
+
+ elif kinetics == 'Ads':
+ K_red = K0 * np.exp(-alpha * Theta)
+ K_ox = K0 * np.exp(beta * Theta)
+ Gamma_sat = kw.get('Gamma_sat', 1.0)
+
+ A_matrix[n-1, n-2] = -1.0
+ A_matrix[n-1, n-1] = 1.0 + X0/dA * K_red * Gamma_sat
+ A_matrix[n-1, n] = -X0/dA * K_ox * Gamma_sat
+
+ A_matrix[n, n-1] = -X0/dB * K_red * Gamma_sat
+ A_matrix[n, n] = 1.0 + X0/dB * K_ox * Gamma_sat
+ A_matrix[n, n+1] = -1.0
+
+ # Far boundary conditions
+ A_matrix[0, 0] = 1.0
+ A_matrix[0, 1] = 0.0
+ A_matrix[2*n-1, 2*n-1] = 1.0
+ A_matrix[2*n-1, 2*n-2] = 0.0
+
+ return A_matrix
+
+
+def calc_flux(conc, n, dA, X_grid):
+ """Calculate current flux at electrode surface."""
+ return -dA * (conc[n-2] - conc[n-1]) / (X_grid[1] - X_grid[0])
+
+
+# =============================================================================
+# Main Simulation Function with Concentration History
+# =============================================================================
+
+def run_cv_simulation(
+ sigma=1.0,
+ K0=1.0,
+ alpha=0.5,
+ beta=None,
+ kinetics='BV',
+ C_A_bulk=1.0,
+ C_B_bulk=0.0,
+ dA=1.0,
+ dB=1.0,
+ theta_i=20.0,
+ theta_v=-20.0,
+ cycles=1,
+ n_spatial_out=64,
+ verbose=False,
+ **extra_kinetics_params,
+):
+ """
+ Run CV simulation and return full concentration history.
+
+ Parameters
+ ----------
+ sigma : float
+ Dimensionless scan rate
+ K0 : float
+ Dimensionless electrochemical rate constant
+ alpha : float
+ Cathodic transfer coefficient
+ beta : float, optional
+ Anodic transfer coefficient (default: 1 - alpha)
+ kinetics : str
+ 'BV' for Butler-Volmer or 'Nernst' for reversible
+ C_A_bulk : float
+ Dimensionless bulk concentration of oxidized species
+ C_B_bulk : float
+ Dimensionless bulk concentration of reduced species
+ dA, dB : float
+ Dimensionless diffusion coefficients
+ theta_i, theta_v : float
+ Dimensionless start and vertex potentials
+ cycles : int
+ Number of CV cycles
+ n_spatial_out : int
+ Number of spatial grid points in output (will resample)
+ verbose : bool
+ Show progress bar
+
+ Returns
+ -------
+ dict with keys:
+ - 'potential': (T,) array of potentials
+ - 'flux': (T,) array of current flux
+ - 'time': (T,) array of dimensionless time
+ - 'c_ox': (T, X) concentration of oxidized species
+ - 'c_red': (T, X) concentration of reduced species
+ - 'x_grid': (X,) spatial grid (original)
+ - 'x_grid_out': (n_spatial_out,) resampled spatial grid
+ - 'params': dict of simulation parameters
+ """
+ if beta is None:
+ beta = 1.0 - alpha
+
+ deltaT = DELTA_THETA / sigma
+ maxT = cycles * 2.0 * np.abs(theta_v - theta_i) / sigma
+ nTimeSteps = int(2 * np.abs(theta_v - theta_i) / DELTA_THETA) + 1
+
+ Esteps = np.arange(nTimeSteps)
+ E = np.where(
+ Esteps < nTimeSteps / 2.0,
+ theta_i - DELTA_THETA * Esteps,
+ theta_v + DELTA_THETA * (Esteps - nTimeSteps / 2.0)
+ )
+ E = np.tile(E, cycles)
+ total_steps = len(E)
+
+ Xi = 0.0
+ maxX = SIMULATION_SPACE_MULTIPLE * np.sqrt(maxT)
+ X_grid, n = gen_grid(Xi, DELTA_X, maxX, EXPANDING_GRID_FACTOR)
+
+ conc, conc_d = ini_conc(n, C_A_bulk, C_B_bulk)
+
+ A_matrix, aA, bA, cA, aB, bB, cB = ini_coeff(n)
+ aA, bA, cA = calc_abc_linear(n, X_grid, deltaT, aA, bA, cA, dA)
+ aB, bB, cB = calc_abc_linear(n, X_grid, deltaT, aB, bB, cB, dB)
+
+ fluxes = np.zeros(total_steps)
+ conc_A_history = []
+ conc_B_history = []
+
+ # For Nernst, the matrix is constant (no Theta-dependent terms),
+ # so we factorize once and reuse via lu_solve every timestep.
+ lu_factor = None
+ if kinetics == 'Nernst':
+ A_mat = calc_matrix(
+ A_matrix, X_grid, 0.0, kinetics, n,
+ aA, bA, cA, dA, aB, bB, cB, dB,
+ K0, alpha, beta, **extra_kinetics_params
+ )
+ lu_factor = scipy.linalg.lu_factor(A_mat)
+
+ iterator = range(total_steps)
+ if verbose:
+ iterator = tqdm(iterator, desc="Simulating CV")
+
+ for idx in iterator:
+ Theta = E[idx]
+
+ conc_d = update_d(Theta, conc, conc_d, n, C_A_bulk, C_B_bulk, kinetics)
+
+ if lu_factor is not None:
+ conc = scipy.linalg.lu_solve(lu_factor, conc_d)
+ else:
+ A_mat = calc_matrix(
+ A_matrix, X_grid, Theta, kinetics, n,
+ aA, bA, cA, dA, aB, bB, cB, dB,
+ K0, alpha, beta, **extra_kinetics_params
+ )
+ conc = scipy.linalg.solve(A_mat, conc_d)
+
+ flux = calc_flux(conc, n, dA, X_grid)
+ fluxes[idx] = flux
+
+ conc_A_history.append(conc[:n].copy())
+ conc_B_history.append(conc[n:].copy())
+
+ conc_A_history = np.stack(conc_A_history, axis=0)
+ conc_B_history = np.stack(conc_B_history, axis=0)
+
+ x_grid_out = np.linspace(X_grid[0], X_grid[-1], n_spatial_out)
+
+ c_ox_out = np.zeros((total_steps, n_spatial_out))
+ c_red_out = np.zeros((total_steps, n_spatial_out))
+ for t in range(total_steps):
+ c_ox_out[t] = np.interp(x_grid_out, X_grid, conc_A_history[t])
+ c_red_out[t] = np.interp(x_grid_out, X_grid, conc_B_history[t])
+
+ time_array = np.arange(total_steps) * float(deltaT)
+
+ params_out = {
+ 'experiment_type': 'CV',
+ 'sigma': float(sigma),
+ 'K0': float(K0),
+ 'alpha': float(alpha),
+ 'beta': float(beta),
+ 'kinetics': kinetics,
+ 'C_A_bulk': float(C_A_bulk),
+ 'C_B_bulk': float(C_B_bulk),
+ 'dA': float(dA),
+ 'dB': float(dB),
+ 'theta_i': float(theta_i),
+ 'theta_v': float(theta_v),
+ 'cycles': cycles,
+ }
+ for k, v in extra_kinetics_params.items():
+ params_out[k] = float(v) if isinstance(v, (int, float, np.floating)) else v
+
+ return {
+ 'potential': E,
+ 'flux': fluxes,
+ 'time': time_array,
+ 'c_ox': c_ox_out,
+ 'c_red': c_red_out,
+ 'x_grid': X_grid,
+ 'x_grid_out': x_grid_out,
+ 'params': params_out,
+ }
+
+
+# =============================================================================
+# Surface-Confined (Laviron) CV Simulation
+# =============================================================================
+
+def run_ads_cv_simulation(
+ sigma=1.0,
+ K0=1.0,
+ alpha=0.5,
+ beta=None,
+ Gamma_sat=1.0,
+ theta_i=20.0,
+ theta_v=-20.0,
+ cycles=1,
+ n_spatial_out=64,
+ verbose=False,
+ **extra_params,
+):
+ """
+ Surface-confined (Laviron) CV: no diffusion, ODE for surface coverage.
+
+ The redox species is adsorbed on the electrode surface. The fractional
+ coverage of the oxidized form, f_ox, evolves as:
+
+ df_ox/dTheta = -(1/sigma) * [k_red * f_ox - k_ox * (1 - f_ox)]
+
+ where k_red = K0*exp(-alpha*Theta), k_ox = K0*exp(beta*Theta).
+
+ Dimensionless current: i = Gamma_sat * df_ox/dTheta * sigma
+ (= Gamma_sat * [k_red*f_ox - k_ox*(1-f_ox)])
+
+ Returns the same dict format as run_cv_simulation for compatibility.
+ Concentration arrays represent uniform surface coverage (no spatial variation).
+ """
+ if beta is None:
+ beta = 1.0 - alpha
+
+ nTimeSteps = int(2 * np.abs(theta_v - theta_i) / DELTA_THETA) + 1
+
+ Esteps = np.arange(nTimeSteps)
+ E = np.where(
+ Esteps < nTimeSteps / 2.0,
+ theta_i - DELTA_THETA * Esteps,
+ theta_v + DELTA_THETA * (Esteps - nTimeSteps / 2.0)
+ )
+ E = np.tile(E, cycles)
+ total_steps = len(E)
+
+ deltaT = DELTA_THETA / sigma
+
+ # Initial condition: fully oxidized surface
+ f_ox = 1.0
+
+ fluxes = np.zeros(total_steps)
+ f_ox_history = np.zeros(total_steps)
+
+ for idx in range(total_steps):
+ Theta = E[idx]
+ k_red = K0 * np.exp(-alpha * Theta)
+ k_ox = K0 * np.exp(beta * Theta)
+
+ # Analytical solution for this timestep (exact for constant Theta).
+ # df_ox/dt = -(k_red + k_ox)*f_ox + k_ox
+ # f_ox(t+dt) = f_eq + (f_ox - f_eq) * exp(-(k_red+k_ox)*dt)
+ k_total = k_red + k_ox
+ f_eq = k_ox / k_total
+ f_ox_new = f_eq + (f_ox - f_eq) * np.exp(-k_total * deltaT)
+ f_ox_new = np.clip(f_ox_new, 0.0, 1.0)
+
+ # Current = -Gamma_sat * (change in coverage) / deltaT
+ # Negative sign: reduction (f_ox decreasing) should give negative flux,
+ # consistent with diffusion-based mechanisms where reduction = negative current.
+ fluxes[idx] = -Gamma_sat * (f_ox - f_ox_new) / deltaT
+
+ f_ox_history[idx] = f_ox
+ f_ox = f_ox_new
+
+ time_array = np.arange(total_steps) * float(deltaT)
+
+ # Build concentration arrays compatible with diffusion-based output.
+ # c_ox = f_ox (surface coverage of oxidized), c_red = 1 - f_ox
+ # Replicated across a dummy spatial grid for format compatibility.
+ x_grid_out = np.linspace(0.0, 1.0, n_spatial_out)
+ c_ox_out = np.outer(f_ox_history, np.ones(n_spatial_out))
+ c_red_out = np.outer(1.0 - f_ox_history, np.ones(n_spatial_out))
+
+ params_out = {
+ 'experiment_type': 'CV',
+ 'sigma': float(sigma),
+ 'K0': float(K0),
+ 'alpha': float(alpha),
+ 'beta': float(beta),
+ 'kinetics': 'Ads',
+ 'Gamma_sat': float(Gamma_sat),
+ 'theta_i': float(theta_i),
+ 'theta_v': float(theta_v),
+ 'cycles': cycles,
+ 'C_A_bulk': 0.0,
+ 'C_B_bulk': 0.0,
+ 'dA': 1e-10,
+ 'dB': 1e-10,
+ }
+
+ return {
+ 'potential': E,
+ 'flux': fluxes,
+ 'time': time_array,
+ 'c_ox': c_ox_out.astype(np.float64),
+ 'c_red': c_red_out.astype(np.float64),
+ 'x_grid': x_grid_out,
+ 'x_grid_out': x_grid_out,
+ 'params': params_out,
+ }
+
+
+# =============================================================================
+# EC Mechanism Simulation (Electrochemical-Chemical)
+# =============================================================================
+
+def run_ec_cv_simulation(
+ sigma=1.0,
+ K0=1.0,
+ alpha=0.5,
+ beta=None,
+ kinetics='EC',
+ C_A_bulk=1.0,
+ C_B_bulk=0.0,
+ dA=1.0,
+ dB=1.0,
+ theta_i=20.0,
+ theta_v=-20.0,
+ cycles=1,
+ n_spatial_out=64,
+ verbose=False,
+ kc=1.0,
+ **extra_params,
+):
+ """
+ EC mechanism CV: A + e- -> B (BV kinetics), then B -> Y (first-order chemical).
+
+ The follow-up chemical reaction consumes B in the bulk with rate constant kc
+ (dimensionless, scaled by scan rate). This modifies the diffusion equation
+ for species B to include a homogeneous reaction sink term.
+
+ The PDE for B becomes:
+ dc_B/dt = D_B * d²c_B/dx² - kc * c_B
+
+ We handle this via operator splitting: after solving the diffusion step
+ (same matrix as BV), we apply the chemical decay analytically:
+ c_B(t+dt) = c_B_diffusion * exp(-kc * dt)
+
+ Parameters
+ ----------
+ kc : float
+ Dimensionless first-order chemical rate constant for B -> Y.
+ kc = k_chem / (F*v/RT) where k_chem is the dimensional rate constant
+ and v is the scan rate. Large kc means fast follow-up chemistry.
+ """
+ if beta is None:
+ beta = 1.0 - alpha
+
+ deltaT = DELTA_THETA / sigma
+ maxT = cycles * 2.0 * np.abs(theta_v - theta_i) / sigma
+ nTimeSteps = int(2 * np.abs(theta_v - theta_i) / DELTA_THETA) + 1
+
+ Esteps = np.arange(nTimeSteps)
+ E = np.where(
+ Esteps < nTimeSteps / 2.0,
+ theta_i - DELTA_THETA * Esteps,
+ theta_v + DELTA_THETA * (Esteps - nTimeSteps / 2.0)
+ )
+ E = np.tile(E, cycles)
+ total_steps = len(E)
+
+ Xi = 0.0
+ maxX = SIMULATION_SPACE_MULTIPLE * np.sqrt(maxT)
+ X_grid, n = gen_grid(Xi, DELTA_X, maxX, EXPANDING_GRID_FACTOR)
+
+ conc, conc_d = ini_conc(n, C_A_bulk, C_B_bulk)
+
+ A_matrix, aA, bA, cA, aB, bB, cB = ini_coeff(n)
+ aA, bA, cA = calc_abc_linear(n, X_grid, deltaT, aA, bA, cA, dA)
+ aB, bB, cB = calc_abc_linear(n, X_grid, deltaT, aB, bB, cB, dB)
+
+ fluxes = np.zeros(total_steps)
+ conc_A_history = []
+ conc_B_history = []
+
+ decay_factor = np.exp(-kc * deltaT)
+
+ iterator = range(total_steps)
+ if verbose:
+ iterator = tqdm(iterator, desc="Simulating EC CV")
+
+ for idx in iterator:
+ Theta = E[idx]
+
+ conc_d = update_d(Theta, conc, conc_d, n, C_A_bulk, C_B_bulk, 'BV')
+
+ A_mat = calc_matrix(
+ A_matrix, X_grid, Theta, 'BV', n,
+ aA, bA, cA, dA, aB, bB, cB, dB,
+ K0, alpha, beta
+ )
+ conc = scipy.linalg.solve(A_mat, conc_d)
+
+ # Chemical step: B -> Y (first-order decay in bulk, not at boundaries)
+ conc[n:2*n-1] *= decay_factor
+ # Keep far boundary at C_B_bulk
+ conc[2*n-1] = C_B_bulk
+
+ flux = calc_flux(conc, n, dA, X_grid)
+ fluxes[idx] = flux
+
+ conc_A_history.append(conc[:n].copy())
+ conc_B_history.append(conc[n:].copy())
+
+ conc_A_history = np.stack(conc_A_history, axis=0)
+ conc_B_history = np.stack(conc_B_history, axis=0)
+
+ x_grid_out = np.linspace(X_grid[0], X_grid[-1], n_spatial_out)
+
+ c_ox_out = np.zeros((total_steps, n_spatial_out))
+ c_red_out = np.zeros((total_steps, n_spatial_out))
+ for t in range(total_steps):
+ c_ox_out[t] = np.interp(x_grid_out, X_grid, conc_A_history[t])
+ c_red_out[t] = np.interp(x_grid_out, X_grid, conc_B_history[t])
+
+ time_array = np.arange(total_steps) * float(deltaT)
+
+ params_out = {
+ 'experiment_type': 'CV',
+ 'sigma': float(sigma),
+ 'K0': float(K0),
+ 'alpha': float(alpha),
+ 'beta': float(beta),
+ 'kinetics': 'EC',
+ 'C_A_bulk': float(C_A_bulk),
+ 'C_B_bulk': float(C_B_bulk),
+ 'dA': float(dA),
+ 'dB': float(dB),
+ 'theta_i': float(theta_i),
+ 'theta_v': float(theta_v),
+ 'cycles': cycles,
+ 'kc': float(kc),
+ }
+
+ return {
+ 'potential': E,
+ 'flux': fluxes,
+ 'time': time_array,
+ 'c_ox': c_ox_out,
+ 'c_red': c_red_out,
+ 'x_grid': X_grid,
+ 'x_grid_out': x_grid_out,
+ 'params': params_out,
+ }
+
+
+# =============================================================================
+# Langmuir-Hinshelwood Adsorption + ET Simulation
+# =============================================================================
+
+def run_lh_cv_simulation(
+ sigma=1.0,
+ K0=1.0,
+ alpha=0.5,
+ beta=None,
+ kinetics='LH',
+ C_A_bulk=1.0,
+ C_B_bulk=0.0,
+ dA=1.0,
+ dB=1.0,
+ theta_i=20.0,
+ theta_v=-20.0,
+ cycles=1,
+ n_spatial_out=64,
+ verbose=False,
+ KA_eq=10.0,
+ KB_eq=1.0,
+ **extra_params,
+):
+ """
+ Langmuir-Hinshelwood CV: diffusion + fast adsorption equilibrium + surface ET.
+
+ Reaction scheme:
+ A_sol <-> A_ads (fast Langmuir equilibrium, constant K_A)
+ B_sol <-> B_ads (fast Langmuir equilibrium, constant K_B)
+ A_ads + e- <-> B_ads (BV kinetics with K0, alpha)
+
+ Under the pre-equilibrium approximation, surface coverages are:
+ theta_A = K_A * c_A(0,t) / (1 + K_A*c_A(0,t) + K_B*c_B(0,t))
+ theta_B = K_B * c_B(0,t) / (1 + K_A*c_A(0,t) + K_B*c_B(0,t))
+
+ The effective boundary condition becomes coverage-dependent BV kinetics.
+ The flux at the surface is:
+ j = K0 * [exp(-alpha*Theta) * theta_A - exp(beta*Theta) * theta_B]
+
+ This is implemented by modifying the boundary condition at each timestep
+ based on the current surface concentrations.
+
+ Parameters
+ ----------
+ KA_eq : float
+ Dimensionless adsorption equilibrium constant for oxidized species A.
+ KB_eq : float
+ Dimensionless adsorption equilibrium constant for reduced species B.
+ """
+ if beta is None:
+ beta = 1.0 - alpha
+
+ deltaT = DELTA_THETA / sigma
+ maxT = cycles * 2.0 * np.abs(theta_v - theta_i) / sigma
+ nTimeSteps = int(2 * np.abs(theta_v - theta_i) / DELTA_THETA) + 1
+
+ Esteps = np.arange(nTimeSteps)
+ E = np.where(
+ Esteps < nTimeSteps / 2.0,
+ theta_i - DELTA_THETA * Esteps,
+ theta_v + DELTA_THETA * (Esteps - nTimeSteps / 2.0)
+ )
+ E = np.tile(E, cycles)
+ total_steps = len(E)
+
+ Xi = 0.0
+ maxX = SIMULATION_SPACE_MULTIPLE * np.sqrt(maxT)
+ X_grid, n = gen_grid(Xi, DELTA_X, maxX, EXPANDING_GRID_FACTOR)
+
+ conc, conc_d = ini_conc(n, C_A_bulk, C_B_bulk)
+
+ A_matrix, aA, bA, cA, aB, bB, cB = ini_coeff(n)
+ aA, bA, cA = calc_abc_linear(n, X_grid, deltaT, aA, bA, cA, dA)
+ aB, bB, cB = calc_abc_linear(n, X_grid, deltaT, aB, bB, cB, dB)
+
+ fluxes = np.zeros(total_steps)
+ conc_A_history = []
+ conc_B_history = []
+
+ X0 = X_grid[1] - X_grid[0]
+
+ iterator = range(total_steps)
+ if verbose:
+ iterator = tqdm(iterator, desc="Simulating LH CV")
+
+ for idx in iterator:
+ Theta = E[idx]
+
+ conc_d[:] = conc[:]
+ conc_d[n-1] = 0.0
+ conc_d[n] = 0.0
+ conc_d[0] = C_A_bulk
+ conc_d[2*n-1] = C_B_bulk
+
+ # Compute Langmuir coverage fractions from current surface concentrations
+ cA_surf = max(conc[n-1], 0.0)
+ cB_surf = max(conc[n], 0.0)
+ denom = 1.0 + KA_eq * cA_surf + KB_eq * cB_surf
+ theta_A = KA_eq * cA_surf / denom
+ theta_B = KB_eq * cB_surf / denom
+
+ K_red = K0 * np.exp(-alpha * Theta)
+ K_ox = K0 * np.exp(beta * Theta)
+
+ # Effective rate constants scaled by coverage sensitivity
+ # The flux is: j = K_red * theta_A - K_ox * theta_B
+ # We linearize around current concentrations for the matrix:
+ # theta_A ≈ KA/(1+KA*cA+KB*cB) * cA (leading term)
+ # For the boundary condition, we use effective rates:
+ K_red_eff = K_red * KA_eq / denom
+ K_ox_eff = K_ox * KB_eq / denom
+
+ # Build matrix with LH-modified boundary conditions
+ # Interior points
+ rows_A = np.arange(n-2, 0, -1)
+ A_matrix[rows_A, rows_A - 1] = cA[1:n-1]
+ A_matrix[rows_A, rows_A] = bA[1:n-1]
+ A_matrix[rows_A, rows_A + 1] = aA[1:n-1]
+
+ rows_B = np.arange(n+1, 2*n-1)
+ A_matrix[rows_B, rows_B - 1] = aB[1:n-1]
+ A_matrix[rows_B, rows_B] = bB[1:n-1]
+ A_matrix[rows_B, rows_B + 1] = cB[1:n-1]
+
+ # Boundary: species A at electrode (row n-1)
+ A_matrix[n-1, n-2] = -1.0
+ A_matrix[n-1, n-1] = 1.0 + X0/dA * K_red_eff
+ A_matrix[n-1, n] = -X0/dA * K_ox_eff
+
+ # Boundary: species B at electrode (row n)
+ A_matrix[n, n-1] = -X0/dB * K_red_eff
+ A_matrix[n, n] = 1.0 + X0/dB * K_ox_eff
+ A_matrix[n, n+1] = -1.0
+
+ # Far boundaries
+ A_matrix[0, 0] = 1.0
+ A_matrix[0, 1] = 0.0
+ A_matrix[2*n-1, 2*n-1] = 1.0
+ A_matrix[2*n-1, 2*n-2] = 0.0
+
+ conc = scipy.linalg.solve(A_matrix, conc_d)
+
+ flux = calc_flux(conc, n, dA, X_grid)
+ fluxes[idx] = flux
+
+ conc_A_history.append(conc[:n].copy())
+ conc_B_history.append(conc[n:].copy())
+
+ conc_A_history = np.stack(conc_A_history, axis=0)
+ conc_B_history = np.stack(conc_B_history, axis=0)
+
+ x_grid_out = np.linspace(X_grid[0], X_grid[-1], n_spatial_out)
+
+ c_ox_out = np.zeros((total_steps, n_spatial_out))
+ c_red_out = np.zeros((total_steps, n_spatial_out))
+ for t in range(total_steps):
+ c_ox_out[t] = np.interp(x_grid_out, X_grid, conc_A_history[t])
+ c_red_out[t] = np.interp(x_grid_out, X_grid, conc_B_history[t])
+
+ time_array = np.arange(total_steps) * float(deltaT)
+
+ params_out = {
+ 'experiment_type': 'CV',
+ 'sigma': float(sigma),
+ 'K0': float(K0),
+ 'alpha': float(alpha),
+ 'beta': float(beta),
+ 'kinetics': 'LH',
+ 'C_A_bulk': float(C_A_bulk),
+ 'C_B_bulk': float(C_B_bulk),
+ 'dA': float(dA),
+ 'dB': float(dB),
+ 'theta_i': float(theta_i),
+ 'theta_v': float(theta_v),
+ 'cycles': cycles,
+ 'KA_eq': float(KA_eq),
+ 'KB_eq': float(KB_eq),
+ }
+
+ return {
+ 'potential': E,
+ 'flux': fluxes,
+ 'time': time_array,
+ 'c_ox': c_ox_out,
+ 'c_red': c_red_out,
+ 'x_grid': X_grid,
+ 'x_grid_out': x_grid_out,
+ 'params': params_out,
+ }
+
+
+# =============================================================================
+# Chronoamperometry Simulation
+# =============================================================================
+
+def run_ca_simulation(
+ theta_step=-10.0,
+ K0=1.0,
+ alpha=0.5,
+ beta=None,
+ kinetics='BV',
+ C_A_bulk=1.0,
+ C_B_bulk=0.0,
+ dA=1.0,
+ dB=1.0,
+ t_max=10.0,
+ dt=0.01,
+ n_spatial_out=64,
+ verbose=False,
+):
+ """
+ Run chronoamperometry simulation: step potential held constant.
+
+ Parameters
+ ----------
+ theta_step : float
+ Dimensionless step potential (held constant for all t > 0)
+ K0 : float
+ Dimensionless electrochemical rate constant
+ alpha : float
+ Cathodic transfer coefficient
+ beta : float, optional
+ Anodic transfer coefficient (default: 1 - alpha)
+ kinetics : str
+ 'BV' for Butler-Volmer
+ C_A_bulk, C_B_bulk : float
+ Dimensionless bulk concentrations
+ dA, dB : float
+ Dimensionless diffusion coefficients
+ t_max : float
+ Dimensionless total experiment time
+ dt : float
+ Dimensionless time step
+ n_spatial_out : int
+ Number of spatial grid points in output
+ verbose : bool
+ Show progress bar
+
+ Returns
+ -------
+ dict with same keys as run_cv_simulation, plus experiment_type='CA'
+ """
+ if beta is None:
+ beta = 1.0 - alpha
+
+ total_steps = int(t_max / dt) + 1
+ deltaT = dt
+
+ E = np.full(total_steps, theta_step)
+
+ Xi = 0.0
+ maxX = SIMULATION_SPACE_MULTIPLE * np.sqrt(t_max * max(dA, dB))
+ X_grid, n = gen_grid(Xi, DELTA_X, maxX, EXPANDING_GRID_FACTOR)
+
+ conc, conc_d = ini_conc(n, C_A_bulk, C_B_bulk)
+ A_matrix, aA, bA, cA, aB, bB, cB = ini_coeff(n)
+ aA, bA, cA = calc_abc_linear(n, X_grid, deltaT, aA, bA, cA, dA)
+ aB, bB, cB = calc_abc_linear(n, X_grid, deltaT, aB, bB, cB, dB)
+
+ fluxes = np.zeros(total_steps)
+ conc_A_history = []
+ conc_B_history = []
+
+ iterator = range(total_steps)
+ if verbose:
+ iterator = tqdm(iterator, desc="Simulating CA")
+
+ for idx in iterator:
+ Theta = E[idx]
+
+ A_mat = calc_matrix(
+ A_matrix, X_grid, Theta, kinetics, n,
+ aA, bA, cA, dA, aB, bB, cB, dB,
+ K0, alpha, beta
+ )
+ conc_d = update_d(Theta, conc, conc_d, n, C_A_bulk, C_B_bulk, kinetics)
+ conc = scipy.linalg.solve(A_mat, conc_d)
+
+ flux = calc_flux(conc, n, dA, X_grid)
+ fluxes[idx] = flux
+
+ conc_A_history.append(conc[:n].copy())
+ conc_B_history.append(conc[n:].copy())
+
+ conc_A_history = np.stack(conc_A_history, axis=0)
+ conc_B_history = np.stack(conc_B_history, axis=0)
+
+ x_grid_out = np.linspace(X_grid[0], X_grid[-1], n_spatial_out)
+
+ c_ox_out = np.zeros((total_steps, n_spatial_out))
+ c_red_out = np.zeros((total_steps, n_spatial_out))
+ for t in range(total_steps):
+ c_ox_out[t] = np.interp(x_grid_out, X_grid, conc_A_history[t])
+ c_red_out[t] = np.interp(x_grid_out, X_grid, conc_B_history[t])
+
+ time_array = np.arange(total_steps) * float(deltaT)
+
+ return {
+ 'potential': E,
+ 'flux': fluxes,
+ 'time': time_array,
+ 'c_ox': c_ox_out,
+ 'c_red': c_red_out,
+ 'x_grid': X_grid,
+ 'x_grid_out': x_grid_out,
+ 'params': {
+ 'experiment_type': 'CA',
+ 'theta_step': float(theta_step),
+ 'K0': float(K0),
+ 'alpha': float(alpha),
+ 'beta': float(beta),
+ 'kinetics': kinetics,
+ 'C_A_bulk': float(C_A_bulk),
+ 'C_B_bulk': float(C_B_bulk),
+ 'dA': float(dA),
+ 'dB': float(dB),
+ 't_max': float(t_max),
+ 'dt': float(dt),
+ }
+ }
+
+
+# =============================================================================
+# Parameter Sampling
+# =============================================================================
+
+def sample_ca_params(rng=None):
+ """
+ Sample random dimensionless parameters for chronoamperometry.
+
+ CA holds a constant potential and observes the transient current decay.
+ The Cottrell equation predicts j(t) ~ 1/sqrt(t) for diffusion-limited case.
+ """
+ if rng is None:
+ rng = np.random.default_rng()
+
+ # Step potential: large negative drives reduction, large positive drives oxidation
+ theta_step = rng.uniform(-20.0, -2.0)
+
+ # Rate constant — same range as CV
+ log_K0 = rng.uniform(-2, 2)
+ K0 = 10 ** log_K0
+
+ # Transfer coefficient
+ alpha = rng.uniform(0.3, 0.7)
+
+ # Diffusion coefficient ratio
+ d_ratio = 10 ** rng.uniform(-0.3, 0.3)
+ dA = 1.0
+ dB = dA * d_ratio
+
+ # Experiment duration and time step
+ log_tmax = rng.uniform(0.5, 2.0) # t_max in [~3, 100]
+ t_max = 10 ** log_tmax
+ dt = t_max / rng.uniform(500, 1500) # 500-1500 time steps
+
+ return {
+ 'theta_step': theta_step,
+ 'K0': K0,
+ 'alpha': alpha,
+ 'kinetics': 'BV',
+ 'C_A_bulk': 1.0,
+ 'C_B_bulk': 0.0,
+ 'dA': dA,
+ 'dB': dB,
+ 't_max': t_max,
+ 'dt': dt,
+ }
+
+
+def _sample_common_cv_params(rng):
+ """Sample scan rate, diffusion ratio, and potential window (shared across mechanisms)."""
+ log_sigma = rng.uniform(-1, 2)
+ sigma = 10 ** log_sigma
+
+ d_ratio = 10 ** rng.uniform(-0.3, 0.3)
+ dA = 1.0
+ dB = dA * d_ratio
+
+ theta_center = rng.uniform(-5, 5)
+ theta_range = rng.uniform(15, 25)
+ theta_i = theta_center + theta_range / 2
+ theta_v = theta_center - theta_range / 2
+
+ return {
+ 'sigma': sigma,
+ 'C_A_bulk': 1.0,
+ 'C_B_bulk': 0.0,
+ 'dA': dA,
+ 'dB': dB,
+ 'theta_i': theta_i,
+ 'theta_v': theta_v,
+ 'cycles': 1,
+ }
+
+
+def sample_cv_params_nernst(rng=None):
+ """Sample parameters for Nernstian (reversible) CV."""
+ if rng is None:
+ rng = np.random.default_rng()
+ p = _sample_common_cv_params(rng)
+ p['kinetics'] = 'Nernst'
+ p['K0'] = 1e6 # effectively infinite (not a free parameter)
+ p['alpha'] = 0.5 # not used
+ p['E0_offset'] = 0.0 # dimensionless formal potential offset
+ return p
+
+
+def sample_cv_params_bv(rng=None):
+ """Sample parameters for Butler-Volmer CV."""
+ if rng is None:
+ rng = np.random.default_rng()
+ p = _sample_common_cv_params(rng)
+ p['kinetics'] = 'BV'
+ p['K0'] = 10 ** rng.uniform(-2, 2)
+ p['alpha'] = rng.uniform(0.3, 0.7)
+ return p
+
+
+def sample_cv_params_mhc(rng=None):
+ """Sample parameters for Marcus-Hush-Chidsey CV."""
+ if rng is None:
+ rng = np.random.default_rng()
+ p = _sample_common_cv_params(rng)
+ p['kinetics'] = 'MHC'
+ p['K0'] = 10 ** rng.uniform(-2, 2)
+ p['alpha'] = 0.5 # not used by MHC, but kept for interface consistency
+ p['reorg_e'] = 10 ** rng.uniform(0.5, 2.0) # dimensionless reorganization energy ~3-100
+ return p
+
+
+def sample_cv_params_ads(rng=None):
+ """Sample parameters for surface adsorption (Laviron-type) CV.
+
+ Surface-confined model: no diffusion, purely ODE for surface coverage.
+ Parameters: K0 (rate constant), alpha (transfer coefficient), Gamma_sat (coverage).
+ """
+ if rng is None:
+ rng = np.random.default_rng()
+
+ log_sigma = rng.uniform(-1, 2)
+ sigma = 10 ** log_sigma
+
+ theta_center = rng.uniform(-5, 5)
+ theta_range = rng.uniform(15, 25)
+ theta_i = theta_center + theta_range / 2
+ theta_v = theta_center - theta_range / 2
+
+ return {
+ 'sigma': sigma,
+ 'theta_i': theta_i,
+ 'theta_v': theta_v,
+ 'cycles': 1,
+ 'kinetics': 'Ads',
+ 'K0': 10 ** rng.uniform(-2, 2),
+ 'alpha': rng.uniform(0.3, 0.7),
+ 'Gamma_sat': 10 ** rng.uniform(-1, 1),
+ }
+
+
+def sample_cv_params_ec(rng=None):
+ """Sample parameters for EC mechanism CV.
+
+ EC: A + e- -> B (BV kinetics), then B -> Y (first-order chemical).
+ Parameters: K0, alpha, dB (same as BV) + kc (chemical rate constant).
+ """
+ if rng is None:
+ rng = np.random.default_rng()
+ p = _sample_common_cv_params(rng)
+ p['kinetics'] = 'EC'
+ p['K0'] = 10 ** rng.uniform(-2, 2)
+ p['alpha'] = rng.uniform(0.3, 0.7)
+ # kc: dimensionless chemical rate constant
+ # Small kc (~0.01): slow chemistry, CV looks like BV
+ # Large kc (~100): fast chemistry, irreversible CV with shifted peak
+ p['kc'] = 10 ** rng.uniform(-2, 2)
+ return p
+
+
+def sample_cv_params_lh(rng=None):
+ """Sample parameters for Langmuir-Hinshelwood CV.
+
+ LH: diffusion + fast Langmuir adsorption equilibrium + surface BV ET.
+ Parameters: K0, alpha, KA_eq, KB_eq, dB.
+ """
+ if rng is None:
+ rng = np.random.default_rng()
+ p = _sample_common_cv_params(rng)
+ p['kinetics'] = 'LH'
+ p['K0'] = 10 ** rng.uniform(-2, 2)
+ p['alpha'] = rng.uniform(0.3, 0.7)
+ # Adsorption equilibrium constants (dimensionless)
+ # KA_eq, KB_eq ~ 0.1-100: moderate to strong adsorption
+ p['KA_eq'] = 10 ** rng.uniform(-1, 2)
+ p['KB_eq'] = 10 ** rng.uniform(-1, 2)
+ return p
+
+
+MECHANISM_SAMPLERS = {
+ 'Nernst': sample_cv_params_nernst,
+ 'BV': sample_cv_params_bv,
+ 'MHC': sample_cv_params_mhc,
+ 'Ads': sample_cv_params_ads,
+ 'EC': sample_cv_params_ec,
+ 'LH': sample_cv_params_lh,
+}
+
+
+def sample_cv_params(rng=None, mechanism=None):
+ """
+ Sample random dimensionless parameters for CV simulation.
+
+ If mechanism is specified, samples from that mechanism.
+ Otherwise defaults to BV for backward compatibility.
+ """
+ if rng is None:
+ rng = np.random.default_rng()
+ if mechanism is None:
+ mechanism = 'BV'
+ return MECHANISM_SAMPLERS[mechanism](rng)
+
+
+# =============================================================================
+# Dataset Generation
+# =============================================================================
+
+MECHANISM_LIST = ['Nernst', 'BV', 'MHC', 'Ads', 'EC', 'LH']
+MECHANISM_TO_ID = {m: i for i, m in enumerate(MECHANISM_LIST)}
+
+
+def _run_single_cv(params, n_spatial):
+ """Run a single CV simulation, dispatching to the correct simulator."""
+ kin = params.get('kinetics')
+ if kin == 'Ads':
+ return run_ads_cv_simulation(**params, n_spatial_out=n_spatial, verbose=False)
+ elif kin == 'EC':
+ return run_ec_cv_simulation(**params, n_spatial_out=n_spatial, verbose=False)
+ elif kin == 'LH':
+ return run_lh_cv_simulation(**params, n_spatial_out=n_spatial, verbose=False)
+ else:
+ return run_cv_simulation(**params, n_spatial_out=n_spatial, verbose=False)
+
+
+def _sample_scan_rates(rng, n_scan_rates, log_sigma_range=(-1, 2)):
+ """Sample log-spaced scan rates spanning the given range."""
+ lo, hi = log_sigma_range
+ if n_scan_rates == 1:
+ return np.array([10 ** rng.uniform(lo, hi)])
+ anchors = np.linspace(lo, hi, n_scan_rates)
+ jitter = (hi - lo) / (n_scan_rates - 1) * 0.3
+ log_sigmas = np.array([rng.uniform(a - jitter, a + jitter) for a in anchors])
+ log_sigmas = np.clip(log_sigmas, lo, hi)
+ log_sigmas.sort()
+ return 10 ** log_sigmas
+
+
+def _add_noise(flux, rng, noise_range=(0.001, 0.02)):
+ """Add Gaussian noise to flux signal. Returns (noisy_flux, sigma_noise)."""
+ sigma_noise = rng.uniform(*noise_range)
+ peak = np.max(np.abs(flux)) + 1e-20
+ noise = sigma_noise * peak * rng.standard_normal(flux.shape)
+ return flux + noise.astype(flux.dtype), float(sigma_noise)
+
+
+def generate_sample_single(idx, outdir, seed, n_spatial=64, experiment_type='CV',
+ mechanism=None, n_scan_rates=1, add_noise=True):
+ """
+ Generate and save a single sample (single or multi-scan-rate).
+
+ When n_scan_rates > 1, the same kinetic parameters are simulated at
+ multiple scan rates and saved together.
+
+ Parameters
+ ----------
+ n_scan_rates : int
+ Number of scan rates per sample. Use -1 to randomly sample from
+ {1, 2, 3} per sample (drawn from the per-sample RNG for
+ reproducibility).
+ add_noise : bool
+ If True, add Gaussian noise to flux signals (sigma_noise ~ U(0.001, 0.02)
+ as a fraction of peak current).
+ """
+ rng = np.random.default_rng(seed + idx)
+
+ if n_scan_rates == -1:
+ n_scan_rates = int(rng.integers(1, 4)) # 1, 2, or 3
+
+ if experiment_type == 'mixed':
+ exp = rng.choice(['CV', 'CA'])
+ else:
+ exp = experiment_type
+
+ try:
+ if exp == 'CV':
+ params = sample_cv_params(rng, mechanism=mechanism)
+ actual_mechanism = params.get('kinetics', 'BV')
+ mechanism_id = MECHANISM_TO_ID.get(actual_mechanism, -1)
+
+ if n_scan_rates <= 1:
+ # Single-scan-rate path
+ result = _run_single_cv(params, n_spatial)
+ flux = result['flux'].astype(np.float32)
+
+ sigma_noise = 0.0
+ if add_noise:
+ flux, sigma_noise = _add_noise(flux, rng)
+
+ # Convert K0/kc to canonical sigma=1 (same convention as multi-scan)
+ sigma_ref = params['sigma']
+ kin = actual_mechanism
+ phys_params = dict(result['params'])
+ K0_ref = params.get('K0', 1.0)
+ if kin in ('BV', 'MHC', 'EC', 'LH'):
+ phys_params['K0'] = float(K0_ref * np.sqrt(sigma_ref))
+ elif kin == 'Ads':
+ phys_params['K0'] = float(K0_ref * sigma_ref)
+ if kin == 'EC':
+ phys_params['kc'] = float(params.get('kc', 1.0) * sigma_ref)
+ phys_params['sigma_noise'] = sigma_noise
+
+ np.savez_compressed(
+ os.path.join(outdir, f"sample_{idx:06d}.npz"),
+ potential=result['potential'].astype(np.float32),
+ flux=flux,
+ time=result['time'].astype(np.float32),
+ c_ox=result['c_ox'].astype(np.float32),
+ c_red=result['c_red'].astype(np.float32),
+ x_grid=result['x_grid_out'].astype(np.float32),
+ params=phys_params,
+ mechanism_id=np.int32(mechanism_id),
+ )
+ meta = {
+ 'idx': idx, 'success': True, 'experiment_type': exp,
+ 'mechanism': actual_mechanism, 'mechanism_id': int(mechanism_id),
+ 'K0': float(phys_params['K0']),
+ 'alpha': float(params.get('alpha', 0.5)),
+ 'n_time': len(result['time']),
+ 'sigma': float(params['sigma']),
+ 'n_scan_rates': 1,
+ 'sigma_noise': sigma_noise,
+ }
+ return meta
+
+ # Multi-scan-rate: simulate the same physical system at N scan rates.
+ #
+ # The sampled params define dimensionless rate constants at the
+ # originally sampled sigma_ref. We convert to a canonical reference
+ # sigma=1 so that saved K0/kc values are sigma-independent and
+ # comparable across samples.
+ #
+ # Scaling relations (dimensionless = physical / sigma^power):
+ # BV/MHC/EC/LH: K0 ~ 1/sqrt(sigma)
+ # Ads: K0 ~ 1/sigma
+ # EC: kc ~ 1/sigma
+ sigmas = _sample_scan_rates(rng, n_scan_rates)
+ sigma_ref = params['sigma']
+ kin = actual_mechanism
+
+ # Compute K0 and kc at canonical sigma=1
+ K0_at_ref = params.get('K0', 1.0)
+ kc_at_ref = params.get('kc', 1.0)
+ if kin in ('BV', 'MHC', 'EC', 'LH'):
+ K0_at_1 = K0_at_ref * np.sqrt(sigma_ref)
+ elif kin == 'Ads':
+ K0_at_1 = K0_at_ref * sigma_ref
+ else:
+ K0_at_1 = K0_at_ref
+ kc_at_1 = kc_at_ref * sigma_ref if kin == 'EC' else kc_at_ref
+
+ potentials, fluxes, times = [], [], []
+
+ for sigma in sigmas:
+ p = dict(params)
+ p['sigma'] = float(sigma)
+ if kin in ('BV', 'MHC', 'EC', 'LH'):
+ p['K0'] = K0_at_1 / np.sqrt(sigma)
+ elif kin == 'Ads':
+ p['K0'] = K0_at_1 / sigma
+ if kin == 'EC':
+ p['kc'] = kc_at_1 / sigma
+
+ result = _run_single_cv(p, n_spatial)
+ potentials.append(result['potential'].astype(np.float32))
+ flux_clean = result['flux'].astype(np.float32)
+ if add_noise:
+ flux_clean, _ = _add_noise(flux_clean, rng)
+ fluxes.append(flux_clean)
+ times.append(result['time'].astype(np.float32))
+
+ # Save params with K0/kc at canonical sigma=1 so targets are
+ # sigma-independent and comparable across samples.
+ phys_params = dict(params)
+ phys_params['kinetics'] = actual_mechanism
+ phys_params['K0'] = float(K0_at_1)
+ if kin == 'EC':
+ phys_params['kc'] = float(kc_at_1)
+
+ # Pad CVs to the same length (different sigma -> different T)
+ max_t = max(len(p) for p in potentials)
+ n_s = len(sigmas)
+ pot_arr = np.zeros((n_s, max_t), dtype=np.float32)
+ flux_arr = np.zeros((n_s, max_t), dtype=np.float32)
+ time_arr = np.zeros((n_s, max_t), dtype=np.float32)
+ lengths = np.zeros(n_s, dtype=np.int32)
+
+ for i in range(n_s):
+ t_len = len(potentials[i])
+ pot_arr[i, :t_len] = potentials[i]
+ flux_arr[i, :t_len] = fluxes[i]
+ time_arr[i, :t_len] = times[i]
+ lengths[i] = t_len
+
+ np.savez_compressed(
+ os.path.join(outdir, f"sample_{idx:06d}.npz"),
+ potential=pot_arr,
+ flux=flux_arr,
+ time=time_arr,
+ sigmas=sigmas.astype(np.float32),
+ lengths=lengths,
+ params=phys_params,
+ mechanism_id=np.int32(mechanism_id),
+ n_scan_rates=np.int32(n_scan_rates),
+ )
+
+ meta = {
+ 'idx': idx, 'success': True, 'experiment_type': exp,
+ 'mechanism': actual_mechanism, 'mechanism_id': int(mechanism_id),
+ 'K0': float(params.get('K0', 0)),
+ 'alpha': float(params.get('alpha', 0.5)),
+ 'n_time_max': int(max_t),
+ 'sigmas': [float(s) for s in sigmas],
+ 'n_scan_rates': n_scan_rates,
+ }
+ return meta
+
+ elif exp == 'CA':
+ params = sample_ca_params(rng)
+ result = run_ca_simulation(**params, n_spatial_out=n_spatial, verbose=False)
+ actual_mechanism = params.get('kinetics', 'BV')
+ mechanism_id = MECHANISM_TO_ID.get(actual_mechanism, -1)
+ np.savez_compressed(
+ os.path.join(outdir, f"sample_{idx:06d}.npz"),
+ potential=result['potential'].astype(np.float32),
+ flux=result['flux'].astype(np.float32),
+ time=result['time'].astype(np.float32),
+ c_ox=result['c_ox'].astype(np.float32),
+ c_red=result['c_red'].astype(np.float32),
+ x_grid=result['x_grid_out'].astype(np.float32),
+ params=result['params'],
+ mechanism_id=np.int32(mechanism_id),
+ )
+ meta = {
+ 'idx': idx, 'success': True, 'experiment_type': exp,
+ 'mechanism': actual_mechanism, 'mechanism_id': int(mechanism_id),
+ 'n_time': len(result['time']),
+ 'theta_step': float(params['theta_step']),
+ 'n_scan_rates': 1,
+ }
+ return meta
+ else:
+ raise ValueError(f"Unknown experiment type: {exp}")
+
+ except Exception as e:
+ return {
+ 'idx': idx,
+ 'success': False,
+ 'error': str(e),
+ }
+
+
+def _worker_generate(args):
+ """Worker function for multiprocessing (must be at module level)."""
+ import signal
+
+ def _timeout_handler(signum, frame):
+ raise TimeoutError("Sample generation timed out")
+
+ if len(args) == 8:
+ idx, outdir, seed, n_spatial, experiment_type, mechanism, n_scan_rates, add_noise = args
+ elif len(args) == 7:
+ idx, outdir, seed, n_spatial, experiment_type, mechanism, n_scan_rates = args
+ add_noise = True
+ elif len(args) == 6:
+ idx, outdir, seed, n_spatial, experiment_type, mechanism = args
+ n_scan_rates = 1
+ add_noise = True
+ else:
+ idx, outdir, seed, n_spatial, experiment_type = args
+ mechanism = None
+ n_scan_rates = 1
+ add_noise = True
+
+ # Skip if output file already exists (resume support)
+ outpath = os.path.join(outdir, f"sample_{idx:06d}.npz")
+ if os.path.exists(outpath):
+ return {'idx': idx, 'success': True, 'error': None, 'skipped': True}
+
+ old_handler = signal.signal(signal.SIGALRM, _timeout_handler)
+ signal.alarm(180) # 3 minute timeout per sample
+ try:
+ result = generate_sample_single(idx, outdir, seed, n_spatial, experiment_type,
+ mechanism, n_scan_rates, add_noise)
+ except (TimeoutError, Exception) as e:
+ result = {'idx': idx, 'success': False, 'error': f'Timeout or error: {e}'}
+ finally:
+ signal.alarm(0)
+ signal.signal(signal.SIGALRM, old_handler)
+ return result
+
+
+def generate_dataset(
+ n_samples=1000,
+ outdir="data/diffec_cv",
+ n_spatial=64,
+ seed=42,
+ n_workers=None,
+ experiment_type='CV',
+ mechanism=None,
+ multi_mechanism=False,
+ n_per_mechanism=None,
+ n_scan_rates=1,
+ add_noise=True,
+):
+ """
+ Generate a dataset of electrochemical simulations.
+
+ Parameters
+ ----------
+ n_samples : int
+ Number of samples to generate (used when mechanism is single or None)
+ outdir : str
+ Output directory
+ n_spatial : int
+ Number of spatial grid points in output
+ seed : int
+ Random seed
+ n_workers : int, optional
+ Number of parallel workers. Default: number of CPU cores.
+ experiment_type : str
+ 'CV' for cyclic voltammetry, 'CA' for chronoamperometry,
+ 'mixed' for random mix of both.
+ mechanism : str or None
+ Specific mechanism to use. None defaults to BV.
+ multi_mechanism : bool
+ If True, generate balanced data across all 4 mechanisms.
+ n_per_mechanism : int or None
+ Samples per mechanism when multi_mechanism=True. Defaults to n_samples.
+ n_scan_rates : int
+ Number of scan rates per sample. 1 = legacy single-CV format.
+ >1 = multi-scan-rate format with shared kinetic parameters.
+ -1 = randomly sample from {1, 2, 3} per sample.
+ """
+ os.makedirs(outdir, exist_ok=True)
+
+ if n_workers is None:
+ n_workers = max(1, cpu_count() - 1)
+
+ if multi_mechanism:
+ if n_per_mechanism is None:
+ n_per_mechanism = n_samples
+ total = n_per_mechanism * len(MECHANISM_LIST)
+ print(f"Generating multi-mechanism dataset: {n_per_mechanism} per mechanism x {len(MECHANISM_LIST)} = {total}")
+ args_list = []
+ for mech_idx, mech in enumerate(MECHANISM_LIST):
+ offset = mech_idx * n_per_mechanism
+ for i in range(n_per_mechanism):
+ args_list.append((offset + i, outdir, seed, n_spatial, experiment_type, mech, n_scan_rates, add_noise))
+ n_samples = total
+ else:
+ args_list = [(i, outdir, seed, n_spatial, experiment_type, mechanism, n_scan_rates, add_noise) for i in range(n_samples)]
+
+ n_workers = min(n_workers, n_samples)
+
+ print(f"Generating {n_samples} samples...")
+ print(f"Output directory: {outdir}")
+ print(f"Spatial resolution: {n_spatial} points")
+ print(f"Using {n_workers} worker(s)")
+
+ metadata = []
+
+ if n_workers == 1:
+ # Sequential processing
+ for args in tqdm(args_list, desc="Generating samples"):
+ meta = _worker_generate(args)
+ metadata.append(meta)
+ if not meta['success']:
+ print(f"\nSample {meta['idx']} failed: {meta.get('error', 'Unknown error')}")
+ else:
+ from concurrent.futures import ProcessPoolExecutor, as_completed
+ TASK_TIMEOUT = 180 # 3 minutes per sample
+ try:
+ with ProcessPoolExecutor(max_workers=n_workers) as executor:
+ futures = {executor.submit(_worker_generate, a): a[0] for a in args_list}
+ pbar = tqdm(total=n_samples, desc="Generating samples")
+ for future in as_completed(futures):
+ idx = futures[future]
+ try:
+ meta = future.result(timeout=TASK_TIMEOUT)
+ except Exception as e:
+ meta = {'idx': idx, 'success': False, 'error': f'Worker error: {e}'}
+ metadata.append(meta)
+ if not meta['success'] and not meta.get('skipped'):
+ tqdm.write(f"Sample {meta['idx']} failed: {meta.get('error', 'Unknown error')}")
+ pbar.update(1)
+ pbar.close()
+ except (PermissionError, OSError) as e:
+ print(f"\nWarning: Multiprocessing failed ({e}). Falling back to sequential processing...")
+ metadata = []
+ for args in tqdm(args_list, desc="Generating samples (sequential)"):
+ meta = _worker_generate(args)
+ metadata.append(meta)
+ if not meta['success']:
+ print(f"\nSample {meta['idx']} failed: {meta.get('error', 'Unknown error')}")
+
+ # Sort metadata by index (parallel processing may return out of order)
+ metadata = sorted(metadata, key=lambda x: x['idx'])
+
+ # Save metadata
+ n_success = sum(1 for m in metadata if m['success'])
+
+ mech_counts = {}
+ for m in metadata:
+ if m['success']:
+ mech = m.get('mechanism', 'BV')
+ mech_counts[mech] = mech_counts.get(mech, 0) + 1
+
+ summary = {
+ 'n_samples': n_samples,
+ 'n_success': n_success,
+ 'n_spatial': n_spatial,
+ 'n_scan_rates': 'random(1-3)' if n_scan_rates == -1 else n_scan_rates,
+ 'add_noise': add_noise,
+ 'seed': seed,
+ 'n_workers': n_workers,
+ 'experiment_type': experiment_type,
+ 'multi_mechanism': multi_mechanism,
+ 'mechanism_counts': mech_counts,
+ 'samples': metadata,
+ }
+
+ with open(os.path.join(outdir, "metadata.json"), "w") as f:
+ json.dump(summary, f, indent=2)
+
+ print(f"\nGeneration complete: {n_success}/{n_samples} successful")
+ print(f"Metadata saved to {os.path.join(outdir, 'metadata.json')}")
+
+ return metadata
+
+
+# =============================================================================
+# Data Loading Utilities
+# =============================================================================
+
+def load_sample(filepath):
+ """Load a single sample from npz file."""
+ data = np.load(filepath, allow_pickle=True)
+ return {
+ 'potential': data['potential'],
+ 'flux': data['flux'],
+ 'time': data['time'],
+ 'c_ox': data['c_ox'],
+ 'c_red': data['c_red'],
+ 'x_grid': data['x_grid'],
+ 'params': data['params'].item(),
+ }
+
+
+def load_dataset(datadir, max_samples=None):
+ """Load all samples from a directory."""
+ import glob
+
+ files = sorted(glob.glob(os.path.join(datadir, "sample_*.npz")))
+ if max_samples is not None:
+ files = files[:max_samples]
+
+ samples = []
+ for f in tqdm(files, desc="Loading samples"):
+ samples.append(load_sample(f))
+
+ return samples
+
+
+# =============================================================================
+# Main
+# =============================================================================
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(
+ description="Generate DiffEC CV dataset for flow matching"
+ )
+ parser.add_argument(
+ "--n_samples", type=int, default=1000,
+ help="Number of samples to generate"
+ )
+ parser.add_argument(
+ "--outdir", type=str, default="data/diffec_cv",
+ help="Output directory"
+ )
+ parser.add_argument(
+ "--n_spatial", type=int, default=64,
+ help="Number of spatial grid points in output"
+ )
+ parser.add_argument(
+ "--seed", type=int, default=42,
+ help="Random seed"
+ )
+ parser.add_argument(
+ "--n_workers", type=int, default=None,
+ help="Number of parallel workers (default: num_cpus - 1). Set to 1 for sequential."
+ )
+ parser.add_argument(
+ "--experiment_type", type=str, default="CV",
+ choices=["CV", "CA", "mixed"],
+ help="Experiment type: CV (cyclic voltammetry), CA (chronoamperometry), or mixed"
+ )
+ parser.add_argument(
+ "--mechanism", type=str, default=None,
+ choices=["Nernst", "BV", "MHC", "Ads", "EC", "LH"],
+ help="Specific mechanism to generate data for"
+ )
+ parser.add_argument(
+ "--multi_mechanism", action="store_true",
+ help="Generate balanced data across all 4 mechanisms"
+ )
+ parser.add_argument(
+ "--n_per_mechanism", type=int, default=None,
+ help="Samples per mechanism when using --multi_mechanism"
+ )
+ parser.add_argument(
+ "--n_scan_rates", type=str, default="1",
+ help="Number of scan rates per sample. 1 = legacy single-CV. "
+ ">1 = multi-scan-rate with shared kinetic parameters. "
+ "'random' = randomly 1-3 per sample."
+ )
+ parser.add_argument(
+ "--no_noise", action="store_true",
+ help="Disable noise augmentation (generate clean signals)"
+ )
+ parser.add_argument(
+ "--test", action="store_true",
+ help="Run a single test simulation and plot results"
+ )
+
+ args = parser.parse_args()
+
+ if args.test:
+ # Run a test simulation
+ print("Running test simulation...")
+ params = sample_cv_params(np.random.default_rng(42))
+ print(f"Parameters: {params}")
+
+ result = run_cv_simulation(**params, n_spatial_out=64, verbose=True)
+
+ print(f"\nResults:")
+ print(f" Time steps: {len(result['time'])}")
+ print(f" Spatial points: {result['c_ox'].shape[1]}")
+ print(f" Potential range: [{result['potential'].min():.2f}, {result['potential'].max():.2f}]")
+ print(f" Flux range: [{result['flux'].min():.4f}, {result['flux'].max():.4f}]")
+
+ # Try to plot if matplotlib available
+ try:
+ import matplotlib.pyplot as plt
+
+ fig, axes = plt.subplots(2, 2, figsize=(12, 10))
+
+ # CV plot
+ ax = axes[0, 0]
+ ax.plot(result['potential'], result['flux'])
+ ax.set_xlabel('Potential (dimensionless)')
+ ax.set_ylabel('Flux (dimensionless)')
+ ax.set_title('Cyclic Voltammogram')
+
+ # Concentration at electrode surface vs time
+ ax = axes[0, 1]
+ ax.plot(result['time'], result['c_ox'][:, -1], label='Ox (surface)')
+ ax.plot(result['time'], result['c_red'][:, 0], label='Red (surface)')
+ ax.set_xlabel('Time (dimensionless)')
+ ax.set_ylabel('Concentration')
+ ax.set_title('Surface Concentration vs Time')
+ ax.legend()
+
+ # Concentration heatmap - Ox
+ ax = axes[1, 0]
+ im = ax.imshow(
+ result['c_ox'].T, aspect='auto', origin='lower',
+ extent=[0, result['time'][-1], 0, result['x_grid_out'][-1]]
+ )
+ plt.colorbar(im, ax=ax, label='Concentration')
+ ax.set_xlabel('Time')
+ ax.set_ylabel('Distance from electrode')
+ ax.set_title('Oxidized Species Concentration')
+
+ # Concentration heatmap - Red
+ ax = axes[1, 1]
+ im = ax.imshow(
+ result['c_red'].T, aspect='auto', origin='lower',
+ extent=[0, result['time'][-1], 0, result['x_grid_out'][-1]]
+ )
+ plt.colorbar(im, ax=ax, label='Concentration')
+ ax.set_xlabel('Time')
+ ax.set_ylabel('Distance from electrode')
+ ax.set_title('Reduced Species Concentration')
+
+ plt.tight_layout()
+ plt.savefig('test_simulation.png', dpi=150)
+ print("\nPlot saved to test_simulation.png")
+
+ except ImportError:
+ print("\nmatplotlib not available, skipping plot")
+
+ else:
+ n_scan_rates = -1 if args.n_scan_rates.lower() == 'random' else int(args.n_scan_rates)
+ generate_dataset(
+ n_samples=args.n_samples,
+ outdir=args.outdir,
+ n_spatial=args.n_spatial,
+ seed=args.seed,
+ n_workers=args.n_workers,
+ experiment_type=args.experiment_type,
+ mechanism=args.mechanism,
+ multi_mechanism=args.multi_mechanism,
+ n_per_mechanism=args.n_per_mechanism,
+ n_scan_rates=n_scan_rates,
+ add_noise=not args.no_noise,
+ )
diff --git a/generate_tpd_data.py b/generate_tpd_data.py
new file mode 100644
index 0000000000000000000000000000000000000000..dc7c69a4455645c83325649ebd1ebc07bd20d448
--- /dev/null
+++ b/generate_tpd_data.py
@@ -0,0 +1,1021 @@
+"""
+TPD/TPR Simulator and Dataset Generation for Heterogeneous Catalysis.
+
+Implements 6 temperature-programmed desorption/reaction mechanisms:
+ 1. FirstOrder - first-order desorption (Polanyi-Wigner, n=1)
+ 2. SecondOrder - second-order/recombinative desorption (n=2)
+ 3. LH_Surface - Langmuir-Hinshelwood bimolecular surface reaction
+ 4. MvK - Mars-van Krevelen lattice oxygen mechanism
+ 5. FirstOrderCovDep - first-order with coverage-dependent activation energy
+ 6. DiffLimited - diffusion-limited desorption from porous materials
+
+Each mechanism is solved as an ODE with a linear temperature ramp T = T0 + beta*t.
+Supports multi-heating-rate generation (analogous to multi-scan-rate CVs in EC).
+
+Data format mirrors the electrochemistry pipeline for compatibility.
+"""
+
+import os
+import sys
+import json
+import argparse
+import numpy as np
+from tqdm import tqdm
+from multiprocessing import Pool, cpu_count
+
+import scipy.integrate
+
+
+# =============================================================================
+# Mechanism registry
+# =============================================================================
+
+TPD_MECHANISM_LIST = [
+ 'FirstOrder', 'SecondOrder', 'LH_Surface', 'MvK',
+ 'FirstOrderCovDep', 'DiffLimited',
+]
+TPD_MECHANISM_TO_ID = {m: i for i, m in enumerate(TPD_MECHANISM_LIST)}
+
+TPD_MECHANISM_PARAMS = {
+ 'FirstOrder': {
+ 'names': ['Ed', 'log10(nu)', 'theta_0'],
+ 'dim': 3,
+ },
+ 'SecondOrder': {
+ 'names': ['Ed', 'log10(nu)', 'theta_0'],
+ 'dim': 3,
+ },
+ 'LH_Surface': {
+ 'names': ['Ea', 'log10(nu)', 'theta_A0', 'theta_B0'],
+ 'dim': 4,
+ },
+ 'MvK': {
+ 'names': ['Ea_red', 'Ea_reox', 'log10(nu_red)', 'theta_O0'],
+ 'dim': 4,
+ },
+ 'FirstOrderCovDep': {
+ 'names': ['Ed0', 'alpha_cov', 'log10(nu)', 'theta_0'],
+ 'dim': 4,
+ },
+ 'DiffLimited': {
+ 'names': ['Ed', 'log10(nu)', 'log10(D0)', 'E_diff', 'theta_0'],
+ 'dim': 5,
+ },
+}
+
+
+# =============================================================================
+# Simulation constants
+# =============================================================================
+
+# We work in dimensionless temperature units: T_dimless = T_physical / T_ref.
+# Activation energies are also dimensionless: Ed_dimless = Ed_physical / (R * T_ref).
+# With T_ref = 1 K conceptually, T values are just Kelvin and Ed = Ea/(R) in K.
+# In practice we use T in Kelvin directly and Ed in units of K (= Ea/R).
+# This avoids carrying R everywhere.
+
+T_REF = 1.0 # Reference temperature (K); energies in K (= Ea/R)
+N_POINTS_DEFAULT = 500 # time steps per TPD curve
+
+
+# =============================================================================
+# ODE Simulators
+# =============================================================================
+
+def run_tpd_first_order(Ed, nu, theta_0, beta, T_start, T_end,
+ n_points=N_POINTS_DEFAULT):
+ """
+ First-order desorption: d(theta)/dt = -nu * theta * exp(-Ed / T(t))
+ where T(t) = T_start + beta * t.
+
+ Parameters
+ ----------
+ Ed : float
+ Dimensionless desorption energy (= Ea / R, in Kelvin).
+ nu : float
+ Pre-exponential factor (s^-1).
+ theta_0 : float
+ Initial fractional surface coverage [0, 1].
+ beta : float
+ Heating rate (K/s).
+ T_start, T_end : float
+ Temperature ramp range (K).
+ n_points : int
+ Number of output points.
+
+ Returns
+ -------
+ dict with 'temperature', 'rate', 'time', 'coverage', 'params'
+ """
+ t_end = (T_end - T_start) / beta
+ t_eval = np.linspace(0, t_end, n_points)
+
+ def rhs(t, y):
+ theta = y[0]
+ T = T_start + beta * t
+ if T < 1.0:
+ T = 1.0
+ rate = -nu * theta * np.exp(-Ed / T)
+ return [rate]
+
+ sol = scipy.integrate.solve_ivp(
+ rhs, [0, t_end], [theta_0], t_eval=t_eval,
+ method='BDF', rtol=1e-8, atol=1e-10, max_step=t_end / 50,
+ )
+
+ theta = sol.y[0]
+ temperature = T_start + beta * sol.t
+ rate = nu * np.maximum(theta, 0) * np.exp(-Ed / np.maximum(temperature, 1.0))
+
+ return {
+ 'temperature': temperature.astype(np.float32),
+ 'rate': rate.astype(np.float32),
+ 'time': sol.t.astype(np.float32),
+ 'coverage': theta.astype(np.float32),
+ 'params': {
+ 'mechanism': 'FirstOrder',
+ 'Ed': float(Ed),
+ 'nu': float(nu),
+ 'theta_0': float(theta_0),
+ 'beta': float(beta),
+ 'T_start': float(T_start),
+ 'T_end': float(T_end),
+ },
+ }
+
+
+def run_tpd_second_order(Ed, nu, theta_0, beta, T_start, T_end,
+ n_points=N_POINTS_DEFAULT):
+ """
+ Second-order (recombinative) desorption:
+ d(theta)/dt = -nu * theta^2 * exp(-Ed / T(t))
+
+ Peak position shifts to lower T with increasing theta_0 (key diagnostic).
+ """
+ t_end = (T_end - T_start) / beta
+ t_eval = np.linspace(0, t_end, n_points)
+
+ def rhs(t, y):
+ theta = y[0]
+ T = T_start + beta * t
+ if T < 1.0:
+ T = 1.0
+ rate = -nu * theta ** 2 * np.exp(-Ed / T)
+ return [rate]
+
+ sol = scipy.integrate.solve_ivp(
+ rhs, [0, t_end], [theta_0], t_eval=t_eval,
+ method='BDF', rtol=1e-8, atol=1e-10, max_step=t_end / 50,
+ )
+
+ theta = sol.y[0]
+ temperature = T_start + beta * sol.t
+ rate = nu * np.maximum(theta, 0) ** 2 * np.exp(-Ed / np.maximum(temperature, 1.0))
+
+ return {
+ 'temperature': temperature.astype(np.float32),
+ 'rate': rate.astype(np.float32),
+ 'time': sol.t.astype(np.float32),
+ 'coverage': theta.astype(np.float32),
+ 'params': {
+ 'mechanism': 'SecondOrder',
+ 'Ed': float(Ed),
+ 'nu': float(nu),
+ 'theta_0': float(theta_0),
+ 'beta': float(beta),
+ 'T_start': float(T_start),
+ 'T_end': float(T_end),
+ },
+ }
+
+
+def run_tpd_lh_surface(Ea, nu, theta_A0, theta_B0, beta, T_start, T_end,
+ n_points=N_POINTS_DEFAULT):
+ """
+ Langmuir-Hinshelwood bimolecular surface reaction:
+ A(ads) + B(ads) -> products
+ d(theta_A)/dt = -nu * theta_A * theta_B * exp(-Ea / T)
+ d(theta_B)/dt = -nu * theta_A * theta_B * exp(-Ea / T)
+ rate = nu * theta_A * theta_B * exp(-Ea / T)
+ """
+ t_end = (T_end - T_start) / beta
+ t_eval = np.linspace(0, t_end, n_points)
+
+ def rhs(t, y):
+ theta_A, theta_B = y
+ T = T_start + beta * t
+ if T < 1.0:
+ T = 1.0
+ r = -nu * theta_A * theta_B * np.exp(-Ea / T)
+ return [r, r]
+
+ sol = scipy.integrate.solve_ivp(
+ rhs, [0, t_end], [theta_A0, theta_B0], t_eval=t_eval,
+ method='BDF', rtol=1e-8, atol=1e-10, max_step=t_end / 50,
+ )
+
+ theta_A = sol.y[0]
+ theta_B = sol.y[1]
+ temperature = T_start + beta * sol.t
+ rate = nu * np.maximum(theta_A, 0) * np.maximum(theta_B, 0) * \
+ np.exp(-Ea / np.maximum(temperature, 1.0))
+
+ return {
+ 'temperature': temperature.astype(np.float32),
+ 'rate': rate.astype(np.float32),
+ 'time': sol.t.astype(np.float32),
+ 'coverage': np.stack([theta_A, theta_B], axis=-1).astype(np.float32),
+ 'params': {
+ 'mechanism': 'LH_Surface',
+ 'Ea': float(Ea),
+ 'nu': float(nu),
+ 'theta_A0': float(theta_A0),
+ 'theta_B0': float(theta_B0),
+ 'beta': float(beta),
+ 'T_start': float(T_start),
+ 'T_end': float(T_end),
+ },
+ }
+
+
+def run_tpd_mvk(Ea_red, Ea_reox, nu_red, theta_O0, beta, T_start, T_end,
+ n_points=N_POINTS_DEFAULT):
+ """
+ Mars-van Krevelen lattice oxygen mechanism:
+ Reduction: rate_red = nu_red * theta_O * exp(-Ea_red / T)
+ Reoxidation: rate_reox = nu_reox * (1 - theta_O) * exp(-Ea_reox / T)
+ d(theta_O)/dt = rate_reox - rate_red
+ Observable rate = rate_red (consumption of lattice oxygen)
+
+ nu_reox is fixed at nu_red * 0.1 to reduce parameter count while
+ keeping the two-process competition that creates the distinctive MvK
+ peak shapes.
+ """
+ nu_reox = nu_red * 0.1
+ t_end = (T_end - T_start) / beta
+ t_eval = np.linspace(0, t_end, n_points)
+
+ def rhs(t, y):
+ theta_O = y[0]
+ T = T_start + beta * t
+ if T < 1.0:
+ T = 1.0
+ r_red = nu_red * theta_O * np.exp(-Ea_red / T)
+ r_reox = nu_reox * (1.0 - theta_O) * np.exp(-Ea_reox / T)
+ return [r_reox - r_red]
+
+ sol = scipy.integrate.solve_ivp(
+ rhs, [0, t_end], [theta_O0], t_eval=t_eval,
+ method='BDF', rtol=1e-8, atol=1e-10, max_step=t_end / 50,
+ )
+
+ theta_O = sol.y[0]
+ temperature = T_start + beta * sol.t
+ rate = nu_red * np.maximum(theta_O, 0) * \
+ np.exp(-Ea_red / np.maximum(temperature, 1.0))
+
+ return {
+ 'temperature': temperature.astype(np.float32),
+ 'rate': rate.astype(np.float32),
+ 'time': sol.t.astype(np.float32),
+ 'coverage': theta_O.astype(np.float32),
+ 'params': {
+ 'mechanism': 'MvK',
+ 'Ea_red': float(Ea_red),
+ 'Ea_reox': float(Ea_reox),
+ 'nu_red': float(nu_red),
+ 'nu_reox': float(nu_reox),
+ 'theta_O0': float(theta_O0),
+ 'beta': float(beta),
+ 'T_start': float(T_start),
+ 'T_end': float(T_end),
+ },
+ }
+
+
+def run_tpd_first_order_covdep(Ed0, alpha_cov, nu, theta_0, beta, T_start, T_end,
+ n_points=N_POINTS_DEFAULT):
+ """
+ First-order desorption with coverage-dependent activation energy:
+ Ed(theta) = Ed0 + alpha_cov * theta
+ d(theta)/dt = -nu * theta * exp(-Ed(theta) / T(t))
+
+ Repulsive lateral interactions (alpha_cov > 0) cause the peak to sharpen
+ and shift to lower T as coverage decreases — a signature that standard
+ Redhead analysis misinterprets as a change in Ed.
+
+ Parameters
+ ----------
+ Ed0 : float
+ Zero-coverage desorption energy (K, = Ea0/R).
+ alpha_cov : float
+ Coverage-dependence coefficient (K). Positive = repulsive interactions.
+ nu : float
+ Pre-exponential factor (s^-1).
+ theta_0 : float
+ Initial fractional surface coverage [0, 1].
+ beta : float
+ Heating rate (K/s).
+ """
+ t_end = (T_end - T_start) / beta
+ t_eval = np.linspace(0, t_end, n_points)
+
+ def rhs(t, y):
+ theta = y[0]
+ T = T_start + beta * t
+ if T < 1.0:
+ T = 1.0
+ Ed_eff = Ed0 + alpha_cov * theta
+ rate = -nu * theta * np.exp(-Ed_eff / T)
+ return [rate]
+
+ sol = scipy.integrate.solve_ivp(
+ rhs, [0, t_end], [theta_0], t_eval=t_eval,
+ method='BDF', rtol=1e-8, atol=1e-10, max_step=t_end / 50,
+ )
+
+ theta = sol.y[0]
+ temperature = T_start + beta * sol.t
+ Ed_eff = Ed0 + alpha_cov * np.maximum(theta, 0)
+ rate = nu * np.maximum(theta, 0) * np.exp(-Ed_eff / np.maximum(temperature, 1.0))
+
+ return {
+ 'temperature': temperature.astype(np.float32),
+ 'rate': rate.astype(np.float32),
+ 'time': sol.t.astype(np.float32),
+ 'coverage': theta.astype(np.float32),
+ 'params': {
+ 'mechanism': 'FirstOrderCovDep',
+ 'Ed0': float(Ed0),
+ 'alpha_cov': float(alpha_cov),
+ 'nu': float(nu),
+ 'theta_0': float(theta_0),
+ 'beta': float(beta),
+ 'T_start': float(T_start),
+ 'T_end': float(T_end),
+ },
+ }
+
+
+def run_tpd_diff_limited(Ed, nu, D0, E_diff, theta_0, beta, T_start, T_end,
+ n_points=N_POINTS_DEFAULT, n_shells=20):
+ """
+ Diffusion-limited desorption from a porous/layered material.
+
+ Models a 1D spherical particle with n_shells concentric shells.
+ Surface desorption follows first-order kinetics; replenishment of the
+ surface layer is limited by intra-particle diffusion with an
+ Arrhenius-type diffusivity D(T) = D0 * exp(-E_diff / T).
+
+ This produces characteristic broadened, asymmetric peaks with long
+ high-temperature tails that traditional Redhead/Kissinger methods
+ cannot fit — the apparent activation energy depends on particle size
+ and diffusivity.
+
+ Parameters
+ ----------
+ Ed : float
+ Surface desorption energy (K, = Ea/R).
+ nu : float
+ Pre-exponential factor for desorption (s^-1).
+ D0 : float
+ Diffusion pre-exponential (s^-1, dimensionless Fourier units).
+ E_diff : float
+ Diffusion activation energy (K, = Ea_diff/R).
+ theta_0 : float
+ Initial uniform loading in all shells [0, 1].
+ beta : float
+ Heating rate (K/s).
+ n_shells : int
+ Number of radial shells for the discretized diffusion.
+ """
+ t_end = (T_end - T_start) / beta
+ t_eval = np.linspace(0, t_end, n_points)
+
+ # Radial grid: shells at r_i/R = (i+0.5)/n_shells, i=0..n_shells-1
+ # Shell 0 = center, shell n_shells-1 = surface
+ dr = 1.0 / n_shells
+ r = np.array([(i + 0.5) * dr for i in range(n_shells)])
+ r_face = np.array([i * dr for i in range(n_shells + 1)])
+
+ # Shell volumes (spherical): V_i = 4/3 pi (r_face[i+1]^3 - r_face[i]^3)
+ vol = (4.0 / 3.0) * np.pi * (r_face[1:] ** 3 - r_face[:-1] ** 3)
+
+ y0 = np.full(n_shells, theta_0)
+
+ def rhs(t, y):
+ T = T_start + beta * t
+ if T < 1.0:
+ T = 1.0
+
+ D = D0 * np.exp(-E_diff / T)
+ dydt = np.zeros(n_shells)
+
+ # Diffusion between adjacent shells (spherical coordinates)
+ for i in range(n_shells - 1):
+ area = 4.0 * np.pi * r_face[i + 1] ** 2
+ flux = D * area * (y[i] - y[i + 1]) / dr
+ dydt[i] -= flux / vol[i]
+ dydt[i + 1] += flux / vol[i + 1]
+
+ # Surface desorption from outermost shell only
+ k_des = nu * np.exp(-Ed / T)
+ dydt[-1] -= k_des * y[-1]
+
+ return dydt
+
+ sol = scipy.integrate.solve_ivp(
+ rhs, [0, t_end], y0, t_eval=t_eval,
+ method='BDF', rtol=1e-8, atol=1e-10, max_step=t_end / 50,
+ )
+
+ theta_all = sol.y # [n_shells, n_points]
+ temperature = T_start + beta * sol.t
+
+ # Observable rate = surface desorption rate
+ theta_surf = np.maximum(theta_all[-1], 0)
+ rate = nu * theta_surf * np.exp(-Ed / np.maximum(temperature, 1.0))
+
+ return {
+ 'temperature': temperature.astype(np.float32),
+ 'rate': rate.astype(np.float32),
+ 'time': sol.t.astype(np.float32),
+ 'coverage': theta_surf.astype(np.float32),
+ 'params': {
+ 'mechanism': 'DiffLimited',
+ 'Ed': float(Ed),
+ 'nu': float(nu),
+ 'D0': float(D0),
+ 'E_diff': float(E_diff),
+ 'theta_0': float(theta_0),
+ 'beta': float(beta),
+ 'T_start': float(T_start),
+ 'T_end': float(T_end),
+ 'n_shells': n_shells,
+ },
+ }
+
+
+# =============================================================================
+# Simulation dispatch
+# =============================================================================
+
+def _run_single_tpd(params):
+ """Run a single TPD simulation, dispatching to the correct mechanism."""
+ mech = params['mechanism']
+ beta = params['beta']
+ T_start = params['T_start']
+ T_end = params['T_end']
+ n_points = params.get('n_points', N_POINTS_DEFAULT)
+
+ if mech == 'FirstOrder':
+ return run_tpd_first_order(
+ params['Ed'], params['nu'], params['theta_0'],
+ beta, T_start, T_end, n_points,
+ )
+ elif mech == 'SecondOrder':
+ return run_tpd_second_order(
+ params['Ed'], params['nu'], params['theta_0'],
+ beta, T_start, T_end, n_points,
+ )
+ elif mech == 'LH_Surface':
+ return run_tpd_lh_surface(
+ params['Ea'], params['nu'], params['theta_A0'], params['theta_B0'],
+ beta, T_start, T_end, n_points,
+ )
+ elif mech == 'MvK':
+ return run_tpd_mvk(
+ params['Ea_red'], params['Ea_reox'], params['nu_red'],
+ params['theta_O0'], beta, T_start, T_end, n_points,
+ )
+ elif mech == 'FirstOrderCovDep':
+ return run_tpd_first_order_covdep(
+ params['Ed0'], params['alpha_cov'], params['nu'],
+ params['theta_0'], beta, T_start, T_end, n_points,
+ )
+ elif mech == 'DiffLimited':
+ return run_tpd_diff_limited(
+ params['Ed'], params['nu'], params['D0'], params['E_diff'],
+ params['theta_0'], beta, T_start, T_end, n_points,
+ )
+ else:
+ raise ValueError(f"Unknown TPD mechanism: {mech}")
+
+
+# =============================================================================
+# Parameter sampling
+# =============================================================================
+
+def _sample_common_tpd_params(rng):
+ """Sample common TPD experiment parameters."""
+ T_start = rng.uniform(300, 400)
+ T_end = rng.uniform(900, 1200)
+ return T_start, T_end
+
+
+def _estimate_T_peak(Ed, log10_nu, beta):
+ """Redhead estimate of peak temperature for first-order TPD.
+ Solves Ed/T_peak^2 ≈ (nu/beta) * exp(-Ed/T_peak) iteratively.
+ Good enough for rejection sampling."""
+ # Initial guess: T_peak ≈ Ed / (ln(nu*Ed/beta) - ln(T_peak^2))
+ # Simplified: T_peak ≈ Ed / (log10_nu * ln(10) - ln(Ed/beta))
+ ln_nu = log10_nu * np.log(10)
+ T_est = Ed / (ln_nu - np.log(max(Ed / max(beta, 0.01), 1.0)))
+ T_est = np.clip(T_est, 100, 2000)
+ # One Newton step
+ for _ in range(3):
+ exp_term = np.exp(-Ed / max(T_est, 1.0))
+ f = Ed / (T_est ** 2) - (10 ** log10_nu / max(beta, 0.01)) * exp_term
+ df = -2 * Ed / (T_est ** 3) - (10 ** log10_nu / max(beta, 0.01)) * exp_term * Ed / (T_est ** 2)
+ if abs(df) > 1e-30:
+ T_est = T_est - f / df
+ T_est = np.clip(T_est, 100, 2000)
+ return T_est
+
+
+def _sample_Ed_nu_beta(rng, T_start, T_end, max_attempts=50):
+ """Sample (Ed, nu, beta) ensuring the estimated peak temperature
+ falls within the measurement window [T_start+margin, T_end-margin]."""
+ T_lo = T_start + 0.15 * (T_end - T_start)
+ T_hi = T_end - 0.10 * (T_end - T_start)
+
+ for _ in range(max_attempts):
+ log10_nu = rng.uniform(12, 16)
+ log10_beta = rng.uniform(-0.5, 1.5)
+ beta = 10 ** log10_beta
+
+ # Sample T_peak target, then back-solve for Ed
+ T_peak_target = rng.uniform(T_lo, T_hi)
+ ln_nu = log10_nu * np.log(10)
+ # From Redhead: Ed ≈ T_peak * (ln(nu*T_peak/beta) - ln(T_peak))
+ # ≈ T_peak * (ln_nu + ln(T_peak) - ln(beta) - 3.64)
+ Ed = T_peak_target * (ln_nu + np.log(T_peak_target) - np.log(beta) - 3.64)
+
+ if Ed < 3000 or Ed > 50000:
+ continue
+
+ T_est = _estimate_T_peak(Ed, log10_nu, beta)
+ if T_lo <= T_est <= T_hi:
+ return Ed, 10 ** log10_nu, beta
+
+ # Fallback: conservative parameters that always produce a mid-range peak
+ beta = 10 ** rng.uniform(0.0, 1.0)
+ T_peak_target = rng.uniform(T_lo, T_hi)
+ log10_nu = 13.0
+ Ed = T_peak_target * (13.0 * np.log(10) + np.log(T_peak_target) - np.log(beta) - 3.64)
+ return Ed, 10 ** log10_nu, beta
+
+
+def sample_first_order_params(rng):
+ """Sample parameters for first-order desorption."""
+ T_start, T_end = _sample_common_tpd_params(rng)
+ Ed, nu, beta = _sample_Ed_nu_beta(rng, T_start, T_end)
+ theta_0 = rng.uniform(0.1, 1.0)
+ return {
+ 'mechanism': 'FirstOrder',
+ 'Ed': float(Ed), 'nu': float(nu), 'theta_0': float(theta_0),
+ 'beta': float(beta), 'T_start': float(T_start), 'T_end': float(T_end),
+ }
+
+
+def sample_second_order_params(rng):
+ """Sample parameters for second-order desorption."""
+ T_start, T_end = _sample_common_tpd_params(rng)
+ Ed, nu, beta = _sample_Ed_nu_beta(rng, T_start, T_end)
+ theta_0 = rng.uniform(0.1, 1.0)
+ return {
+ 'mechanism': 'SecondOrder',
+ 'Ed': float(Ed), 'nu': float(nu), 'theta_0': float(theta_0),
+ 'beta': float(beta), 'T_start': float(T_start), 'T_end': float(T_end),
+ }
+
+
+def sample_lh_surface_params(rng):
+ """Sample parameters for LH bimolecular surface reaction."""
+ T_start, T_end = _sample_common_tpd_params(rng)
+ Ea, nu, beta = _sample_Ed_nu_beta(rng, T_start, T_end)
+ theta_A0 = rng.uniform(0.1, 1.0)
+ theta_B0 = rng.uniform(0.1, 1.0)
+ return {
+ 'mechanism': 'LH_Surface',
+ 'Ea': float(Ea), 'nu': float(nu),
+ 'theta_A0': float(theta_A0), 'theta_B0': float(theta_B0),
+ 'beta': float(beta), 'T_start': float(T_start), 'T_end': float(T_end),
+ }
+
+
+def sample_mvk_params(rng):
+ """Sample parameters for Mars-van Krevelen mechanism."""
+ T_start, T_end = _sample_common_tpd_params(rng)
+ Ea_red, nu_red, beta = _sample_Ed_nu_beta(rng, T_start, T_end)
+ # Reoxidation energy: sample independently but also constrain to reasonable range
+ Ea_reox, _, _ = _sample_Ed_nu_beta(rng, T_start, T_end)
+ theta_O0 = rng.uniform(0.5, 1.0)
+ return {
+ 'mechanism': 'MvK',
+ 'Ea_red': float(Ea_red), 'Ea_reox': float(Ea_reox),
+ 'nu_red': float(nu_red), 'theta_O0': float(theta_O0),
+ 'beta': float(beta), 'T_start': float(T_start), 'T_end': float(T_end),
+ }
+
+
+def sample_first_order_covdep_params(rng):
+ """Sample parameters for coverage-dependent first-order desorption.
+
+ Ed(theta) = Ed0 + alpha_cov * theta. alpha_cov > 0 means repulsive
+ lateral interactions (common for CO on metals). We sample Ed0 via the
+ Redhead constraint at the *initial* coverage so the peak lands in the
+ measurement window, then add a coverage-dependence coefficient that
+ shifts the effective energy by up to ~30% of Ed0.
+ """
+ T_start, T_end = _sample_common_tpd_params(rng)
+ Ed0, nu, beta = _sample_Ed_nu_beta(rng, T_start, T_end)
+ # alpha_cov in [0.05*Ed0, 0.35*Ed0]: ensures noticeable but not
+ # overwhelming coverage dependence
+ alpha_cov = rng.uniform(0.05, 0.35) * Ed0
+ theta_0 = rng.uniform(0.3, 1.0)
+ return {
+ 'mechanism': 'FirstOrderCovDep',
+ 'Ed0': float(Ed0), 'alpha_cov': float(alpha_cov),
+ 'nu': float(nu), 'theta_0': float(theta_0),
+ 'beta': float(beta), 'T_start': float(T_start), 'T_end': float(T_end),
+ }
+
+
+def sample_diff_limited_params(rng):
+ """Sample parameters for diffusion-limited desorption.
+
+ The key physics: if E_diff is comparable to Ed, diffusion is the
+ rate-limiting step and the TPD peak broadens with a long tail.
+ If E_diff << Ed, diffusion is fast and the curve looks like standard
+ first-order. We sample to ensure a range of diffusion-limitation
+ regimes.
+ """
+ T_start, T_end = _sample_common_tpd_params(rng)
+ Ed, nu, beta = _sample_Ed_nu_beta(rng, T_start, T_end)
+
+ # D0: dimensionless diffusion pre-exponential.
+ # In Fourier number units (D*t/R^2), D0 ~ 1e2 to 1e6 gives a range
+ # from strongly diffusion-limited to nearly surface-kinetics-limited.
+ log10_D0 = rng.uniform(2.0, 6.0)
+ D0 = 10 ** log10_D0
+
+ # E_diff: diffusion activation energy.
+ # Ratio E_diff/Ed ~ 0.3 to 0.9 covers weakly to strongly limited regimes.
+ E_diff = rng.uniform(0.3, 0.9) * Ed
+
+ theta_0 = rng.uniform(0.3, 1.0)
+ return {
+ 'mechanism': 'DiffLimited',
+ 'Ed': float(Ed), 'nu': float(nu),
+ 'D0': float(D0), 'E_diff': float(E_diff),
+ 'theta_0': float(theta_0),
+ 'beta': float(beta), 'T_start': float(T_start), 'T_end': float(T_end),
+ }
+
+
+def sample_tpd_params(rng, mechanism=None):
+ """Sample TPD parameters, optionally for a specific mechanism."""
+ if mechanism is None:
+ mechanism = rng.choice(TPD_MECHANISM_LIST)
+
+ samplers = {
+ 'FirstOrder': sample_first_order_params,
+ 'SecondOrder': sample_second_order_params,
+ 'LH_Surface': sample_lh_surface_params,
+ 'MvK': sample_mvk_params,
+ 'FirstOrderCovDep': sample_first_order_covdep_params,
+ 'DiffLimited': sample_diff_limited_params,
+ }
+ return samplers[mechanism](rng)
+
+
+# =============================================================================
+# Noise
+# =============================================================================
+
+def _add_noise(signal, rng, noise_range=(0.001, 0.02)):
+ """Add Gaussian noise to a signal. Returns (noisy_signal, sigma_noise).
+ Clamps result to >= 0 since desorption/reaction rates are non-negative."""
+ sigma_noise = rng.uniform(*noise_range)
+ peak = np.max(np.abs(signal)) + 1e-20
+ noise = sigma_noise * peak * rng.standard_normal(signal.shape)
+ noisy = signal + noise.astype(signal.dtype)
+ np.maximum(noisy, 0, out=noisy)
+ return noisy, float(sigma_noise)
+
+
+# =============================================================================
+# Multi-heating-rate sampling
+# =============================================================================
+
+def _sample_heating_rates(rng, n_rates, log_beta_range=(-0.5, 1.5)):
+ """Sample log-spaced heating rates spanning the given range."""
+ lo, hi = log_beta_range
+ if n_rates == 1:
+ return np.array([10 ** rng.uniform(lo, hi)])
+ anchors = np.linspace(lo, hi, n_rates)
+ jitter = (hi - lo) / (n_rates - 1) * 0.3
+ log_betas = np.array([rng.uniform(a - jitter, a + jitter) for a in anchors])
+ log_betas = np.clip(log_betas, lo, hi)
+ log_betas.sort()
+ return 10 ** log_betas
+
+
+# =============================================================================
+# Dataset generation
+# =============================================================================
+
+def generate_sample_single(idx, outdir, seed, mechanism=None,
+ n_heating_rates=1, add_noise=True):
+ """
+ Generate and save a single TPD sample (single or multi-heating-rate).
+
+ When n_heating_rates > 1, the same kinetic parameters are simulated at
+ multiple heating rates and saved together.
+ """
+ rng = np.random.default_rng(seed + idx)
+
+ try:
+ params = sample_tpd_params(rng, mechanism=mechanism)
+ actual_mechanism = params['mechanism']
+ mechanism_id = TPD_MECHANISM_TO_ID[actual_mechanism]
+
+ if n_heating_rates <= 1:
+ result = _run_single_tpd(params)
+ rate = result['rate'].copy()
+ sigma_noise = 0.0
+ if add_noise:
+ rate, sigma_noise = _add_noise(rate, rng)
+
+ save_params = dict(params)
+ save_params['sigma_noise'] = sigma_noise
+
+ np.savez_compressed(
+ os.path.join(outdir, f"sample_{idx:06d}.npz"),
+ temperature=result['temperature'],
+ rate=rate,
+ time=result['time'],
+ params=save_params,
+ mechanism_id=np.int32(mechanism_id),
+ )
+ meta = {
+ 'idx': idx, 'success': True,
+ 'mechanism': actual_mechanism,
+ 'mechanism_id': int(mechanism_id),
+ 'n_time': len(result['time']),
+ 'beta': float(params['beta']),
+ 'n_heating_rates': 1,
+ 'sigma_noise': sigma_noise,
+ }
+ return meta
+
+ # Multi-heating-rate: same kinetic params, different heating rates
+ heating_rates = _sample_heating_rates(rng, n_heating_rates)
+
+ temperatures, rates, times = [], [], []
+ for beta in heating_rates:
+ p = dict(params)
+ p['beta'] = float(beta)
+ result = _run_single_tpd(p)
+ temp = result['temperature'].copy()
+ rate = result['rate'].copy()
+ if add_noise:
+ rate, _ = _add_noise(rate, rng)
+ temperatures.append(temp)
+ rates.append(rate)
+ times.append(result['time'].copy())
+
+ # Pad to same length
+ max_t = max(len(t) for t in temperatures)
+ n_hr = len(heating_rates)
+ temp_arr = np.zeros((n_hr, max_t), dtype=np.float32)
+ rate_arr = np.zeros((n_hr, max_t), dtype=np.float32)
+ time_arr = np.zeros((n_hr, max_t), dtype=np.float32)
+ lengths = np.zeros(n_hr, dtype=np.int32)
+
+ for i in range(n_hr):
+ t_len = len(temperatures[i])
+ temp_arr[i, :t_len] = temperatures[i]
+ rate_arr[i, :t_len] = rates[i]
+ time_arr[i, :t_len] = times[i]
+ lengths[i] = t_len
+
+ save_params = dict(params)
+ # Remove the single beta; heating_rates array is saved separately
+ save_params.pop('beta', None)
+
+ np.savez_compressed(
+ os.path.join(outdir, f"sample_{idx:06d}.npz"),
+ temperature=temp_arr,
+ rate=rate_arr,
+ time=time_arr,
+ heating_rates=heating_rates.astype(np.float32),
+ lengths=lengths,
+ params=save_params,
+ mechanism_id=np.int32(mechanism_id),
+ n_heating_rates=np.int32(n_heating_rates),
+ )
+
+ meta = {
+ 'idx': idx, 'success': True,
+ 'mechanism': actual_mechanism,
+ 'mechanism_id': int(mechanism_id),
+ 'n_time_max': int(max_t),
+ 'heating_rates': [float(b) for b in heating_rates],
+ 'n_heating_rates': n_heating_rates,
+ }
+ return meta
+
+ except Exception as e:
+ return {
+ 'idx': idx,
+ 'success': False,
+ 'error': str(e),
+ }
+
+
+def _worker_generate(args):
+ """Worker function for multiprocessing (must be at module level)."""
+ idx, outdir, seed, mechanism, n_heating_rates, add_noise = args
+ return generate_sample_single(idx, outdir, seed, mechanism,
+ n_heating_rates, add_noise)
+
+
+def generate_dataset(
+ n_samples=1000,
+ outdir="data_tpd/raw",
+ seed=42,
+ n_workers=None,
+ mechanism=None,
+ multi_mechanism=False,
+ n_per_mechanism=None,
+ n_heating_rates=1,
+ add_noise=True,
+):
+ """Generate a dataset of TPD simulations."""
+ os.makedirs(outdir, exist_ok=True)
+
+ if n_workers is None:
+ n_workers = max(1, cpu_count() - 1)
+
+ if multi_mechanism:
+ if n_per_mechanism is None:
+ n_per_mechanism = n_samples
+ total = n_per_mechanism * len(TPD_MECHANISM_LIST)
+ print(f"Generating multi-mechanism TPD dataset: "
+ f"{n_per_mechanism} per mechanism x {len(TPD_MECHANISM_LIST)} = {total}")
+ args_list = []
+ for mech_idx, mech in enumerate(TPD_MECHANISM_LIST):
+ offset = mech_idx * n_per_mechanism
+ for i in range(n_per_mechanism):
+ args_list.append((offset + i, outdir, seed, mech,
+ n_heating_rates, add_noise))
+ n_samples = total
+ else:
+ args_list = [(i, outdir, seed, mechanism, n_heating_rates, add_noise)
+ for i in range(n_samples)]
+
+ n_workers = min(n_workers, n_samples)
+
+ print(f"Generating {n_samples} TPD samples...")
+ print(f"Output directory: {outdir}")
+ print(f"Heating rates per sample: {n_heating_rates}")
+ print(f"Using {n_workers} worker(s)")
+
+ metadata = []
+
+ if n_workers == 1:
+ for args in tqdm(args_list, desc="Generating samples"):
+ meta = _worker_generate(args)
+ metadata.append(meta)
+ if not meta['success']:
+ print(f"\nSample {meta['idx']} failed: {meta.get('error', 'Unknown')}")
+ else:
+ try:
+ with Pool(processes=n_workers) as pool:
+ for meta in tqdm(
+ pool.imap_unordered(_worker_generate, args_list, chunksize=max(1, n_samples // (n_workers * 4))),
+ total=n_samples,
+ desc="Generating samples",
+ ):
+ metadata.append(meta)
+ if not meta['success']:
+ tqdm.write(f"Sample {meta['idx']} failed: "
+ f"{meta.get('error', 'Unknown')}")
+ except (PermissionError, OSError) as e:
+ print(f"\nWarning: Multiprocessing failed ({e}). "
+ "Falling back to sequential...")
+ metadata = []
+ for args in tqdm(args_list, desc="Generating samples (sequential)"):
+ meta = _worker_generate(args)
+ metadata.append(meta)
+ if not meta['success']:
+ print(f"\nSample {meta['idx']} failed: "
+ f"{meta.get('error', 'Unknown')}")
+
+ metadata = sorted(metadata, key=lambda x: x['idx'])
+
+ n_success = sum(1 for m in metadata if m['success'])
+ mech_counts = {}
+ for m in metadata:
+ if m['success']:
+ mech = m.get('mechanism', 'Unknown')
+ mech_counts[mech] = mech_counts.get(mech, 0) + 1
+
+ summary = {
+ 'n_samples': n_samples,
+ 'n_success': n_success,
+ 'n_heating_rates': n_heating_rates,
+ 'add_noise': add_noise,
+ 'seed': seed,
+ 'n_workers': n_workers,
+ 'multi_mechanism': multi_mechanism,
+ 'mechanism_counts': mech_counts,
+ 'samples': metadata,
+ }
+
+ with open(os.path.join(outdir, "metadata.json"), "w") as f:
+ json.dump(summary, f, indent=2)
+
+ print(f"\nGeneration complete: {n_success}/{n_samples} successful")
+ print(f"Mechanism counts: {mech_counts}")
+ print(f"Metadata saved to {os.path.join(outdir, 'metadata.json')}")
+
+ return metadata
+
+
+# =============================================================================
+# Main
+# =============================================================================
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(
+ description="Generate TPD dataset for catalysis mechanism identification"
+ )
+ parser.add_argument("--n_samples", type=int, default=1000)
+ parser.add_argument("--outdir", type=str, default="data_tpd/raw")
+ parser.add_argument("--seed", type=int, default=42)
+ parser.add_argument("--n_workers", type=int, default=None)
+ parser.add_argument("--mechanism", type=str, default=None,
+ choices=TPD_MECHANISM_LIST)
+ parser.add_argument("--multi_mechanism", action="store_true")
+ parser.add_argument("--n_per_mechanism", type=int, default=None)
+ parser.add_argument("--n_heating_rates", type=int, default=1)
+ parser.add_argument("--no_noise", action="store_true")
+ parser.add_argument("--test", action="store_true",
+ help="Run a single test simulation and plot")
+
+ args = parser.parse_args()
+
+ if args.test:
+ print(f"Running test TPD simulations for all {len(TPD_MECHANISM_LIST)} mechanisms...\n")
+ rng = np.random.default_rng(42)
+
+ for mech in TPD_MECHANISM_LIST:
+ params = sample_tpd_params(rng, mechanism=mech)
+ result = _run_single_tpd(params)
+ peak_rate = np.max(result['rate'])
+ peak_T = result['temperature'][np.argmax(result['rate'])]
+ print(f"{mech}:")
+ print(f" T range: [{result['temperature'][0]:.0f}, "
+ f"{result['temperature'][-1]:.0f}] K")
+ print(f" Peak rate: {peak_rate:.4e} at T = {peak_T:.0f} K")
+ print(f" Time steps: {len(result['time'])}")
+ print(f" Params: {params}")
+ print()
+
+ try:
+ import matplotlib.pyplot as plt
+
+ fig, axes = plt.subplots(2, 2, figsize=(12, 10))
+ for ax, mech in zip(axes.flat, TPD_MECHANISM_LIST):
+ params = sample_tpd_params(rng, mechanism=mech)
+ for beta in [0.5, 2.0, 10.0]:
+ p = dict(params)
+ p['beta'] = beta
+ result = _run_single_tpd(p)
+ ax.plot(result['temperature'], result['rate'],
+ label=f'beta={beta:.1f} K/s')
+ ax.set_xlabel('Temperature (K)')
+ ax.set_ylabel('Desorption/Reaction Rate')
+ ax.set_title(mech)
+ ax.legend(fontsize=8)
+
+ plt.tight_layout()
+ plt.savefig('test_tpd_simulation.png', dpi=150)
+ print("Plot saved to test_tpd_simulation.png")
+ except ImportError:
+ print("matplotlib not available, skipping plot")
+ else:
+ generate_dataset(
+ n_samples=args.n_samples,
+ outdir=args.outdir,
+ seed=args.seed,
+ n_workers=args.n_workers,
+ mechanism=args.mechanism,
+ multi_mechanism=args.multi_mechanism,
+ n_per_mechanism=args.n_per_mechanism,
+ n_heating_rates=args.n_heating_rates,
+ add_noise=not args.no_noise,
+ )
diff --git a/inference.py b/inference.py
new file mode 100644
index 0000000000000000000000000000000000000000..994a2c456ee8f75c94a8e1b26c244e7dfc54807f
--- /dev/null
+++ b/inference.py
@@ -0,0 +1,576 @@
+"""
+ECFlow inference engine.
+
+Loads trained EC and TPD models and runs end-to-end inference
+from preprocessed arrays (dimensionless for CV, physical for TPD).
+"""
+
+import json
+import sys
+import os
+from pathlib import Path
+
+import numpy as np
+import torch
+
+
+
+from multi_mechanism_model import MultiMechanismFlow
+from tpd_model import MultiMechanismFlowTPD
+from flow_model import MECHANISM_LIST, MECHANISM_PARAMS, ActNorm
+from generate_tpd_data import TPD_MECHANISM_LIST, TPD_MECHANISM_PARAMS
+
+
+def _fix_actnorm_initialized(model):
+ """Mark all ActNorm layers as initialized after loading a checkpoint.
+
+ Old checkpoints lack the ``_initialized`` buffer, so ``load_state_dict``
+ leaves it at ``False``. The first forward pass would then overwrite the
+ trained ``log_scale``/``bias`` with data-dependent statistics.
+ """
+ for module in model.modules():
+ if isinstance(module, ActNorm) and not module.initialized:
+ module.initialized = True
+
+
+class ECFlowPredictor:
+ """Unified predictor for both EC (cyclic voltammetry) and TPD domains."""
+
+ def __init__(self, ec_checkpoint=None, tpd_checkpoint=None, device=None):
+ if device is None:
+ device = "cuda" if torch.cuda.is_available() else "cpu"
+ self.device = device
+
+ self.ec_model = None
+ self.ec_norm_stats = None
+ self.tpd_model = None
+ self.tpd_norm_stats = None
+
+ if ec_checkpoint is not None:
+ self._load_ec(ec_checkpoint)
+ if tpd_checkpoint is not None:
+ self._load_tpd(tpd_checkpoint)
+
+ def _load_ec(self, ckpt_path):
+ ckpt_path = Path(ckpt_path)
+ checkpoint = torch.load(ckpt_path, map_location="cpu", weights_only=False)
+ args = checkpoint["args"]
+
+ self.ec_model = MultiMechanismFlow(
+ d_context=args.get("d_context", 128),
+ d_model=args.get("d_model", 128),
+ n_coupling_layers=args.get("n_coupling_layers", 6),
+ hidden_dim=args.get("hidden_dim", 96),
+ coupling_type=args.get("coupling_type", "spline"),
+ n_bins=args.get("n_bins", 8),
+ tail_bound=args.get("tail_bound", 5.0),
+ )
+ self.ec_model.load_state_dict(checkpoint["model_state_dict"], strict=False)
+ _fix_actnorm_initialized(self.ec_model)
+ self.ec_model.to(self.device).eval()
+
+ # Search for norm_stats in multiple locations
+ ckpt_dir = ckpt_path.parent
+ stem = ckpt_path.stem.replace("best", "").rstrip("_")
+ prefix = stem + "_" if stem else ""
+ for search_dir in [ckpt_dir, ckpt_dir.parent]:
+ for name_pattern in [f"{prefix}norm_stats.json", "ec_norm_stats.json", "norm_stats.json"]:
+ p = search_dir / name_pattern
+ if p.exists():
+ with open(p) as f:
+ self.ec_norm_stats = json.load(f)
+ break
+ if self.ec_norm_stats is not None:
+ break
+ for search_dir in [ckpt_dir, ckpt_dir.parent]:
+ for name_pattern in [f"{prefix}theta_stats.json", "ec_theta_stats.json", "theta_stats.json"]:
+ p = search_dir / name_pattern
+ if p.exists():
+ with open(p) as f:
+ self.ec_theta_stats = json.load(f)
+ break
+ if hasattr(self, "ec_theta_stats") and self.ec_theta_stats is not None:
+ break
+
+ def _load_tpd(self, ckpt_path):
+ ckpt_path = Path(ckpt_path)
+ checkpoint = torch.load(ckpt_path, map_location="cpu", weights_only=False)
+ args = checkpoint["args"]
+
+ self.tpd_model = MultiMechanismFlowTPD(
+ d_context=args.get("d_context", 128),
+ d_model=args.get("d_model", 128),
+ n_coupling_layers=args.get("n_coupling_layers", 6),
+ hidden_dim=args.get("hidden_dim", 96),
+ coupling_type=args.get("coupling_type", "spline"),
+ n_bins=args.get("n_bins", 8),
+ tail_bound=args.get("tail_bound", 5.0),
+ )
+ self.tpd_model.load_state_dict(checkpoint["model_state_dict"], strict=False)
+ _fix_actnorm_initialized(self.tpd_model)
+ self.tpd_model.to(self.device).eval()
+
+ # Search for norm_stats in multiple locations
+ ckpt_dir = ckpt_path.parent
+ stem = ckpt_path.stem.replace("best", "").rstrip("_")
+ prefix = stem + "_" if stem else ""
+ for search_dir in [ckpt_dir, ckpt_dir.parent]:
+ for name_pattern in [f"{prefix}norm_stats.json", "tpd_norm_stats.json", "norm_stats.json"]:
+ p = search_dir / name_pattern
+ if p.exists():
+ with open(p) as f:
+ self.tpd_norm_stats = json.load(f)
+ break
+ if self.tpd_norm_stats is not None:
+ break
+ for search_dir in [ckpt_dir, ckpt_dir.parent]:
+ for name_pattern in [f"{prefix}theta_stats.json", "tpd_theta_stats.json", "theta_stats.json"]:
+ p = search_dir / name_pattern
+ if p.exists():
+ with open(p) as f:
+ self.tpd_theta_stats = json.load(f)
+ break
+ if hasattr(self, "tpd_theta_stats") and self.tpd_theta_stats is not None:
+ break
+
+ def _prepare_ec_tensor(self, potentials, fluxes, times, sigmas):
+ """
+ Build model input tensor from preprocessed dimensionless CV data.
+
+ Args:
+ potentials: list of 1-D arrays (dimensionless theta)
+ fluxes: list of 1-D arrays (dimensionless flux)
+ times: list of 1-D arrays (dimensionless time) or None
+ sigmas: 1-D array of dimensionless scan rates
+
+ Returns:
+ dict of tensors ready for model.predict()
+ """
+ from scipy.interpolate import interp1d
+
+ n_scans = len(potentials)
+ T_target = 672
+
+ pot_resampled = []
+ flux_resampled = []
+ time_resampled = []
+ flux_scales = []
+
+ for i in range(n_scans):
+ pot = np.asarray(potentials[i], dtype=np.float32)
+ flx = np.asarray(fluxes[i], dtype=np.float32)
+
+ if times is not None and times[i] is not None:
+ tim = np.asarray(times[i], dtype=np.float32)
+ else:
+ theta_range = pot.max() - pot.min()
+ sigma = sigmas[i]
+ total_time = 2.0 * theta_range / sigma
+ tim = np.linspace(0, total_time, len(pot), dtype=np.float32)
+
+ peak = np.max(np.abs(flx)) + 1e-30
+ flux_scales.append(np.log10(peak))
+ flx = flx / peak
+
+ t_uniform = np.linspace(tim[0], tim[-1], T_target)
+ pot_resampled.append(
+ interp1d(tim, pot, kind="linear", fill_value="extrapolate")(t_uniform)
+ )
+ flux_resampled.append(
+ interp1d(tim, flx, kind="linear", fill_value="extrapolate")(t_uniform)
+ )
+ time_resampled.append(t_uniform)
+
+ pot_arr = np.stack(pot_resampled).astype(np.float32)
+ flx_arr = np.stack(flux_resampled).astype(np.float32)
+ tim_arr = np.stack(time_resampled).astype(np.float32)
+
+ ns = self.ec_norm_stats
+ if ns:
+ pot_arr = (pot_arr - ns["potential"][0]) / ns["potential"][1]
+ flx_arr = (flx_arr - ns["flux"][0]) / ns["flux"][1]
+ tim_arr = (tim_arr - ns["time"][0]) / ns["time"][1]
+
+ # [1, N, 3, T]
+ waveforms = np.stack([pot_arr, flx_arr, tim_arr], axis=1)
+ x = torch.from_numpy(waveforms).unsqueeze(0).to(self.device)
+ scan_mask = torch.ones(1, n_scans, T_target, dtype=torch.bool, device=self.device)
+ sigmas_t = torch.from_numpy(
+ np.log10(np.asarray(sigmas, dtype=np.float32))
+ ).unsqueeze(0).to(self.device)
+ flux_scales_t = torch.from_numpy(
+ np.asarray(flux_scales, dtype=np.float32)
+ ).unsqueeze(0).to(self.device)
+
+ return {
+ "input": x,
+ "scan_mask": scan_mask,
+ "sigmas": sigmas_t,
+ "flux_scales": flux_scales_t,
+ }
+
+ def _prepare_tpd_tensor(self, temperatures, rates, betas):
+ """
+ Build model input tensor from TPD data.
+
+ Args:
+ temperatures: list of 1-D arrays (K)
+ rates: list of 1-D arrays (arb. units)
+ betas: 1-D array of heating rates (K/s)
+
+ Returns:
+ dict of tensors ready for model.predict()
+ """
+ from scipy.interpolate import interp1d
+
+ n_rates = len(temperatures)
+ T_target = 500
+
+ temp_resampled = []
+ rate_resampled = []
+ rate_scales = []
+
+ for i in range(n_rates):
+ temp = np.asarray(temperatures[i], dtype=np.float32)
+ rate = np.asarray(rates[i], dtype=np.float32)
+
+ peak = np.max(np.abs(rate)) + 1e-30
+ rate_scales.append(np.log10(peak))
+ rate = rate / peak
+
+ t_uniform = np.linspace(temp[0], temp[-1], T_target)
+ temp_resampled.append(t_uniform)
+ rate_resampled.append(
+ interp1d(temp, rate, kind="linear", fill_value="extrapolate")(t_uniform)
+ )
+
+ temp_arr = np.stack(temp_resampled).astype(np.float32)
+ rate_arr = np.stack(rate_resampled).astype(np.float32)
+
+ ns = self.tpd_norm_stats
+ if ns:
+ temp_arr = (temp_arr - ns["temperature"][0]) / ns["temperature"][1]
+ rate_arr = (rate_arr - ns["rate"][0]) / ns["rate"][1]
+
+ # [1, N, 2, T]
+ waveforms = np.stack([temp_arr, rate_arr], axis=1)
+ x = torch.from_numpy(waveforms).unsqueeze(0).to(self.device)
+ scan_mask = torch.ones(1, n_rates, T_target, dtype=torch.bool, device=self.device)
+ sigmas_t = torch.from_numpy(
+ np.log10(np.asarray(betas, dtype=np.float32))
+ ).unsqueeze(0).to(self.device)
+ rate_scales_t = torch.from_numpy(
+ np.asarray(rate_scales, dtype=np.float32)
+ ).unsqueeze(0).to(self.device)
+
+ return {
+ "input": x,
+ "scan_mask": scan_mask,
+ "sigmas": sigmas_t,
+ "flux_scales": rate_scales_t,
+ }
+
+ @torch.no_grad()
+ def predict_ec(self, potentials, fluxes, sigmas, times=None, n_samples=500, temperature=1.0):
+ """
+ Run EC inference on dimensionless CV data.
+
+ Args:
+ potentials: list of 1-D arrays (dimensionless theta per scan rate)
+ fluxes: list of 1-D arrays (dimensionless flux per scan rate)
+ sigmas: list/array of dimensionless scan rates
+ times: optional list of 1-D time arrays
+ n_samples: posterior samples to draw
+ temperature: sampling temperature (>1 broadens posteriors)
+
+ Returns:
+ dict with mechanism_probs, mechanism_names, predicted_mechanism,
+ parameter_stats (per mechanism), posterior_samples (per mechanism)
+ """
+ if self.ec_model is None:
+ raise RuntimeError("EC model not loaded")
+
+ tensors = self._prepare_ec_tensor(potentials, fluxes, times, sigmas)
+ pred = self.ec_model.predict(
+ tensors["input"],
+ scan_mask=tensors["scan_mask"],
+ sigmas=tensors["sigmas"],
+ flux_scales=tensors["flux_scales"],
+ n_samples=n_samples,
+ temperature=temperature,
+ )
+
+ probs = pred["mechanism_probs"][0].cpu().numpy()
+ pred_idx = int(pred["mechanism_pred"][0].cpu().item())
+ pred_mech = MECHANISM_LIST[pred_idx]
+
+ param_stats = {}
+ samples_dict = {}
+ for mech in MECHANISM_LIST:
+ if pred["samples"][mech] is not None:
+ s = pred["samples"][mech][0].cpu().numpy() # [n_samples, D]
+ samples_dict[mech] = s
+ param_stats[mech] = {
+ "names": MECHANISM_PARAMS[mech]["names"],
+ "mean": s.mean(axis=0).tolist(),
+ "std": s.std(axis=0).tolist(),
+ "median": np.median(s, axis=0).tolist(),
+ "q05": np.quantile(s, 0.05, axis=0).tolist(),
+ "q95": np.quantile(s, 0.95, axis=0).tolist(),
+ }
+
+ return {
+ "domain": "ec",
+ "mechanism_probs": {m: float(probs[i]) for i, m in enumerate(MECHANISM_LIST)},
+ "mechanism_names": MECHANISM_LIST,
+ "predicted_mechanism": pred_mech,
+ "predicted_mechanism_idx": pred_idx,
+ "parameter_stats": param_stats,
+ "posterior_samples": samples_dict,
+ }
+
+ @torch.no_grad()
+ def predict_tpd(self, temperatures, rates, betas, n_samples=500, temperature=1.0):
+ """
+ Run TPD inference.
+
+ Args:
+ temperatures: list of 1-D arrays (K per heating rate)
+ rates: list of 1-D arrays (signal per heating rate)
+ betas: list/array of heating rates (K/s)
+ n_samples: posterior samples to draw
+ temperature: sampling temperature
+
+ Returns:
+ dict with mechanism_probs, parameter_stats, posterior_samples
+ """
+ if self.tpd_model is None:
+ raise RuntimeError("TPD model not loaded")
+
+ tensors = self._prepare_tpd_tensor(temperatures, rates, betas)
+ pred = self.tpd_model.predict(
+ tensors["input"],
+ scan_mask=tensors["scan_mask"],
+ sigmas=tensors["sigmas"],
+ flux_scales=tensors["flux_scales"],
+ n_samples=n_samples,
+ temperature=temperature,
+ )
+
+ probs = pred["mechanism_probs"][0].cpu().numpy()
+ pred_idx = int(pred["mechanism_pred"][0].cpu().item())
+ pred_mech = TPD_MECHANISM_LIST[pred_idx]
+
+ param_stats = {}
+ samples_dict = {}
+ for mech in TPD_MECHANISM_LIST:
+ if pred["samples"][mech] is not None:
+ s = pred["samples"][mech][0].cpu().numpy()
+ samples_dict[mech] = s
+ param_stats[mech] = {
+ "names": TPD_MECHANISM_PARAMS[mech]["names"],
+ "mean": s.mean(axis=0).tolist(),
+ "std": s.std(axis=0).tolist(),
+ "median": np.median(s, axis=0).tolist(),
+ "q05": np.quantile(s, 0.05, axis=0).tolist(),
+ "q95": np.quantile(s, 0.95, axis=0).tolist(),
+ }
+
+ return {
+ "domain": "tpd",
+ "mechanism_probs": {m: float(probs[i]) for i, m in enumerate(TPD_MECHANISM_LIST)},
+ "mechanism_names": TPD_MECHANISM_LIST,
+ "predicted_mechanism": pred_mech,
+ "predicted_mechanism_idx": pred_idx,
+ "parameter_stats": param_stats,
+ "posterior_samples": samples_dict,
+ }
+
+ # =====================================================================
+ # Signal Reconstruction
+ # =====================================================================
+
+ def reconstruct_ec(self, result, potentials, fluxes, sigmas,
+ base_params=None, mechanism=None):
+ """
+ Reconstruct CV signals from inferred posterior median and compute metrics.
+
+ Args:
+ result: output dict from predict_ec()
+ potentials: list of 1-D arrays (original dimensionless theta)
+ fluxes: list of 1-D arrays (original dimensionless flux)
+ sigmas: list of dimensionless scan rates
+ base_params: dict of fixed simulation params; defaults used if None
+ mechanism: which mechanism to reconstruct (default: predicted)
+
+ Returns:
+ dict with 'observed', 'reconstructed' curve lists,
+ 'nrmse', 'r2' per scan rate, and 'mean_nrmse', 'mean_r2'
+ """
+ from evaluate_reconstruction import (
+ reconstruct_ec_signal, signal_nrmse, signal_r2,
+ )
+
+ mech = mechanism or result["predicted_mechanism"]
+ stats = result["parameter_stats"].get(mech)
+ if stats is None:
+ return None
+
+ theta_point = np.array(stats["median"])
+
+ if base_params is None:
+ pot0 = np.asarray(potentials[0])
+ base_params = {
+ "theta_i": float(pot0.max()),
+ "theta_v": float(pot0.min()),
+ "dA": 1.0,
+ "C_A_bulk": 1.0,
+ "C_B_bulk": 0.0,
+ "kinetics": mech,
+ }
+
+ try:
+ recon_results = reconstruct_ec_signal(
+ theta_point, mech, base_params, sigmas, n_spatial=64
+ )
+ except Exception:
+ return None
+
+ observed_curves = []
+ recon_curves = []
+ conc_curves = []
+ nrmses = []
+ r2s = []
+
+ for i, (pot, flx, sigma) in enumerate(zip(potentials, fluxes, sigmas)):
+ pot = np.asarray(pot)
+ flx = np.asarray(flx)
+ observed_curves.append({"x": pot, "y": flx})
+
+ if i < len(recon_results) and recon_results[i].get("success", False):
+ rec = recon_results[i]
+ rec_pot = np.asarray(rec["potential"])
+ rec_flx = np.asarray(rec["flux"])
+
+ n_obs = len(pot)
+ n_rec = len(rec_pot)
+ t_obs = np.linspace(0, 1, n_obs)
+ t_rec = np.linspace(0, 1, n_rec)
+ rec_flx_interp = np.interp(t_obs, t_rec, rec_flx)
+ recon_curves.append({"x": pot, "y": rec_flx_interp})
+ nrmse_val = signal_nrmse(flx, rec_flx_interp)
+ r2_val = signal_r2(flx, rec_flx_interp)
+ nrmses.append(nrmse_val)
+ r2s.append(r2_val)
+
+ if "c_ox_surface" in rec and "c_red_surface" in rec:
+ c_ox_interp = np.interp(t_obs, t_rec, np.asarray(rec["c_ox_surface"]))
+ c_red_interp = np.interp(t_obs, t_rec, np.asarray(rec["c_red_surface"]))
+ conc_curves.append({
+ "x": pot,
+ "c_ox": c_ox_interp,
+ "c_red": c_red_interp,
+ })
+ else:
+ conc_curves.append(None)
+ else:
+ recon_curves.append({"x": pot, "y": np.zeros_like(flx)})
+ nrmses.append(float("nan"))
+ r2s.append(float("nan"))
+ conc_curves.append(None)
+
+ valid_nrmse = [v for v in nrmses if np.isfinite(v)]
+ valid_r2 = [v for v in r2s if np.isfinite(v)]
+
+ return {
+ "observed": observed_curves,
+ "reconstructed": recon_curves,
+ "concentrations": conc_curves,
+ "nrmse": nrmses,
+ "r2": r2s,
+ "mean_nrmse": float(np.mean(valid_nrmse)) if valid_nrmse else float("nan"),
+ "mean_r2": float(np.mean(valid_r2)) if valid_r2 else float("nan"),
+ }
+
+ def reconstruct_tpd(self, result, temperatures, rates, betas,
+ base_params=None, mechanism=None):
+ """
+ Reconstruct TPD signals from inferred posterior median and compute metrics.
+
+ Args:
+ result: output dict from predict_tpd()
+ temperatures: list of 1-D arrays (K)
+ rates: list of 1-D arrays (signal)
+ betas: list of heating rates (K/s)
+ base_params: dict of fixed simulation params; defaults used if None
+ mechanism: which mechanism to reconstruct (default: predicted)
+
+ Returns:
+ dict with 'observed', 'reconstructed' curve lists,
+ 'nrmse', 'r2' per heating rate, and 'mean_nrmse', 'mean_r2'
+ """
+ from evaluate_reconstruction import (
+ reconstruct_tpd_signal, signal_nrmse, signal_r2,
+ )
+
+ mech = mechanism or result["predicted_mechanism"]
+ stats = result["parameter_stats"].get(mech)
+ if stats is None:
+ return None
+
+ theta_point = np.array(stats["median"])
+
+ if base_params is None:
+ temp0 = np.asarray(temperatures[0])
+ base_params = {
+ "mechanism": mech,
+ "T_start": float(temp0.min()),
+ "T_end": float(temp0.max()),
+ "n_points": 500,
+ }
+
+ try:
+ recon_results = reconstruct_tpd_signal(
+ theta_point, mech, base_params, betas
+ )
+ except Exception:
+ return None
+
+ observed_curves = []
+ recon_curves = []
+ nrmses = []
+ r2s = []
+
+ for i, (temp, rate, beta) in enumerate(zip(temperatures, rates, betas)):
+ temp = np.asarray(temp)
+ rate = np.asarray(rate)
+ observed_curves.append({"x": temp, "y": rate})
+
+ if i < len(recon_results) and recon_results[i].get("success", False):
+ rec = recon_results[i]
+ rec_temp = np.asarray(rec["temperature"])
+ rec_rate = np.asarray(rec["rate"])
+
+ rec_rate_interp = np.interp(temp, rec_temp, rec_rate)
+ recon_curves.append({"x": temp, "y": rec_rate_interp})
+ nrmse_val = signal_nrmse(rate, rec_rate_interp)
+ r2_val = signal_r2(rate, rec_rate_interp)
+
+ nrmses.append(nrmse_val)
+ r2s.append(r2_val)
+ else:
+ recon_curves.append({"x": temp, "y": np.zeros_like(rate)})
+ nrmses.append(float("nan"))
+ r2s.append(float("nan"))
+
+ valid_nrmse = [v for v in nrmses if np.isfinite(v)]
+ valid_r2 = [v for v in r2s if np.isfinite(v)]
+
+ return {
+ "observed": observed_curves,
+ "reconstructed": recon_curves,
+ "nrmse": nrmses,
+ "r2": r2s,
+ "mean_nrmse": float(np.mean(valid_nrmse)) if valid_nrmse else float("nan"),
+ "mean_r2": float(np.mean(valid_r2)) if valid_r2 else float("nan"),
+ }
diff --git a/multi_mechanism_model.py b/multi_mechanism_model.py
new file mode 100644
index 0000000000000000000000000000000000000000..e7bbc96b88dfcc5aa6f070afe45509fa417e8969
--- /dev/null
+++ b/multi_mechanism_model.py
@@ -0,0 +1,703 @@
+"""
+Multi-Mechanism Normalizing Flow for Joint Mechanism Identification
+and Bayesian Parameter Inference from Multi-Scan-Rate CV Signals.
+
+Architecture:
+ 1. MultiScanEncoder: per-CV CNN + Set Transformer (SAB + PMA) -> context vector
+ 2. MechanismClassifier: MLP head -> p(mechanism | x)
+ 3. Per-mechanism ConditionalFlow heads: p(theta_m | x, mechanism=m)
+
+The model performs two-level inference:
+ Level 1: Mechanism probabilities p(m | x) from the classifier
+ Level 2: Parameter posteriors p(theta_m | x, m) from mechanism-specific flows
+
+Training loss = classification CE + mechanism-specific NLL (weighted by true label).
+"""
+
+import torch
+import torch.nn as nn
+import torch.nn.functional as F
+import math
+
+from flow_model import (
+ SignalEncoder,
+ ActNorm,
+ ConditionalSplineCoupling,
+ ConditionalAffineCoupling,
+ MECHANISM_LIST,
+ MECHANISM_PARAMS,
+)
+
+
+class MechanismClassifier(nn.Module):
+ """MLP classifier: context vector -> mechanism probabilities."""
+ def __init__(self, d_context=128, n_mechanisms=4, hidden_dim=128):
+ super().__init__()
+ self.net = nn.Sequential(
+ nn.Linear(d_context, hidden_dim),
+ nn.GELU(),
+ nn.Dropout(0.1),
+ nn.Linear(hidden_dim, hidden_dim // 2),
+ nn.GELU(),
+ nn.Dropout(0.1),
+ nn.Linear(hidden_dim // 2, n_mechanisms),
+ )
+
+ def forward(self, context):
+ """Returns raw logits [B, n_mechanisms]."""
+ return self.net(context)
+
+
+class SAB(nn.Module):
+ """Self-Attention Block (Set Transformer, Lee et al. 2019).
+
+ Applies multi-head self-attention + feed-forward with residual
+ connections and layer norm over a set of elements.
+ """
+ def __init__(self, d, n_heads=4):
+ super().__init__()
+ self.attn = nn.MultiheadAttention(d, n_heads, batch_first=True)
+ self.norm1 = nn.LayerNorm(d)
+ self.ffn = nn.Sequential(nn.Linear(d, d), nn.GELU(), nn.Linear(d, d))
+ self.norm2 = nn.LayerNorm(d)
+
+ def forward(self, h, key_padding_mask=None):
+ """
+ Args:
+ h: [B, N, d]
+ key_padding_mask: [B, N] True = ignore this position
+ """
+ h2, _ = self.attn(h, h, h, key_padding_mask=key_padding_mask)
+ h = self.norm1(h + h2)
+ h = self.norm2(h + self.ffn(h))
+ return h
+
+
+class PMA(nn.Module):
+ """Pooling by Multi-head Attention (Set Transformer, Lee et al. 2019).
+
+ Uses learnable seed vectors as queries that attend to the input set,
+ producing a fixed-size output regardless of set cardinality.
+ """
+ def __init__(self, d, n_heads=4, n_seeds=1):
+ super().__init__()
+ self.seed = nn.Parameter(torch.randn(1, n_seeds, d))
+ self.attn = nn.MultiheadAttention(d, n_heads, batch_first=True)
+ self.norm = nn.LayerNorm(d)
+
+ def forward(self, h, key_padding_mask=None):
+ """
+ Args:
+ h: [B, N, d]
+ key_padding_mask: [B, N] True = ignore this position
+ Returns:
+ [B, n_seeds, d]
+ """
+ S = self.seed.expand(h.size(0), -1, -1)
+ out, _ = self.attn(S, h, h, key_padding_mask=key_padding_mask)
+ return self.norm(out + S)
+
+
+class MultiScanEncoder(nn.Module):
+ """
+ Encode a set of multi-scan-rate CVs into a single context vector.
+
+ Architecture (Set Transformer, default):
+ 1. Shared per-CV CNN encoder -> per-CV embedding
+ 2. Augment with [log10(sigma), log10(peak_flux)]
+ 3. SAB: self-attention across scan rates (cross-CV interaction)
+ 4. PMA: attention-based pooling to single vector
+ 5. rho MLP: project to final context
+
+ With aggregation='mean_pool', steps 3-4 are replaced by masked mean
+ pooling (no learned cross-CV interaction).
+
+ Input: x [B, N_sigma, 3, T], scan_mask [B, N_sigma, T],
+ sigmas [B, N_sigma], flux_scales [B, N_sigma]
+ Output: context [B, d_context]
+ """
+ def __init__(self, in_channels=3, d_model=128, d_context=128, n_heads=4,
+ aggregation='set_transformer'):
+ super().__init__()
+ self.aggregation = aggregation
+ self.per_cv_encoder = SignalEncoder(
+ in_channels=in_channels, d_model=d_model, d_context=d_context,
+ )
+ self.cv_augment = nn.Sequential(
+ nn.Linear(d_context + 2, d_context),
+ nn.GELU(),
+ )
+ if aggregation == 'set_transformer':
+ self.sab = SAB(d_context, n_heads=n_heads)
+ self.pma = PMA(d_context, n_heads=n_heads, n_seeds=1)
+ elif aggregation == 'mean_pool':
+ pass
+ else:
+ raise ValueError(f"Unknown aggregation: {aggregation!r}")
+ self.rho = nn.Sequential(
+ nn.Linear(d_context, d_context),
+ nn.GELU(),
+ nn.Linear(d_context, d_context),
+ )
+
+ def forward(self, x, scan_mask=None, sigmas=None, flux_scales=None):
+ """
+ Args:
+ x: [B, N_sigma, 3, T] multi-scan CV waveforms
+ scan_mask: [B, N_sigma, T] valid timestep mask
+ sigmas: [B, N_sigma] log10 scan rates
+ flux_scales: [B, N_sigma] log10(peak_flux) per CV
+
+ Returns:
+ context: [B, d_context]
+ """
+ B, N, C, T = x.shape
+
+ x_flat = x.reshape(B * N, C, T)
+ mask_flat = scan_mask.reshape(B * N, T) if scan_mask is not None else None
+
+ h_flat = self.per_cv_encoder(x_flat, mask=mask_flat) # [B*N, d_context]
+ h = h_flat.reshape(B, N, -1) # [B, N, d_context]
+
+ if sigmas is None:
+ sigmas = torch.zeros(B, N, device=x.device)
+ if flux_scales is None:
+ flux_scales = torch.zeros(B, N, device=x.device)
+
+ aug_features = torch.stack([sigmas, flux_scales], dim=-1) # [B, N, 2]
+ h = self.cv_augment(torch.cat([h, aug_features], dim=-1)) # [B, N, d_context]
+
+ # Build key_padding_mask: True where CV is padded (invalid)
+ if scan_mask is not None:
+ cv_invalid = ~scan_mask.any(dim=-1) # [B, N] True = padded
+ else:
+ cv_invalid = None
+
+ if self.aggregation == 'set_transformer':
+ h = self.sab(h, key_padding_mask=cv_invalid)
+ h = self.pma(h, key_padding_mask=cv_invalid) # [B, 1, d_context]
+ h = h.squeeze(1) # [B, d_context]
+ elif self.aggregation == 'mean_pool':
+ if cv_invalid is not None:
+ cv_valid = (~cv_invalid).unsqueeze(-1).float() # [B, N, 1]
+ h = (h * cv_valid).sum(dim=1) / cv_valid.sum(dim=1).clamp(min=1)
+ else:
+ h = h.mean(dim=1) # [B, d_context]
+
+ context = self.rho(h)
+ return context
+
+
+class MechanismFlow(nn.Module):
+ """
+ Single-mechanism conditional flow: p(theta_m | context).
+
+ Lightweight flow head operating on the context vector from the shared encoder.
+ """
+ def __init__(
+ self,
+ theta_dim,
+ d_context=128,
+ n_coupling_layers=6,
+ hidden_dim=96,
+ coupling_type='spline',
+ n_bins=8,
+ tail_bound=5.0,
+ ):
+ super().__init__()
+ self.theta_dim = theta_dim
+ self.coupling_type = coupling_type
+ self.tail_bound = tail_bound
+
+ self.flows = nn.ModuleList()
+ for i in range(n_coupling_layers):
+ mask_type = 'even' if i % 2 == 0 else 'odd'
+ self.flows.append(ActNorm(theta_dim))
+ if coupling_type == 'spline':
+ self.flows.append(
+ ConditionalSplineCoupling(
+ dim=theta_dim,
+ d_context=d_context,
+ hidden_dim=hidden_dim,
+ mask_type=mask_type,
+ n_bins=n_bins,
+ tail_bound=tail_bound,
+ )
+ )
+ else:
+ self.flows.append(
+ ConditionalAffineCoupling(
+ dim=theta_dim,
+ d_context=d_context,
+ hidden_dim=hidden_dim,
+ mask_type=mask_type,
+ )
+ )
+
+ self.register_buffer('theta_mean', torch.zeros(theta_dim))
+ self.register_buffer('theta_std', torch.ones(theta_dim))
+
+ def set_theta_stats(self, mean, std):
+ self.theta_mean.copy_(torch.as_tensor(mean, dtype=torch.float32))
+ self.theta_std.copy_(torch.as_tensor(std, dtype=torch.float32))
+
+ def normalize_theta(self, theta):
+ return (theta - self.theta_mean) / self.theta_std
+
+ def denormalize_theta(self, theta_norm):
+ return theta_norm * self.theta_std + self.theta_mean
+
+ def forward_flow(self, z, context):
+ total_log_det = torch.zeros(z.shape[0], device=z.device)
+ h = z
+ for layer in self.flows:
+ if isinstance(layer, ActNorm):
+ h, ld = layer(h)
+ total_log_det += ld
+ else:
+ h, ld = layer(h, context)
+ total_log_det += ld
+ return h, total_log_det
+
+ def inverse_flow(self, theta_norm, context):
+ total_log_det = torch.zeros(theta_norm.shape[0], device=theta_norm.device)
+ h = theta_norm
+ for layer in reversed(self.flows):
+ if isinstance(layer, ActNorm):
+ h = layer.inverse(h)
+ total_log_det -= layer.log_scale.sum()
+ else:
+ h, ld = layer.inverse(h, context)
+ total_log_det += ld
+ return h, total_log_det
+
+ def log_prob(self, theta, context):
+ """Compute log p(theta | context) for this mechanism's parameters."""
+ theta_norm = self.normalize_theta(theta)
+ if self.coupling_type == 'spline':
+ theta_norm = theta_norm.clamp(-self.tail_bound, self.tail_bound)
+ z, log_det = self.inverse_flow(theta_norm, context)
+ log_pz = -0.5 * (z ** 2 + math.log(2 * math.pi)).sum(dim=-1)
+ log_det_norm = -torch.log(self.theta_std).sum()
+ log_p = log_pz + log_det + log_det_norm
+ return log_p.clamp(min=-50.0, max=50.0)
+
+ @torch.no_grad()
+ def sample(self, context, n_samples=100, temperature=1.0):
+ """Sample theta from this mechanism's posterior.
+
+ Args:
+ temperature: Posterior inflation factor. Can be:
+ - scalar: uniform scaling for all parameters
+ - 1-D tensor of shape [theta_dim]: per-parameter scaling
+ T > 1 broadens the posterior by scaling samples around
+ their per-example mean in theta-space.
+ """
+ B = context.shape[0]
+ context_rep = context.unsqueeze(1).expand(-1, n_samples, -1).reshape(B * n_samples, -1)
+ z = torch.randn(B * n_samples, self.theta_dim, device=context.device)
+ theta_norm, _ = self.forward_flow(z, context_rep)
+ theta = self.denormalize_theta(theta_norm)
+ theta = theta.reshape(B, n_samples, self.theta_dim)
+
+ if isinstance(temperature, torch.Tensor):
+ T = temperature.to(theta.device).reshape(1, 1, -1)
+ mu = theta.mean(dim=1, keepdim=True)
+ theta = mu + T * (theta - mu)
+ elif temperature != 1.0:
+ mu = theta.mean(dim=1, keepdim=True)
+ theta = mu + temperature * (theta - mu)
+
+ return theta
+
+ def sample_with_grad(self, context, n_samples=64):
+ """Sample theta with gradients enabled (for calibration loss).
+
+ Uses the reparameterization trick: z ~ N(0,I) is fixed noise,
+ gradients flow through the flow's forward transform.
+ """
+ B = context.shape[0]
+ context_rep = context.unsqueeze(1).expand(-1, n_samples, -1).reshape(B * n_samples, -1)
+ z = torch.randn(B * n_samples, self.theta_dim, device=context.device)
+ theta_norm, _ = self.forward_flow(z, context_rep)
+ theta = self.denormalize_theta(theta_norm)
+ return theta.reshape(B, n_samples, self.theta_dim)
+
+
+SUMMARY_DIM = 21 # 3 scan rates * 6 features + 3 log10(sigma)
+
+
+class SummaryProjection(nn.Module):
+ """Project hand-crafted summary statistics to context space.
+
+ Replaces the Set Transformer encoder for the Summary-ECFlow ablation,
+ keeping everything else (classifier, flow heads, training) identical.
+ """
+ def __init__(self, summary_dim=SUMMARY_DIM, d_context=128):
+ super().__init__()
+ self.net = nn.Sequential(
+ nn.Linear(summary_dim, d_context),
+ nn.GELU(),
+ nn.Linear(d_context, d_context),
+ nn.GELU(),
+ nn.Linear(d_context, d_context),
+ )
+
+ def forward(self, summary):
+ """summary: [B, summary_dim] -> [B, d_context]"""
+ return self.net(summary)
+
+
+class MultiMechanismFlow(nn.Module):
+ """
+ Joint mechanism identification and parameter inference model.
+
+ Combines:
+ - Multi-scan-rate signal encoder (Set Transformer over per-CV embeddings)
+ - Mechanism classifier
+ - Per-mechanism normalizing flow heads
+
+ If use_summary_features=True, replaces the signal encoder with a simple
+ MLP projection from hand-crafted summary statistics (21-dim) to context
+ space, keeping all other components identical. This isolates the effect
+ of the input representation (full signal vs. summary statistics).
+ """
+ def __init__(
+ self,
+ d_context=128,
+ d_model=128,
+ n_coupling_layers=6,
+ hidden_dim=96,
+ coupling_type='spline',
+ n_bins=8,
+ tail_bound=5.0,
+ aggregation='set_transformer',
+ use_summary_features=False,
+ ):
+ super().__init__()
+ self.n_mechanisms = len(MECHANISM_LIST)
+ self.mechanism_list = MECHANISM_LIST
+ self.d_context = d_context
+ self.use_summary_features = use_summary_features
+
+ if use_summary_features:
+ self.summary_proj = SummaryProjection(
+ summary_dim=SUMMARY_DIM, d_context=d_context,
+ )
+ self.encoder = None
+ else:
+ self.encoder = MultiScanEncoder(
+ in_channels=3, d_model=d_model, d_context=d_context,
+ aggregation=aggregation,
+ )
+ self.summary_proj = None
+
+ self.classifier = MechanismClassifier(
+ d_context=d_context,
+ n_mechanisms=self.n_mechanisms,
+ hidden_dim=hidden_dim,
+ )
+
+ # Mechanisms whose parameters are not identifiable from the signal
+ # (e.g. Nernst: E0_offset=0, dA=1 are constants, dB is unidentifiable).
+ # These get a flow head for architecture uniformity but are excluded
+ # from the NLL loss during training.
+ self.skip_nll_mechanisms: set = set()
+
+ self.flow_heads = nn.ModuleDict()
+ for mech in MECHANISM_LIST:
+ theta_dim = MECHANISM_PARAMS[mech]['dim']
+ self.flow_heads[mech] = MechanismFlow(
+ theta_dim=theta_dim,
+ d_context=d_context,
+ n_coupling_layers=n_coupling_layers,
+ hidden_dim=hidden_dim,
+ coupling_type=coupling_type,
+ n_bins=n_bins,
+ tail_bound=tail_bound,
+ )
+
+ def set_theta_stats(self, mechanism, mean, std):
+ """Set normalization stats for a specific mechanism's flow head."""
+ self.flow_heads[mechanism].set_theta_stats(mean, std)
+
+ def encode_signal(self, x, scan_mask=None, sigmas=None, flux_scales=None,
+ summary=None):
+ """
+ Encode input into a context vector.
+
+ In full-signal mode: uses Set Transformer encoder on x.
+ In summary mode: projects 21-dim hand-crafted features to context space.
+
+ Args:
+ x: [B, N_sigma, 3, T] (ignored in summary mode)
+ scan_mask: [B, N_sigma, T]
+ sigmas: [B, N_sigma] log10 scan rates
+ flux_scales: [B, N_sigma] log10(std(flux)) per CV
+ summary: [B, 21] hand-crafted summary statistics (summary mode only)
+ """
+ if self.use_summary_features:
+ assert summary is not None, "summary features required in summary mode"
+ return self.summary_proj(summary)
+ return self.encoder(x, scan_mask=scan_mask, sigmas=sigmas,
+ flux_scales=flux_scales)
+
+ def forward(self, x, mechanism_ids, mech_theta, mech_theta_mask=None,
+ scan_mask=None, sigmas=None, flux_scales=None, summary=None):
+ """
+ Compute classification logits and per-sample NLL for the true mechanism.
+
+ Returns:
+ dict with 'logits' [B, n_mechanisms] and 'nll' [B]
+ """
+ context = self.encode_signal(x, scan_mask=scan_mask, sigmas=sigmas,
+ flux_scales=flux_scales, summary=summary)
+ logits = self.classifier(context)
+
+ nll = torch.zeros(x.shape[0], device=x.device)
+
+ for m_idx, mech in enumerate(MECHANISM_LIST):
+ sel = (mechanism_ids == m_idx)
+ if not sel.any():
+ continue
+ if mech in self.skip_nll_mechanisms:
+ continue
+
+ theta_dim = MECHANISM_PARAMS[mech]['dim']
+ ctx_m = context[sel]
+ theta_m = mech_theta[sel, :theta_dim]
+
+ log_p = self.flow_heads[mech].log_prob(theta_m, ctx_m)
+ bad = ~torch.isfinite(log_p)
+ if bad.any():
+ log_p = torch.where(bad, torch.full_like(log_p, -10.0).detach(), log_p)
+ nll[sel] = -log_p
+
+ return {'logits': logits, 'nll': nll}
+
+ def forward_with_calibration(self, x, mechanism_ids, mech_theta,
+ mech_theta_mask=None, scan_mask=None,
+ sigmas=None, flux_scales=None,
+ cal_n_samples=64, cal_levels=(0.5, 0.9),
+ cal_beta=20.0, summary=None):
+ """
+ Forward pass with additional calibration loss.
+
+ Extends forward() by drawing posterior samples and computing a
+ differentiable coverage penalty that encourages the flow's credible
+ intervals to match their nominal levels.
+
+ Returns:
+ dict with 'logits', 'nll', and 'cal_loss' (scalar)
+ """
+ context = self.encode_signal(x, scan_mask=scan_mask, sigmas=sigmas,
+ flux_scales=flux_scales, summary=summary)
+ logits = self.classifier(context)
+
+ nll = torch.zeros(x.shape[0], device=x.device)
+ cal_losses = []
+
+ for m_idx, mech in enumerate(MECHANISM_LIST):
+ sel = (mechanism_ids == m_idx)
+ if not sel.any():
+ continue
+ if mech in self.skip_nll_mechanisms:
+ continue
+
+ theta_dim = MECHANISM_PARAMS[mech]['dim']
+ ctx_m = context[sel]
+ theta_m = mech_theta[sel, :theta_dim]
+
+ # Standard NLL
+ log_p = self.flow_heads[mech].log_prob(theta_m, ctx_m)
+ bad = ~torch.isfinite(log_p)
+ if bad.any():
+ log_p = torch.where(bad, torch.full_like(log_p, -10.0).detach(), log_p)
+ nll[sel] = -log_p
+
+ # Calibration: draw samples WITH gradients
+ if ctx_m.shape[0] < 4:
+ continue
+ samples = self.flow_heads[mech].sample_with_grad(
+ ctx_m, n_samples=cal_n_samples,
+ ) # [B_m, K, D]
+
+ # Inverse-spread weights: collapsed parameters (small posterior std)
+ # get more calibration pressure than well-spread parameters.
+ with torch.no_grad():
+ param_std = samples.std(dim=1).clamp(min=1e-4) # [B_m, D]
+ inv_spread_w = 1.0 / param_std # [B_m, D]
+ inv_spread_w = inv_spread_w / inv_spread_w.mean()
+
+ for level in cal_levels:
+ alpha = (1.0 - level) / 2.0
+ lower = torch.quantile(samples, alpha, dim=1) # [B_m, D]
+ upper = torch.quantile(samples, 1 - alpha, dim=1) # [B_m, D]
+
+ inside = (
+ torch.sigmoid(cal_beta * (theta_m - lower))
+ * torch.sigmoid(cal_beta * (upper - theta_m))
+ ) # [B_m, D]
+
+ per_sample_loss = (inside - level).pow(2) # [B_m, D]
+ cal_losses.append((per_sample_loss * inv_spread_w).mean())
+
+ if cal_losses:
+ cal_loss = torch.stack(cal_losses).mean()
+ else:
+ cal_loss = torch.tensor(0.0, device=x.device)
+
+ return {'logits': logits, 'nll': nll, 'cal_loss': cal_loss}
+
+ @torch.no_grad()
+ def predict(self, x, scan_mask=None, sigmas=None, flux_scales=None,
+ n_samples=200, top_k=None, temperature=1.0,
+ temperature_map=None, summary=None):
+ """
+ Full inference: classify mechanism, then sample parameters.
+
+ Args:
+ x: [B, N_sigma, 3, T] multi-scan input signals
+ scan_mask: [B, N_sigma, T]
+ sigmas: [B, N_sigma]
+ flux_scales: [B, N_sigma]
+ n_samples: posterior samples per mechanism
+ top_k: if set, only sample from top-k most likely mechanisms
+ temperature: scalar fallback (>1 broadens posteriors)
+ temperature_map: dict mapping mechanism name -> list of
+ per-parameter temperatures. Overrides scalar temperature
+ for mechanisms present in the map.
+ summary: [B, 21] hand-crafted summary stats (summary mode only)
+
+ Returns:
+ dict with mechanism_probs, mechanism_pred, samples, stats
+ """
+ context = self.encode_signal(x, scan_mask=scan_mask, sigmas=sigmas,
+ flux_scales=flux_scales, summary=summary)
+ logits = self.classifier(context)
+ probs = F.softmax(logits, dim=-1)
+ pred = probs.argmax(dim=-1)
+
+ probs_clamped = probs.clamp(min=1e-7, max=1 - 1e-7)
+ xdB = 10.0 * torch.log10(probs_clamped / (1.0 - probs_clamped))
+
+ samples_dict = {}
+ stats_dict = {}
+
+ for m_idx, mech in enumerate(MECHANISM_LIST):
+ if top_k is not None:
+ top_k_mechs = probs.topk(top_k, dim=-1).indices
+ if not (top_k_mechs == m_idx).any():
+ samples_dict[mech] = None
+ stats_dict[mech] = None
+ continue
+
+ T = temperature
+ if temperature_map is not None and mech in temperature_map:
+ T = torch.tensor(temperature_map[mech], dtype=torch.float32)
+
+ s = self.flow_heads[mech].sample(context, n_samples=n_samples,
+ temperature=T)
+ samples_dict[mech] = s
+ stats_dict[mech] = {
+ 'mean': s.mean(dim=1),
+ 'std': s.std(dim=1),
+ 'median': s.median(dim=1).values,
+ 'q05': s.quantile(0.05, dim=1),
+ 'q95': s.quantile(0.95, dim=1),
+ }
+
+ return {
+ 'mechanism_probs': probs,
+ 'mechanism_xdB': xdB,
+ 'mechanism_pred': pred,
+ 'samples': samples_dict,
+ 'stats': stats_dict,
+ }
+
+ @torch.no_grad()
+ def predict_single_mechanism(self, x, mechanism, scan_mask=None,
+ sigmas=None, flux_scales=None, n_samples=1000,
+ temperature=1.0, temperature_map=None,
+ summary=None):
+ """Sample parameters assuming a known mechanism."""
+ context = self.encode_signal(x, scan_mask=scan_mask, sigmas=sigmas,
+ flux_scales=flux_scales, summary=summary)
+ T = temperature
+ if temperature_map is not None and mechanism in temperature_map:
+ T = torch.tensor(temperature_map[mechanism], dtype=torch.float32)
+ samples = self.flow_heads[mechanism].sample(context, n_samples=n_samples,
+ temperature=T)
+ return {
+ 'mean': samples.mean(dim=1),
+ 'std': samples.std(dim=1),
+ 'median': samples.median(dim=1).values,
+ 'q05': samples.quantile(0.05, dim=1),
+ 'q95': samples.quantile(0.95, dim=1),
+ 'samples': samples,
+ }
+
+
+def count_parameters(model):
+ return sum(p.numel() for p in model.parameters() if p.requires_grad)
+
+
+if __name__ == "__main__":
+ n_mechs = len(MECHANISM_LIST)
+ B, N_sigma, T = n_mechs, 3, 800
+
+ x = torch.randn(B, N_sigma, 3, T)
+ scan_mask = torch.ones(B, N_sigma, T, dtype=torch.bool)
+ sigmas = torch.randn(B, N_sigma)
+ flux_scales = torch.randn(B, N_sigma)
+ mechanism_ids = torch.arange(n_mechs)
+
+ max_dim = max(MECHANISM_PARAMS[m]['dim'] for m in MECHANISM_LIST)
+ mech_theta = torch.randn(B, max_dim)
+ mech_theta_mask = torch.zeros(B, max_dim, dtype=torch.bool)
+ for i, mid in enumerate(mechanism_ids):
+ d = MECHANISM_PARAMS[MECHANISM_LIST[mid]]['dim']
+ mech_theta_mask[i, :d] = True
+
+ print("=" * 60)
+ print("Testing MultiMechanismFlow (multi-scan-rate, Set Transformer)")
+ print("=" * 60)
+
+ model = MultiMechanismFlow(
+ d_context=128,
+ d_model=128,
+ n_coupling_layers=8,
+ hidden_dim=128,
+ coupling_type='affine',
+ )
+
+ total_params = count_parameters(model)
+ print(f"Total parameters: {total_params:,}")
+ print(f" Encoder: {count_parameters(model.encoder):,}")
+ print(f" Classifier: {count_parameters(model.classifier):,}")
+ for mech in MECHANISM_LIST:
+ print(f" Flow ({mech}, dim={MECHANISM_PARAMS[mech]['dim']}): "
+ f"{count_parameters(model.flow_heads[mech]):,}")
+
+ out = model(x, mechanism_ids, mech_theta, mech_theta_mask,
+ scan_mask=scan_mask, sigmas=sigmas, flux_scales=flux_scales)
+ print(f"\nForward pass:")
+ print(f" Logits shape: {out['logits'].shape}")
+ print(f" NLL shape: {out['nll'].shape}")
+ print(f" NLL values: {out['nll']}")
+
+ pred = model.predict(x, scan_mask=scan_mask, sigmas=sigmas,
+ flux_scales=flux_scales, n_samples=100)
+ print(f"\nPrediction:")
+ print(f" Mechanism probs shape: {pred['mechanism_probs'].shape}")
+ print(f" Mechanism xdB shape: {pred['mechanism_xdB'].shape}")
+ print(f" Predicted mechanisms: {pred['mechanism_pred']}")
+ print(f" xdB for predicted mechanisms:")
+ for i in range(B):
+ m_idx = pred['mechanism_pred'][i].item()
+ mech = MECHANISM_LIST[m_idx]
+ xdB_val = pred['mechanism_xdB'][i, m_idx].item()
+ print(f" sample {i}: {mech} ({xdB_val:+.1f} dB)")
+ for mech in MECHANISM_LIST:
+ if pred['samples'][mech] is not None:
+ print(f" {mech} samples shape: {pred['samples'][mech].shape}")
diff --git a/plotting.py b/plotting.py
new file mode 100644
index 0000000000000000000000000000000000000000..9f2eeb1b913c0c04ebf7d800bc1f24b98a6ec43f
--- /dev/null
+++ b/plotting.py
@@ -0,0 +1,396 @@
+"""
+Visualization utilities for ECFlow web app.
+
+Generates matplotlib figures for mechanism classification, parameter
+posteriors, and signal reconstruction overlays.
+"""
+
+import numpy as np
+import matplotlib
+matplotlib.use("Agg")
+import matplotlib.pyplot as plt
+from matplotlib.gridspec import GridSpec
+
+
+COLORS = {
+ "primary": "#2563EB",
+ "secondary": "#7C3AED",
+ "accent": "#059669",
+ "warm": "#DC2626",
+ "neutral": "#6B7280",
+ "bg": "#F9FAFB",
+}
+
+MECH_COLORS_EC = {
+ "Nernst": "#3B82F6",
+ "BV": "#8B5CF6",
+ "MHC": "#EC4899",
+ "Ads": "#F59E0B",
+ "EC": "#10B981",
+ "LH": "#EF4444",
+}
+
+MECH_COLORS_TPD = {
+ "FirstOrder": "#3B82F6",
+ "SecondOrder": "#8B5CF6",
+ "LH_Surface": "#EC4899",
+ "MvK": "#F59E0B",
+ "FirstOrderCovDep": "#10B981",
+ "DiffLimited": "#EF4444",
+}
+
+
+def plot_mechanism_probs(probs_dict, domain="ec"):
+ """
+ Horizontal bar chart of mechanism classification probabilities.
+
+ Args:
+ probs_dict: {mechanism_name: probability}
+ domain: 'ec' or 'tpd'
+
+ Returns:
+ matplotlib Figure
+ """
+ colors = MECH_COLORS_EC if domain == "ec" else MECH_COLORS_TPD
+ names = list(probs_dict.keys())
+ probs = [probs_dict[n] for n in names]
+
+ sorted_idx = np.argsort(probs)
+ names = [names[i] for i in sorted_idx]
+ probs = [probs[i] for i in sorted_idx]
+ bar_colors = [colors.get(n, COLORS["neutral"]) for n in names]
+
+ fig, ax = plt.subplots(figsize=(8, max(3, len(names) * 0.6)))
+ bars = ax.barh(range(len(names)), probs, color=bar_colors, edgecolor="white",
+ linewidth=0.5, height=0.7)
+
+ ax.set_yticks(range(len(names)))
+ ax.set_yticklabels(names, fontsize=12, fontweight="medium")
+ ax.set_xlim(0, 1.05)
+ ax.set_xlabel("Probability", fontsize=12)
+ ax.set_title("Mechanism Classification", fontsize=14, fontweight="bold", pad=15)
+
+ for i, (bar, prob) in enumerate(zip(bars, probs)):
+ if prob > 0.05:
+ ax.text(bar.get_width() + 0.02, bar.get_y() + bar.get_height() / 2,
+ f"{prob:.1%}", va="center", fontsize=11, fontweight="bold")
+
+ ax.spines["top"].set_visible(False)
+ ax.spines["right"].set_visible(False)
+ ax.grid(axis="x", alpha=0.3, linestyle="--")
+ fig.tight_layout()
+ return fig
+
+
+def plot_posteriors(samples, param_names, mechanism_name, domain="ec"):
+ """
+ Violin plots of posterior distributions for each parameter.
+
+ Args:
+ samples: [n_samples, D] array of posterior samples
+ param_names: list of parameter names
+ mechanism_name: name of the mechanism
+ domain: 'ec' or 'tpd'
+
+ Returns:
+ matplotlib Figure
+ """
+ n_params = len(param_names)
+ fig, axes = plt.subplots(1, n_params, figsize=(max(4, 3 * n_params), 4.5))
+ if n_params == 1:
+ axes = [axes]
+
+ colors = MECH_COLORS_EC if domain == "ec" else MECH_COLORS_TPD
+ color = colors.get(mechanism_name, COLORS["primary"])
+
+ for i, (ax, name) in enumerate(zip(axes, param_names)):
+ data = samples[:, i]
+
+ parts = ax.violinplot(data, positions=[0], showmeans=True,
+ showmedians=True, showextrema=False)
+ for pc in parts["bodies"]:
+ pc.set_facecolor(color)
+ pc.set_alpha(0.6)
+ parts["cmeans"].set_color("black")
+ parts["cmedians"].set_color(COLORS["warm"])
+
+ q05, q95 = np.quantile(data, [0.05, 0.95])
+ ax.axhline(q05, color=COLORS["neutral"], linestyle="--", alpha=0.5, linewidth=0.8)
+ ax.axhline(q95, color=COLORS["neutral"], linestyle="--", alpha=0.5, linewidth=0.8)
+
+ ax.set_title(_format_param_name(name), fontsize=11, fontweight="medium")
+ ax.set_xticks([])
+ ax.spines["top"].set_visible(False)
+ ax.spines["right"].set_visible(False)
+ ax.spines["bottom"].set_visible(False)
+
+ mean_val = data.mean()
+ ax.text(0.5, 0.02, f"mean={mean_val:.3f}", transform=ax.transAxes,
+ ha="center", fontsize=9, color=COLORS["neutral"])
+
+ fig.suptitle(f"Parameter Posteriors — {mechanism_name}",
+ fontsize=14, fontweight="bold")
+ fig.tight_layout(rect=[0, 0, 1, 0.93])
+ return fig
+
+
+def plot_reconstruction(observed_curves, recon_curves, domain="ec",
+ nrmses=None, r2s=None, scan_labels=None):
+ """
+ Overlay of observed vs reconstructed signals with optional metrics.
+
+ Args:
+ observed_curves: list of dicts with 'x' and 'y' arrays
+ recon_curves: list of dicts with 'x' and 'y' arrays (same length)
+ domain: 'ec' or 'tpd'
+ nrmses: optional list of NRMSE values per curve
+ r2s: optional list of R2 values per curve
+ scan_labels: optional list of label strings per curve
+
+ Returns:
+ matplotlib Figure
+ """
+ n_curves = len(observed_curves)
+ fig, axes = plt.subplots(1, min(n_curves, 4),
+ figsize=(max(5, 4 * min(n_curves, 4)), 5),
+ squeeze=False)
+ axes = axes[0]
+
+ xlabel = "Potential (\u03b8)" if domain == "ec" else "Temperature (K)"
+ ylabel = "Flux" if domain == "ec" else "Rate"
+
+ for i, ax in enumerate(axes):
+ if i >= n_curves:
+ ax.set_visible(False)
+ continue
+
+ obs = observed_curves[i]
+ rec = recon_curves[i]
+
+ ax.plot(obs["x"], obs["y"], color=COLORS["neutral"], linewidth=1.5,
+ label="Observed", alpha=0.8)
+ ax.plot(rec["x"], rec["y"], color=COLORS["primary"], linewidth=1.5,
+ label="Reconstructed", linestyle="--")
+
+ ax.set_xlabel(xlabel, fontsize=10)
+ if i == 0:
+ ax.set_ylabel(ylabel, fontsize=10)
+ ax.legend(fontsize=8, framealpha=0.8, loc="best")
+ ax.spines["top"].set_visible(False)
+ ax.spines["right"].set_visible(False)
+
+ if scan_labels and i < len(scan_labels):
+ title = scan_labels[i]
+ elif domain == "ec":
+ title = f"Scan rate {i + 1}"
+ else:
+ title = f"Heating rate {i + 1}"
+ ax.set_title(title, fontsize=10)
+
+ metrics_parts = []
+ if nrmses and i < len(nrmses) and np.isfinite(nrmses[i]):
+ metrics_parts.append(f"NRMSE={nrmses[i]:.4f}")
+ if r2s and i < len(r2s) and np.isfinite(r2s[i]):
+ metrics_parts.append(f"R\u00b2={r2s[i]:.4f}")
+ if metrics_parts:
+ ax.text(0.02, 0.98, " ".join(metrics_parts),
+ transform=ax.transAxes, fontsize=8, va="top",
+ color=COLORS["accent"], fontweight="bold",
+ bbox=dict(boxstyle="round,pad=0.3", facecolor="white",
+ alpha=0.8, edgecolor=COLORS["accent"]))
+
+ suptitle = "Signal Reconstruction"
+ if nrmses and r2s:
+ valid_nrmse = [v for v in nrmses if np.isfinite(v)]
+ valid_r2 = [v for v in r2s if np.isfinite(v)]
+ if valid_nrmse and valid_r2:
+ avg_nrmse = np.mean(valid_nrmse)
+ avg_r2 = np.mean(valid_r2)
+ suptitle += f" (avg NRMSE={avg_nrmse:.4f}, avg R\u00b2={avg_r2:.4f})"
+
+ fig.suptitle(suptitle, fontsize=12, fontweight="bold")
+ fig.tight_layout(rect=[0, 0, 1, 0.93])
+ return fig
+
+
+def _add_sweep_arrows(ax, pot, y_ox, y_red, mid):
+ """Add direction arrows and labels for forward/reverse sweeps on both species."""
+ sweep_specs = [
+ (slice(None, mid), "reductive \u2192", 16),
+ (slice(mid, None), "\u2190 oxidative", -16),
+ ]
+ curves = [
+ (y_ox, COLORS["primary"], 0.35, 0.65),
+ (y_red, COLORS["warm"], 0.35, 0.65),
+ ]
+ for y_data, color, fwd_frac, rev_frac in curves:
+ for segment, label, y_offset in sweep_specs:
+ x_seg = pot[segment]
+ y_seg = y_data[segment]
+ n = len(x_seg)
+ if n < 10:
+ continue
+
+ frac = fwd_frac if y_offset > 0 else rev_frac
+ idx = int(n * frac)
+ idx = max(2, min(idx, n - 3))
+
+ step = max(1, n // 30)
+ i0 = max(0, idx - step)
+ i1 = min(n - 1, idx + step)
+
+ ax.annotate(
+ "", xy=(x_seg[i1], y_seg[i1]),
+ xytext=(x_seg[i0], y_seg[i0]),
+ arrowprops=dict(arrowstyle="-|>", color=color,
+ lw=1.8, mutation_scale=14),
+ )
+
+ ax.annotate(label, xy=(x_seg[idx], y_seg[idx]),
+ xytext=(0, y_offset), textcoords="offset points",
+ fontsize=7.5, color=color, fontstyle="italic",
+ ha="center", va="center")
+
+
+def plot_concentration_profiles(conc_curves, scan_labels=None):
+ """
+ Plot surface concentration profiles (C_A and C_B) vs potential.
+
+ Args:
+ conc_curves: list of dicts with 'x' (potential), 'c_ox', 'c_red',
+ or None for failed reconstructions
+ scan_labels: optional list of label strings per curve
+
+ Returns:
+ matplotlib Figure, or None if no valid data
+ """
+ valid = [c for c in conc_curves if c is not None]
+ if not valid:
+ return None
+
+ n_curves = len(conc_curves)
+ fig, axes = plt.subplots(1, min(n_curves, 4),
+ figsize=(max(5, 4 * min(n_curves, 4)), 5),
+ squeeze=False)
+ axes = axes[0]
+
+ for i, ax in enumerate(axes):
+ if i >= n_curves or conc_curves[i] is None:
+ ax.set_visible(False)
+ continue
+
+ c = conc_curves[i]
+ pot = np.asarray(c["x"])
+ c_ox = np.asarray(c["c_ox"])
+ c_red = np.asarray(c["c_red"])
+ mid = len(pot) // 2
+
+ # Forward sweep (reductive): first half
+ ax.plot(pot[:mid], c_ox[:mid], color=COLORS["primary"], linewidth=1.5,
+ label="C$_A$ (ox)")
+ ax.plot(pot[:mid], c_red[:mid], color=COLORS["warm"], linewidth=1.5,
+ label="C$_B$ (red)")
+ # Reverse sweep (oxidative): second half
+ ax.plot(pot[mid:], c_ox[mid:], color=COLORS["primary"], linewidth=1.5)
+ ax.plot(pot[mid:], c_red[mid:], color=COLORS["warm"], linewidth=1.5)
+
+ _add_sweep_arrows(ax, pot, c_ox, c_red, mid)
+
+ ax.set_xlabel("Potential (\u03b8)", fontsize=10)
+ if i == 0:
+ ax.set_ylabel("Surface concentration", fontsize=10)
+ ax.legend(fontsize=8, framealpha=0.8, loc="best")
+ ax.spines["top"].set_visible(False)
+ ax.spines["right"].set_visible(False)
+
+ if scan_labels and i < len(scan_labels):
+ ax.set_title(scan_labels[i], fontsize=10)
+ else:
+ ax.set_title(f"Scan rate {i + 1}", fontsize=10)
+
+ fig.suptitle("Surface Concentration Profiles", fontsize=12,
+ fontweight="bold")
+ fig.tight_layout(rect=[0, 0, 1, 0.93])
+ return fig
+
+
+def plot_parameter_table(param_stats, mechanism_name):
+ """
+ Create a formatted parameter summary table as a figure.
+
+ Args:
+ param_stats: dict with 'names', 'mean', 'std', 'q05', 'q95'
+ mechanism_name: name of the mechanism
+
+ Returns:
+ matplotlib Figure
+ """
+ names = param_stats["names"]
+ means = param_stats["mean"]
+ stds = param_stats["std"]
+ q05s = param_stats["q05"]
+ q95s = param_stats["q95"]
+
+ n = len(names)
+ fig, ax = plt.subplots(figsize=(8, max(2, 0.6 * n + 1)))
+ ax.axis("off")
+
+ col_labels = ["Parameter", "Mean", "Std", "5th %ile", "95th %ile"]
+ cell_text = []
+ for i in range(n):
+ cell_text.append([
+ _format_param_name(names[i]),
+ f"{means[i]:.4f}",
+ f"{stds[i]:.4f}",
+ f"{q05s[i]:.4f}",
+ f"{q95s[i]:.4f}",
+ ])
+
+ table = ax.table(cellText=cell_text, colLabels=col_labels,
+ loc="center", cellLoc="center")
+ table.auto_set_font_size(False)
+ table.set_fontsize(11)
+ table.scale(1.0, 1.5)
+
+ for (row, col), cell in table.get_celld().items():
+ if row == 0:
+ cell.set_facecolor("#E5E7EB")
+ cell.set_text_props(fontweight="bold")
+ else:
+ cell.set_facecolor("#F9FAFB" if row % 2 == 0 else "white")
+
+ ax.set_title(f"Parameter Estimates — {mechanism_name}",
+ fontsize=14, fontweight="bold", pad=20)
+ fig.tight_layout()
+ return fig
+
+
+def _format_param_name(name):
+ """Format parameter names for display."""
+ replacements = {
+ "log10(K0)": "log₁₀(K₀)",
+ "log10(dB)": "log₁₀(d_B)",
+ "log10(dA)": "log₁₀(d_A)",
+ "log10(kc)": "log₁₀(k_c)",
+ "log10(reorg_e)": "log₁₀(λ)",
+ "log10(Gamma_sat)": "log₁₀(Γ_sat)",
+ "log10(KA_eq)": "log₁₀(K_A,eq)",
+ "log10(KB_eq)": "log₁₀(K_B,eq)",
+ "log10(nu)": "log₁₀(ν)",
+ "log10(nu_red)": "log₁₀(ν_red)",
+ "log10(D0)": "log₁₀(D₀)",
+ "E0_offset": "E₀ offset",
+ "alpha": "α",
+ "alpha_cov": "α_cov",
+ "Ed": "E_d (K)",
+ "Ed0": "E_d0 (K)",
+ "Ea": "E_a (K)",
+ "Ea_red": "E_a,red (K)",
+ "Ea_reox": "E_a,reox (K)",
+ "E_diff": "E_diff (K)",
+ "theta_0": "θ₀",
+ "theta_A0": "θ_A0",
+ "theta_B0": "θ_B0",
+ "theta_O0": "θ_O0",
+ }
+ return replacements.get(name, name)
diff --git a/preprocessing.py b/preprocessing.py
new file mode 100644
index 0000000000000000000000000000000000000000..0cb045e677adfe4288c8746a9b746977c1f51d17
--- /dev/null
+++ b/preprocessing.py
@@ -0,0 +1,405 @@
+"""
+Preprocessing utilities for ECFlow web app.
+
+Handles:
+- CSV/NPZ parsing for both CV and TPD data
+- Physical-to-dimensionless unit conversion for CV (Compton convention)
+- Formal potential estimation
+- Diffusion coefficient estimation via Randles-Sevcik
+"""
+
+import io
+import numpy as np
+
+# Physical constants
+F_CONST = 96485.3329 # Faraday constant (C/mol)
+R_CONST = 8.314462 # Gas constant (J/(mol·K))
+
+
+# =========================================================================
+# CV nondimensionalization
+# =========================================================================
+
+def nondimensionalize_cv(E_volts, i_amps, v_Vs, E0_V, T_K=298.15,
+ A_cm2=0.0707, C_A_molcm3=1e-6, D_A_cm2s=1e-5, n=1,
+ v_ref_Vs=0.1):
+ """
+ Convert physical CV data to dimensionless units for the ECFlow model.
+
+ Potential and current are nondimensionalized using the Compton convention
+ with the scan-rate-dependent diffusion length d = sqrt(D·RT/(nFv)):
+ θ = (E - E₀) / (RT/nF)
+ ψ = i / (nFAC·D/d)
+
+ The dimensionless scan rate σ = v / v_ref is computed separately.
+ In the Compton convention σ ≡ 1 by construction (d absorbs v), but the
+ ECFlow model uses σ as an explicit conditioning variable to distinguish
+ experiments at different scan rates. Setting v_ref so that σ spans the
+ training range (~0.1–100) gives the model the scan-rate information.
+
+ Args:
+ E_volts: potential array (V)
+ i_amps: current array (A)
+ v_Vs: scan rate (V/s)
+ E0_V: formal potential (V)
+ T_K: temperature (K)
+ A_cm2: electrode area (cm²)
+ C_A_molcm3: bulk concentration (mol/cm³)
+ D_A_cm2s: diffusion coefficient (cm²/s)
+ n: number of electrons
+ v_ref_Vs: reference scan rate (V/s) at which σ = 1
+
+ Returns:
+ theta: dimensionless potential array
+ flux: dimensionless current array
+ sigma: dimensionless scan rate (= v_Vs / v_ref_Vs)
+ """
+ thermal_voltage = R_CONST * T_K / (n * F_CONST)
+
+ theta = (E_volts - E0_V) / thermal_voltage
+
+ d = np.sqrt(D_A_cm2s * R_CONST * T_K / (n * F_CONST * v_Vs))
+ flux_scale = n * F_CONST * A_cm2 * C_A_molcm3 * D_A_cm2s / d
+ flux = i_amps / flux_scale
+
+ sigma = v_Vs / v_ref_Vs
+
+ return theta.astype(np.float32), flux.astype(np.float32), float(sigma)
+
+
+def estimate_E0(E, i):
+ """
+ Estimate formal potential from CV midpoint of anodic/cathodic peaks.
+
+ Args:
+ E: potential array (V)
+ i: current array (A)
+
+ Returns:
+ E0 estimate (V)
+ """
+ E = np.asarray(E)
+ i = np.asarray(i)
+
+ mid = len(E) // 2
+ i_anodic = i[:mid] if i[:mid].max() > abs(i[:mid].min()) else i[mid:]
+ i_cathodic = i[mid:] if i[mid:].min() < -abs(i[mid:].max()) else i[:mid]
+
+ E_pa = E[np.argmax(i)]
+ E_pc = E[np.argmin(i)]
+
+ return float((E_pa + E_pc) / 2.0)
+
+
+def estimate_D_randles_sevcik(i_peak_A, v_Vs, A_cm2, C_molcm3, n=1, T_K=298.15):
+ """
+ Estimate diffusion coefficient from Randles-Sevcik equation.
+
+ i_p = 0.4463 * n^(3/2) * F^(3/2) * A * C * sqrt(D * v / (R * T))
+
+ Args:
+ i_peak_A: peak current (A)
+ v_Vs: scan rate (V/s)
+ A_cm2: electrode area (cm^2)
+ C_molcm3: concentration (mol/cm^3)
+ n: number of electrons
+ T_K: temperature (K)
+
+ Returns:
+ D estimate (cm^2/s)
+ """
+ coeff = 0.4463 * n**1.5 * F_CONST**1.5 * A_cm2 * C_molcm3
+ if abs(coeff) < 1e-30 or v_Vs <= 0:
+ return 1e-5
+ ratio = abs(i_peak_A) / coeff
+ D = ratio**2 * R_CONST * T_K / v_Vs
+ return max(float(D), 1e-10)
+
+
+# =========================================================================
+# CSV parsing
+# =========================================================================
+
+def parse_cv_csv(file_content, delimiter=None):
+ """
+ Parse a CV CSV file with flexible column detection.
+
+ Expected columns: potential (V or mV) and current (A, mA, uA, nA).
+ Optionally includes a time column (s) to infer the scan rate.
+ Auto-detects column names and units from header.
+
+ Args:
+ file_content: string or bytes of CSV content
+ delimiter: CSV delimiter (auto-detected if None)
+
+ Returns:
+ dict with 'E_V' (potential in V), 'i_A' (current in A),
+ and optionally 'scan_rate_Vs' (V/s) if time is available.
+ """
+ if isinstance(file_content, bytes):
+ file_content = file_content.decode("utf-8", errors="replace")
+
+ lines = file_content.strip().split("\n")
+ if len(lines) < 2:
+ raise ValueError("CSV must have at least a header and one data row")
+
+ if delimiter is None:
+ for d in [",", "\t", ";"]:
+ if d in lines[0]:
+ delimiter = d
+ break
+ if delimiter is None:
+ delimiter = ","
+
+ header = [h.strip().lower() for h in lines[0].split(delimiter)]
+
+ e_col, i_col, t_col = None, None, None
+ e_scale, i_scale = 1.0, 1.0
+
+ time_patterns = ["time/s", "time (s)", "time/ms", "time (ms)",
+ "elapsed time", "t/s", "t (s)", "time"]
+
+ potential_patterns = [
+ ("e/v", 1.0), ("e (v)", 1.0), ("potential/v", 1.0), ("potential (v)", 1.0),
+ ("ewe/v", 1.0), ("working electrode", 1.0),
+ ("e/mv", 1e-3), ("e (mv)", 1e-3), ("potential/mv", 1e-3), ("potential (mv)", 1e-3),
+ ("voltage", 1.0), ("e", 1.0), ("potential", 1.0),
+ ]
+ current_patterns = [
+ ("i/a", 1.0), ("i (a)", 1.0), ("current/a", 1.0), ("current (a)", 1.0),
+ ("/ma", 1e-3),
+ ("i/ma", 1e-3), ("i (ma)", 1e-3), ("current/ma", 1e-3), ("current (ma)", 1e-3),
+ ("i/ua", 1e-6), ("i (ua)", 1e-6), ("i/µa", 1e-6), ("i (µa)", 1e-6),
+ ("current/ua", 1e-6), ("current/µa", 1e-6),
+ ("i/na", 1e-9), ("i (na)", 1e-9),
+ ("current", 1.0), ("i", 1.0),
+ ]
+
+ for idx, col in enumerate(header):
+ if t_col is None:
+ for pat in time_patterns:
+ if pat in col:
+ t_col = idx
+ break
+ if t_col == idx:
+ continue
+ if e_col is None:
+ for pat, scale in potential_patterns:
+ if pat in col:
+ e_col, e_scale = idx, scale
+ break
+ if i_col is None:
+ for pat, scale in current_patterns:
+ if pat in col:
+ i_col, i_scale = idx, scale
+ break
+
+ if e_col is None or i_col is None:
+ non_time = [idx for idx in range(len(header)) if idx != t_col]
+ if len(non_time) >= 2:
+ e_col, i_col = non_time[0], non_time[1]
+ else:
+ raise ValueError(
+ f"Cannot identify potential/current columns from header: {header}"
+ )
+
+ all_cols = {e_col, i_col}
+ if t_col is not None:
+ all_cols.add(t_col)
+ max_col = max(all_cols)
+
+ E_vals, i_vals, t_vals = [], [], []
+ for line in lines[1:]:
+ parts = line.strip().split(delimiter)
+ if len(parts) <= max_col:
+ continue
+ try:
+ E_vals.append(float(parts[e_col]) * e_scale)
+ i_vals.append(float(parts[i_col]) * i_scale)
+ if t_col is not None:
+ t_vals.append(float(parts[t_col]))
+ except ValueError:
+ continue
+
+ if len(E_vals) < 5:
+ raise ValueError(f"Only {len(E_vals)} valid data points found")
+
+ result = {
+ "E_V": np.array(E_vals, dtype=np.float32),
+ "i_A": np.array(i_vals, dtype=np.float32),
+ }
+
+ if t_vals:
+ t_arr = np.array(t_vals, dtype=np.float64)
+ E_arr = np.array(E_vals, dtype=np.float64)
+ mid = len(E_arr) // 2
+ dE = np.abs(np.diff(E_arr[:mid]))
+ dt = np.abs(np.diff(t_arr[:mid]))
+ valid = dt > 1e-12
+ if valid.sum() > 10:
+ v = float(np.median(dE[valid] / dt[valid]))
+ if v > 1e-6:
+ result["scan_rate_Vs"] = v
+
+ return result
+
+
+def parse_tpd_csv(file_content, delimiter=None):
+ """
+ Parse a TPD CSV file.
+
+ Expected columns: temperature (K or °C) and signal (arb. units).
+ Optionally includes a time column (s) to infer the heating rate.
+ Auto-detects Celsius vs Kelvin.
+
+ Returns:
+ dict with 'T_K' (temperature in K), 'signal' (arb. units),
+ and optionally 'beta_Ks' (heating rate in K/s) if time is available.
+ """
+ if isinstance(file_content, bytes):
+ file_content = file_content.decode("utf-8", errors="replace")
+
+ lines = file_content.strip().split("\n")
+ if len(lines) < 2:
+ raise ValueError("CSV must have at least a header and one data row")
+
+ if delimiter is None:
+ for d in [",", "\t", ";"]:
+ if d in lines[0]:
+ delimiter = d
+ break
+ if delimiter is None:
+ delimiter = ","
+
+ header = [h.strip().lower() for h in lines[0].split(delimiter)]
+
+ t_col, s_col, time_col = None, None, None
+ is_celsius = False
+
+ temp_patterns = [
+ ("temperature", False), ("temp", False), ("t/k", False), ("t (k)", False),
+ ("t/c", True), ("t (c)", True), ("t/°c", True), ("t (°c)", True),
+ ]
+ signal_patterns = ["signal", "rate", "intensity", "des", "tpd"]
+ time_patterns = ["time/s", "time (s)", "time"]
+
+ for idx, col in enumerate(header):
+ if t_col is None:
+ for pat, celsius in temp_patterns:
+ if pat in col:
+ t_col = idx
+ is_celsius = celsius
+ break
+ if s_col is None:
+ for pat in signal_patterns:
+ if pat in col:
+ s_col = idx
+ break
+ if time_col is None:
+ for pat in time_patterns:
+ if pat in col:
+ time_col = idx
+ break
+
+ if t_col is None or s_col is None:
+ if len(header) >= 2:
+ t_col, s_col = 0, 1
+ else:
+ raise ValueError(
+ f"Cannot identify temperature/signal columns from header: {header}"
+ )
+
+ all_cols = {t_col, s_col}
+ if time_col is not None:
+ all_cols.add(time_col)
+ max_col = max(all_cols)
+
+ T_vals, s_vals, time_vals = [], [], []
+ for line in lines[1:]:
+ parts = line.strip().split(delimiter)
+ if len(parts) <= max_col:
+ continue
+ try:
+ T_vals.append(float(parts[t_col]))
+ s_vals.append(float(parts[s_col]))
+ if time_col is not None:
+ time_vals.append(float(parts[time_col]))
+ except ValueError:
+ continue
+
+ if len(T_vals) < 5:
+ raise ValueError(f"Only {len(T_vals)} valid data points found")
+
+ T_arr = np.array(T_vals, dtype=np.float32)
+ if is_celsius or T_arr.max() < 200:
+ T_arr += 273.15
+
+ result = {
+ "T_K": T_arr,
+ "signal": np.array(s_vals, dtype=np.float32),
+ }
+
+ if time_vals:
+ time_arr = np.array(time_vals, dtype=np.float32)
+ dt = time_arr[-1] - time_arr[0]
+ dT = T_arr[-1] - T_arr[0]
+ if dt > 0:
+ result["beta_Ks"] = float(dT / dt)
+
+ return result
+
+
+def parse_dimensionless_cv_csv(file_content, delimiter=None):
+ """
+ Parse a CSV that already contains dimensionless CV data.
+
+ Expected columns: theta (dimensionless potential), flux (dimensionless current).
+
+ Returns:
+ dict with 'theta', 'flux' arrays
+ """
+ if isinstance(file_content, bytes):
+ file_content = file_content.decode("utf-8", errors="replace")
+
+ lines = file_content.strip().split("\n")
+ if len(lines) < 2:
+ raise ValueError("CSV must have at least a header and one data row")
+
+ if delimiter is None:
+ for d in [",", "\t", ";"]:
+ if d in lines[0]:
+ delimiter = d
+ break
+ if delimiter is None:
+ delimiter = ","
+
+ header = [h.strip().lower() for h in lines[0].split(delimiter)]
+
+ t_col, f_col = None, None
+ for idx, col in enumerate(header):
+ if t_col is None and any(p in col for p in ["theta", "potential", "e"]):
+ t_col = idx
+ if f_col is None and any(p in col for p in ["flux", "current", "j", "i"]):
+ f_col = idx
+
+ if t_col is None or f_col is None:
+ if len(header) >= 2:
+ t_col, f_col = 0, 1
+ else:
+ raise ValueError(f"Cannot identify columns from header: {header}")
+
+ theta_vals, flux_vals = [], []
+ for line in lines[1:]:
+ parts = line.strip().split(delimiter)
+ if len(parts) <= max(t_col, f_col):
+ continue
+ try:
+ theta_vals.append(float(parts[t_col]))
+ flux_vals.append(float(parts[f_col]))
+ except ValueError:
+ continue
+
+ return {
+ "theta": np.array(theta_vals, dtype=np.float32),
+ "flux": np.array(flux_vals, dtype=np.float32),
+ }
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000000000000000000000000000000000000..86112e9674bfd7358e9d940295ecaa7aa9fb1661
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,8 @@
+torch>=2.0
+numpy>=1.24
+scipy>=1.10
+matplotlib>=3.7
+gradio>=4.0
+opencv-python-headless>=4.8
+easyocr>=1.7
+tqdm>=4.65
diff --git a/tpd_model.py b/tpd_model.py
new file mode 100644
index 0000000000000000000000000000000000000000..bbfe15d40f75cf945e8eae9f06cc5b0a26e724d3
--- /dev/null
+++ b/tpd_model.py
@@ -0,0 +1,402 @@
+"""
+Multi-Mechanism Normalizing Flow for Joint Mechanism Identification
+and Bayesian Parameter Inference from Multi-Heating-Rate TPD Signals.
+
+Architecture mirrors the electrochemistry model (multi_mechanism_model.py)
+but configured for TPD with 2 input channels (temperature, rate) and
+6 catalysis mechanisms.
+
+Reuses domain-agnostic components from flow_model.py and
+multi_mechanism_model.py (SAB, PMA, MechanismClassifier, MechanismFlow).
+"""
+
+import torch
+import torch.nn as nn
+import torch.nn.functional as F
+import math
+
+from flow_model import (
+ SignalEncoder,
+ ActNorm,
+ ConditionalSplineCoupling,
+ ConditionalAffineCoupling,
+)
+from multi_mechanism_model import MechanismClassifier, MechanismFlow, SAB, PMA, SummaryProjection, SUMMARY_DIM
+
+from generate_tpd_data import TPD_MECHANISM_LIST, TPD_MECHANISM_PARAMS
+
+
+class MultiScanEncoderTPD(nn.Module):
+ """
+ Encode a set of multi-heating-rate TPD curves into a single context vector.
+
+ Architecture (Set Transformer):
+ 1. Shared per-curve CNN encoder -> per-curve embedding
+ 2. Augment with [log10(heating_rate), log10(peak_rate)]
+ 3. SAB: self-attention across heating rates
+ 4. PMA: attention-based pooling to single vector
+ 5. rho MLP: project to final context
+
+ Input: x [B, N_beta, 2, T], scan_mask [B, N_beta, T],
+ heating_rates [B, N_beta], rate_scales [B, N_beta]
+ Output: context [B, d_context]
+ """
+ def __init__(self, in_channels=2, d_model=128, d_context=128, n_heads=4):
+ super().__init__()
+ self.per_cv_encoder = SignalEncoder(
+ in_channels=in_channels, d_model=d_model, d_context=d_context,
+ )
+ self.cv_augment = nn.Sequential(
+ nn.Linear(d_context + 2, d_context),
+ nn.GELU(),
+ )
+ self.sab = SAB(d_context, n_heads=n_heads)
+ self.pma = PMA(d_context, n_heads=n_heads, n_seeds=1)
+ self.rho = nn.Sequential(
+ nn.Linear(d_context, d_context),
+ nn.GELU(),
+ nn.Linear(d_context, d_context),
+ )
+
+ def forward(self, x, scan_mask=None, sigmas=None, flux_scales=None):
+ """
+ Args:
+ x: [B, N_beta, 2, T] multi-heating-rate TPD curves
+ scan_mask: [B, N_beta, T] valid timestep mask
+ sigmas: [B, N_beta] log10 heating rates
+ flux_scales: [B, N_beta] log10(peak_rate) per curve
+
+ Returns:
+ context: [B, d_context]
+ """
+ B, N, C, T = x.shape
+
+ x_flat = x.reshape(B * N, C, T)
+ mask_flat = scan_mask.reshape(B * N, T) if scan_mask is not None else None
+
+ h_flat = self.per_cv_encoder(x_flat, mask=mask_flat)
+ h = h_flat.reshape(B, N, -1)
+
+ if sigmas is None:
+ sigmas = torch.zeros(B, N, device=x.device)
+ if flux_scales is None:
+ flux_scales = torch.zeros(B, N, device=x.device)
+
+ aug_features = torch.stack([sigmas, flux_scales], dim=-1)
+ h = self.cv_augment(torch.cat([h, aug_features], dim=-1))
+
+ if scan_mask is not None:
+ cv_invalid = ~scan_mask.any(dim=-1) # [B, N] True = padded
+ else:
+ cv_invalid = None
+
+ h = self.sab(h, key_padding_mask=cv_invalid)
+ h = self.pma(h, key_padding_mask=cv_invalid) # [B, 1, d_context]
+ h = h.squeeze(1)
+
+ context = self.rho(h)
+ return context
+
+
+class MultiMechanismFlowTPD(nn.Module):
+ """
+ Joint mechanism identification and parameter inference model for TPD.
+
+ Combines:
+ - Multi-heating-rate signal encoder (Set Transformer over per-curve embeddings)
+ - Mechanism classifier (6 TPD mechanisms)
+ - Per-mechanism normalizing flow heads
+
+ If use_summary_features=True, replaces the signal encoder with a simple
+ MLP projection from hand-crafted summary statistics (21-dim) to context
+ space, keeping all other components identical.
+ """
+ def __init__(
+ self,
+ d_context=128,
+ d_model=128,
+ n_coupling_layers=6,
+ hidden_dim=96,
+ coupling_type='spline',
+ n_bins=8,
+ tail_bound=5.0,
+ use_summary_features=False,
+ ):
+ super().__init__()
+ self.n_mechanisms = len(TPD_MECHANISM_LIST)
+ self.mechanism_list = TPD_MECHANISM_LIST
+ self.d_context = d_context
+ self.use_summary_features = use_summary_features
+
+ if use_summary_features:
+ self.summary_proj = SummaryProjection(
+ summary_dim=SUMMARY_DIM, d_context=d_context,
+ )
+ self.encoder = None
+ else:
+ self.encoder = MultiScanEncoderTPD(
+ in_channels=2, d_model=d_model, d_context=d_context,
+ )
+ self.summary_proj = None
+
+ self.classifier = MechanismClassifier(
+ d_context=d_context,
+ n_mechanisms=self.n_mechanisms,
+ hidden_dim=hidden_dim,
+ )
+
+ self.flow_heads = nn.ModuleDict()
+ for mech in TPD_MECHANISM_LIST:
+ theta_dim = TPD_MECHANISM_PARAMS[mech]['dim']
+ self.flow_heads[mech] = MechanismFlow(
+ theta_dim=theta_dim,
+ d_context=d_context,
+ n_coupling_layers=n_coupling_layers,
+ hidden_dim=hidden_dim,
+ coupling_type=coupling_type,
+ n_bins=n_bins,
+ tail_bound=tail_bound,
+ )
+
+ def set_theta_stats(self, mechanism, mean, std):
+ """Set normalization stats for a specific mechanism's flow head."""
+ self.flow_heads[mechanism].set_theta_stats(mean, std)
+
+ def encode_signal(self, x, scan_mask=None, sigmas=None, flux_scales=None,
+ summary=None):
+ if self.use_summary_features:
+ assert summary is not None, "summary features required in summary mode"
+ return self.summary_proj(summary)
+ return self.encoder(x, scan_mask=scan_mask, sigmas=sigmas,
+ flux_scales=flux_scales)
+
+ def forward(self, x, mechanism_ids, mech_theta, mech_theta_mask=None,
+ scan_mask=None, sigmas=None, flux_scales=None, summary=None):
+ """
+ Compute classification logits and per-sample NLL for the true mechanism.
+
+ Returns:
+ dict with 'logits' [B, n_mechanisms] and 'nll' [B]
+ """
+ context = self.encode_signal(x, scan_mask=scan_mask, sigmas=sigmas,
+ flux_scales=flux_scales, summary=summary)
+ logits = self.classifier(context)
+
+ nll = torch.zeros(x.shape[0], device=x.device)
+
+ for m_idx, mech in enumerate(TPD_MECHANISM_LIST):
+ sel = (mechanism_ids == m_idx)
+ if not sel.any():
+ continue
+
+ theta_dim = TPD_MECHANISM_PARAMS[mech]['dim']
+ ctx_m = context[sel]
+ theta_m = mech_theta[sel, :theta_dim]
+
+ log_p = self.flow_heads[mech].log_prob(theta_m, ctx_m)
+ bad = ~torch.isfinite(log_p)
+ if bad.any():
+ log_p = torch.where(bad, torch.full_like(log_p, -10.0).detach(), log_p)
+ nll[sel] = -log_p
+
+ return {'logits': logits, 'nll': nll}
+
+ def forward_with_calibration(self, x, mechanism_ids, mech_theta,
+ mech_theta_mask=None, scan_mask=None,
+ sigmas=None, flux_scales=None,
+ cal_n_samples=64, cal_levels=(0.5, 0.9),
+ cal_beta=20.0, summary=None):
+ """Forward pass with additional calibration loss (see MultiMechanismFlow)."""
+ context = self.encode_signal(x, scan_mask=scan_mask, sigmas=sigmas,
+ flux_scales=flux_scales, summary=summary)
+ logits = self.classifier(context)
+
+ nll = torch.zeros(x.shape[0], device=x.device)
+ cal_losses = []
+
+ for m_idx, mech in enumerate(TPD_MECHANISM_LIST):
+ sel = (mechanism_ids == m_idx)
+ if not sel.any():
+ continue
+
+ theta_dim = TPD_MECHANISM_PARAMS[mech]['dim']
+ ctx_m = context[sel]
+ theta_m = mech_theta[sel, :theta_dim]
+
+ log_p = self.flow_heads[mech].log_prob(theta_m, ctx_m)
+ bad = ~torch.isfinite(log_p)
+ if bad.any():
+ log_p = torch.where(bad, torch.full_like(log_p, -10.0).detach(), log_p)
+ nll[sel] = -log_p
+
+ if ctx_m.shape[0] < 4:
+ continue
+ samples = self.flow_heads[mech].sample_with_grad(
+ ctx_m, n_samples=cal_n_samples,
+ )
+
+ # Inverse-spread weights: collapsed parameters (small posterior std)
+ # get more calibration pressure than well-spread parameters.
+ with torch.no_grad():
+ param_std = samples.std(dim=1).clamp(min=1e-4) # [B_m, D]
+ inv_spread_w = 1.0 / param_std # [B_m, D]
+ inv_spread_w = inv_spread_w / inv_spread_w.mean()
+
+ for level in cal_levels:
+ alpha = (1.0 - level) / 2.0
+ lower = torch.quantile(samples, alpha, dim=1) # [B_m, D]
+ upper = torch.quantile(samples, 1 - alpha, dim=1) # [B_m, D]
+
+ inside = (
+ torch.sigmoid(cal_beta * (theta_m - lower))
+ * torch.sigmoid(cal_beta * (upper - theta_m))
+ ) # [B_m, D]
+
+ per_sample_loss = (inside - level).pow(2) # [B_m, D]
+ cal_losses.append((per_sample_loss * inv_spread_w).mean())
+
+ if cal_losses:
+ cal_loss = torch.stack(cal_losses).mean()
+ else:
+ cal_loss = torch.tensor(0.0, device=x.device)
+
+ return {'logits': logits, 'nll': nll, 'cal_loss': cal_loss}
+
+ @torch.no_grad()
+ def predict(self, x, scan_mask=None, sigmas=None, flux_scales=None,
+ n_samples=200, top_k=None, temperature=1.0,
+ temperature_map=None, summary=None):
+ """
+ Full inference: classify mechanism, then sample parameters.
+
+ Args:
+ temperature: scalar fallback (>1 broadens posteriors)
+ temperature_map: dict mapping mechanism name -> list of
+ per-parameter temperatures. Overrides scalar temperature.
+ summary: [B, 21] hand-crafted summary stats (summary mode only)
+
+ Returns:
+ dict with mechanism_probs, mechanism_xdB, mechanism_pred, samples, stats
+ """
+ context = self.encode_signal(x, scan_mask=scan_mask, sigmas=sigmas,
+ flux_scales=flux_scales, summary=summary)
+ logits = self.classifier(context)
+ probs = F.softmax(logits, dim=-1)
+ pred = probs.argmax(dim=-1)
+
+ probs_clamped = probs.clamp(min=1e-7, max=1 - 1e-7)
+ xdB = 10.0 * torch.log10(probs_clamped / (1.0 - probs_clamped))
+
+ samples_dict = {}
+ stats_dict = {}
+
+ for m_idx, mech in enumerate(TPD_MECHANISM_LIST):
+ if top_k is not None:
+ top_k_mechs = probs.topk(top_k, dim=-1).indices
+ if not (top_k_mechs == m_idx).any():
+ samples_dict[mech] = None
+ stats_dict[mech] = None
+ continue
+
+ T = temperature
+ if temperature_map is not None and mech in temperature_map:
+ T = torch.tensor(temperature_map[mech], dtype=torch.float32)
+
+ s = self.flow_heads[mech].sample(context, n_samples=n_samples,
+ temperature=T)
+ samples_dict[mech] = s
+ stats_dict[mech] = {
+ 'mean': s.mean(dim=1),
+ 'std': s.std(dim=1),
+ 'median': s.median(dim=1).values,
+ 'q05': s.quantile(0.05, dim=1),
+ 'q95': s.quantile(0.95, dim=1),
+ }
+
+ return {
+ 'mechanism_probs': probs,
+ 'mechanism_xdB': xdB,
+ 'mechanism_pred': pred,
+ 'samples': samples_dict,
+ 'stats': stats_dict,
+ }
+
+ def predict_single_mechanism(self, x, mechanism, scan_mask=None,
+ sigmas=None, flux_scales=None, n_samples=1000,
+ temperature=1.0, temperature_map=None,
+ summary=None):
+ """Sample parameters assuming a known mechanism."""
+ context = self.encode_signal(x, scan_mask=scan_mask, sigmas=sigmas,
+ flux_scales=flux_scales, summary=summary)
+ T = temperature
+ if temperature_map is not None and mechanism in temperature_map:
+ T = torch.tensor(temperature_map[mechanism], dtype=torch.float32)
+ samples = self.flow_heads[mechanism].sample(context, n_samples=n_samples,
+ temperature=T)
+ return {
+ 'mean': samples.mean(dim=1),
+ 'std': samples.std(dim=1),
+ 'median': samples.median(dim=1).values,
+ 'q05': samples.quantile(0.05, dim=1),
+ 'q95': samples.quantile(0.95, dim=1),
+ 'samples': samples,
+ }
+
+
+def count_parameters(model):
+ return sum(p.numel() for p in model.parameters() if p.requires_grad)
+
+
+if __name__ == "__main__":
+ n_mechs = len(TPD_MECHANISM_LIST)
+ B, N_beta, T = n_mechs, 3, 500
+
+ x = torch.randn(B, N_beta, 2, T)
+ scan_mask = torch.ones(B, N_beta, T, dtype=torch.bool)
+ sigmas = torch.randn(B, N_beta)
+ flux_scales = torch.randn(B, N_beta)
+ mechanism_ids = torch.arange(n_mechs)
+
+ max_dim = max(TPD_MECHANISM_PARAMS[m]['dim'] for m in TPD_MECHANISM_LIST)
+ mech_theta = torch.randn(B, max_dim)
+ mech_theta_mask = torch.zeros(B, max_dim, dtype=torch.bool)
+ for i, mid in enumerate(mechanism_ids):
+ d = TPD_MECHANISM_PARAMS[TPD_MECHANISM_LIST[mid]]['dim']
+ mech_theta_mask[i, :d] = True
+
+ print("=" * 60)
+ print("Testing MultiMechanismFlowTPD (multi-heating-rate, Set Transformer)")
+ print("=" * 60)
+
+ model = MultiMechanismFlowTPD(
+ d_context=128,
+ d_model=128,
+ n_coupling_layers=8,
+ hidden_dim=128,
+ coupling_type='affine',
+ )
+
+ total_params = count_parameters(model)
+ print(f"Total parameters: {total_params:,}")
+ print(f" Encoder: {count_parameters(model.encoder):,}")
+ print(f" Classifier: {count_parameters(model.classifier):,}")
+ for mech in TPD_MECHANISM_LIST:
+ print(f" Flow ({mech}, dim={TPD_MECHANISM_PARAMS[mech]['dim']}): "
+ f"{count_parameters(model.flow_heads[mech]):,}")
+
+ out = model(x, mechanism_ids, mech_theta, mech_theta_mask,
+ scan_mask=scan_mask, sigmas=sigmas, flux_scales=flux_scales)
+ print(f"\nForward pass:")
+ print(f" Logits shape: {out['logits'].shape}")
+ print(f" NLL shape: {out['nll'].shape}")
+ print(f" NLL values: {out['nll']}")
+
+ pred = model.predict(x, scan_mask=scan_mask, sigmas=sigmas,
+ flux_scales=flux_scales, n_samples=100)
+ print(f"\nPrediction:")
+ print(f" Mechanism probs shape: {pred['mechanism_probs'].shape}")
+ print(f" Mechanism xdB shape: {pred['mechanism_xdB'].shape}")
+ print(f" Predicted mechanisms: {pred['mechanism_pred']}")
+ for mech in TPD_MECHANISM_LIST:
+ if pred['samples'][mech] is not None:
+ print(f" {mech} samples shape: {pred['samples'][mech].shape}")