refactor: PhysicalFeature 精炼至 15 个指数 — 砍冗余比值 + 补 BGA 公式
- 删除 6 个无明确物理意义的波段比值(R700_R670 等) - 新增 PC_ND: (R650-R620)/(R650+R620) 藻蓝归一化差值 - 最终 15 个: 通用4 + Chl5 + BGA3 + Turb3
This commit is contained in:
@ -436,7 +436,7 @@ class MNFTransformer(TransformerMixin, BaseEstimator, _ArrayAsFloat64):
|
||||
# ============================================================================
|
||||
|
||||
class PhysicalFeatureExtractor(TransformerMixin, BaseEstimator, _ArrayAsFloat64):
|
||||
"""从原始高光谱波段计算 20 个精选水质/植被指数。
|
||||
"""从原始高光谱波段计算 15 个精选水质/植被指数。
|
||||
|
||||
涵盖通用植被指数 + Chl/BGA/Turb 等指标,覆盖全部 13 个预测目标。
|
||||
使用最近的传感器波段匹配目标波长,无需外部公式库。
|
||||
@ -444,34 +444,28 @@ class PhysicalFeatureExtractor(TransformerMixin, BaseEstimator, _ArrayAsFloat64)
|
||||
输入 X 为 DataFrame 时自动解析列名;ndarray 时需在 __init__ 传入 wavelengths。
|
||||
"""
|
||||
|
||||
# (名称, 分子波长nm, 分母波长nm)
|
||||
# (名称, 公式类型, 目标波长nm_a, 目标波长nm_b)
|
||||
# ratio 型: (A-B)/(A+B); ratio_single 型: A/B
|
||||
_INDEX_DEFS = [
|
||||
# ── 通用植被/水体指数 ──
|
||||
# ── 通用植被/水体指数 (4个) ──
|
||||
('NDVI', 'ratio', 800.0, 670.0),
|
||||
('NDWI', 'ratio', 550.0, 800.0),
|
||||
('MNDWI', 'ratio', 550.0, 1600.0),
|
||||
('EVI', 'ratio', 800.0, 670.0), # EVI 简化: (NIR-R)/(NIR+R)
|
||||
# ── Chl 叶绿素 ──
|
||||
('EVI', 'ratio', 800.0, 670.0),
|
||||
# ── Chl 叶绿素 (5个) ──
|
||||
('NDCI', 'ratio', 708.0, 665.0),
|
||||
('CIgreen', 'ratio_single', 750.0, 550.0),
|
||||
('CIrededge', 'ratio_single', 750.0, 705.0),
|
||||
('MCI', 'ratio', 709.0, 665.0),
|
||||
('SABI', 'ratio', 800.0, 670.0),
|
||||
# ── BGA 藻蓝蛋白 ──
|
||||
# ── BGA 藻蓝蛋白 (3个) ──
|
||||
('PC_ratio1', 'ratio_single', 620.0, 600.0),
|
||||
('PC_ratio2', 'ratio_single', 650.0, 620.0),
|
||||
# ── Turb 浊度 ──
|
||||
('PC_ND', 'ratio', 650.0, 620.0), # 藻蓝 ND 指数
|
||||
# ── Turb 浊度 (3个) ──
|
||||
('Turb_RedNIR', 'ratio_single', 800.0, 670.0),
|
||||
('Turb_GreenRed','ratio_single', 550.0, 670.0),
|
||||
('Turb_NIRGreen','ratio_single', 800.0, 550.0),
|
||||
# ── 其他有用比值 ──
|
||||
('R700_R670', 'ratio_single', 705.0, 670.0),
|
||||
('R550_R670', 'ratio_single', 550.0, 670.0),
|
||||
('R800_R550', 'ratio_single', 800.0, 550.0),
|
||||
('R800_R700', 'ratio_single', 800.0, 705.0),
|
||||
('R670_R550', 'ratio_single', 670.0, 550.0),
|
||||
('R670_R440', 'ratio_single', 670.0, 440.0),
|
||||
]
|
||||
|
||||
def __init__(self, wavelengths=None):
|
||||
|
||||
Reference in New Issue
Block a user