예제 #1
0
def _plot_accel_Bode(bode, fi, linetype='-', \
                     bode_opts=None, **kwargs):
    if bode_opts is None:
        AccelFB_Bode_opts[1]
    BPO._plot_bode(bode, bode_opts, \
                   f, fignum=fi, linetype=linetype, \
                   **kwargs)
예제 #2
0
 def plot_one_bode(self, f, index, fignum=1, clear=False, **kwargs):
     """index refers to which bode option to pull from
     self.bode_opts.  This is how the method determines which bode
     to plot."""
     if not hasattr(self, "bodes"):
         self.calc_bodes(f)
     if not kwargs.has_key("label"):
         kwargs["label"] = self.label
     opt = self.bode_opts[index]
     bode = self.find_bode(opt.output_label, opt.input_label)
     BPO._plot_bode(bode, opt, f, fignum=fignum, clear=clear, **kwargs)
예제 #3
0
 def plot_bodes(self, f, startfi=1, clear=False, **kwargs):
     """This method is for compatability with
     bode_plot_overlayer.py"""
     if not hasattr(self, "bodes"):
         self.calc_bodes(f)
     if not kwargs.has_key("label"):
         kwargs["label"] = self.label
     for i, opt in enumerate(self.bode_opts):
         fignum = startfi + i
         bode = self.find_bode(opt.output_label, opt.input_label)
         BPO._plot_bode(bode, opt, f, fignum=fignum, clear=clear, **kwargs)
예제 #4
0
def ThetaFB_bode_plots(fi=3, resave=0):
    ThetaFB_Exp_Bode_Plotter = build_ThetaFB_exp_Bode_plotter()
    design_dir = rwkos.FindFullPath('SFLR_2010/vibration_suppression_design/TMM')

    if design_dir not in sys.path:
        sys.path.append(design_dir)


    Gth_TMM = build_Gth_TMM_model()

    import Gth
    reload(Gth)

    ThetaFB_TMM_Bode_Plotter = BPO.TMM_bode_object(Gth_TMM, \
                                                   ThetaFB_Bode_opts)

    ThetaFB_Plotters =[ThetaFB_Exp_Bode_Plotter, \
                       ThetaFB_TMM_Bode_Plotter, \
                      ]

    ThetaFB_overlayer = BPO.Bode_Overlayer(ThetaFB_Plotters, \
                                           ThetaFB_Bode_opts)
    ThetaFB_overlayer.plot_bodes(f, startfi=fi)

    th_comp, a_comp = model_w_bm_bodes_ThetaFB_editted.Bodes(s, \
                                                             params, \
                                                             Gth.Gth)
    PU.SetLegend(fi,axis=0,loc=3)
    PU.SetLegend(fi+1,axis=0,loc=2)

    if resave:
        mysave('thetafb_theta_thd_bode.eps', fi)
        mysave('thetafb_a_thd_bode.eps', fi+1)


    th_bode_opt = ThetaFB_Bode_opts[0]
    a_bode_opt = ThetaFB_Bode_opts[1]
    th_bode = BPO.comp_to_Bode(th_comp, f, bode_opt=th_bode_opt)
    a_bode = BPO.comp_to_Bode(a_comp, f, bode_opt=a_bode_opt)
    BPO._plot_bode(th_bode, th_bode_opt, f, fignum=fi, linetype='k:')
    BPO._plot_bode(a_bode, a_bode_opt, f, fignum=fi+1, linetype='k:')
예제 #5
0
def plot_Accel_comp(bode, fi, linetype='-', **kwargs):
    BPO._plot_bode(bode, Accel_Comp_Bode_opts[1], \
                   f, fignum=fi, linetype=linetype, **kwargs)