python - 为什么辐射校正后波段 5、6 和 7 会出现负值?
问题描述
我正在尝试使用 Python 手动校正 Landsat 8 图像;我正在使用 Rasterio 和 numpy 数组使用 LVL 1 集合 1 数据中提供的 MTL 文件中的波段乘法和加法值来修改每个波段的数字数字,但我的 NIR SWIR1 和 SWIR2 值是负数。
for x in B_list:
with rasterio.open(x,"r") as b:
band=b.read(1)
band_masked = numpy.ma.masked_array(band, mask=(band == 0))
TOA_x=(.00002000*band_masked)+(-.100000)
TOA=TOA_x/math.sin(sun_elevation)
scaled=TOA*10000 # scale the numbers by 10000
rad_cor_bands.append(scaled) # append the new rasters to a list
这些是与 ENVI FLAASH 结果比较的结果:
(我的结果)
{'min':870.353812730424,'max':9149.756477515453,'mean':1282.322945234995,'std':320.7381911648936}
{'min':622.4013889713156,'max':10142.046235327802,'mean':1079.4094047219655,'std':350.35757713331907}
{'min':343.96497894172603,'max':11529.667689104577,'mean':896.144857921475,'std':378.5729920045608}
{'min':134.17754586770752,'max':11543.109446830142,'mean':742.6455972788715,'std':453.6422724804889}
{'min':-110.65446984796611,'max':10970.634586553786,'mean':1557.865121879584,'std':1162.4318852778347}
{'min':-82.33076606909405,'max':14530.300069949319,'mean':1092.5736223521078,'std':926.4220337052117}
{'min':-41.045367340568724,'max':14530.300069949319,'mean':667.2732393332138,'std':626.3179561231228}
(ENVI 的结果)
带 1 859.540771 9036.083008 1266.391450 316.757106
带 2 614.668823 10016.045898 1065.998458 346.008481
带 3 339.691589 11386.427734 885.012531 373.876933
带 4 132.510468 11399.702148 733.421884 448.012152
带 5 0.711042 10834.339844 1538.519843 1147.988763
带 6 0.236943 14349.781250 1078.952402 914.906030
带 7 1.896288 14349.781250 658.963308 618.535988
ENVI 快速统计结果的显示顺序与我为我的 numpy 数组制作的字典中的顺序相同。有谁知道为什么我的 NIR SWIR1 和 SWIR2 为负值?所有其他值都与 ENVI Quick 统计数据极为相似。
解决方案
推荐阅读
- angular - 角关闭浏览器
- angular - 'array-contains' 查询不适用于引用的 Firestore
- c++ - std::find 的奇怪行为,当元素不在向量中时返回 true
- angular - Angular:检查 json 属性
- windows - 调试 PE 时执行的字节数
- java - 指定 ZonedDateTime 的时区而不更改实际日期
- ios - Swift - 正则表达式提取价值
- ruby-on-rails - 将 rails 从 4.2 升级到 5.2 依赖问题
- timezone - 如何在 Azure AD 中确定用户的国家代码
- algorithm - 如何根据任意顺序对列表进行排序