HomeDocs-Technical WhitePaper06-EFT.WP.Core.DataSpec v1.0

Chapter 2 — Schemas and the Field Dictionary


I. Type System and Fundamental Constraints


II. Field-Entry Structure and Registration Workflow

  1. Minimal field-entry set:
    name, desc, type, unit, dim, nullable, default, aliases, roles, see.
  2. Entry naming rules: use snake_case, ASCII, lowercase; do not place units or dimensions in name—declare them only in unit and dim.
  3. Role annotation: roles ⊆ {key,time,geom,measure,quality,mask,meta,index}.
  4. Registration workflow (I60):
    • Create entries with register_field(name, type, unit, dim, desc, aliases).
    • Assemble schema via register_schema(name, version, fields, constraints, units, pk, idx, see).
    • Validate persisted data with validate_dataset(schema, ds, strict=True).
    • Publish and freeze with export_schema(SRef,"yaml").

III. Unit and Dimension Binding

  1. Binding requirements:
    • Any field that participates in equations must specify unit(•) and dim(•) and pass check_dim( y - f(x; theta) ).
    • Only affine unit conversions are allowed: v_to = a * v_from + b, with b ≠ 0 only for zero-offset pairs (e.g., degC ↔ K).
    • Under the convention t0 = L0 / c_ref, the integrand ( n_eff / c_ref ) * d ell can be written as bar_n_eff * d bar_ell and treated as dimensionless, where bar_n_eff = n_eff and d bar_ell = d ell / L0.
  2. Arrival-time dual binding:
    • Constant-factored: T_arr = ( 1 / c_ref ) * ( ∫_gamma n_eff d ell )。
    • General form: T_arr = ( ∫_gamma ( n_eff / c_ref ) d ell )。
    • Difference metric:
      delta_form = | ( 1 / c_ref ) * ( ∫_gamma n_eff d ell ) - ( ∫_gamma ( n_eff / c_ref ) d ell ) |。

IV. Nullability, Defaults, and Missingness


V. Standard Field Dictionary (40 Examples)


VI. Composite Types and Structured Fields


VII. Contracts and Validation Mapping

Typical contracts (map to assert_contract):

VIII. Indexing and Ordering

  1. Required indexes:
    • Time series: idx(ts) and composite idx(uid, ts).
    • Path series: idx(pid, ell); optional spatial index idx(lon, lat).
  2. Order preservation: persisted/exported order follows the primary key or (pid, ell) / (uid, ts) to guarantee idempotent replay.

IX. Binding Essentials for Arrival-Time Datasets

  1. Required fields: pid, ell, n_eff (if available), c_ref, ts (if time-varying) plus geometries and CRS.
  2. Compute and verify:
    • Compute T_arr under the chosen form;
    • Compute delta_form and compare to threshold;
    • Validate T_arr via check_dim against "[T]";
    • Write RefCond and the path measure d ell into the manifest.

X. Schema Evolution and Compatibility

  1. Semantic versioning: major=breaking, minor=backward compatible, patch=docs/metadata fixes.
  2. Evolution rules:
    • Field rename: keep the old name in aliases for at least one release cycle; supply a map via diff_datasets.
    • New fields: must default nullable=True or supply a default.
    • Field removal: major+1 and provide a compatibility layer in import_manifest.

XI. Field-Entry Template (Text)

name=<snake_case>; type=<dtype>; unit=<SI|1|compound>; dim=<dimstr>; nullable=<True|False>; default=<value|None>; roles={<...>}; aliases=[...]; desc=<one-line>; see=[<Sxx-?>,<I60-?>,<DS.*>]

XII. Unit/Dimension Binding Examples (20 cases)


XIII. Interface Crosswalk (I60-*)


Copyright & License (CC BY 4.0)

Copyright: Unless otherwise noted, the copyright of “Energy Filament Theory” (text, charts, illustrations, symbols, and formulas) belongs to the author “Guanglin Tu”.
License: This work is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0). You may copy, redistribute, excerpt, adapt, and share for commercial or non‑commercial purposes with proper attribution.
Suggested attribution: Author: “Guanglin Tu”; Work: “Energy Filament Theory”; Source: energyfilament.org; License: CC BY 4.0.

First published: 2025-11-11|Current version:v5.1
License link:https://creativecommons.org/licenses/by/4.0/