A toolkit to read and convert seismic data of GDST (https://www.geodeepsensing.com/) sensors to H5 and SAC file format
Project description
pyGDST
转换中科深源仪器产生的BIN文件为SAC,H5文件的工具包
A toolkit to read and convert seismic data of GDST (https://www.geodeepsensing.com/) sensors to H5 and SAC file format
依赖(Dependencies)
- glob
- numpy
- obspy
- h5py
- tqdm
读取GDST仪器二进制文件 (Reading)
eg:
from pygdst import read_bin
dt = 0.002# sampling interval, s
file_header, data, block_headers = read_bin('./P320LINE/A0000102/24052808.BIN', dt=dt*1000)
# file_header : 512 x int32
# data : recording of 1h
# block_headers : 每500个采样点的数据块头文件
转换文件为h5文件 (Convert to .H5)
eg:
from pygdst import bins2h5
dt = 0.002# sampling interval, s
bin_files = glob.glob(f'./P320LINE/A0000102/*.BIN')
new_file = './test.h5'
bins2h5(bin_files, new_file, dt=dt)
'''
H5 文件内部定义
f.create_dataset('data', data=data)
f.create_dataset('headers', data=headers)
f.create_dataset('Times',data=t_all)
f.create_dataset('dt',data=dt)
f.create_dataset('NF',data=len(data))
f.create_dataset('raw_files',data=np.array(bins_file, dtype='S'))
'''
转换文件为sac文件 (Convert to .sac)
eg:
from pygdst import bins2sac
dt = 0.002# sampling interval, s
DW = 5 # 降采样5倍到0.01s采样
# files in a day
bin_files_aday = glob.glob(f'./P320LINE/A0000102/240528*.BIN')
sac_file = './test.sac'
bins2sac(bin_files_aday,sac_file,dt=dt, name='my_stat_name', DOWNSAMPLE_RATE=DW)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pygdst-0.0.1.tar.gz
(5.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pygdst-0.0.1.tar.gz.
File metadata
- Download URL: pygdst-0.0.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b41ddb0c6b1e1748dc184e852bafe430b2f1d2e7887c96249b9701ad65303441
|
|
| MD5 |
815b2f00046142de2696225fbb32034b
|
|
| BLAKE2b-256 |
9d87352958651bd029a3b69dfccc7cbc37592a53d49481a2df4bdfd8c3ec8771
|
File details
Details for the file pygdst-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pygdst-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9abb2bf45218dc9ec76a3d537d897e3486d0bd736f924163b10b456f36d996c
|
|
| MD5 |
504c6ba4af0e0c1f08722313e953e74e
|
|
| BLAKE2b-256 |
36976f2bef5397027a560826c53a08845d4795da375c8e30e30bcb3e618af4b6
|