DipoleWidgetFD.py 文件源码

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

项目:em_examples 作者: geoscixyz 项目源码 文件源码
def InteractiveDipole(self):
        def foo(orientation, normal, component, view, functype, flog, siglog, x1, y1, x2, y2, npts2D, npts, loc):
            f = np.r_[10**flog]
            sig = np.r_[10**siglog]
            return self.Dipole2Dviz(x1, y1, x2, y2, npts2D, npts, sig, f, srcLoc=np.r_[0., 0., 0.], orientation=orientation, component=component, view=view, normal=normal, functype=functype, loc=loc, dx=50.)

        out = widgetify(foo
            ,orientation=widgets.ToggleButtons(options=['x','y','z']) \
            ,normal=widgets.ToggleButtons(options=['X','Y','Z'], value="Z") \
            ,component=widgets.ToggleButtons(options=['real','imag','amplitude', 'phase']) \
            ,view=widgets.ToggleButtons(options=['x','y','z', 'vec']) \
            ,functype=widgets.ToggleButtons(options=["E_from_ED", "H_from_ED", "E_from_ED_galvanic", "E_from_ED_inductive"]) \
            ,flog=widgets.FloatSlider(min=-3, max=6, step=0.5, value=-3, continuous_update=False) \
            ,siglog=widgets.FloatSlider(min=-3, max=3, step=0.5, value=-3, continuous_update=False) \
            ,loc=widgets.FloatText(value=0.01) \
            ,x1=widgets.FloatText(value=-10) \
            ,y1=widgets.FloatText(value=0.01) \
            ,x2=widgets.FloatText(value=10) \
            ,y2=widgets.FloatText(value=0.01) \
            ,npts2D=widgets.IntSlider(min=4,max=200,step=2,value=40) \
            ,npts=widgets.IntSlider(min=4,max=200,step=2,value=40)
            )
        return out
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号