python f2py extension wrapping eebls.f作者:kovacs等人。2002。
pyeebls的Python项目详细描述
这是一个模块,包装了geza kovacs的eebls.f.取自daniel Foreman Mackey的python-bls模块,被分解为便于其他人使用 包装。这是由astrobase模块使用的。
eebls.f
- Kovacs,Zucker&Mazeh 2002,A&A,第391369卷
- http://arxiv.org/abs/astro-ph/0206099
- http://www.konkoly.hu/staff/kovacs/eebls.f
PythonBLS
- Foreman Mackey,D.,Angus,R.等人2012年
- https://github.com/dfm/python-bls.git
Pyeebls
- Bhatti,W.等人2017年
- https://github.com/waqasbhatti/pyeebls
安装
此软件包可从pypi获得:https://pypi.python.org/pypi/pyeebls
您需要安装numpy和Fortran编译器:
(venv)$ pip install numpy # in a virtualenv # or use dnf/yum/apt install numpy to install systemwide ## you'll need a Fortran compiler to install pyeebls! ## ## on Linux: dnf/yum/apt install gcc gcc-gfortran ## ## on OSX (using homebrew): brew install gcc && brew link gcc ##
然后,使用pip安装pyeebls(最好在virtualenv中或使用–user 标志):
(venv)$ pip install pyeebls
或者从pypi下载tarball,解压缩文件,然后运行setup.py:
(venv)$ python setup.py install
文件
这个模块中只有一个函数可以使用。
def pyeebls.eebls(times, mags, workarr_u, workarr_v, nfreq, freqmin, stepsize, nbins, minduration, maxduration):
计算输入时间和mags数组的bls谱。
参数
- times:ndarray
- 包含测量次数的numpy数组。
- mags:ndarray
- 包含用作测量的磁通量或磁通量的numpy数组。
- workarr_u,workarr_v:ndarray
- numpy数组必须与times大小相同,用作temp Fortran函数的工作区。
- nfreq:int
- 搜索最佳时段的频率数。
- freqmin:float
- 要使用的最小频率。
- stepsize:float
- 搜索时要使用的步长(频率单位)。
- nbins:int
- 将灯光曲线的相位调整为 单一测试周期。
- minduration:float
- 测试时要考虑的相位单位中的最小传输持续时间 中转站。
- maxduration:float
- 测试时要考虑的相位单位中的最小传输持续时间 中转站。
返回
一系列结果:
(power, bestperiod, bestpower, transdepth, transduration, transingressbin, transegressbin)
- power:ndarray
- 一个numpy数组,包含每个测试点的bls谱值 频率。
- bestperiod:float
- 频谱中最高峰值的周期。
- bestpower:float
- 频谱中最高峰值的功率。
- transdepth:float
- 最佳时段的过境深度。
- transduration:float
- 作为相位分数的渡越长度。这是 所谓的“q”参数。
- transingressbin:int
- 传输开始时的相箱索引。
- transegressbin:int
- 传输结束时的相箱索引。
许可证
python文件的许可证是mit许可证。埃布斯。F由提供 G.Kovacs;似乎可以重新分配,但请务必引用 科瓦奇等人。2002如果你使用这个实现。