TSEBIPythonInterface.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:pyTSEB 作者: hectornieto 项目源码 文件源码
def resistances_image(self):
        '''Widgets for resistance model selection'''

        self.w_res = widgets.ToggleButtons(
            description='Select TSEB model to run:',
            options={
                'Kustas & Norman 1999': 0,
                'Choudhury & Monteith 1988': 1,
                'McNaughton & Van der Hurk': 2},
            value=self.res,
            width=300)

        self.w_PT_But = widgets.Button(
            description='Browse Initial alphaPT Image')
        self.w_PT = widgets.Text(description=' ', value=str(self.max_PT), width=500)            

        self.w_KN_b_But = widgets.Button(
            description = 'Browse Resistance Parameter b Image')
        self.w_KN_b = widgets.Text(
            value=str(self.KN_b), description=' ', width=500)
        self.w_KN_c_But = widgets.Button(
            description = ('Browse Resistance Parameter c image'))
        self.w_KN_c = widgets.Text(
            value=str(self.KN_c), description='(m s-1 K-1/3)', width=500)
        self.w_KN_C_dash_But = widgets.Button(
            description = ("Browse Resistance Parameter C' Image"))
        self.w_KN_C_dash = widgets.Text(
            value=str(self.KN_C_dash), description="s1/2 m-1", width=500)
        self.KN_params_box =  widgets.VBox([widgets.HTML('Select resistance parameter b image or type a constant value'),
                                            widgets.HBox([self.w_KN_b_But, self.w_KN_b]),
                                            widgets.HTML('Select resistance parameter c image or type a constant value'),
                                            widgets.HBox([self.w_KN_c_But, self.w_KN_c]),
                                            widgets.HTML('Select resistance parameter C\' image or type a constant value'),
                                            widgets.HBox([self.w_KN_C_dash_But, self.w_KN_C_dash])], background_color='#EEE')
        self.res_page = widgets.VBox([self.w_res, self.KN_params_box], background_color='#EEE')

        self.w_KN_b_But.on_click(
            lambda b: self._on_input_clicked(b, 'Resistance Parameter b', self.w_KN_b))
        self.w_KN_c_But.on_click(
            lambda b: self._on_input_clicked(b, 'Resistance Parameter c', self.w_KN_c))
        self.w_KN_C_dash_But.on_click(
            lambda b: self._on_input_clicked(b, 'Resistance Parameter C\'', self.w_KN_C_dash))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号