Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/YinchuanLi05/GPRForce
/ functions
Functions
176 in github.com/YinchuanLi05/GPRForce
⨍
Functions
176
◇
Types & classes
16
↓ 108 callers
Method
tr
Translate a key for current language. Behavior: - If key exists in current language: return it. - If key missing:
core/i18n.py:239
↓ 58 callers
Method
_t
Tiny bilingual helper: choose text based on current language.
ui/main_window.py:947
↓ 54 callers
Method
console_print
在控制台输出一行文字,并根据 kind 设置颜色/样式。 kind: - "cmd" : 用户输入的命令 (>>> ...) - "info" : 提示信息 / 正常输出 - "warn" : 警告
ui/main_window.py:1144
↓ 29 callers
Method
play_ui_sound
轻量 UI 音效:只用于按钮/模式切换等交互反馈。
ui/main_window.py:684
↓ 15 callers
Function
_safe_float
(x: Any, default: float)
io_module/exporter.py:13
↓ 14 callers
Method
_create_double_spin
(self, val, min_v, max_v, step=0.1, decimals=2)
ui/controls.py:47
↓ 10 callers
Function
_safe_float
None/空/异常时回退 default。支持 numpy 标量、字符串数字等。
io_module/loader.py:32
↓ 9 callers
Method
get_values
(self)
ui/controls.py:430
↓ 9 callers
Method
run_pipeline
(self, force_full: bool = False)
ui/main_window.py:2021
↓ 7 callers
Function
_writestr
(z: zipfile.ZipFile, arcname: str, b: bytes)
io_module/exporter.py:169
↓ 7 callers
Method
plot
Render image.
ui/canvas.py:32
↓ 6 callers
Method
_set_brush_checkbox_checked
(self, checked: bool)
ui/main_window.py:2721
↓ 6 callers
Method
set_message
在头像上方显示气泡文本。 - auto_hide_ms=0 表示不自动隐藏
ui/main_window.py:263
↓ 5 callers
Method
load_params_from_slot
从某个视图槽位读取参数,应用到当前控件并回到单图模式
ui/main_window.py:2465
↓ 5 callers
Function
parse_in_file
(path: Path | str)
io_module/parse_in.py:348
↓ 5 callers
Method
save_current_view_to_slot
把当前 B 扫处理结果和参数保存到第 slot_idx 个对比视图
ui/main_window.py:2408
↓ 5 callers
Method
update_status_bar
(self, extra: str = "")
ui/main_window.py:1606
↓ 4 callers
Method
__init__
(self)
ui/main_window.py:300
↓ 4 callers
Method
_set_fit_button_checked
(self, checked: bool)
ui/main_window.py:2713
↓ 4 callers
Method
clear_paths
清空当前所有画笔轨迹。
ui/model3d_pv.py:120
↓ 4 callers
Method
update_info_display
(self)
ui/main_window.py:1563
↓ 3 callers
Function
_color_for_material
为不同材料分配颜色.
ui/model3d_pv.py:34
↓ 3 callers
Method
_exit_brush_mode
(self)
ui/main_window.py:2793
↓ 3 callers
Method
_exit_fit_mode
(self)
ui/main_window.py:2736
↓ 3 callers
Function
_npy_bytes
(arr: np.ndarray)
io_module/exporter.py:187
↓ 3 callers
Method
_restore_controls
(self, vals: dict)
ui/main_window.py:1508
↓ 3 callers
Method
add
(seq: str, fn)
ui/main_window.py:724
↓ 3 callers
Method
show_placeholder
Placeholder when no data is loaded (language-aware).
ui/canvas.py:67
↓ 2 callers
Function
_cos_taper_1d
1D 余弦平滑窗: - 对于 |x| < x0: 返回 0 - 对于 |x| > x1: 返回 1 - 中间 |x|∈[x0,x1]: 用 0→1 的半个 cos 过渡 - invert=True 时反转(中间段从 1 过渡到 0) 这里
algorithms/fk.py:10
↓ 2 callers
Method
_create_int_spin
(self, val, min_v, max_v, step=1)
ui/controls.py:56
↓ 2 callers
Function
_load_npy_from_zip
(z: zipfile.ZipFile, name: str)
io_module/loader.py:254
↓ 2 callers
Function
_make_sphere_mesh
(center, r)
ui/model3d_pv.py:61
↓ 2 callers
Method
_place_ai_widget
把 AI 小助手贴到 console_widget 右下角。 注意: - raise_() 只在显示/首次摆放时做一次(do_raise=True), 避免在 eventFilter 里反复 raise_() 导致 Z 序混乱。
ui/main_window.py:807
↓ 2 callers
Function
_scalar_item
把 numpy 标量/0-d array 解包成 Python 标量
io_module/loader.py:22
↓ 2 callers
Method
ai_build_suggestion
读取当前参数 + 数据,给出一小段文字建议。 不接 LLM,完全是规则+模板。
ui/main_window.py:1351
↓ 2 callers
Method
draw_hyperbola
绘制拟合曲线 【逻辑修正】: 1. 形状由 fit_v 决定 (滚轮) 2. 屏幕位置由 spin_eps 决定 (当前背景) 3. 强制锁定视图范围,防止 Matplotlib 自动缩放导致图像跳变
ui/main_window.py:2993
↓ 2 callers
Method
get_values
(self)
ui/dialogs.py:145
↓ 2 callers
Method
set_background
设置背景截图,并清空已有涂鸦。
ui/model3d_pv.py:113
↓ 2 callers
Method
set_interaction_mode
统一管理交互模式(互斥): - normal:A-Scan 点击可用 - fit:速度拟合(屏蔽 A-Scan / 画笔) - brush:2D 画笔(屏蔽 A-Scan / 拟合)
ui/main_window.py:2799
↓ 2 callers
Method
set_materials
用 .in 中的 materials 列表填充“背景材料”下拉框。 materials: {name: {'epsr':..., ...}, ...} default_name: 期望默认选中的材料名(可为 None)
ui/controls.py:486
↓ 2 callers
Method
toggle_fitting_mode
顶部按钮切换速度拟合工具:交由统一的交互模式管理。
ui/main_window.py:3097
↓ 2 callers
Method
update_bubble_pos
根据当前小人位置,把气泡贴在头像上方(尽量靠右对齐)。
ui/main_window.py:235
↓ 2 callers
Method
update_texts
根据当前语言刷新界面文字
ui/main_window.py:870
↓ 1 callers
Method
__init__
(self, parent=None)
ui/model3d_pv.py:93
↓ 1 callers
Method
_add_text_annotation
(self, point: np.ndarray)
ui/model3d_pv.py:591
↓ 1 callers
Method
_bubble_style
(self, mood: str)
ui/main_window.py:212
↓ 1 callers
Function
_collect_objects_from_info
从 parse_in_file 解析得到的 info 中,收集材料和体积几何对象。 目前使用的对象类型: - box - cylinder - sphere 返回: materials : dict, name -> materia
algorithms/model_gt.py:141
↓ 1 callers
Method
_decode_point_from_args
兼容不同 PyVista 版本的点选回调.
ui/model3d_pv.py:560
↓ 1 callers
Method
_enter_brush_mode
进入 2D 画笔模式:截图 -> overlay。成功返回 True,否则 False(并负责回滚 UI)。
ui/main_window.py:2761
↓ 1 callers
Method
_enter_fit_mode
(self)
ui/main_window.py:2729
↓ 1 callers
Method
_format_params_for_label
把参数字典压缩成几行描述,显示在四宫格下方
ui/main_window.py:2382
↓ 1 callers
Method
_init_shortcuts
常用快捷键(偏保守,避免和输入框冲突)。
ui/main_window.py:722
↓ 1 callers
Function
_make_box_mesh
(p1, p2)
ui/model3d_pv.py:54
↓ 1 callers
Function
_make_cylinder_mesh
构造任意方向圆柱体.
ui/model3d_pv.py:70
↓ 1 callers
Method
_plot_gt
(self)
ui/model_view.py:43
↓ 1 callers
Function
_read_first_existing_dataset
在 group 中按顺序查找第一个存在的数据集
io_module/loader.py:14
↓ 1 callers
Method
_refresh_placeholders
Refresh placeholder text on canvases after language/view changes.
ui/main_window.py:840
↓ 1 callers
Method
_setup_theme
调整 PyVista 主题外观,让比例更协调。
ui/model3d_pv.py:286
↓ 1 callers
Function
_sha256_bytes
(b: bytes)
io_module/exporter.py:99
↓ 1 callers
Method
_update_picking
根据当前模式启用/关闭点选(用于文字标注),避免重复 enable 报错。
ui/model3d_pv.py:507
↓ 1 callers
Method
add_group_basic
(self)
ui/controls.py:66
↓ 1 callers
Method
add_group_display
(self)
ui/controls.py:378
↓ 1 callers
Method
add_group_filter
(self)
ui/controls.py:310
↓ 1 callers
Method
add_group_fk
(self)
ui/controls.py:341
↓ 1 callers
Method
add_group_gain
(self)
ui/controls.py:276
↓ 1 callers
Method
add_group_roi
ROI:左右/上下裁剪 + 深度静音带(用于 .out/.npy 等所有输入)
ui/controls.py:125
↓ 1 callers
Method
add_group_spatial
(self)
ui/controls.py:254
↓ 1 callers
Method
ai_explain_basic
(self)
ui/main_window.py:1460
↓ 1 callers
Method
ai_explain_bg
(self)
ui/main_window.py:1488
↓ 1 callers
Method
ai_explain_gain
(self)
ui/main_window.py:1440
↓ 1 callers
Function
build_gt_slice_from_in_info
根据 .in 解析结果构建一个几何真值切片(目前只支持 XZ 平面)。 参数 ---- info_fallback : dict io_module.parse_in.parse_in_file 返回的 info。 plane : str
algorithms/model_gt.py:202
↓ 1 callers
Method
export_compare_views
在对比 4 图模式下导出选中的视图(图片 + 参数 JSON)
ui/main_window.py:1888
↓ 1 callers
Method
export_data
(self)
ui/main_window.py:1782
↓ 1 callers
Method
hide_bubble
(self)
ui/main_window.py:285
↓ 1 callers
Method
init_ui
(self)
ui/main_window.py:365
↓ 1 callers
Method
init_ui
(self)
ui/controls.py:22
↓ 1 callers
Method
init_ui
(self)
ui/dialogs.py:27
↓ 1 callers
Function
is_in_box
判断 (X,Y,Z) 网格点是否在 box 内。 p1, p2 为对角点,顺序不限。
algorithms/model_gt.py:12
↓ 1 callers
Function
is_in_cylinder
判断 (X,Y,Z) 网格点是否在 cylinder 内,支持任意方向的圆柱。 p1, p2 为两端面中心坐标。
algorithms/model_gt.py:30
↓ 1 callers
Function
is_in_cylindrical_sector
判断 (X,Y,Z) 网格点是否在 cylindrical_sector 内。 语法对应 gprMax 文档: #cylindrical_sector: c1 f1 f2 f3 f4 f5 f6 f7 str1 [c1] - axis = c1: 'x' / '
algorithms/model_gt.py:65
↓ 1 callers
Function
is_in_sphere
判断 (X,Y,Z) 网格点是否在 sphere 内。
algorithms/model_gt.py:59
↓ 1 callers
Method
load_file
(self)
ui/main_window.py:1673
↓ 1 callers
Method
load_in_file_manual
(self)
ui/main_window.py:1744
↓ 1 callers
Function
load_npy_file
加载 .npy 文件。 支持两种格式: A) dict 格式(推荐,GPR_Studio 导出):{'data': (Nt,Nx), 'dt':..., 'dx':..., 'eps_bg':..., 'roi':...} B) 纯数组格式:直接认为是 (Nt,N
io_module/loader.py:152
↓ 1 callers
Function
load_out_file
加载 gprMax .out 文件,并尽可能根据同名 .in 填充物理参数。 - 读取 /rxs/rx1/{Ez,Ey,Ex} 中的一个作为主数据; - 将数据 reshape 成 (Nt, Nx),以列为 trace; - 读取 dt; - 若存在同名
io_module/loader.py:53
↓ 1 callers
Method
load_params_preset
从 JSON 文件加载参数预设并应用到控件
ui/main_window.py:2879
↓ 1 callers
Function
load_repro_package
加载由 export_reproducible_package 导出的 .zip 可复现包。 优先读: - data/raw.npy 作为 raw_data - data/processed.npy 作为 processed_data 并恢复 met
io_module/loader.py:241
↓ 1 callers
Method
on_compare_canvas_click
在对比模式的某个视图里点击,弹出对应的 A-Scan
ui/main_window.py:2611
↓ 1 callers
Function
parse_in_text
解析 gprMax .in 文本,抽取物理与几何参数。 支持的命令(常用部分): - #title - #domain, #dx_dy_dz, #time_window, #pml_cells - #material - #box - #c
io_module/parse_in.py:7
↓ 1 callers
Method
plot_graphs
(self)
ui/ascan_view.py:31
↓ 1 callers
Method
plot_model
(self)
ui/model3d_pv.py:308
↓ 1 callers
Method
reset_view
(self)
ui/model3d_pv.py:467
↓ 1 callers
Method
save_params_preset
保存当前参数到 JSON 文件
ui/main_window.py:2661
↓ 1 callers
Method
set_language
(self, lang)
core/i18n.py:235
↓ 1 callers
Method
set_pen_color
修改画笔颜色,并重绘。
ui/model3d_pv.py:107
↓ 1 callers
Method
set_roi_limits
由 MainWindow 根据当前数据动态设置 ROI 控件范围
ui/controls.py:236
↓ 1 callers
Method
show_help_topic
在控制台输出帮助信息(中英双语)。
ui/main_window.py:1203
↓ 1 callers
Method
show_model3d_view
弹出 3D 几何模型视图
ui/main_window.py:2567
↓ 1 callers
Method
show_model_view
(self)
ui/main_window.py:2500
↓ 1 callers
Method
show_shortcuts_help
把快捷键清单输出到下方控制台(不弹窗)。
ui/main_window.py:742
next →
1–100 of 176, ranked by callers