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)
'''
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('N_hours',data=nh)
f.create_dataset('chns',data=CHN_DEF[nc])
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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.2-py3-none-any.whl.
File metadata
- Download URL: pygdst-0.0.2-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4026a41e0fe910e82ceb23cb7357dfe0776677f3d8edf2ecbf2757cc334c19a0
|
|
| MD5 |
d64a6fd5745db66471e879b2542331c3
|
|
| BLAKE2b-256 |
19a0d7109d7ab4520456f6c63e1c3b4f77fb1fe3e17270f66c5506c655c13c09
|