# Independent ionized-nebula science / 电离星云独立复算

This package contains own MIT Python and synthetic figures. It contains no
App/Engine, Cloudy source/library, atomic data table, native zone array,
original paper or real observation. No command below downloads data or
launches a native physical calculation.

本包只含自有MIT Python与合成图，不含App/Engine、Cloudy源代码/库、原子表、
原生壳层、论文或真实观测。下面的命令不联网，也不启动原生物理求解。

## Requirements / 依赖

Core numerical and saved-shell calculations: Python 3.10+ standard library;
actually tested with Python 3.12.12. Optional figures: NumPy 2.4.4 and
Matplotlib 3.10.8 in an existing compatible environment. Those dependencies
are not bundled; the core and fixture checks do not need them.

核心数值与保存壳层积分仅需Python标准库，实际使用3.12.12检查。可选重画图
使用已有环境中的NumPy 2.4.4和Matplotlib 3.10.8；包中没有这些依赖，也不假称
全新环境已离线安装。没有绘图库仍可完成核心与合成保存文件检查。

## Actual offline calculation / 实际离线计算

From the extracted package root / 从解压后的包根目录执行：

```sh
python science/recompute.py --output results/ideal
python science/validate_reader.py --output results/self-check
```

The first command recalculates scales, ideal on/off ion history, backward
Euler convergence, independent RK4 source-off and positive projected-area
integration. It retains the dt.01 accuracy failure even though the photon
residual is small. The second independently generates synthetic 16/32-shell
files, integrates them, compares to the exact uniform-sphere volume and
keeps a print-interval UNDETERMINED example plus invalid-input refusals.
These fixtures are generated here; they are not Cloudy output.

第一条命令真正重算尺度、理想开关时序、隐式步进收敛、独立RK4关源解和正的
投影面积积分。步长.01的精度失败继续保留。第二条命令实际生成16/32层合成
保存文件，检查解析球体积及区间算法，并保留未确定与输入拒绝。这些是合成
格式练习，不是Cloudy跑出的模型。

Optional figure regeneration / 可选重画图：

```sh
python science/plot_references.py --results results/ideal --output results/figures
```

Three figures in desktop/mobile SVG layouts use those own analytic inputs. They do not reproduce
author figures, raw observations or a native Cloudy image.

## Local native saved files / 本地原生保存文件

If you already have matching saved native files, use:

```sh
python science/inspect_native.py --model-dir /your/local/base --output results/native-base.json
python science/inspect_native.py --model-dir /your/local/atomic --output results/native-atomic.json
python science/inspect_native.py --model-dir /your/local/space --output results/native-space.json
python science/compare_axes.py results/native-base.json results/native-atomic.json --output results/atomic-axis.json
python science/compare_axes.py results/native-base.json results/native-space.json --output results/space-axis.json
```

These commands require actual `first.rad` and `first.emis` inputs; they are
not shipped and are not fabricated if missing. Expected radial columns:
NZONE, radius, depth, dr in cm. Emissivity columns: depth followed by H1
4861.32A/6562.80A and CaB4861.32A/6562.80A energy emission in
erg cm^-3 s^-1. Inspect the model's physical input/version first.

这些命令需要本地真实存在的first.rad与first.emis，缺少时会明确失败，不会由
内置常数补成原生解。它们只重算体积光度与完整打印区间，不重新认证全电荷、
入射/弥散光子、温度解或整个九点网格。若要得到新的原生解，还需相应版本工具链
和检查过的输入/保存配置，本包不提供它们。

## Current evidence / 当前证据

Two completed fixed native nodes were privately calculated from original
Cloudy C25 commit fb07fa7142af77846af521753622453fb551bef7:
Q49/nH100 and Q48/nH30. Each has separate atomic and spatial controls passing
the original four-line ±.002 print-interval gate. A complete nine-node grid,
joint error certificate, and complete atomic-source/diffuse certification
are not delivered. Later attempts stopped without physical zones: one had
a wall-cap overrun; a distinct new phase failed its supervision-gap gate.
The failures and twenty unstarted cases in each stopped queue are retained.

两个已完成节点及各自两条细化轴是有限证据。完整九点网格仍未交付，两次后续
停止均保留，不能靠这一小包或返回码把它们改成通过。教学解析常数为给定输入，
不冒充新原子系数、已运行Cloudy网格或网页交互引擎。

`compare_axes.py` returns 0 only when every whole interval is inside its
named single-axis gate; otherwise it returns 2 with FAIL/UNDETERMINED
distinguished per line. A PASS does not establish a combined two-axis error.

## Provenance / 来源

- Pogge: https://www.astronomy.ohio-state.edu/pogge.1/Ast871/Notes/Ionized.pdf
- Shapiro et al. fixed v2: https://arxiv.org/abs/astro-ph/0507677v2
- Cloudy fixed source: https://gitlab.nublado.org/cloudy/cloudy/-/tree/fb07fa7142af77846af521753622453fb551bef7
- Baron et al. fixed first preprint: https://arxiv.org/html/2610.07163v1

References are links, not bundled bodies. The two-channel filtering figure
is our own synthetic illustration; no metal-line calculation is claimed.
