add:
(1)在生成的300tc定标文件中添加生成时间; (2)添加版本号:2.1;
This commit is contained in:
@ -13,6 +13,7 @@ import sys, traceback
|
||||
from osgeo import gdal
|
||||
from scipy.interpolate import interp1d
|
||||
import spectral
|
||||
import time
|
||||
|
||||
from PyQt5.QtWidgets import QMainWindow, QFileDialog, QApplication
|
||||
from PyQt5.QtCore import Qt
|
||||
@ -155,6 +156,7 @@ class RadianceCalibration():
|
||||
def write_fields_to_hdrfile(self, fields, hdr_file):
|
||||
header_tmp = spectral.envi.read_envi_header(hdr_file)
|
||||
|
||||
fields['generated time'] = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())
|
||||
with open(hdr_file, "a", encoding='utf-8') as f:
|
||||
for key in fields.keys():
|
||||
if key in header_tmp or key == "description":
|
||||
|
Reference in New Issue
Block a user