Python对ttvfast的包装
项目描述
围绕Katherine Deck的TTVFast C程序(https://github.com/kdeck/TTVFast)的Python包装器
安装
从pypi安装
pip install ttvfast
或下载并使用以下命令编译代码:
python setup.py build_ext --inplace
对于最新开发版本,使用pip安装
pip install git+https://github.com/mindriot101/ttvfast.git
或从git克隆
git clone https://github.com/mindriot101/ttvfast-python.git cd ttvfast-python git submodule init git submodule update # grabs code from TTVFast
然后使用以下命令测试是否构建正确:
$ py.test ============================== test session starts =============================== testing/test_lweiss.py . testing/test_models.py ... testing/test_python_api.py ... testing/test_ttvfast.py ...
使用方法
为了计算一个或多个行星的TTV属性
创建一个ttvfast.models.Planet实例(请参阅类文档以获取所需参数)
将系统中的行星列表传递给ttvfast.ttvfast,以及
恒星质量(以太阳质量为单位),
积分的起始点(以天为单位),
积分的时间步长(以天为单位),
以及积分的终点(以天为单位)。
ttvfast.ttvfast函数返回一个包含positions和rv的字典。其中positions项是一个包含以下内容的元组:
整数索引列表,其值对应于哪个行星,
定义纪元的整数列表,
时间列表,
rsky值列表,
vsky值列表。
可选的 rv_times 参数接受一个 RV 时间的列表,这些时间用于计算 RV。如果是这样,输出字典中的 rv 条目将填充一个 RV 值的列表,否则填充 None。
有关更多详细信息,请参阅原始 C 模块的文档:https://github.com/kdeck/TTVFast/blob/master/c_version/README
参考文献
如果您使用此代码,请引用 Deck, Agol, Holman, & Nesvorny (2014), ApJ, 787, 132, arXiv:1403.1895。
-Katherine Deck, Eric Agol, Matt Holman, & David Nesvorny
项目详情
散列 for ttvfast-0.3.0-cp35-cp35m-macosx_10_11_x86_64.whl
算法 | 散列摘要 | |
---|---|---|
SHA256 | 377e577ece208d4e7204d10af5d059b5627fefffd1559d54b9c6bc46774b860b |
|
MD5 | b5acdb03f48647fbd62b6a50a013460f |
|
BLAKE2b-256 | d187445ff204cf26f2d141837fa6db63ec96a106295e7959a96e5a082dc2ee09 |