def _build_frames(self, *args, **kwargs):
     self.tiptilt = self.add_frame(
         jk.GraphMulti(name="tip-tilt",
                       size=(500, 500),
                       pos=(50, 50),
                       fmt="ko",
                       xnpts=len(core.FIRSTSEGS),
                       nlines=len(core.FIRSTSEGS),
                       freq_up=5,
                       bgcol="w",
                       numbering=True,
                       lbls=core.FIRSTSEGS,
                       legend=False,
                       xylim=(core.TIPTILTMIN, core.TIPTILTMAX,
                              core.TIPTILTMIN, core.TIPTILTMAX),
                       xlabel='tip',
                       ylabel='tilt'))
     self.piston = self.add_frame(
         jk.Graph(name="Piston",
                  size=(500, 500),
                  pos=(650, 50),
                  fmt="rs",
                  xnpts=len(core.FIRSTSEGS),
                  freq_up=5,
                  bgcol="w",
                  xylim=(-1, np.max(core.FIRSTSEGS) + 1, core.PISTONMIN,
                         core.PISTONMAX),
                  xlabel='segment',
                  ylabel='piston'))
     self.mems = Mems()
Exemplo n.º 2
0
 def _init(self, *args, **kwargs):
     """
     Function called at initialization, don't bother why for now
     """
     self._t0 = time.time()  # initialize time
     self.xdata = np.array([self._t0])  # time x-axis
     self.ydata = np.array([0.0])  # fake data y-axis
     # create a graph frame
     self.mygraph = self.add_frame(
         jk.Graph(name="test",
                  size=(500, 500),
                  pos=(50, 50),
                  fmt="go-",
                  xnpts=15,
                  freq_up=7,
                  bgcol="y",
                  xylim=(0, 10, 0, 1)))
     # create a text frame
     self.mytext = self.add_frame(
         jk.Text(name="Y-overflow",
                 size=(500, 250),
                 pos=(600, 50),
                 freq_up=2))
     self.myimg = self.add_frame(
         jk.Image(name="IMG",
                  size=(0.5, 0.5),
                  pos=(0.2, 0.2),
                  screen_relative=True,
                  axrect=(0, 0, 1, 1),
                  freq_up=3,
                  cm_bounds=(0, 1)))
Exemplo n.º 3
0
 def _init(self, *args, **kwargs):
     """
     Function called at initialization, see the doc
     """
     self._t0 = time.time()  # initialize time
     self.xdata = np.array([self._t0])  # time x-axis
     self.ydata = np.array([0.0])  # fake data y-axis
     # create a graph frame
     self.mygraph = self.add_frame(jk.Graph(name="test", size=(500, 500), pos=(50, 50), fmt="go-", xnpts=10000, xnptsmax=10000, xylim=(None, None, 0, 1)))
Exemplo n.º 4
0
 def _init(self, **kwargs):
     first_seg = kwargs.get('first_seg', [])
     # create a graph frame
     self.mygraph = self.add_frame(
         jk.Graph(name="tip-tilt",
                  size=(500, 500),
                  pos=(50, 50),
                  fmt="ko",
                  xnpts=len(first_seg),
                  xnptsmax=len(first_seg),
                  freq_up=3,
                  bgcol="w",
                  xylim=(-core.TIPTILTMAX, core.TIPTILTMAX,
                         -core.TIPTILTMAX, core.TIPTILTMAX)))
     self.mems = Mems(first_segs)
 def _build_frames(self, *args, **kwargs):
     # Function automatically called at initialization, thanks to the
     # decorator. It will be called after "_init_data" given that it is
     # declared after
     # create a graph frame
     self.mygraph = self.add_frame(
         jk.Graph(name="test",
                  size=(500, 500),
                  pos=(50, 50),
                  fmt="go-",
                  xnpts=15,
                  freq_up=7,
                  bgcol="y",
                  xylim=(0, 10, 0, 1),
                  xlabel='t',
                  ylabel='random'))
     # create a text frame
     self.mytext = self.add_frame(
         jk.Text(name="Y-overflow",
                 size=(500, 250),
                 pos=(600, 50),
                 freq_up=1))