添加公式方法

This commit is contained in:
DXC
2026-06-12 16:48:20 +08:00
parent be47b70594
commit f73a7d8999
7 changed files with 162 additions and 62 deletions

View File

@ -1378,7 +1378,8 @@ class WaterQualityGUI(QMainWindow):
'step11_map': "14_visualization/"
}
# 定义步骤间的依赖关系:{当前步骤: {输入字段: (依赖步骤, 输出类型, 面板属性名)}}
# 依赖关系字典结构:
# '当前步骤ID': { '依赖参数名': ('上游步骤ID', '上游输出类型/Key', '当前步骤接收该路径的组件属性名') }
self.step_dependencies = {
'step2': {
'img_path': ('step1', 'reference_img', 'img_file'),
@ -1386,31 +1387,36 @@ class WaterQualityGUI(QMainWindow):
},
'step3': {
'img_path': ('step1', 'reference_img', 'img_file'),
'water_mask': ('step1', 'water_mask', 'water_mask_file'),
'water_mask': ('step1', 'water_mask', 'water_mask_file')
},
'step4_sampling': {
'deglint_img_path': ('step3', 'deglint_image', 'deglint_img_file'),
'water_mask_path': ('step1', 'water_mask', 'water_mask_file')
},
'step5_clean': {
'csv_path': ('step4_sampling', 'sampling_spectra', 'csv_file') # step5 寻找 step4 的采样点
},
'step6_feature': {
'deglint_img_path': ('step3', 'deglint_image', 'deglint_img_file'),
'csv_path': ('step5_clean', 'processed_data', 'csv_file'),
'boundary_mask_path': ('step1', 'water_mask', 'boundary_mask_file'),
'boundary_mask_path': ('step1', 'water_mask', 'water_mask_file'), # step6_panel里叫water_mask_file
'glint_mask_path': ('step2', 'glint_mask', 'glint_mask_file')
},
'step7_index': {
'training_csv_path': ('step6_feature', 'training_spectra', 'output_file')
'training_csv_path': ('step6_feature', 'training_spectra', 'training_data_widget') # step7 找 step6 的光谱提取
},
'step8_ml_train': {
'training_csv_path': ('step7_index', 'water_indices', 'csv_file')
},
'step4_sampling': {
'deglint_img_path': ('step3', 'deglint_image', 'deglint_img_file'),
'water_mask_path': ('step1', 'water_mask', 'water_mask_file'),
'glint_mask_path': ('step2', 'glint_mask', 'glint_mask_file')
'training_csv_file': ('step7_index', 'training_spectra_indices', 'training_csv_file') # step8 找 step7 的指数宽表
},
'step9_ml_predict': {
'sampling_csv_path': ('step4_sampling', 'sampling_points', 'sampling_csv_file'),
'models_dir': ('step8_ml_train', 'models', 'models_dir_file')
'models_dir': ('step8_ml_train', 'Supervised_Model_Training', 'models_dir_widget')
},
'step10_watercolor': {
'bsq_file': ('step3', 'deglint_image', 'bsq_file') # 水色反演需要去耀斑BSQ影像
},
'step11_map': {
'prediction_csv_path': ('step9_ml_predict', 'predictions', 'prediction_csv_file')
'prediction_csv_dir_edit': ('step9_ml_predict', 'Machine_Learning_Prediction', 'prediction_csv_dir_edit'),
'geotiff_dir_edit': ('step10_watercolor', 'WaterIndex_Images', 'geotiff_dir_edit')
}
}