探地雷达python库:io、处理与可视化

siina的Python项目详细描述


siina

说明

用于探地雷达(GPR)数据处理的Python库:IO、过滤器和可视化。

使用Python3.6进行测试。

安装

siina可以与pip一起安装

pip install siina

最新的Github版本

克隆repo并使用setup.py

安装
git clone https://github.com/ahartikainen/siina  
cd siina
python setup.py install

或者用pip

python -m pip install git+https://github.com/ahartikainen/siina

基础数据结构

标题信息保存为字典:obj.header 测量数据保存为nDarrays的列表:obj.data_list 可以使用.data方法访问主通道

示例用法

import siina

# create RadarFile object
meas = siina.Radar()

# read in the data
meas.read_file("./example_path/example_file.DZT")

# set the center frequency for GPR (in Hertz) if not done
if meas.header.get('frequency', None) is None:
    meas.header['frequency'] = 1e9 # 1 GHz

# print dimensions for the data
print("points in samples={}, samples={}, channels={}".format(meas.nrows, meas.ncols, meas.nchan)

# strip markers (important step with .DZT files)
meas.read_markers()

# center each sample (for each trace do func(trace[500:])
meas.func_dc(start=500)

# apply lowpass filter with cutoff= 6 * frequency
#     if cutoff is float -> cutoff = cutoff
#     if cutoff is str -> cutoff = float(cutoff) * frequency
meas.func_filter(cutoff='6')

import matplotlib.pyplot as plt

# plot mean function for the first channel
# all channels are found under obj.data_list
plt.plot(meas.data.mean(1))
plt.show()

# plot radargram with plt.imshow
# be careful with the profile size (meas.ncols < 5000)
plt.imshow(meas.data, aspect='auto')
plt.show()

开发

pip install -r requirements-test.txt
black siina
pylint siina
pydocstyle --convention=numpy siina

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
如何使用java向dropup html/css添加项目   如何从java中的向量向量打印   Java Maven库项目模板   java使用atmosphere api还是直接使用grizzly?   java JComponent仅部分显示   如何将动态值传递给自定义注释,以从Java数据进行映射。性质   java破解已实现方法的返回类型的最佳方法?   java Netbeans在JFrame Gui布局中覆盖图像   spring java仅向登录用户显示注销按钮   java如何对com进行身份验证。谷歌。云bigquery。带有服务帐户的BigQuery`   java禁止空字符串参数和抛出RuntimeException以阻止方法继续的利弊   java分析项目中的所有JAR以获取版本和许可证信息   Java,数据库为什么要分配一个新对象,而我们可以直接将它放入数据库