目录文档-技术白皮书(V5.05)33-EFT.WP.Cosmo.EarlyObjects v1.0

附录D 参考实现与测试脚本清单


I. 一句话目标

一句话目标:提供与模板 v0.1接口族一致的最小参考实现与测试脚本清单,给出目录、入口、配置、运行与审计规范,使 Catalog/Seeds/Trajectory、Phi_T/grad_Phi_T、L_nu/LC、n_eff、{ ell_i }、Delta_T_sigma、{R_env,T_trans,A_sigma} 与两类 T_arr/Delta_T_arr 的端到端流程可落地、可复现、可审计


II. 适用范围与非目标


III. 目录结构(建议)

ref_eo/ 参考实现根目录
  1. core/ 物理与数值核心
    • catalog.py(I.Build.Catalog → build_early_object_catalog)
    • seed.py(I.Build.Seeds|Triggers → seed_and_trigger)
    • evolve.py(I.Build.* → evolve_object_state)
    • sed.py(I.Build.Phi/谱 → synthesize_spectrum)
    • transport.py(I.Arrival.Constant|General|Delta → predict_arrival_signature)
    • interfaces.py(I.Interface.ApplyMatching|I.Path.Segment|I.Path.InterfaceCorrection → detect_interfaces,segment_integrals,interface_correction_sea)
    • rt.py(I.RT.Estimate → estimate_energy_triplet)
    • metrics.py(I.Consistency.DualMode|ThinThick/I.Uncertainty.GUM|MC → check_dual_arrival_consistency,consistency_thin_vs_thick_EO,propagate_uncertainty_GUM,propagate_uncertainty_MC)
  2. io/ 数据与契约
    • contract.py(Contract 读写/校验/DimReport 生成)
    • dataio.py(读写 Catalog/Seeds/Trajectory/SeaProfile/Path/Observations 等)
    • hashing.py(hash(Catalog/Seeds/Trajectory/SeaProfile/Phi_T/n_eff/gamma/code))
  3. utils/ 通用工具
    • solvercfg.py(求积法/步长阈值/并发策略构建)
    • logger.py(I.Report.Log|Emit → log_artifacts_EO,emit_measurement_report)
    • rng.py(MC 可播种随机源)
  4. scripts/ 基准与测试脚本(见 V)
  5. configs/ 运行配置与样例(见 VII)
  6. artifacts/ 结果与审计产物(日志、报告、哈希清单、重放清单)

命名隔离:严禁将 T_fil 与 T_trans 混用,严禁将 n 与 n_eff 混用;入口强制 n_eff ≥ 1 与量纲核查。


IV. 核心接口(模板接口族 → 本卷 I70-*)

统一约束:入口 check_dimension;校验 T_arr ≥ L_path/c_ref 与 R_env + T_trans + A_sigma = 1;分段端点 { ell_i } 显式入积禁止跨界面插值


V. 脚本清单与用途(最小集)


VI. 运行示例(CLI)

python scripts/run_catalog.py --contract configs/eo.contract.json --out artifacts/catalog/

python scripts/run_seed.py --contract configs/eo.contract.json --priors configs/priors.json --out artifacts/seeds/

python scripts/run_evolve.py --contract configs/eo.contract.json --catalog artifacts/catalog/catalog.json --seeds artifacts/seeds/sd.json --out artifacts/traj/

python scripts/run_spectrum.py --contract configs/eo.contract.json --traj artifacts/traj/trajectory.jsonl --fgrid configs/fgrid.json --out artifacts/sed/

python scripts/run_transport.py --contract configs/eo.contract.json --path paths/p001.path.jsonl --phi fields/phi_t.zarr --gphi fields/grad_phi_t.zarr --sea seaprofile/sea.v1.json --out artifacts/transport/

python scripts/run_dual_consistency.py --contract configs/eo.contract.json --path paths/p001.path.jsonl --neff fields/neff.zarr --cref calib/c_ref.json --out artifacts/consistency/

python scripts/run_dispersion.py --contract configs/eo.contract.json --obs obs/p001.obs.jsonl --fgrid configs/fgrid.json --out artifacts/dispersion/

python scripts/run_thin_vs_thick.py --contract configs/eo.contract.json --path paths/p001.path.jsonl --sea seaprofile/sea.v1.json --out artifacts/switch/

python scripts/run_uncertainty_gum.py --contract configs/eo.contract.json --inputs artifacts/transport/results.json --out artifacts/uncertainty/gum/

python scripts/run_uncertainty_mc.py --contract configs/eo.contract.json --inputs artifacts/transport/results.json --nsamples 20000 --seed 20250905 --out artifacts/uncertainty/mc/

python scripts/run_report.py --manifest artifacts/manifest.json --out artifacts/report/


VII. 配置样例(最小可用)

{

"spec_version":"EFT.WP.Cosmo.EarlyObjects v1.0",

"coords_spec":"Comoving-Spherical",

"units_spec":{"length":"m","time":"s","speed":"m·s^-1","frequency":"Hz"},

"metric_spec":{"type":"FLRW-like","S_k":"sin","a_ref":1.0},

"mode":"constant",

"gauge":{"x_ref":[0,0,0],"t_ref":"2025-01-01T00:00:00Z"},

"tolerances":{"eps_T":1e-9,"eta_T":5e-10,"eta_w":0.03,"tau_switch":5e-12}

}

{"BHSeed":{"M0":{"dist":"lognormal","mu":2e4,"sigma":0.3},"a_bh0":{"dist":"uniform","low":0.1,"high":0.9}}}

{"quad":"adaptive_simpson","step_rule":"curvature_medium_layer",

"tau_geom":0.02,"tau_medium":0.01,"tau_sea":0.005,

"convergence":{"levels":[1.0,0.5,0.25],"eps_T":1e-9},

"parallel":{"freq":"threads","paths":"threads"}}

{"f0":1.0e9,"band":[-5.0e7,5.0e7],"nodes":[9.5e8,1.0e9,1.05e9]}


VIII. 输出与审计(最小集)


IX. 复现流程(一键重放)

python scripts/run_report.py --manifest artifacts/manifest.json --out artifacts/report/


X. 安全与完整性


XI. 模板接口族映射速览(锚定模板 v0.1)

工程映射:参见本卷 I70-* 清单(第 IV 节)。


XII. 交叉引用


XIII. 产出物


版权与许可:除另有说明外,《能量丝理论》(含文本、图表、插图、符号与公式)的著作权由作者(屠广林)享有。
许可方式(CC BY 4.0):在注明作者与来源的前提下,允许复制、转载、节选、改编与再分发。
署名格式(建议):作者:屠广林|作品:《能量丝理论》|来源:energyfilament.org|许可证:CC BY 4.0
验证召集: 作者独立自费、无雇主无资助;下一阶段将优先在最愿意公开讨论、公开复现、公开挑错的环境中推进落地,不限国家。欢迎各国媒体与同行抓住窗口组织验证,并与我们联系。
版本信息: 首次发布:2025-11-11 | 当前版本:v6.0+5.05