D:\Pythoncode\try\simple\generate_tables.py:508: UserWarning: Glyph 25490 (\N{CJK UNIFIED IDEOGRAPH-6392}) missing from font(s) SimSun-ExtB. D:\Pythoncode\try\simple\generate_tables.py:508: UserWarning: Glyph 24207 (\N{CJK UNIFIED IDEOGRAPH-5E8F}) missing from font(s) SimSun-ExtB. E:\idea\pycharm2024\PyCharm 2024.3\plugins\python-ce\helpers\pycharm_matplotlib_backend\backend_interagg.py:124: UserWarning: Glyph 27169 (\N{CJK UNIFIED IDEOGRAPH-6A21}) missing from font(s) SimSun-ExtB. E:\idea\pycharm2024\PyCharm 2024.3\plugins\python-ce\helpers\pycharm_matplotlib_backend\backend_interagg.py:124: UserWarning: Glyph 22411 (\N{CJK UNIFIED IDEOGRAPH-578B}) missing from font(s) SimSun-ExtB. E:\idea\pycharm2024\PyCharm 2024.3\plugins\python-ce\helpers\pycharm_matplotlib_backend\backend_interagg.py:124: UserWarning: Glyph 21508 (\N{CJK UNIFIED IDEOGRAPH-5404}) missing from font(s) SimSun-ExtB. E:\idea\pycharm2024\PyCharm 2024.3\plugins\python-ce\helpers\pycharm_matplotlib_backend\backend_interagg.py:124: UserWarning: Glyph 28909 (\N{CJK UNIFIED IDEOGRAPH-70ED}) missing from font(s) SimSun-ExtB. E:\idea\pycharm2024\PyCharm 2024.3\plugins\python-ce\helpers\pycharm_matplotlib_backend\backend_interagg.py:124: UserWarning: Glyph 21147 (\N{CJK UNIFIED IDEOGRAPH-529B}) missing from font(s) SimSun-ExtB. E:\idea\pycharm2024\PyCharm 2024.3\plugins\python-ce\helpers\pycharm_matplotlib_backend\backend_interagg.py:124: UserWarning: Glyph 22270 (\N{CJK UNIFIED IDEOGRAPH-56FE}) missing from font(s) SimSun-ExtB.

时间: 2025-08-21 11:19:21 AIGC 浏览: 35
<think>好的,我现在需要解决用户在使用matplotlib时遇到的SimSun-ExtB字体缺失CJK统一表意字符的警告问题。首先,我得回顾一下用户提供的引用内容,特别是引用[1]和[2],里面提到设置字体为SimHei以及处理符号显示的问题。但用户现在使用的是SimSun-ExtB,这个字体可能没有包含所有需要的CJK字符,导致某些字符无法显示并出现警告。 接下来,我应该考虑几个可能的解决方案。首先,检查系统中是否确实安装了SimSun-ExtB字体。有时候用户可能误以为安装了,但实际上没有,或者路径不正确。如果字体不存在,可能需要安装完整的字体包,比如从官方网站下载或使用系统字体管理器。 其次,如果字体确实存在,但仍有部分字符缺失,可能需要更换一个支持更广CJK字符的字体。例如,SimHei、Microsoft YaHei或者Noto Sans CJK等字体通常包含更全面的字符集。用户之前提到设置SimHei有效,所以推荐用户尝试这些字体可能是一个解决办法。 另外,用户可能需要配置matplotlib的字体参数,确保正确指定备用字体。Matplotlib允许设置多个回退字体,当主字体缺少某些字符时,会自动尝试其他字体。这可以通过修改rcParams中的font.sans-serif或font.family来实现,添加备用字体如'SimHei', 'Microsoft YaHei'等。 还有一种情况是字体缓存的问题。有时候matplotlib会缓存字体信息,导致即使安装了新字体也无法立即识别。这时需要清除matplotlib的缓存文件,通常位于~/.cache/matplotlib,然后重启Python环境。 此外,确保matplotlib版本较新也很重要,因为旧版本可能存在字体处理的bug。升级到最新版本可能会解决兼容性问题。 最后,如果用户必须使用SimSun-ExtB,可能需要手动补全缺失的字符,但这通常比较复杂,涉及到字体编辑工具,对普通用户来说可能不太实际,所以更换字体可能是更可行的方案。 综合以上思路,我应该分步骤建议用户检查字体安装情况、更换字体、设置备用字体、清除缓存以及升级matplotlib。同时,提供具体的代码示例,比如如何设置多个备用字体,如何处理缓存问题,并解释每种方法的原因和适用场景,帮助用户逐步解决问题。</think>### 解决方案:matplotlib SimSun-ExtB字体缺失CJK字符的解决方法 #### 1. **检查字体文件完整性** - **问题原因**:`SimSun-ExtB`字体可能未包含全部CJK统一表意字符[^1]。 - **解决方法**: 1. 确认系统中已安装完整版的`SimSun-ExtB`字体文件(如从Windows系统目录复制或通过包管理器安装)。 2. 使用以下代码验证字体是否被matplotlib识别: ```python import matplotlib.font_manager as fm print([f.name for f in fm.fontManager.ttflist if 'SimSun' in f.name]) ``` #### 2. **更换更全面的中文字体** - **推荐字体**:优先使用支持更广泛字符集的字体(如`SimHei`, `Microsoft YaHei`, `Noto Sans CJK`)[^2]。 - **代码示例**: ```python import matplotlib.pyplot as plt plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'Noto Sans CJK'] # 设置多级回退字体 plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 ``` #### 3. **强制指定备用字体路径** - **适用场景**:若字体文件不在默认路径中。 - **代码示例**: ```python import matplotlib as mpl mpl.font_manager.fontManager.addfont('/path/to/SimSun-ExtB.ttf') # 手动添加字体路径 plt.rcParams['font.sans-serif'] = ['SimSun-ExtB', 'Fallback Font'] ``` #### 4. **清除matplotlib字体缓存** - **步骤**: 1. 删除缓存文件(路径可通过`mpl.get_cachedir()`获取)。 2. 重启Python内核或IDE。 #### 5. **升级matplotlib版本** - **命令**: ```bash pip install --upgrade matplotlib ``` --- ### 验证代码示例 ```python import matplotlib.pyplot as plt import numpy as np # 配置字体和符号 plt.rcParams['font.sans-serif'] = ['SimHei', 'Microsoft YaHei', 'Noto Sans CJK'] plt.rcParams['axes.unicode_minus'] = False # 生成示例数据 x = np.linspace(0, 10, 100) y = np.sin(x) # 绘图测试 plt.plot(x, y) plt.title('测试中文标题:图表示例') plt.xlabel('横轴标签(含生僻字:𠀀𠀁)') # 测试扩展字符 plt.show() ``` --- ### 其他注意事项 - **系统级字体支持**:Linux系统需安装`fonts-noto-cjk`等包。 - **Docker环境**:需在容器内安装中文字体。 ---
阅读全文

相关推荐

