(1)在生成的300tc定标文件中添加生成时间;
(2)添加版本号:2.1;
This commit is contained in:
tangchao0503
2023-07-27 13:35:02 +08:00
parent fe8e2441c9
commit 32ccb25a0e
3 changed files with 4 additions and 2 deletions

View File

@ -13,6 +13,7 @@ import sys, traceback
from osgeo import gdal from osgeo import gdal
from scipy.interpolate import interp1d from scipy.interpolate import interp1d
import spectral import spectral
import time
from PyQt5.QtWidgets import QMainWindow, QFileDialog, QApplication from PyQt5.QtWidgets import QMainWindow, QFileDialog, QApplication
from PyQt5.QtCore import Qt from PyQt5.QtCore import Qt
@ -155,6 +156,7 @@ class RadianceCalibration():
def write_fields_to_hdrfile(self, fields, hdr_file): def write_fields_to_hdrfile(self, fields, hdr_file):
header_tmp = spectral.envi.read_envi_header(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: with open(hdr_file, "a", encoding='utf-8') as f:
for key in fields.keys(): for key in fields.keys():
if key in header_tmp or key == "description": if key in header_tmp or key == "description":

View File

@ -141,7 +141,7 @@ class Ui_MainWindow(object):
def retranslateUi(self, MainWindow): def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate _translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) MainWindow.setWindowTitle(_translate("MainWindow", "Corning Calibration v2.1"))
self.label.setText(_translate("MainWindow", "ASD辐亮度")) self.label.setText(_translate("MainWindow", "ASD辐亮度"))
self.rad_bt.setText(_translate("MainWindow", "浏览...")) self.rad_bt.setText(_translate("MainWindow", "浏览..."))
self.label_3.setText(_translate("MainWindow", "DN")) self.label_3.setText(_translate("MainWindow", "DN"))

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>MainWindow</string> <string>Corning Calibration v2.1</string>
</property> </property>
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">