---
title: "复算亮汽笛与暗汽笛的哈勃常数"
description: "用公开的距离样本复算GW170817的结果，再在合成宇宙里检验亮汽笛和暗汽笛推断是否校准。"
canonical_url: "https://sandboxphysics.com/zh/stories/standard-sirens/recomputing-bright-and-dark-siren-h0/"
language: "zh-CN"
page_type: "story"
alternate_languages:
  en: "https://sandboxphysics.com/stories/standard-sirens/recomputing-bright-and-dark-siren-h0/"
last_modified: "2026-11-14"
---

[引力波标准汽笛](https://sandboxphysics.com/zh/stories/standard-sirens/)

# 复算亮汽笛与暗汽笛的哈勃常数

Sandbox Physics · 2026-11-14

用GW170817公开的GWTC-1距离样本，加上一个高斯形式的哈勃流速度，我们复算出的亮汽笛后验峰值在 $68.5\,\mathrm{km\,s^{-1}\,Mpc^{-1}}$，最短68.3%区间从 $60.9$ 到 $86.4$。公布值是 $70.0^{+12.0}_{-8.0}$，差别可以用下文列出的两处简化来解释。在合成宇宙里，同一套推断加上选择归一化后，亮汽笛和暗汽笛都是校准的；去掉它就有偏。

[打开标准汽笛Lab](https://sandboxphysics.com/zh/labs/gravitational-wave-standard-sirens/)

本指南列出每一项输入、命令、版本、输出和失败案例，方便你把两部分都重做一遍。物理原理见[从一个距离和一个红移到哈勃常数](https://sandboxphysics.com/zh/stories/standard-sirens/from-distance-to-hubble-constant/)和[暗汽笛、星系星表与选择归一化](https://sandboxphysics.com/zh/stories/standard-sirens/dark-sirens-and-selection-effects/)。

## 哪些是真实数据，哪些是合成的

**表 5.1** 本指南的两部分。

| 部分 | 数据 | 性质 |
| --- | --- | --- |
| GW170817亮汽笛 | LVK的GWTC-1后验样本，天区固定在对应体位置 | 真实探测器数据，由LVK重新分析 |
| 哈勃流速度 | 发现论文给出的 $3017\pm166\,\mathrm{km\,s^{-1}}$ | 已发表的测量 |
| 校准研究 | 由我们的脚本抽取的事件、星系和噪声 | 合成数据，注入的宇宙学已知 |
| 参考事件 | 列出的十个星系速度和两个振幅 | 合成数据，用来与Lab交叉核对 |

样本来自GWTC-1数据发布，文档号LIGO-P1800370，第5版，文件名GW170817\_GWTC-1.hdf5。页面没有写明许可，所以我们不转发这个文件。脚本会自己下载，SHA-256摘要不符就拒绝运行。[LIGO and Virgo, LIGO-P1800370-v5: Parameter estimation sample release for GWTC-1](https://dcc.ligo.org/LIGO-P1800370/public)

## 运行环境

我们在macOS上用Python 3.9.6、NumPy 1.26.4、SciPy 1.13.1和h5py 3.14.0运行全部脚本。距离单位是百万秒差距，速度单位 $\mathrm{km\,s^{-1}}$，哈勃常数单位 $\mathrm{km\,s^{-1}\,Mpc^{-1}}$。下载的文件和脚本要放在不同的文件夹里。

```
mkdir -p siren-check/data siren-check/scripts
cd siren-check/scripts
curl --remote-name-all "https://sandboxphysics.com/stories/standard-sirens/materials/{siren_model.py,synthetic_siren_study.py,recompute_gw170817_bright_siren.py,study-inputs.json}"
python3 -m venv ../venv && ../venv/bin/pip install numpy==1.26.4 scipy==1.13.1 h5py==3.14.0
```

这几个文件是[siren\_model.py](https://sandboxphysics.com/zh/stories/standard-sirens/materials/siren_model.py)、[synthetic\_siren\_study.py](https://sandboxphysics.com/zh/stories/standard-sirens/materials/synthetic_siren_study.py)、[recompute\_gw170817\_bright\_siren.py](https://sandboxphysics.com/zh/stories/standard-sirens/materials/recompute_gw170817_bright_siren.py)和[study-inputs.json](https://sandboxphysics.com/zh/stories/standard-sirens/materials/study-inputs.json)。

## 第一步：复算GW170817

```
../venv/bin/python recompute_gw170817_bright_siren.py ../data/GW170817_GWTC-1.hdf5 gw170817-outputs.json
```

文件不存在时脚本会自动下载，并核对摘要：

```
eff59472991bb0f0fa8c1e58057093ce07b82eb4c112364e3578ba16fe54eca9
```

脚本读取低自旋和高自旋两组运行的距离样本。这些样本按正比于 $d^2$ 的先验抽取，与发现论文用的先验相同，所以对距离的积分变成样本平均：

$$
p(H_0\mid x,v_H)\propto p(H_0)\,\frac1S\sum_{s=1}^{S}\exp\!\left[-\frac{(v_H-H_0d_s)^2}{2\sigma_v^2}\right],
$$

其中 $v_H=3017$，$\sigma_v=166$，$S$ 是样本数。发现论文说明，先验放在距离上时选择项是常数。[Abbott et al., A gravitational-wave standard siren measurement of the Hubble constant, Methods](https://arxiv.org/abs/1710.05835v1)

**表 5.2** 结果，取自[gw170817-bright-siren-outputs.json](https://sandboxphysics.com/zh/stories/standard-sirens/materials/gw170817-bright-siren-outputs.json)。区间是网格步长 $0.05$ 上的最短68.3%区间。

| 运行 | 样本数 | 距离中位数与16%至84%区间 | 先验 | 峰值 | 区间 |
| --- | --- | --- | --- | --- | --- |
| 低自旋 | $8078$ | $40.0$，$30.8$ 至 $45.4\,\mathrm{Mpc}$ | $1/H_0$ | $68.5$ | $60.9$ 至 $86.4$ |
| 低自旋 | $8078$ | 同上 | 平坦 | $69.2$ | $61.2$ 至 $91.9$ |
| 高自旋 | $4041$ | $41.7$，$34.6$ 至 $45.7\,\mathrm{Mpc}$ | $1/H_0$ | $68.3$ | $61.3$ 至 $80.6$ |
| 公布值 |  | $43.8^{+2.9}_{-6.9}\,\mathrm{Mpc}$ | $1/H_0$ | $70.0$ | $62.0$ 至 $82.0$ |

低自旋后验的均值为 $80.9$，公布值为 $78$。

## 我们的数为什么和公布值不同

发现论文用的是写作时已有的参数估计，距离为 $43.8^{+2.9}_{-6.9}\,\mathrm{Mpc}$。GWTC-1样本是后来的重新分析，低自旋距离中位数为 $40.0\,\mathrm{Mpc}$。距离变短，多数样本对应的 $H_0$ 变大，高值一侧也变宽。发现论文还把测得的退行速度和本动速度分成两项建模，$v_p$ 取 $-1000$ 到 $1000\,\mathrm{km\,s^{-1}}$ 之间的平坦先验，而我们只用一个高斯。[Abbott et al., A gravitational-wave standard siren measurement of the Hubble constant, Methods, Eqs. 4 to 9](https://arxiv.org/abs/1710.05835v1) 两处简化各自造成多少差别，我们没有检验。请把我们的数当作放在已发表结果旁边的一次复算。

## 第二步：在合成宇宙里校准

```
../venv/bin/python synthetic_siren_study.py study-inputs.json synthetic-study-outputs.json
```

在一台笔记本上运行用了51秒。模型是有意简化的：每个事件记录为两个偏振振幅，叠加单位高斯噪声；探测阈值是信噪比 $12$；宇宙学是 $\Omega_m=0.3$ 的平直模型，星表止于 $z=0.07$。相位、偏振角和啁啾质量都当作已知。随机种子为 $71154$，重跑得到完全相同的数。

**表 5.3** 主要输入，取自study-inputs.json。

| 输入 | 取值 |
| --- | --- |
| 源正对、位于 $100\,\mathrm{Mpc}$ 时的信噪比 | $15$ |
| 本动速度弥散 | $200\,\mathrm{km\,s^{-1}}$ |
| $H_0$ 的先验 | 平坦，$20$ 至 $160$ |
| 亮汽笛与暗汽笛试验次数 | $400$，$250$ |
| 每个暗汽笛星表的星系数 | $40$ |
| 选择检验的蒙特卡罗事件数 | $400000$ |

**表 5.4** 结果，取自[synthetic-study-outputs.json](https://sandboxphysics.com/zh/stories/standard-sirens/materials/synthetic-study-outputs.json)。预期覆盖率 $0.683$。

| 检验 | 结果 | 是否通过 |
| --- | --- | --- |
| $H_0=70$ 时的选择比例 | 蒙特卡罗 $0.02189\pm0.00023$，数值积分 $0.02179$ | 是 |
| $\rho_{100}=4$ 时的 $\beta(80)/\beta(40)$ | $7.92$，预期 $8$ | 是 |
| 亮汽笛，含 $\beta$ | 覆盖率 $0.700$，KS $p=0.083$ | 是 |
| 亮汽笛，不含 $\beta$ | 覆盖率 $0.653$，KS $p=1.2\times10^{-9}$ | 否，符合预期 |
| 暗汽笛，含星表 $\beta$ | 覆盖率 $0.728$，KS $p=0.85$ | 是 |
| 暗汽笛，不含 $\beta$ | 覆盖率 $0.384$，KS $p=8\times10^{-42}$ | 否，符合预期 |
| $H_0=70$ 处40个亮汽笛事件，含 $\beta$ | $71.9$，$70.3$ 至 $73.8$ | 相符 |
| $H_0=70$ 处40个暗汽笛事件，含 $\beta$ | $67.9$，$65.3$ 至 $70.6$ | 相符 |

同样的文件里还有一个固定的参考事件。Lab背后的浏览器模型复现它的距离、亮汽笛和暗汽笛后验，与Python结果的差别分别在 $0.5$、$0.6$ 和 $1.5$ 以内，仓库里有一项测试专门检查这一点。

## 失败案例

输出里有意包含三个失败案例。

1. 忽略选择效应。见表5.4第4行和第6行。不含 $\beta$ 的40事件暗汽笛结果停在先验边界 $159$。
2. 宿主不在星表里，分析又没有星表外的项。覆盖率 $0.55$，KS $p=1.9\times10^{-8}$，还有一条后验处处没有支撑。
3. 低估本动速度弥散，假定 $100$、真实 $500$，$\rho_{100}=60$。覆盖率 $0.64$，KS $p=0.43$：模型错了，检验却通过了。我们把它当作检验本身的局限来报告，而不是模型的成功。

暗汽笛试验还重抽了250个星表中的51个，这些星表里没有任何星系能产生可探测的事件。脚本的早期版本对这个循环没有设上限，跑了几个小时也没结束。

## 本指南没有复现什么

我们没有在应变数据上重做参数估计，没有为探测网络建模，合成星表里没有星系成团、光度加权或不完备性，也没有用质量的族群模型。GW170817的速度直接取自论文，没有从星系巡天重新推出。有这些局限，合成结果检验的只是推断逻辑本身。

## 在Lab里试一试

在默认事件上多按几次“换一组噪声”，记下亮汽笛中位数移动多远，再和读数给出的区间比一比。 [打开标准汽笛Lab](https://sandboxphysics.com/zh/labs/gravitational-wave-standard-sirens/)

## 来源

1. [LIGO and Virgo, LIGO-P1800370-v5: Parameter estimation sample release for GWTC-1](https://dcc.ligo.org/LIGO-P1800370/public)
2. [Abbott et al., A gravitational-wave standard siren measurement of the Hubble constant, Methods](https://arxiv.org/abs/1710.05835v1)

## 继续阅读

引力波标准汽笛 · 阅读路径

### 从波的振幅到哈勃常数

1. [文章 **一列引力波，怎么自己报出它有多远？**](https://sandboxphysics.com/zh/stories/standard-sirens/measuring-distance-with-gravitational-waves/)
2. [文章 **波形振幅、轨道倾角与光度距离**](https://sandboxphysics.com/zh/stories/standard-sirens/waveform-amplitude-and-luminosity-distance/)
3. [文章 **从一个距离和一个红移到哈勃常数**](https://sandboxphysics.com/zh/stories/standard-sirens/from-distance-to-hubble-constant/)
4. [文章 **暗汽笛、星系星表与选择归一化**](https://sandboxphysics.com/zh/stories/standard-sirens/dark-sirens-and-selection-effects/)
5. [当前页面 **复算亮汽笛与暗汽笛的哈勃常数**](https://sandboxphysics.com/zh/stories/standard-sirens/recomputing-bright-and-dark-siren-h0/)
6. [文章 **读懂GWTC-3暗汽笛宇宙学论文**](https://sandboxphysics.com/zh/stories/standard-sirens/reading-the-gwtc3-dark-siren-cosmology-paper/)
