# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'gravtools/gui/dialog_corrections.ui'
#
# Created by: PyQt5 UI code generator 5.15.9
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again.  Do not edit this file unless you know what you are doing.


from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_Dialog_corrections(object):
    def setupUi(self, Dialog_corrections):
        Dialog_corrections.setObjectName("Dialog_corrections")
        Dialog_corrections.resize(481, 639)
        self.verticalLayout_8 = QtWidgets.QVBoxLayout(Dialog_corrections)
        self.verticalLayout_8.setObjectName("verticalLayout_8")
        self.tabWidget = QtWidgets.QTabWidget(Dialog_corrections)
        self.tabWidget.setObjectName("tabWidget")
        self.tab_all_instruments = QtWidgets.QWidget()
        self.tab_all_instruments.setObjectName("tab_all_instruments")
        self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.tab_all_instruments)
        self.verticalLayout_7.setObjectName("verticalLayout_7")
        self.groupBox_corrections_tides = QtWidgets.QGroupBox(self.tab_all_instruments)
        self.groupBox_corrections_tides.setObjectName("groupBox_corrections_tides")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.groupBox_corrections_tides)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.radioButton_corr_tides_no_correction = QtWidgets.QRadioButton(self.groupBox_corrections_tides)
        self.radioButton_corr_tides_no_correction.setObjectName("radioButton_corr_tides_no_correction")
        self.buttonGroup_corrections_tides = QtWidgets.QButtonGroup(Dialog_corrections)
        self.buttonGroup_corrections_tides.setObjectName("buttonGroup_corrections_tides")
        self.buttonGroup_corrections_tides.addButton(self.radioButton_corr_tides_no_correction)
        self.verticalLayout.addWidget(self.radioButton_corr_tides_no_correction)
        self.radioButton_corr_tides_cg5_model = QtWidgets.QRadioButton(self.groupBox_corrections_tides)
        self.radioButton_corr_tides_cg5_model.setChecked(True)
        self.radioButton_corr_tides_cg5_model.setObjectName("radioButton_corr_tides_cg5_model")
        self.buttonGroup_corrections_tides.addButton(self.radioButton_corr_tides_cg5_model)
        self.verticalLayout.addWidget(self.radioButton_corr_tides_cg5_model)
        self.radioButton_corr_tides_longman1959 = QtWidgets.QRadioButton(self.groupBox_corrections_tides)
        self.radioButton_corr_tides_longman1959.setObjectName("radioButton_corr_tides_longman1959")
        self.buttonGroup_corrections_tides.addButton(self.radioButton_corr_tides_longman1959)
        self.verticalLayout.addWidget(self.radioButton_corr_tides_longman1959)
        self.radioButton_corr_tides_time_series = QtWidgets.QRadioButton(self.groupBox_corrections_tides)
        self.radioButton_corr_tides_time_series.setObjectName("radioButton_corr_tides_time_series")
        self.buttonGroup_corrections_tides.addButton(self.radioButton_corr_tides_time_series)
        self.verticalLayout.addWidget(self.radioButton_corr_tides_time_series)
        self.verticalLayout_3.addLayout(self.verticalLayout)
        self.formLayout = QtWidgets.QFormLayout()
        self.formLayout.setObjectName("formLayout")
        self.label_tides_interpolation_method = QtWidgets.QLabel(self.groupBox_corrections_tides)
        self.label_tides_interpolation_method.setEnabled(False)
        self.label_tides_interpolation_method.setObjectName("label_tides_interpolation_method")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_tides_interpolation_method)
        self.comboBox_tides_interpolation_method = QtWidgets.QComboBox(self.groupBox_corrections_tides)
        self.comboBox_tides_interpolation_method.setEnabled(False)
        self.comboBox_tides_interpolation_method.setObjectName("comboBox_tides_interpolation_method")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.comboBox_tides_interpolation_method)
        self.verticalLayout_3.addLayout(self.formLayout)
        self.verticalLayout_7.addWidget(self.groupBox_corrections_tides)
        self.groupBox_corrections_ref_heights = QtWidgets.QGroupBox(self.tab_all_instruments)
        self.groupBox_corrections_ref_heights.setObjectName("groupBox_corrections_ref_heights")
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.groupBox_corrections_ref_heights)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.radioButton_corr_ref_heights_sensor = QtWidgets.QRadioButton(self.groupBox_corrections_ref_heights)
        self.radioButton_corr_ref_heights_sensor.setObjectName("radioButton_corr_ref_heights_sensor")
        self.buttonGroup_corrections_ref_heights = QtWidgets.QButtonGroup(Dialog_corrections)
        self.buttonGroup_corrections_ref_heights.setObjectName("buttonGroup_corrections_ref_heights")
        self.buttonGroup_corrections_ref_heights.addButton(self.radioButton_corr_ref_heights_sensor)
        self.verticalLayout_2.addWidget(self.radioButton_corr_ref_heights_sensor)
        self.radioButton_corr_ref_heights_instrument_top = QtWidgets.QRadioButton(self.groupBox_corrections_ref_heights)
        self.radioButton_corr_ref_heights_instrument_top.setObjectName("radioButton_corr_ref_heights_instrument_top")
        self.buttonGroup_corrections_ref_heights.addButton(self.radioButton_corr_ref_heights_instrument_top)
        self.verticalLayout_2.addWidget(self.radioButton_corr_ref_heights_instrument_top)
        self.radioButton_corr_ref_heights_ground = QtWidgets.QRadioButton(self.groupBox_corrections_ref_heights)
        self.radioButton_corr_ref_heights_ground.setObjectName("radioButton_corr_ref_heights_ground")
        self.buttonGroup_corrections_ref_heights.addButton(self.radioButton_corr_ref_heights_ground)
        self.verticalLayout_2.addWidget(self.radioButton_corr_ref_heights_ground)
        self.radioButton_corr_ref_heights_control_point = QtWidgets.QRadioButton(self.groupBox_corrections_ref_heights)
        self.radioButton_corr_ref_heights_control_point.setChecked(True)
        self.radioButton_corr_ref_heights_control_point.setObjectName("radioButton_corr_ref_heights_control_point")
        self.buttonGroup_corrections_ref_heights.addButton(self.radioButton_corr_ref_heights_control_point)
        self.verticalLayout_2.addWidget(self.radioButton_corr_ref_heights_control_point)
        self.verticalLayout_4.addLayout(self.verticalLayout_2)
        self.verticalLayout_7.addWidget(self.groupBox_corrections_ref_heights)
        self.groupBox_atm_pres_correction = QtWidgets.QGroupBox(self.tab_all_instruments)
        self.groupBox_atm_pres_correction.setObjectName("groupBox_atm_pres_correction")
        self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.groupBox_atm_pres_correction)
        self.verticalLayout_5.setObjectName("verticalLayout_5")
        self.checkBox_corrections_atm_pressure = QtWidgets.QCheckBox(self.groupBox_atm_pres_correction)
        self.checkBox_corrections_atm_pressure.setChecked(False)
        self.checkBox_corrections_atm_pressure.setObjectName("checkBox_corrections_atm_pressure")
        self.verticalLayout_5.addWidget(self.checkBox_corrections_atm_pressure)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.formLayout_2 = QtWidgets.QFormLayout()
        self.formLayout_2.setObjectName("formLayout_2")
        self.label_atm_pres_admittance = QtWidgets.QLabel(self.groupBox_atm_pres_correction)
        self.label_atm_pres_admittance.setEnabled(False)
        self.label_atm_pres_admittance.setObjectName("label_atm_pres_admittance")
        self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_atm_pres_admittance)
        self.doubleSpinBox_atm_pres_admittance = QtWidgets.QDoubleSpinBox(self.groupBox_atm_pres_correction)
        self.doubleSpinBox_atm_pres_admittance.setEnabled(False)
        self.doubleSpinBox_atm_pres_admittance.setMinimum(-99.99)
        self.doubleSpinBox_atm_pres_admittance.setSingleStep(0.1)
        self.doubleSpinBox_atm_pres_admittance.setProperty("value", 0.3)
        self.doubleSpinBox_atm_pres_admittance.setObjectName("doubleSpinBox_atm_pres_admittance")
        self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.doubleSpinBox_atm_pres_admittance)
        self.horizontalLayout.addLayout(self.formLayout_2)
        self.verticalLayout_5.addLayout(self.horizontalLayout)
        self.verticalLayout_7.addWidget(self.groupBox_atm_pres_correction)
        self.groupBox_scale_correction = QtWidgets.QGroupBox(self.tab_all_instruments)
        self.groupBox_scale_correction.setObjectName("groupBox_scale_correction")
        self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.groupBox_scale_correction)
        self.verticalLayout_6.setObjectName("verticalLayout_6")
        self.checkBox_linear_scale_correction = QtWidgets.QCheckBox(self.groupBox_scale_correction)
        self.checkBox_linear_scale_correction.setObjectName("checkBox_linear_scale_correction")
        self.verticalLayout_6.addWidget(self.checkBox_linear_scale_correction)
        self.verticalLayout_7.addWidget(self.groupBox_scale_correction)
        spacerItem1 = QtWidgets.QSpacerItem(20, 19, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_7.addItem(spacerItem1)
        self.tabWidget.addTab(self.tab_all_instruments, "")
        self.tab_cg6_only = QtWidgets.QWidget()
        self.tab_cg6_only.setObjectName("tab_cg6_only")
        self.verticalLayout_10 = QtWidgets.QVBoxLayout(self.tab_cg6_only)
        self.verticalLayout_10.setObjectName("verticalLayout_10")
        self.groupBox_ocean_loading = QtWidgets.QGroupBox(self.tab_cg6_only)
        self.groupBox_ocean_loading.setObjectName("groupBox_ocean_loading")
        self.verticalLayout_9 = QtWidgets.QVBoxLayout(self.groupBox_ocean_loading)
        self.verticalLayout_9.setObjectName("verticalLayout_9")
        self.checkBox_apply_ocean_loading_lynxlg = QtWidgets.QCheckBox(self.groupBox_ocean_loading)
        self.checkBox_apply_ocean_loading_lynxlg.setChecked(True)
        self.checkBox_apply_ocean_loading_lynxlg.setObjectName("checkBox_apply_ocean_loading_lynxlg")
        self.verticalLayout_9.addWidget(self.checkBox_apply_ocean_loading_lynxlg)
        self.verticalLayout_10.addWidget(self.groupBox_ocean_loading)
        spacerItem2 = QtWidgets.QSpacerItem(20, 465, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_10.addItem(spacerItem2)
        self.tabWidget.addTab(self.tab_cg6_only, "")
        self.verticalLayout_8.addWidget(self.tabWidget)
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog_corrections)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout_8.addWidget(self.buttonBox)

        self.retranslateUi(Dialog_corrections)
        self.tabWidget.setCurrentIndex(0)
        self.buttonBox.accepted.connect(Dialog_corrections.accept) # type: ignore
        self.buttonBox.rejected.connect(Dialog_corrections.reject) # type: ignore
        self.radioButton_corr_tides_time_series.toggled['bool'].connect(self.comboBox_tides_interpolation_method.setEnabled) # type: ignore
        self.radioButton_corr_tides_time_series.toggled['bool'].connect(self.label_tides_interpolation_method.setEnabled) # type: ignore
        self.checkBox_corrections_atm_pressure.toggled['bool'].connect(self.label_atm_pres_admittance.setEnabled) # type: ignore
        self.checkBox_corrections_atm_pressure.toggled['bool'].connect(self.doubleSpinBox_atm_pres_admittance.setEnabled) # type: ignore
        QtCore.QMetaObject.connectSlotsByName(Dialog_corrections)

    def retranslateUi(self, Dialog_corrections):
        _translate = QtCore.QCoreApplication.translate
        Dialog_corrections.setWindowTitle(_translate("Dialog_corrections", "Corrections"))
        self.groupBox_corrections_tides.setToolTip(_translate("Dialog_corrections", "<html><head/><body><p>Options for tidal corretio of observation data.</p></body></html>"))
        self.groupBox_corrections_tides.setTitle(_translate("Dialog_corrections", "Tidal correction"))
        self.radioButton_corr_tides_no_correction.setToolTip(_translate("Dialog_corrections", "No tidal corrections applied."))
        self.radioButton_corr_tides_no_correction.setText(_translate("Dialog_corrections", "No correction"))
        self.radioButton_corr_tides_cg5_model.setToolTip(_translate("Dialog_corrections", "<html><head/><body><p>The tidal correction calculated by the instrument is applied. The Scintrex CG-5 Gravimeter uses, e.g., the Longman (1959) model. </p></body></html>"))
        self.radioButton_corr_tides_cg5_model.setText(_translate("Dialog_corrections", "Instrument correction model"))
        self.radioButton_corr_tides_longman1959.setToolTip(_translate("Dialog_corrections", "Tidal corrections are calculated ans applied in GravTools by evaluationg the model by Longman (1959). "))
        self.radioButton_corr_tides_longman1959.setText(_translate("Dialog_corrections", "Longman (1959)"))
        self.radioButton_corr_tides_time_series.setToolTip(_translate("Dialog_corrections", "<html><head/><body><p>Interpolate corrections from time series data. The python module <span style=\" font-style:italic;\">scipy.interpolation.interp1</span> is used.</p></body></html>"))
        self.radioButton_corr_tides_time_series.setText(_translate("Dialog_corrections", "Interpolate from time series"))
        self.label_tides_interpolation_method.setToolTip(_translate("Dialog_corrections", "Method for the interpolation of correction time series."))
        self.label_tides_interpolation_method.setText(_translate("Dialog_corrections", "Interpolation method"))
        self.comboBox_tides_interpolation_method.setToolTip(_translate("Dialog_corrections", "Method for the interpolation of correction time series."))
        self.groupBox_corrections_ref_heights.setToolTip(_translate("Dialog_corrections", "The original gravity reading refer to the location (height) of the sensor within the instrument. By using the vertical differences \"dhb\" and \"dhf\" provided in the CG-5observation files along with the observation data and the vertical gravity gradients (standard value or provided in the station data), the observations can be reduced to different refernce heights."))
        self.groupBox_corrections_ref_heights.setTitle(_translate("Dialog_corrections", "Reference height"))
        self.radioButton_corr_ref_heights_sensor.setToolTip(_translate("Dialog_corrections", "Sensor heigt (measurement heugt => no correction applied)"))
        self.radioButton_corr_ref_heights_sensor.setText(_translate("Dialog_corrections", "Sensor"))
        self.radioButton_corr_ref_heights_instrument_top.setToolTip(_translate("Dialog_corrections", "Top of the gravimeter."))
        self.radioButton_corr_ref_heights_instrument_top.setText(_translate("Dialog_corrections", "Instrument top"))
        self.radioButton_corr_ref_heights_ground.setToolTip(_translate("Dialog_corrections", "Ground level at the station."))
        self.radioButton_corr_ref_heights_ground.setText(_translate("Dialog_corrections", "Ground"))
        self.radioButton_corr_ref_heights_control_point.setToolTip(_translate("Dialog_corrections", "Height of the control point."))
        self.radioButton_corr_ref_heights_control_point.setText(_translate("Dialog_corrections", "Control point"))
        self.groupBox_atm_pres_correction.setToolTip(_translate("Dialog_corrections", "<html><head/><body><p>Corrections of atmospheric pressure variations.</p></body></html>"))
        self.groupBox_atm_pres_correction.setTitle(_translate("Dialog_corrections", "Atmospheric pressure variations"))
        self.checkBox_corrections_atm_pressure.setToolTip(_translate("Dialog_corrections", "<html><head/><body><p>Use measured pressure values (p<span style=\" vertical-align:sub;\">obs, </span>in hPa) provided in the input observation files to correct atmosperhic pressure variations. Be aware that this correction is only applied, if pressure measurements are provided along with the observaiton data. </p><p>The correction p<span style=\" vertical-align:sub;\">corr</span> in µGal is calculated by multiplying the difference between normal air pressure according to ISO 2533:1975 (p<span style=\" vertical-align:sub;\">n</span>) and p<span style=\" vertical-align:sub;\">obs</span> with the admittance factor k defined below: p<span style=\" vertical-align:sub;\">corr</span> = (p<span style=\" vertical-align:sub;\">obs</span> - p<span style=\" vertical-align:sub;\">n</span>) * k</p></body></html>"))
        self.checkBox_corrections_atm_pressure.setText(_translate("Dialog_corrections", "Atmospheric pressure variations (ISO 2533:1975)"))
        self.label_atm_pres_admittance.setToolTip(_translate("Dialog_corrections", "Admittance factor for the correction of atmospheric pressure variations based on measured and normal pressure."))
        self.label_atm_pres_admittance.setText(_translate("Dialog_corrections", "Admittance factor"))
        self.doubleSpinBox_atm_pres_admittance.setToolTip(_translate("Dialog_corrections", "<html><head/><body><p>Admittance factor for the correction of atmospheric pressure variations based on measured and normal pressure.</p></body></html>"))
        self.groupBox_scale_correction.setToolTip(_translate("Dialog_corrections", "<html><head/><body><p>A priori scale factor correction. Scale factors are applied on the uncorrected gravity observations. </p></body></html>"))
        self.groupBox_scale_correction.setTitle(_translate("Dialog_corrections", "Scale corrections"))
        self.checkBox_linear_scale_correction.setToolTip(_translate("Dialog_corrections", "<html><head/><body><p>Applie linear scale factor, as listed in the gravimeter tab, on the uncorrected gravity observations. Scale factors can be loaded from json-formatted gravimeter files. Scale factors have to be available for all observation epochs, if this correction is applied.</p></body></html>"))
        self.checkBox_linear_scale_correction.setText(_translate("Dialog_corrections", "Apply linear scale factors"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_all_instruments), _translate("Dialog_corrections", "All instruments"))
        self.groupBox_ocean_loading.setTitle(_translate("Dialog_corrections", "Ocean loading"))
        self.checkBox_apply_ocean_loading_lynxlg.setToolTip(_translate("Dialog_corrections", "<html><head/><body><p>Correct the observations for ocean loading effects based on the correction provided by LynxLG (tablet). </p></body></html>"))
        self.checkBox_apply_ocean_loading_lynxlg.setText(_translate("Dialog_corrections", "Apply ocean loading corrections from LynxLG (if available)"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_cg6_only), _translate("Dialog_corrections", "Scintrex CG6 only"))
        self.buttonBox.setToolTip(_translate("Dialog_corrections", "When clicking OK the corrections are applied on all observations in the current campaign."))
