你已经派生过 gpr-sidl-inv
镜像自地址
https://gitee.com/sduem/gpr-sidl-inv.git
已同步 2025-08-02 18:36:51 +08:00
33 行
989 B
Python
33 行
989 B
Python
import numpy as np
|
|
import pandas as pd
|
|
from readgssi.dzt import readdzt
|
|
from scipy.signal import tukey
|
|
from config import Field_data_test_Config as cfg
|
|
from config import Path_Config as pcfg
|
|
from utils.plot import plot_BSCAN_data
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
# File path and parameters
|
|
TEST_FILE = pcfg.TEST_FILE # Input DZT file
|
|
extract_time_grid =cfg.extract_time_grid # Extracted time range (grid size)
|
|
|
|
# Read GPR data
|
|
result = readdzt(infile=TEST_FILE)
|
|
data_result = result[1]
|
|
data = data_result[0]
|
|
data = data[2:extract_time_grid, :] # Trim data within the specified time range
|
|
|
|
# Normalize data
|
|
data = data / np.max(np.abs(data))
|
|
|
|
# Save raw data as CSV
|
|
pd.DataFrame(data).to_csv(pcfg.CONVERTED_TEST_FILE, index=False)
|
|
|
|
# Plot and save the permittivity constant image
|
|
plot_BSCAN_data(data, pcfg.CONVERTED_TEST_FILE_img, line_length=cfg.distance, time_length=cfg.time_window, ratio=0.3)
|
|
|
|
|