D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 36755 (\N{CJK UNIFIED IDEOGRAPH-8F93}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 20837 (\N{CJK UNIFIED IDEOGRAPH-5165}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 22270 (\N{CJK UNIFIED IDEOGRAPH-56FE}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 20687 (\N{CJK UNIFIED IDEOGRAPH-50CF}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 30495 (\N{CJK UNIFIED IDEOGRAPH-771F}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 23454 (\N{CJK UNIFIED IDEOGRAPH-5B9E}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 25513 (\N{CJK UNIFIED IDEOGRAPH-63A9}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 30721 (\N{CJK UNIFIED IDEOGRAPH-7801}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 39044 (\N{CJK UNIFIED IDEOGRAPH-9884}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 27979 (\N{CJK UNIFIED IDEOGRAPH-6D4B}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 25439 (\N{CJK UNIFIED IDEOGRAPH-635F}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 22833 (\N{CJK UNIFIED IDEOGRAPH-5931}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 26354 (\N{CJK UNIFIED IDEOGRAPH-66F2}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 32447 (\N{CJK UNIFIED IDEOGRAPH-7EBF}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 23545 (\N{CJK UNIFIED IDEOGRAPH-5BF9}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 27604 (\N{CJK UNIFIED IDEOGRAPH-6BD4}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 35757 (\N{CJK UNIFIED IDEOGRAPH-8BAD}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 32451 (\N{CJK UNIFIED IDEOGRAPH-7EC3}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 39564 (\N{CJK UNIFIED IDEOGRAPH-9A8C}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 35777 (\N{CJK UNIFIED IDEOGRAPH-8BC1}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 25351 (\N{CJK UNIFIED IDEOGRAPH-6307}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:228: UserWarning: Glyph 26631 (\N{CJK UNIFIED IDEOGRAPH-6807}) missing from current font. plt.tight_layout() D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 36755 (\N{CJK UNIFIED IDEOGRAPH-8F93}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 20837 (\N{CJK UNIFIED IDEOGRAPH-5165}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 22270 (\N{CJK UNIFIED IDEOGRAPH-56FE}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 20687 (\N{CJK UNIFIED IDEOGRAPH-50CF}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 30495 (\N{CJK UNIFIED IDEOGRAPH-771F}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 23454 (\N{CJK UNIFIED IDEOGRAPH-5B9E}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 25513 (\N{CJK UNIFIED IDEOGRAPH-63A9}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 30721 (\N{CJK UNIFIED IDEOGRAPH-7801}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 39044 (\N{CJK UNIFIED IDEOGRAPH-9884}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 27979 (\N{CJK UNIFIED IDEOGRAPH-6D4B}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 25439 (\N{CJK UNIFIED IDEOGRAPH-635F}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 22833 (\N{CJK UNIFIED IDEOGRAPH-5931}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 26354 (\N{CJK UNIFIED IDEOGRAPH-66F2}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 32447 (\N{CJK UNIFIED IDEOGRAPH-7EBF}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 23545 (\N{CJK UNIFIED IDEOGRAPH-5BF9}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 27604 (\N{CJK UNIFIED IDEOGRAPH-6BD4}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 35757 (\N{CJK UNIFIED IDEOGRAPH-8BAD}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 32451 (\N{CJK UNIFIED IDEOGRAPH-7EC3}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 39564 (\N{CJK UNIFIED IDEOGRAPH-9A8C}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 35777 (\N{CJK UNIFIED IDEOGRAPH-8BC1}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 25351 (\N{CJK UNIFIED IDEOGRAPH-6307}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:229: UserWarning: Glyph 26631 (\N{CJK UNIFIED IDEOGRAPH-6807}) missing from current font. plt.savefig("segmentation_comparison.png", dpi=150, bbox_inches='tight') D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 36755 (\N{CJK UNIFIED IDEOGRAPH-8F93}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 20837 (\N{CJK UNIFIED IDEOGRAPH-5165}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 22270 (\N{CJK UNIFIED IDEOGRAPH-56FE}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 20687 (\N{CJK UNIFIED IDEOGRAPH-50CF}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 30495 (\N{CJK UNIFIED IDEOGRAPH-771F}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 23454 (\N{CJK UNIFIED IDEOGRAPH-5B9E}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 25513 (\N{CJK UNIFIED IDEOGRAPH-63A9}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 30721 (\N{CJK UNIFIED IDEOGRAPH-7801}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 39044 (\N{CJK UNIFIED IDEOGRAPH-9884}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 27979 (\N{CJK UNIFIED IDEOGRAPH-6D4B}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 25439 (\N{CJK UNIFIED IDEOGRAPH-635F}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 22833 (\N{CJK UNIFIED IDEOGRAPH-5931}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 26354 (\N{CJK UNIFIED IDEOGRAPH-66F2}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 32447 (\N{CJK UNIFIED IDEOGRAPH-7EBF}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 23545 (\N{CJK UNIFIED IDEOGRAPH-5BF9}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 27604 (\N{CJK UNIFIED IDEOGRAPH-6BD4}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 35757 (\N{CJK UNIFIED IDEOGRAPH-8BAD}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 32451 (\N{CJK UNIFIED IDEOGRAPH-7EC3}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 39564 (\N{CJK UNIFIED IDEOGRAPH-9A8C}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 35777 (\N{CJK UNIFIED IDEOGRAPH-8BC1}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 25351 (\N{CJK UNIFIED IDEOGRAPH-6307}) missing from current font. plt.show() D:\pythoncharm\pythonProject8\main.py:230: UserWarning: Glyph 26631 (\N{CJK UNIFIED IDEOGRAPH-6807}) missing from current font. plt.show()

C:\Users\HUAWEI\miniconda3\python.exe D:\python-learning\词云图制作.py D:\python-learning\词云图制作.py:47: UserWarning: Glyph 24377 (\N{CJK UNIFIED IDEOGRAPH-5F39}) missing from font(s) DejaVu Sans. plt.savefig("danmu_element_wordcloud.png", bbox_inches='tight', dpi=300) D:\python-learning\词云图制作.py:47: UserWarning: Glyph 24149 (\N{CJK UNIFIED IDEOGRAPH-5E55}) missing from font(s) DejaVu Sans. plt.savefig("danmu_element_wordcloud.png", bbox_inches='tight', dpi=300) D:\python-learning\词云图制作.py:47: UserWarning: Glyph 20803 (\N{CJK UNIFIED IDEOGRAPH-5143}) missing from font(s) DejaVu Sans. plt.savefig("danmu_element_wordcloud.png", bbox_inches='tight', dpi=300) D:\python-learning\词云图制作.py:47: UserWarning: Glyph 32032 (\N{CJK UNIFIED IDEOGRAPH-7D20}) missing from font(s) DejaVu Sans. plt.savefig("danmu_element_wordcloud.png", bbox_inches='tight', dpi=300) D:\python-learning\词云图制作.py:47: UserWarning: Glyph 35789 (\N{CJK UNIFIED IDEOGRAPH-8BCD}) missing from font(s) DejaVu Sans. plt.savefig("danmu_element_wordcloud.png", bbox_inches='tight', dpi=300) D:\python-learning\词云图制作.py:47: UserWarning: Glyph 20113 (\N{CJK UNIFIED IDEOGRAPH-4E91}) missing from font(s) DejaVu Sans. plt.savefig("danmu_element_wordcloud.png", bbox_inches='tight', dpi=300) C:\Users\HUAWEI\miniconda3\Lib\tkinter\__init__.py:861: UserWarning: Glyph 24377 (\N{CJK UNIFIED IDEOGRAPH-5F39}) missing from font(s) DejaVu Sans. func(*args) C:\Users\HUAWEI\miniconda3\Lib\tkinter\__init__.py:861: UserWarning: Glyph 24149 (\N{CJK UNIFIED IDEOGRAPH-5E55}) missing from font(s) DejaVu Sans. func(*args) C:\Users\HUAWEI\miniconda3\Lib\tkinter\__init__.py:861: UserWarning: Glyph 20803 (\N{CJK UNIFIED IDEOGRAPH-5143}) missing from font(s) DejaVu Sans. func(*args) C:\Users\HUAWEI\miniconda3\Lib\tkinter\__init__.py:861: UserWarning: Glyph 32032 (\N{CJK UNIFIED IDEOGRAPH-7D20}) missing from font(s) DejaVu Sans. func(*args) C:\Users\HUAWEI\miniconda3\Lib\tkinter\__init__.py:861: UserWarning: Glyph 35789 (\N{CJK UNIFIED IDEOGRAPH-8BCD}) missing from font(s) DejaVu Sans. func(*args) C:\Users\HUAWEI\miniconda3\Lib\tkinter\__init__.py:861: UserWarning: Glyph 20113 (\N{CJK UNIFIED IDEOGRAPH-4E91}) missing from font(s) DejaVu Sans. func(*args) 以上代码运行出现了这个结果,问题出现在哪里

粗匹配完成 (0.00s) ADE优化完成 (0.02s) 时间步 8: 执行重采样 (N_eff=180.0/1200) 时间步 11: 执行重采样 (N_eff=148.4/1200) 时间步 14: 执行重采样 (N_eff=120.2/1200) 时间步 17: 执行重采样 (N_eff=172.0/1200) 时间步 20: 执行重采样 (N_eff=157.1/1200) 时间步 23: 执行重采样 (N_eff=117.2/1200) 时间步 26: 执行重采样 (N_eff=98.6/1200) 时间步 29: 执行重采样 (N_eff=55.7/1200) 时间步 31: 执行重采样 (N_eff=151.1/1200) 时间步 34: 执行重采样 (N_eff=49.9/1200) 时间步 37: 执行重采样 (N_eff=179.9/1200) 时间步 43: 执行重采样 (N_eff=191.1/1200) 时间步 54: 执行重采样 (N_eff=204.9/1200) 时间步 58: 执行重采样 (N_eff=149.2/1200) 粒子滤波完成 (2.27s), 平均有效样本数: 579.7/1200 Backend qtagg is interactive backend. Turning interactive mode on. PS E:\网页下载> ^C PS E:\网页下载> PS E:\网页下载> e:; cd 'e:\网页下载'; & 'd:\A\python.exe' 'c:\Users\86181\.vscode\extensions\ms-python.debugpy-2025.10.0-win32-x64\bundled\libs\debugpy\launcher' '57054' '--' 'E:\网页下载\Magnetic Matching with ADE and Particle Filter.py' === 开始地磁匹配优化 === 粗匹配完成 (0.00s) ADE优化完成 (0.02s) 时间步 25: 执行重采样 (N_eff=229.3/1200) 时间步 27: 执行重采样 (N_eff=217.5/1200) 时间步 29: 执行重采样 (N_eff=185.1/1200) 时间步 31: 执行重采样 (N_eff=147.0/1200) 时间步 33: 执行重采样 (N_eff=68.7/1200) 时间步 35: 执行重采样 (N_eff=43.7/1200) 时间步 37: 执行重采样 (N_eff=75.1/1200) 时间步 39: 执行重采样 (N_eff=50.1/1200) 时间步 41: 执行重采样 (N_eff=21.9/1200) 时间步 42: 执行重采样 (N_eff=225.1/1200) 时间步 43: 执行重采样 (N_eff=62.9/1200) 时间步 44: 执行重采样 (N_eff=114.7/1200) 时间步 45: 执行重采样 (N_eff=111.6/1200) 时间步 46: 执行重采样 (N_eff=103.1/1200) 时间步 47: 执行重采样 (N_eff=115.0/1200) 警告: 时间步 48 所有权重接近零,执行粒子恢复 时间步 49: 执行重采样 (N_eff=226.4/1200) 时间步 53: 执行重采样 (N_eff=115.9/1200) 时间步 56: 执行重采样 (N_eff=138.4/1200) 时间步 59: 执行重采样 (N_eff=95.3/1200) 粒子滤波完成 (2.21s), 平均有效样本数: 426.1/1200 禁忌搜索完成 (0.00s) 最终轨迹与真实轨迹的平均偏差: 0.20438 总耗时: 2.23s 轨迹完整性检查: 输入INS轨迹点数: 60 粗匹配轨迹点数: 60 粒子滤波轨迹点数: 60 精细轨迹点数: 60 真实轨迹点数: 60 E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 36712 (\N{CJK UNIFIED IDEOGRAPH-8F68}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 36857 (\N{CJK UNIFIED IDEOGRAPH-8FF9}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 23545 (\N{CJK UNIFIED IDEOGRAPH-5BF9}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 27604 (\N{CJK UNIFIED IDEOGRAPH-6BD4}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 31895 (\N{CJK UNIFIED IDEOGRAPH-7C97}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 21305 (\N{CJK UNIFIED IDEOGRAPH-5339}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 37197 (\N{CJK UNIFIED IDEOGRAPH-914D}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 20248 (\N{CJK UNIFIED IDEOGRAPH-4F18}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 21270 (\N{CJK UNIFIED IDEOGRAPH-5316}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 31890 (\N{CJK UNIFIED IDEOGRAPH-7C92}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 23376 (\N{CJK UNIFIED IDEOGRAPH-5B50}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 28388 (\N{CJK UNIFIED IDEOGRAPH-6EE4}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 27874 (\N{CJK UNIFIED IDEOGRAPH-6CE2}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 31934 (\N{CJK UNIFIED IDEOGRAPH-7CBE}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 32454 (\N{CJK UNIFIED IDEOGRAPH-7EC6}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 30495 (\N{CJK UNIFIED IDEOGRAPH-771F}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 23454 (\N{CJK UNIFIED IDEOGRAPH-5B9E}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 38170 (\N{CJK UNIFIED IDEOGRAPH-951A}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 28857 (\N{CJK UNIFIED IDEOGRAPH-70B9}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 26102 (\N{CJK UNIFIED IDEOGRAPH-65F6}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 38388 (\N{CJK UNIFIED IDEOGRAPH-95F4}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 27493 (\N{CJK UNIFIED IDEOGRAPH-6B65}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 35823 (\N{CJK UNIFIED IDEOGRAPH-8BEF}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 24046 (\N{CJK UNIFIED IDEOGRAPH-5DEE}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 20301 (\N{CJK UNIFIED IDEOGRAPH-4F4D}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 32622 (\N{CJK UNIFIED IDEOGRAPH-7F6E}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 26377 (\N{CJK UNIFIED IDEOGRAPH-6709}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 25928 (\N{CJK UNIFIED IDEOGRAPH-6548}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 26679 (\N{CJK UNIFIED IDEOGRAPH-6837}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 26412 (\N{CJK UNIFIED IDEOGRAPH-672C}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 25968 (\N{CJK UNIFIED IDEOGRAPH-6570}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 21464 (\N{CJK UNIFIED IDEOGRAPH-53D8}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 37325 (\N{CJK UNIFIED IDEOGRAPH-91CD}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 37319 (\N{CJK UNIFIED IDEOGRAPH-91C7}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 38408 (\N{CJK UNIFIED IDEOGRAPH-9608}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 20540 (\N{CJK UNIFIED IDEOGRAPH-503C}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 30913 (\N{CJK UNIFIED IDEOGRAPH-78C1}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 22330 (\N{CJK UNIFIED IDEOGRAPH-573A}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 24378 (\N{CJK UNIFIED IDEOGRAPH-5F3A}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 24230 (\N{CJK UNIFIED IDEOGRAPH-5EA6}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 27979 (\N{CJK UNIFIED IDEOGRAPH-6D4B}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 37327 (\N{CJK UNIFIED IDEOGRAPH-91CF}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 19982 (\N{CJK UNIFIED IDEOGRAPH-4E0E}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 39044 (\N{CJK UNIFIED IDEOGRAPH-9884}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 36712 (\N{CJK UNIFIED IDEOGRAPH-8F68}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 36857 (\N{CJK UNIFIED IDEOGRAPH-8FF9}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 23545 (\N{CJK UNIFIED IDEOGRAPH-5BF9}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 27604 (\N{CJK UNIFIED IDEOGRAPH-6BD4}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 31895 (\N{CJK UNIFIED IDEOGRAPH-7C97}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 21305 (\N{CJK UNIFIED IDEOGRAPH-5339}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 37197 (\N{CJK UNIFIED IDEOGRAPH-914D}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 20248 (\N{CJK UNIFIED IDEOGRAPH-4F18}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 21270 (\N{CJK UNIFIED IDEOGRAPH-5316}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 31890 (\N{CJK UNIFIED IDEOGRAPH-7C92}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 23376 (\N{CJK UNIFIED IDEOGRAPH-5B50}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 28388 (\N{CJK UNIFIED IDEOGRAPH-6EE4}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 27874 (\N{CJK UNIFIED IDEOGRAPH-6CE2}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 31934 (\N{CJK UNIFIED IDEOGRAPH-7CBE}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 32454 (\N{CJK UNIFIED IDEOGRAPH-7EC6}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 30495 (\N{CJK UNIFIED IDEOGRAPH-771F}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 23454 (\N{CJK UNIFIED IDEOGRAPH-5B9E}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 38170 (\N{CJK UNIFIED IDEOGRAPH-951A}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 28857 (\N{CJK UNIFIED IDEOGRAPH-70B9}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 35823 (\N{CJK UNIFIED IDEOGRAPH-8BEF}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 24046 (\N{CJK UNIFIED IDEOGRAPH-5DEE}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 20301 (\N{CJK UNIFIED IDEOGRAPH-4F4D}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 32622 (\N{CJK UNIFIED IDEOGRAPH-7F6E}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 26102 (\N{CJK UNIFIED IDEOGRAPH-65F6}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 38388 (\N{CJK UNIFIED IDEOGRAPH-95F4}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 27493 (\N{CJK UNIFIED IDEOGRAPH-6B65}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 26377 (\N{CJK UNIFIED IDEOGRAPH-6709}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 25928 (\N{CJK UNIFIED IDEOGRAPH-6548}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 26679 (\N{CJK UNIFIED IDEOGRAPH-6837}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 26412 (\N{CJK UNIFIED IDEOGRAPH-672C}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 25968 (\N{CJK UNIFIED IDEOGRAPH-6570}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 21464 (\N{CJK UNIFIED IDEOGRAPH-53D8}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 37325 (\N{CJK UNIFIED IDEOGRAPH-91CD}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 37319 (\N{CJK UNIFIED IDEOGRAPH-91C7}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 38408 (\N{CJK UNIFIED IDEOGRAPH-9608}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 20540 (\N{CJK UNIFIED IDEOGRAPH-503C}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 30913 (\N{CJK UNIFIED IDEOGRAPH-78C1}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 22330 (\N{CJK UNIFIED IDEOGRAPH-573A}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 24378 (\N{CJK UNIFIED IDEOGRAPH-5F3A}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 24230 (\N{CJK UNIFIED IDEOGRAPH-5EA6}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 27979 (\N{CJK UNIFIED IDEOGRAPH-6D4B}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 37327 (\N{CJK UNIFIED IDEOGRAPH-91CF}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 19982 (\N{CJK UNIFIED IDEOGRAPH-4E0E}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 39044 (\N{CJK UNIFIED IDEOGRAPH-9884}) missing from font(s) DejaVu Sans. plt.show() 优化完成! PS E:\网页下载> ^C PS E:\网页下载> PS E:\网页下载> e:; cd 'e:\网页下载'; & 'd:\A\python.exe' 'c:\Users\86181\.vscode\extensions\ms-python.debugpy-2025.10.0-win32-x64\bundled\libs\debugpy\launcher' '57107' '--' 'E:\网页下载\Magnetic Matching with ADE and Particle Filter.py' === 开始地磁匹配优化 === 粗匹配完成 (0.00s) ADE优化完成 (0.02s) 时间步 3: 执行重采样 (N_eff=147.4/1200) 时间步 5: 执行重采样 (N_eff=46.4/1200) 时间步 7: 执行重采样 (N_eff=217.0/1200) 时间步 14: 执行重采样 (N_eff=162.6/1200) 时间步 19: 执行重采样 (N_eff=110.8/1200) 时间步 20: 执行重采样 (N_eff=216.5/1200) 时间步 21: 执行重采样 (N_eff=219.9/1200) 时间步 22: 执行重采样 (N_eff=220.4/1200) 时间步 23: 执行重采样 (N_eff=201.4/1200) 警告: 时间步 24 所有权重接近零,执行粒子恢复 时间步 29: 执行重采样 (N_eff=187.7/1200) 时间步 32: 执行重采样 (N_eff=234.9/1200) 时间步 35: 执行重采样 (N_eff=86.6/1200) 时间步 37: 执行重采样 (N_eff=156.7/1200) 时间步 39: 执行重采样 (N_eff=157.2/1200) 时间步 41: 执行重采样 (N_eff=157.8/1200) 时间步 43: 执行重采样 (N_eff=123.0/1200) 时间步 45: 执行重采样 (N_eff=83.3/1200) 时间步 47: 执行重采样 (N_eff=75.8/1200) 时间步 49: 执行重采样 (N_eff=58.0/1200) 时间步 51: 执行重采样 (N_eff=47.7/1200) 时间步 53: 执行重采样 (N_eff=16.4/1200) 警告: 时间步 54 所有权重接近零,执行粒子恢复 时间步 58: 执行重采样 (N_eff=177.3/1200) 粒子滤波完成 (2.26s), 平均有效样本数: 474.7/1200 禁忌搜索完成 (0.00s) 最终轨迹与真实轨迹的平均偏差: 0.21105 总耗时: 2.28s 轨迹完整性检查: 输入INS轨迹点数: 60 粗匹配轨迹点数: 60 粒子滤波轨迹点数: 60 精细轨迹点数: 60 真实轨迹点数: 60 E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 36712 (\N{CJK UNIFIED IDEOGRAPH-8F68}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 36857 (\N{CJK UNIFIED IDEOGRAPH-8FF9}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 23545 (\N{CJK UNIFIED IDEOGRAPH-5BF9}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 27604 (\N{CJK UNIFIED IDEOGRAPH-6BD4}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 31895 (\N{CJK UNIFIED IDEOGRAPH-7C97}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 21305 (\N{CJK UNIFIED IDEOGRAPH-5339}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 37197 (\N{CJK UNIFIED IDEOGRAPH-914D}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 20248 (\N{CJK UNIFIED IDEOGRAPH-4F18}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 21270 (\N{CJK UNIFIED IDEOGRAPH-5316}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 31890 (\N{CJK UNIFIED IDEOGRAPH-7C92}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 23376 (\N{CJK UNIFIED IDEOGRAPH-5B50}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 28388 (\N{CJK UNIFIED IDEOGRAPH-6EE4}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 27874 (\N{CJK UNIFIED IDEOGRAPH-6CE2}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 31934 (\N{CJK UNIFIED IDEOGRAPH-7CBE}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 32454 (\N{CJK UNIFIED IDEOGRAPH-7EC6}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 30495 (\N{CJK UNIFIED IDEOGRAPH-771F}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 23454 (\N{CJK UNIFIED IDEOGRAPH-5B9E}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 38170 (\N{CJK UNIFIED IDEOGRAPH-951A}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 28857 (\N{CJK UNIFIED IDEOGRAPH-70B9}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 26102 (\N{CJK UNIFIED IDEOGRAPH-65F6}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 38388 (\N{CJK UNIFIED IDEOGRAPH-95F4}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 27493 (\N{CJK UNIFIED IDEOGRAPH-6B65}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 35823 (\N{CJK UNIFIED IDEOGRAPH-8BEF}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 24046 (\N{CJK UNIFIED IDEOGRAPH-5DEE}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 20301 (\N{CJK UNIFIED IDEOGRAPH-4F4D}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 32622 (\N{CJK UNIFIED IDEOGRAPH-7F6E}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 26377 (\N{CJK UNIFIED IDEOGRAPH-6709}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 25928 (\N{CJK UNIFIED IDEOGRAPH-6548}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 26679 (\N{CJK UNIFIED IDEOGRAPH-6837}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 26412 (\N{CJK UNIFIED IDEOGRAPH-672C}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 25968 (\N{CJK UNIFIED IDEOGRAPH-6570}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 21464 (\N{CJK UNIFIED IDEOGRAPH-53D8}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 37325 (\N{CJK UNIFIED IDEOGRAPH-91CD}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 37319 (\N{CJK UNIFIED IDEOGRAPH-91C7}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 38408 (\N{CJK UNIFIED IDEOGRAPH-9608}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 20540 (\N{CJK UNIFIED IDEOGRAPH-503C}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 30913 (\N{CJK UNIFIED IDEOGRAPH-78C1}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 22330 (\N{CJK UNIFIED IDEOGRAPH-573A}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 24378 (\N{CJK UNIFIED IDEOGRAPH-5F3A}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 24230 (\N{CJK UNIFIED IDEOGRAPH-5EA6}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 27979 (\N{CJK UNIFIED IDEOGRAPH-6D4B}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 37327 (\N{CJK UNIFIED IDEOGRAPH-91CF}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 19982 (\N{CJK UNIFIED IDEOGRAPH-4E0E}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:498: UserWarning: Glyph 39044 (\N{CJK UNIFIED IDEOGRAPH-9884}) missing from font(s) DejaVu Sans. plt.tight_layout() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 36712 (\N{CJK UNIFIED IDEOGRAPH-8F68}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 36857 (\N{CJK UNIFIED IDEOGRAPH-8FF9}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 23545 (\N{CJK UNIFIED IDEOGRAPH-5BF9}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 27604 (\N{CJK UNIFIED IDEOGRAPH-6BD4}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 31895 (\N{CJK UNIFIED IDEOGRAPH-7C97}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 21305 (\N{CJK UNIFIED IDEOGRAPH-5339}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 37197 (\N{CJK UNIFIED IDEOGRAPH-914D}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 20248 (\N{CJK UNIFIED IDEOGRAPH-4F18}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 21270 (\N{CJK UNIFIED IDEOGRAPH-5316}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 31890 (\N{CJK UNIFIED IDEOGRAPH-7C92}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 23376 (\N{CJK UNIFIED IDEOGRAPH-5B50}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 28388 (\N{CJK UNIFIED IDEOGRAPH-6EE4}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 27874 (\N{CJK UNIFIED IDEOGRAPH-6CE2}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 31934 (\N{CJK UNIFIED IDEOGRAPH-7CBE}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 32454 (\N{CJK UNIFIED IDEOGRAPH-7EC6}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 30495 (\N{CJK UNIFIED IDEOGRAPH-771F}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 23454 (\N{CJK UNIFIED IDEOGRAPH-5B9E}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 38170 (\N{CJK UNIFIED IDEOGRAPH-951A}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 28857 (\N{CJK UNIFIED IDEOGRAPH-70B9}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 35823 (\N{CJK UNIFIED IDEOGRAPH-8BEF}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 24046 (\N{CJK UNIFIED IDEOGRAPH-5DEE}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 20301 (\N{CJK UNIFIED IDEOGRAPH-4F4D}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 32622 (\N{CJK UNIFIED IDEOGRAPH-7F6E}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 26102 (\N{CJK UNIFIED IDEOGRAPH-65F6}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 38388 (\N{CJK UNIFIED IDEOGRAPH-95F4}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 27493 (\N{CJK UNIFIED IDEOGRAPH-6B65}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 26377 (\N{CJK UNIFIED IDEOGRAPH-6709}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 25928 (\N{CJK UNIFIED IDEOGRAPH-6548}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 26679 (\N{CJK UNIFIED IDEOGRAPH-6837}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 26412 (\N{CJK UNIFIED IDEOGRAPH-672C}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 25968 (\N{CJK UNIFIED IDEOGRAPH-6570}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 21464 (\N{CJK UNIFIED IDEOGRAPH-53D8}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 37325 (\N{CJK UNIFIED IDEOGRAPH-91CD}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 37319 (\N{CJK UNIFIED IDEOGRAPH-91C7}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 38408 (\N{CJK UNIFIED IDEOGRAPH-9608}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 20540 (\N{CJK UNIFIED IDEOGRAPH-503C}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 30913 (\N{CJK UNIFIED IDEOGRAPH-78C1}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 22330 (\N{CJK UNIFIED IDEOGRAPH-573A}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 24378 (\N{CJK UNIFIED IDEOGRAPH-5F3A}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 24230 (\N{CJK UNIFIED IDEOGRAPH-5EA6}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 27979 (\N{CJK UNIFIED IDEOGRAPH-6D4B}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 37327 (\N{CJK UNIFIED IDEOGRAPH-91CF}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 19982 (\N{CJK UNIFIED IDEOGRAPH-4E0E}) missing from font(s) DejaVu Sans. plt.show() E:\网页下载\Magnetic Matching with ADE and Particle Filter.py:499: UserWarning: Glyph 39044 (\N{CJK UNIFIED IDEOGRAPH-9884}) missing from font(s) DejaVu Sans. plt.show() 优化完成! PS E:\网页下载> 给你看看终端内容,怎么说,就是可视化图形是不是太密了感觉有点乱码,然后好像数据也有点不行,但比以前好了好像,然后用来实验的数据是不是随机的?我希望是随机的

C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 27874 (\N{CJK UNIFIED IDEOGRAPH-6CE2}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 25968 (\N{CJK UNIFIED IDEOGRAPH-6570}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 19968 (\N{CJK UNIFIED IDEOGRAPH-4E00}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 38454 (\N{CJK UNIFIED IDEOGRAPH-9636}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 23548 (\N{CJK UNIFIED IDEOGRAPH-5BFC}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 21560 (\N{CJK UNIFIED IDEOGRAPH-5438}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 20809 (\N{CJK UNIFIED IDEOGRAPH-5149}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 24230 (\N{CJK UNIFIED IDEOGRAPH-5EA6}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 19981 (\N{CJK UNIFIED IDEOGRAPH-4E0D}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 21516 (\N{CJK UNIFIED IDEOGRAPH-540C}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 31181 (\N{CJK UNIFIED IDEOGRAPH-79CD}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 31867 (\N{CJK UNIFIED IDEOGRAPH-7C7B}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 33647 (\N{CJK UNIFIED IDEOGRAPH-836F}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 26448 (\N{CJK UNIFIED IDEOGRAPH-6750}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 30340 (\N{CJK UNIFIED IDEOGRAPH-7684}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 24179 (\N{CJK UNIFIED IDEOGRAPH-5E73}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 22343 (\N{CJK UNIFIED IDEOGRAPH-5747}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 32418 (\N{CJK UNIFIED IDEOGRAPH-7EA2}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 22806 (\N{CJK UNIFIED IDEOGRAPH-5916}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:147: UserWarning: Glyph 35889 (\N{CJK UNIFIED IDEOGRAPH-8C31}) missing from font(s) DejaVu Sans. plt.tight_layout() C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 19968 (\N{CJK UNIFIED IDEOGRAPH-4E00}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 38454 (\N{CJK UNIFIED IDEOGRAPH-9636}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 23548 (\N{CJK UNIFIED IDEOGRAPH-5BFC}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 25968 (\N{CJK UNIFIED IDEOGRAPH-6570}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 21560 (\N{CJK UNIFIED IDEOGRAPH-5438}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 20809 (\N{CJK UNIFIED IDEOGRAPH-5149}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 24230 (\N{CJK UNIFIED IDEOGRAPH-5EA6}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 19981 (\N{CJK UNIFIED IDEOGRAPH-4E0D}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 21516 (\N{CJK UNIFIED IDEOGRAPH-540C}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 31181 (\N{CJK UNIFIED IDEOGRAPH-79CD}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 31867 (\N{CJK UNIFIED IDEOGRAPH-7C7B}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 33647 (\N{CJK UNIFIED IDEOGRAPH-836F}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 26448 (\N{CJK UNIFIED IDEOGRAPH-6750}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 30340 (\N{CJK UNIFIED IDEOGRAPH-7684}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 24179 (\N{CJK UNIFIED IDEOGRAPH-5E73}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 22343 (\N{CJK UNIFIED IDEOGRAPH-5747}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 32418 (\N{CJK UNIFIED IDEOGRAPH-7EA2}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 22806 (\N{CJK UNIFIED IDEOGRAPH-5916}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 35889 (\N{CJK UNIFIED IDEOGRAPH-8C31}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) C:\Users\cheny\Desktop\PythonProject2\表3 六个种类的S D表.py:152: UserWarning: Glyph 27874 (\N{CJK UNIFIED IDEOGRAPH-6CE2}) missing from font(s) DejaVu Sans. plt.savefig(save_path, dpi=300) 报错内容如上 代码如下 import numpy as np import pandas as pd from scipy.signal import savgol_filter, find_peaks from sklearn.decomposition import PCA from sklearn.cluster import KMeans, SpectralClustering from pathlib import Path import matplotlib.pyplot as plt import os # ========== 核心分析模块 ========== def load_data(file_path): """加载光谱数据""" df = pd.read_excel(file_path) wavelengths = df.columns[3:].astype(float) spectra = df.iloc[:, 3:].values return wavelengths, spectra def preprocess_spectra(spectra, window_size=11, poly_order=2, deriv=1): """SG平滑及导数处理""" processed = np.zeros_like(spectra) for i in range(spectra.shape[0]): processed[i] = savgol_filter(spectra[i], window_size, poly_order, deriv=deriv) return processed def analyze_spectra(wavelengths, spectra, use_spectral=False): """聚类分析(可选KMeans或谱聚类)""" processed = preprocess_spectra(spectra) if use_spectral: # 使用谱聚类(适合非球形数据)[2,5](@ref) model = SpectralClustering(n_clusters=6, affinity='rbf', random_state=42) clusters = model.fit_predict(processed) else: # 使用KMeans(默认)[4](@ref) pca = PCA(n_components=12) features = pca.fit_transform(processed) model = KMeans(n_clusters=6, random_state=42, n_init=10) clusters = model.fit_predict(features) return processed, clusters # ========== 报表生成模块 ========== def generate_table2(wavelengths, processed_spectra, clusters): """表2:光谱特征差异表""" results = [] for cluster_id in np.unique(clusters): cluster_spectra = processed_spectra[clusters == cluster_id] avg_spectrum = np.mean(cluster_spectra, axis=0) # 特征计算 peaks, _ = find_peaks(avg_spectrum, height=0.1 * np.max(avg_spectrum), distance=20) peak_count = len(peaks) max_peak_idx = np.argmax(avg_spectrum) max_peak_pos = wavelengths[max_peak_idx] peak_intensity = avg_spectrum[max_peak_idx] # 分类逻辑 intensity_level = "极强" if peak_intensity > 0.8 else "较强" if peak_intensity > 0.6 else "中等" if peak_intensity > 0.4 else "较弱" left_half = avg_spectrum[:max_peak_idx] right_half = avg_spectrum[max_peak_idx:] asymmetry = np.mean(right_half) / np.mean(left_half) if np.mean(left_half) > 0 else 1.0 peak_shape = "尖锐" if 0.9 < asymmetry < 1.1 else "钝" results.append({ "种类": f"种类{cluster_id + 1}", "总峰数": f"{max(1, peak_count - 1)}-{peak_count}", "最高峰位(cm⁻¹)": int(max_peak_pos), "峰强": intensity_level, "峰形": peak_shape }) return pd.DataFrame(results) def generate_table3(wavelengths, processed_spectra, clusters, top_n=3): """表3:聚类统计特征表""" results = [] for cluster_id in np.unique(clusters): cluster_spectra = processed_spectra[clusters == cluster_id] avg_spectrum = np.mean(cluster_spectra, axis=0) std_spectrum = np.std(cluster_spectra, axis=0) # 检测主要峰位 peaks, properties = find_peaks(avg_spectrum, height=0.1 * np.max(avg_spectrum), distance=20) peak_positions = wavelengths[peaks] peak_heights = properties['peak_heights'] # 提取前top_n个显著峰 top_peaks_idx = np.argsort(peak_heights)[-top_n:][::-1] top_peaks = ",".join([f"{int(peak_positions[i])}({peak_heights[i]:.2f})" for i in top_peaks_idx]) # 统计特征 max_peak_idx = np.argmax(avg_spectrum) cv = np.mean(std_spectrum / (np.abs(avg_spectrum) + 1e-5)) # 避免除零 results.append({ "聚类类别": f"种类{cluster_id + 1}", "样本数": len(cluster_spectra), "平均吸光度(导数)": f"{np.mean(avg_spectrum):.4f}±{np.mean(std_spectrum):.4f}", "最高峰位(cm⁻¹)": int(wavelengths[max_peak_idx]), "显著峰位(强度)": top_peaks, "光谱变异系数": f"{cv:.2%}" }) return pd.DataFrame(results) # ========== Excel自动保存模块 ========== def save_to_excel(df, output_path): """ 自动保存DataFrame到Excel(解决路径问题) :param df: 要保存的DataFrame :param output_path: 输出路径(支持相对/绝对路径) :return: 操作状态消息 """ try: path = Path(output_path) path.parent.mkdir(parents=True, exist_ok=True) # 自动创建目录[7](@ref) df.to_excel(path, index=False, engine='openpyxl') return f"✅ Excel已保存至: {path.absolute()}" except PermissionError: return f"❌ 错误:文件'{path.name}'被占用或无写入权限" except Exception as e: return f"❌ 保存失败: {str(e)}" # ========== 可视化模块 ========== def plot_spectra(wavelengths, processed_spectra, clusters): """绘制聚类光谱曲线""" plt.figure(figsize=(12, 6)) colors = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b'] for i, cluster_id in enumerate(np.unique(clusters)): cluster_spectra = processed_spectra[clusters == cluster_id] avg_spectrum = np.mean(cluster_spectra, axis=0) plt.plot(wavelengths, avg_spectrum, label=f'种类{cluster_id + 1}', color=colors[i], linewidth=2) plt.title('不同种类药材的平均红外光谱', fontsize=14) plt.xlabel('波数 (cm⁻¹)', fontsize=12) plt.ylabel('一阶导数吸光度', fontsize=12) plt.legend(fontsize=10) plt.grid(linestyle='--', alpha=0.7) plt.tight_layout() # 保存图片 save_path = "results/光谱聚类图.png" Path(save_path).parent.mkdir(exist_ok=True) plt.savefig(save_path, dpi=300) plt.close() return save_path # ========== 主流程控制 ========== def main(): """主执行函数(全自动分析+保存)""" # 配置参数 DATA_PATH = "附件1.xlsx" OUTPUT_DIR = "分析结果" try: # 1. 数据加载 wavelengths, spectra = load_data(DATA_PATH) print(f"✅ 数据加载成功: 共{len(spectra)}条光谱") # 2. 光谱分析与聚类 processed_spectra, clusters = analyze_spectra(wavelengths, spectra) print(f"✅ 聚类完成: 共{len(np.unique(clusters))}个类别") # 3. 生成表2和表3 table2 = generate_table2(wavelengths, processed_spectra, clusters) table3 = generate_table3(wavelengths, processed_spectra, clusters) # 4. 自动保存Excel save_result1 = save_to_excel(table2, f"{OUTPUT_DIR}/表2_光谱特征差异表.xlsx") save_result2 = save_to_excel(table3, f"{OUTPUT_DIR}/表3_聚类统计特征表.xlsx") print(save_result1) print(save_result2) # 5. 可视化 plot_path = plot_spectra(wavelengths, processed_spectra, clusters) print(f"✅ 光谱图保存至: {plot_path}") print("\n🌟 所有分析完成!结果已保存至'分析结果'目录") except FileNotFoundError: print(f"❌ 文件未找到: 请检查{DATA_PATH}是否存在") except Exception as e: print(f"❌ 全局错误: {type(e).__name__} - {str(e)}") if __name__ == "__main__": main()

最新推荐

recommend-type

数据库中间件使用说明.zip

数据库中间件使用说明.zip
recommend-type

RaspberryMatic与Docker整合:CCU2固件容器化操作指南

### Docker与CCU2固件整合 #### 知识点1:Docker容器技术 Docker是一种开源的容器化平台,它允许开发者将应用及其依赖打包到一个可移植的容器中,该容器可以在任何支持Docker的机器上运行。Docker容器和传统的虚拟机不同,它不需要完整的操作系统镜像,而是利用宿主机的操作系统内核,实现了轻量级的隔离,启动速度快,资源消耗低。 #### 知识点2:CCU2固件与OpenHAB CCU2(CCU代表Comet Control Unit)固件通常用在HomeMatic智能家居自动化系统中,它负责管理和控制HomeMatic的设备。CCU2运行的是一个基于Linux的自定义系统,专门优化用于与HomeMatic硬件和软件通信。当把CCU2固件用于Docker容器时,意味着你可以在任何支持Docker的设备上,通过容器化的方式部署和运行CCU2环境,从而支持HomeMatic设备的控制。 #### 知识点3:RaspberryMatic RaspberryMatic是为树莓派量身打造的一个项目,它允许用户在树莓派上运行CCU2固件。项目提供了一整套的HomeMatic体验,包括备份功能、Dutty-Cycle、LAN GW等。RaspberryMatic的一个显著优点是支持多种架构,包括x86_64/amd64、ARM和ARM64。 #### 知识点4:Docker容器部署脚本 "docker-ccu"项目提供了一套脚本,这些脚本能够自动化创建一个Docker容器来运行CCU2固件。通常这类脚本命名为`deploy.sh`,开发者或者最终用户可以通过运行这些脚本来快速部署和启动Docker容器,而无需手动配置和启动容器的每一个步骤。 #### 知识点5:数据备份与迁移 在使用Docker容器进行部署时,用户可能需要在不同环境下迁移数据或者保留原有数据。脚本中提到了数据保留的问题,如果用户之前使用的是其他方式部署,比如非Docker方式或者使用了特定的docker卷或者容器名称,那么在调用`deploy.sh`脚本部署时,需要对设置进行相应的调整,以保证数据的完整性。 #### 知识点6:仓库维护与开源社区 项目维护者提到了不再计划继续更新该存储库,并提出了将仓库设置为只读模式的想法。这在开源社区中是比较常见的情况,尤其是在维护者有新的兴趣点或者由于个人时间限制时。在此情况下,开源项目可以通过社区协作来继续维护,或者寻求其他维护者的接手。 #### 知识点7:Shell脚本编写 由于项目中提到了一个叫做`deploy.sh`的脚本文件,这说明脚本是用Shell语言编写的。Shell脚本非常适合于执行自动化任务,比如配置环境、启动服务、管理文件系统等,因此在自动化部署或系统管理中经常被使用。了解Shell脚本编写,对于自动化管理Docker容器等任务至关重要。 #### 知识点8:社区支持和反馈 项目维护者在描述中提到,如果在一个月内没有收到任何关于将官方CCU作为容器使用的反馈,将会把仓库设置为只读模式。这表明了开源社区中项目的发展很大程度上依赖于社区成员的反馈和支持。因此,了解如何与开源项目互动,提交问题、建议和补丁,是参与开源社区的重要途径。 #### 知识点9:固件概念与兼容性 CCU2固件特别设计用于某些特定硬件,但通过Docker化的方式,开发者可以跨平台运行CCU2固件,这增加了固件的兼容性。Docker的隔离性允许用户在一个通用的软件层面上运行原本可能受限于特定硬件的固件,从而扩展了固件的应用场景。 #### 知识点10:操作系统架构支持 项目支持包括x86_64/amd64、ARM和ARM64在内的多种架构,说明了Docker容器在不同硬件平台上的高度可移植性。这一特点使得开发者可以在各种硬件上部署相同的环境,简化了跨平台应用的开发和部署。 #### 结语 该文档提供了一个关于如何将特定固件整合入Docker容器的方案,并说明了项目维护者对于未来发展的规划。这些内容不仅对有志于尝试或扩展该项目的个人有指导意义,同时也展示了开源社区协作以及Docker技术在部署和管理复杂系统环境中的重要性和便利性。
recommend-type

手把手封装SDK:C#如何高效集成汉印D35BT打印功能

# 摘要 本文围绕C# SDK封装与汉印D35BT打印机集成的技术实践展开,系统阐述了SDK封装的理论基础、架构设计及面向对象设计原则的应用。文章分析了汉印D35BT打印机的通信协议与API调用方式,并详细介绍了在C#中实现蓝牙设备交互与数据发送的方法。通过核心打印功能的类封装、异步任务处理机制的设计,提升了SDK的易用性与扩展性。结合WinForm项目示例验证功能完整性后,进一步探讨了SDK的性能优化策略、测试方法及发布流程,构建了从设计、实现到部署的完整技术路径。 # 关键字 SDK封装;蓝牙通信;面向对象设计;异步打印;API调用;NuGet包发布 参考资源链接:[C#开
recommend-type

VM虚拟机ubuntu桥接主机无线网络

### 配置 VMware Ubuntu 桥接模式连接无线网络 在 VMware 中配置 Ubuntu 虚拟机通过桥接模式连接主机的无线网络,需要确保虚拟机与主机处于同一网络段,并能够通过主机的无线网卡直接访问外部网络。以下是详细的配置步骤: #### VMware 设置桥接模式 1. **以管理员权限运行 VMware**,进入 **编辑 > 虚拟网络编辑器**。 2. 在 **虚拟网络编辑器** 界面中,找到 **VMnet0(桥接模式)** 的设置部分。 3. 在 **“桥接到”** 的下拉菜单中,选择主机的无线网卡设备。 4. 勾选 **“自动设置桥接”** 选项,确保 VMwar
recommend-type

Ruby on Rails跳蚤市场应用开发详解

根据提供的文件信息,我们可以从中提炼出以下知识点: ### 标题知识点 - **freemarket_sample_72h** - 标题暗示这是一份关于名为“freemarket”的跳蚤市场应用程序的72小时开发样例或原型。 - 样例名称“freemarket_sample_72h”可能用于内部标识或者版本控制,表明该样本是在有限的时间内(即72小时内)完成的。 ### 描述知识点 - **网站结构** - 首页:应用程序的入口点,通常包含总体介绍和导航链接。 - 产品页面:展示产品的列表或者详细信息。 - 展览页:可能指专门展示某些特殊产品或促销产品的页面。 - 应用信息:关于应用程序的基本信息,如版本号、开发团队、联系方式等。 - 应用概述:对应用程序功能和目标用户群体的简介。 - **用户账户信息** - 测试账号:为开发者或测试者提供的虚拟用户账号信息,以便进行应用程序的内部测试。 - 购买者信息:提供了邮箱地址、密码以及购买卡信息,是进行交易和购买所必需的。 - 卖家信息:提供了卖家的邮箱地址和密码,用于登录卖家账户进行产品上架和管理。 - **功能列表** - 新用户注册:允许新用户创建账户。 - 登录功能:用户可以使用凭证登录应用程序。 - 产品列表功能:展示所有可购买的产品。 - 产品购买功能:用户可以购买产品,涉及到支付信息的处理。 - 产品类别注册和显示:允许用户查看不同的产品分类。 - 产品详细信息显示:展示每个产品的详细信息,如描述、价格等。 - 编辑和删除列出的产品:赋予管理员或卖家权利更新或移除产品信息。 - **开发环境** - Ruby 2.5.1:这是Ruby编程语言的一个版本。 - Ruby on Rails 5.4.2:这是一个使用Ruby语言编写的开源Web应用框架。 - MySQL 14.14:这是一个流行的开源关系型数据库管理系统。 - Github:一个用于代码托管和版本控制的平台。 - AWS:亚马逊提供的云服务平台,包括EC2(弹性计算云)和S3(简单存储服务)。 - Capistrano:是一个开源的自动化部署工具,常用于Ruby on Rails项目。 - **开发周期和工作时间** - 开发时间:约4周,说明了项目从开始到完成所需的时间。 - 每天平均工作时间:大约9小时,表明项目的紧凑和开发团队的努力。 - 开发系统人数:4,指出了参与该项目的开发人员数量。 - 敏捷类型:可能指的是一种开发过程,强调快速迭代和响应变化。 ### 标签知识点 - **Ruby** - 这个标签直接指向了Ruby编程语言,说明该应用程序是使用Ruby开发的。 ### 压缩包子文件的文件名称列表知识点 - **freemarket_sample_72h-master** - 这是源代码压缩包的文件名称,指示了一个版本控制中的主分支(master)。 通过这些信息,我们可以了解到该应用程序是一个在线跳蚤市场,它允许用户注册、登录、查看和购买产品,并且提供了产品管理功能。项目采用Ruby语言和Ruby on Rails框架开发,并使用了多种技术和平台,如MySQL数据库、Github、AWS云服务以及Capistrano部署工具。项目开发遵循敏捷开发原则,并在一个紧凑的时间表中完成。
recommend-type

【C#条码打印实战技巧】:汉印D35BT数据格式转换全攻略

# 摘要 本文围绕C#语言实现条码打印的技术方案展开,重点以汉印D35BT打印机为实践对象,系统性地讲解了条码打印中数据格式的基本原理与处理方法。文章分析了条码打印的数据流向、通信协议与命令集结构,探讨了在C#开发环境下实现数据格式转换、命令封装与容错机制的关键技术。通过完整的打印流程实现、性能优化策略以及常见问题排查方法的介绍,帮助开发者构建高效稳定的条码打印应用。同时,文章还展望了条码打印技术在多协议支持、云服务集成与企业级系统对接方面的拓展方向。 # 关键字 条码打印;数据格式;C#开发;通信协议;命令封装;容错机制 参考资源链接:[C#开发汉印D35BT条码打印机源代码
recommend-type

pikaqiu靶场搭建linux

在Linux系统上搭建名为“Pikachu”的靶场环境,主要涉及以下几个步骤: ### 下载并安装Pikachu靶场 首先,需要确保系统中已安装Git工具。如果尚未安装,可以通过以下命令安装Git: ```bash sudo yum install git ``` 接下来,使用Git从GitHub上克隆Pikachu靶场的源代码到本地: ```bash git clone https://github.com/zhuifengshaonianhanlu/pikachu.git ``` 完成下载后,将Pikachu靶场文件移动到Apache服务器的根目录下,以便于后续的Web访问:
recommend-type

jsTris: 探索俄罗斯方块的JavaScript实现

俄罗斯方块是一款经典的电子游戏,自1984年由苏联程序员阿列克谢·帕基特诺夫在计算机上首次开发以来,就以其简单而又富有挑战性的玩法吸引了世界各地的玩家。随着时间的发展,许多开发者开始尝试使用不同的编程语言和平台对俄罗斯方块进行重制或创新。本篇将详细介绍关于一个名为“jsTris”的俄罗斯方块游戏的JavaScript实现。 ### 1. JavaScript与Web游戏开发 JavaScript是一种广泛用于网页前端开发的脚本语言,它能够让网页拥有动态交互功能。自ECMAScript 5版本之后,JavaScript性能得到了显著的提升,使其逐渐成为开发Web游戏的理想选择。通过HTML5的Canvas API与JavaScript的结合,开发者可以创建出流畅、富有吸引力的图形界面,为用户带来良好的游戏体验。 ### 2.俄罗斯方块游戏机制 俄罗斯方块的基本玩法是玩家需要移动、旋转和放置一系列下落的方块,使它们在底部拼成完整的一行或多行,这样可以消除方块并获得分数。当方块堆积到屏幕顶部时,游戏结束。游戏难度会随着时间的推移而逐渐增加。 ### 3. jsTris项目概述 "jsTris"是俄罗斯方块的一个JavaScript版本,由一位不具名的开发者于2014年开发,并上传到了GitHub上进行开源。项目中包含了所有实现俄罗斯方块游戏逻辑的JavaScript代码,以及必要的HTML和CSS文件,用以构建游戏界面。 尽管作者自述代码“非常混乱”,而且表示自己没有回过头来清理过,这可能意味着对于初学者和后来的维护者来说,理解原始代码的结构和逻辑可能会有一定难度。不过,即使代码结构不佳,jsTris仍然可以作为一个学习的资源,开发者可以通过重构和优化来提升代码质量,同时也更好地理解游戏背后的逻辑。 ### 4. 音乐资源 在描述中提到了音乐来源,但并未给出具体的音乐文件信息。通常情况下,Web游戏会使用一些背景音乐和效果音来增强游戏体验。在jsTris项目中,音乐文件可能被嵌入到了项目中,或者通过外部链接引入。音乐的版权问题在此类开源项目中需要特别注意,开发者使用音乐时应确保拥有相应的使用权或音乐已经处于公共领域。 ### 5. 标签和文件结构 本项目的标签是"JavaScript",表明该项目完全是使用JavaScript进行开发的。关于"jsTris-master"这个文件名,它可能是项目中的主文件夹,包含了游戏的核心代码和资源文件。在一个典型的JavaScript项目结构中,可能包括以下部分: - HTML文件:定义游戏的结构和入口点。 - CSS文件:负责游戏的样式和视觉效果。 - JavaScript文件:包含游戏逻辑、控制和交互代码。 - 音频文件:用于游戏背景音乐和各种效果音。 - 图片文件:可能包括游戏中的图标、角色或背景。 ### 6. 开源与社区 该项目被上传到了GitHub,这是一个全球性的开源社区,允许开发者贡献代码,共同改进项目。在GitHub上,jsTris项目可能拥有自己的README文件,用于说明如何运行游戏、如何贡献代码或报告问题等。开源项目对于开发者来说是学习和实践编程技巧的宝贵资源,同时也可以通过社区获得帮助和反馈,从而改进项目。 ### 7. 清理与重构代码的重要性 提到jsTris的代码"非常混乱",对于任何类型的软件项目而言,可读性和可维护性都是极其重要的。混乱的代码会导致开发者难以理解,更不用说进行进一步的开发或优化。因此,对于jsTris或任何类似项目,代码重构是一个需要认真对待的过程。重构可以提高代码质量,降低维护成本,并可能修复一些潜在的错误。 ### 总结 jsTris项目作为一款使用JavaScript实现的俄罗斯方块游戏,向我们展示了如何利用Web技术进行游戏开发。虽然存在代码结构上的问题,但它无疑为有兴趣学习和改进的开发者提供了实践机会。通过深入分析和可能的代码重构,不仅可以提升jsTris项目的质量,也可以使开发者自己在JavaScript编程和游戏开发方面获得宝贵的经验。
recommend-type

从失败到稳定打印:汉印D35BT常见问题排查与解决方案大全

# 摘要 本文围绕汉印D35BT打印机的使用与故障排查展开系统研究,首先介绍其基本功能与典型应用场景,进而从打印质量、通信连接及任务处理等方面深入分析常见故障的成因,涵盖硬件适配、环境影响、数据通信及固件兼容性等多个维度。基于理论分析,本文进一步提出针对典型问题的实操解决方案,并探讨打印性能优化、固件升级及企业系统集成等高级应用策略。通过案例分析与实践经验总结,旨在提升设备运行稳定性与打印效率,为企业用户提供可靠的技术支持和运维指导。 # 关键字 汉印D35BT;打印质量;蓝牙通信;打印缓冲区;固件升级;数据格式适配 参考资源链接:[C#开发汉印D35BT条码打印机源代码及二次
recommend-type

point transformer v3安装

要安装 **Point Transformer V3** 深度学习模型,通常需要从其开源代码库中获取源代码并进行本地部署。目前,该模型的实现可能托管在 GitHub 或类似的代码平台上。以下是安装和部署的一般步骤: ### 1. 环境准备 确保系统中已安装以下工具和库: - **Python**(建议 3.8 或更高版本) - **PyTorch**(建议版本 1.10 或更高) - **CUDA Toolkit**(与 PyTorch 兼容的版本) - **NVIDIA GPU驱动** - **编译工具链**(如 `ninja`、`CMake` 等) 安装 PyTorch 的示例命令