ErrorFields - FEATURE - Add a range-linearity check and per-coil scan controls to the tolerance Monte Carlo
维护者通常 3 天内回复
@logan-nc 已经在做这个了。
开始于 2026年9月26日。
评估
这个 Issue 还没有评估数据。
描述
Plan for the first ErrorFields follow-up after the current stack (#449 … #462, #473) merges into develop. Branch from develop then; do not stack it on the open PRs, since every item touches _resolve_terms in MonteCarlo.jl. Items come from the capability audit of the OMFIT error-field scripts against the Julia stack; each is small, and together they are one PR. Estimates are lines of source.
1. Range-linearity check (~40). The linear sensitivity model is asserted only locally: Sensitivity.jl stores a second-difference ratio at the finite-difference step, normalized by the set's largest first difference. Nothing checks that δ is linear out to the tolerance edge (and the cylinder tilt reach, and a coherent group's combined displacement), which is the premise every post-hoc sweep rests on; the reference scripts found S-curves at large tilts. Add linearity_check(ctx, coil_sets, tolerances; scales=(1, 2)) that evaluates applied_spectrum at ±scale·tol per degree of freedom and reports the relative error of the stored linear prediction, plus a plot sharing the loader of plot_linearity_residuals. Linearity in current needs no check (Biot–Savart). Open choice: check at each coil's own tolerance and twice it, or also at the largest scale of the tolerance scan; leaning to both ends of the scan.
2. Per-coil scan controls (~10). tolerance_scale multiplies every active coil and coil_subset sets the inactive ones to zero tolerance (_resolve_terms, active(t.name) || continue), so "scan class A while class B holds its own tolerance" is not expressible, and that is the reference's primary product plot. Let tolerance_scale accept a per-coil map (or add scale_subset: the coils the scale applies to, the rest at 1×), and make inactive coils hold their tolerance instead of dropping it. Open choice, to decide when implementing: key the map by coil name (no schema change) or add a class field to the tolerance TOML so it is keyed by class.
3. Coherent-group tilt_lever_arm_m (~5). A group tilt tolerance given in metres is converted through a member's major radius (group_tilt_deg, which now requires the members' radii to agree within 1 %). For a group representing a reference structure, the lever arm is a property of that structure, not of any member coil. Add an optional tilt_lever_arm_m key on [[ErrorFields.coherent_group]] that takes precedence over the member radius.
4. Per-coil current_factor (~10). A map applied to delta_nominal per coil in _resolve_terms, so the risk against the current in an uncorrectable coil (the reference's risk_vs_remc) is a user loop over run_monte_carlo. Also needs a keyword copy of ToleranceSet (or map_tolerances(f, ts), ~20) so sigmas and the unattributed budget can be varied programmatically; tolerance_scale deliberately does not touch them.
5. Monte Carlo validity tests (~30 of tests). None of the current tests would catch a systematic binning bias, which is exactly the bug the reference scripts had (risk moved with nsample while the batch spread said it should not). Add: Monte Carlo against the closed-form erfc risk for a Gaussian |δ| (synthetic table) × Gaussian threshold at several amplitudes where the true risk is well below a percent, agreement within batch spread; plock at nbins = 300 vs 3000 within spread; nsample convergence with the spread shrinking as √N. A shipped risk_convergence(...) diagnostic returning plock against nsample and nbins with spread is the same 30 lines.
Verification: the tolerance TOML, Monte Carlo and error-fields test files; the regression harness on diiid_n1 and diiid_error_field must be unchanged (defaults keep today's behaviour). Review package with the linearity and convergence figures on the DIII-D-like example.
- 主要语言
- Julia
- 星标
- 11
- 派生
- 7
- 平均合并
- 4 天 1 小时
- 30 天内合并 PR
- 68
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenFUSIONToolkit/GPEC 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 82/100
OpenFUSIONToolkit/GPEC#644 ·
维护者通常 3 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
OpenFUSIONToolkit/GPEC#643 ·
维护者通常 3 天内回复
-
PerturbedEquilibrium - FEATURE - Complete the resistive perturbed-equilibrium workflow from Galerkin and matched results可能已有人在做 @matt-pharr 于 1 天前认领。 未关闭feature
OpenFUSIONToolkit/GPEC#635 · 1 条评论 · 已指派 1 人 ·
维护者通常 3 天内回复
-
test
难度 4/5 3-5 天 新手友好度 25/100
OpenFUSIONToolkit/GPEC#633 · 2 条评论 ·
维护者通常 3 天内回复
-
Tearing - FEATURE - Add a general modified Rutherford equation for island evolution可能已有人在做 @StuartBenjamin 于 1 天前认领。 未关闭feature
OpenFUSIONToolkit/GPEC#630 · 已指派 1 人 ·
维护者通常 3 天内回复
查看 OpenFUSIONToolkit/GPEC 的全部 Issue
相似的 Issue
-
`ShallowWaterModel` allocates ~9 KiB per grid point per RK3 stage on the CPU可能已有人在做 @ali-ramadhan 今天认领。 未关闭performance 🏍️
难度 2/5 1-3 小时 新手友好度 62/100
CliMA/Oceananigans.jl#6421 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
JuliaQUBO/QUBOLib.jl#105 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
NCAR/musica#1118 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
`AMSGrad` state starts at `epsilon` instead of zero, so zero gradients move parameters and small gradients are damped可能已有人在做 @parth-patel010 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
FluxML/Optimisers.jl#247 · 1 条评论 ·
-
README should say that row and column order must match可能已有人在做 @SAUMYARSH 于 1 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 84/100