克尔黑洞周围物质的引力辐射
kerrgeodesic-gw的Python项目详细描述
克尔测地线
计算kerr黑洞周围物质引力辐射的SageMath包
这个包使用了通过SageManifolds项目开发的sagemath功能,是Black Hole Peturbation Toolkit项目的一部分。
安装
要求
这个包需要基于python的自由数学软件系统SageMath(至少8.2版)。
nb:ubuntu 18.04附带的sagemath版本只有8.1;而不是
ubuntu包sagemath
,然后为ubuntu 18.04安装最新的二进制文件
来自SageMath download page。
从pypi
简单安装运行就足够了
sage -pip install kerrgeodesic_gw
准备好在sagemath中使用的包。 但是,如果要构建 本地版本的文档或修改源文件(开发)。
nb:在CoCalc云计算平台上,您需要
要添加选项--user
,请打开终端并运行
sage -pip install --user kerrgeodesic_gw
这是pypi(python包索引)上的kerrgeodesic_gw page。
从源安装
从git存储库下载源代码:
git clone https://github.com/BlackHolePerturbationToolkit/kerrgeodesic_gw.git
这将创建一个目录kerrgeodesic_gw
。
运行
sage -pip install --upgrade --no-index -v kerrgeodesic_gw
在sagemath中安装软件包。
上面命令的快捷方式由与包一起分发的Makefile
提供:
cd kerrgeodesic_gw
make install
nb:在CoCalc上,您需要添加选项--user
,即打开一个终端并运行
git clone https://github.com/BlackHolePerturbationToolkit/kerrgeodesic_gw.git
sage -pip install --user --upgrade --no-index -v kerrgeodesic_gw
安装用于开发
如果计划编辑包源,则应将选项-e
添加到p i p安装,即运行
sage -pip install --upgrade --no-index -v -e kerrgeodesic_gw
或等效
cd kerrgeodesic_gw
make develop
用法
安装包后,您可以在sagemath中使用它,例如:
sage: from kerrgeodesic_gw import spin_weighted_spherical_harmonic
sage: theta, phi = var('theta phi')
sage: spin_weighted_spherical_harmonic(-2, 2, 1, theta, phi)
1/4*(sqrt(5)*cos(theta) + sqrt(5))*e^(I*phi)*sin(theta)/sqrt(pi)
测试
这个包是为在源文件的文档字符串中编写的测试配置的,也称为doctests。
然后,您可以从包树的根目录运行来测试安装
(即由git clone
创建的kerrgodesic_gw目录),
sage -t kerrgeodesic_gw
然后您应该得到消息All tests passed!
或者,您可以运行(从同一目录中)
make test
文档
可以使用sagemath的Sphinx安装生成包文档:
cd docs
sage -sh -c "make html"
上面的速记是
make doc
HTML参考手册位于
kerrgeodesic_gw/docs/build/html/index.html
对于乳胶文档,请使用
make doc-pdf
然后,PDF参考手册
kerrgeodesic_gw/docs/build/latex/kerrgeodesic_gw.pdf
在线文档
Article describing the formulas implemented in the package(开放存取)
演示笔记本:
对于 KerrBH 类,请参见以下示例: Kerr 1, Kerr 2, Kerr 3, 更普遍的是SageManifolds documentation。
作者
- 埃里克·古古尔洪
- 亚历山大勒蒂克
- 弗雷德里克·文森特
- 尼尔斯·沃伯顿
参考:e.gourgoulhon,a.le tiec,f.h.vincent&n.warburton:绕银河系中心黑洞运行的天体的引力波及其由lisa探测的能力,A&A 627, A92 (2019)(预印本:arXiv:1903.02049)