GWPY:利用公開的 LIGO 數據進行繪圖

1、安裝GWPYpython

pip3 install gwpy -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com

2、得到LIGO數據:code

$ wget http://www.ligo.org/science/GW100916/L-strain_hp30-968654552-10.txt

3、LIGO數據進行繪圖blog

from numpy import asarray
from gwpy.timeseries import TimeSeries
data = open('L-strain_hp30-968654552-10.txt').read()
ts = TimeSeries (asarray (data.splitlines (), dtype=float),epoch=968654552, sample_rate=16384, unit='strain')

plot = ts.plot()
plot.set_title ('LIGO Livingston Observatory data for GW100916')
plot.set_ylabel ('Gravitational-wave strain amplitude')
plot.show ()

相關文章
相關標籤/搜索