def main(): """ Main Code """ # Generate some fake data wafer_info, xyd = gen_fake_data.generate_fake_data() standalone_app(xyd, wafer_info) add_to_existing_app(xyd, wafer_info) discrete_data_example(xyd, wafer_info)
def init_ui(self): """ Init the UI Components """ # Create our list boxes self.mask_lbl = wx.StaticText(self, wx.ID_ANY, label="Mask") self.mask_lb = wx.ListBox(parent=self, id=wx.ID_ANY, size=(150, 200), choices=self.mask_names, style=wx.LB_SINGLE, ) self.map_lbl = wx.StaticText(self, wx.ID_ANY, label="Map") self.map_lb = wx.ListBox(parent=self, id=wx.ID_ANY, size=(150, 150), choices=self.wafer_maps, style=wx.LB_SINGLE, ) # For now, generate some fake data and plot it. wafer_info, xyd = gen_fake_data.generate_fake_data(dtype='discrete') self.wm_panel = wm_core.WaferMapPanel(self, xyd, wafer_info, data_type='discrete', plot_die_centers=False, ) self.wafer_info = wafer_info # Hack! FixMe! self.mask_data = Mask("07G11") self.mask_data.die_xy = wafer_info.die_size self.mask_data.center_xy = wafer_info.center_xy self.mask_data.dia = wafer_info.dia self.read_mask_data(xyd) self.stats_block = StatsBlock(self) # Create the radius plots radius_sqrd_data = list( (wafer_info.die_size[0] * (wafer_info.center_xy[0] - die[0]))**2 + (wafer_info.die_size[1] * (wafer_info.center_xy[1] - die[1]))**2 for die in xyd) radius_data = list(math.sqrt(item) for item in radius_sqrd_data) self.radius_plots = RadiusPlots(self, radius_data) # Create our layout manager self.hbox = wx.BoxSizer(wx.HORIZONTAL) self.vbox = wx.BoxSizer(wx.VERTICAL) self.vbox_plots = wx.BoxSizer(wx.VERTICAL) self.vbox.Add(self.mask_lbl, 0, wx.LEFT, 5) self.vbox.Add(self.mask_lb, 0, wx.LEFT, 5) self.vbox.Add((-1, 10)) self.vbox.Add(self.map_lbl, 0, wx.LEFT, 5) self.vbox.Add(self.map_lb, 0, wx.LEFT, 5) self.vbox.Add((-1, 10)) self.vbox.Add(self.stats_block, 1, wx.EXPAND|wx.BOTTOM|wx.LEFT|wx.RIGHT, 5) self.hbox.Add(self.vbox, 0, wx.EXPAND) self.hbox.Add(self.wm_panel, 2, wx.EXPAND) self.vbox_plots.Add(self.radius_plots, 1, wx.EXPAND) self.hbox.Add(self.vbox_plots, 1, wx.EXPAND) self.SetSizer(self.hbox) # Bind events self._bind_events()
def init_ui(self): """ Init the UI Components """ # Create our list boxes self.mask_lbl = wx.StaticText(self, wx.ID_ANY, label="Mask") self.mask_lb = wx.ListBox( parent=self, id=wx.ID_ANY, size=(150, 200), choices=self.mask_names, style=wx.LB_SINGLE, ) self.map_lbl = wx.StaticText(self, wx.ID_ANY, label="Map") self.map_lb = wx.ListBox( parent=self, id=wx.ID_ANY, size=(150, 150), choices=self.wafer_maps, style=wx.LB_SINGLE, ) # For now, generate some fake data and plot it. wafer_info, xyd = gen_fake_data.generate_fake_data(dtype='discrete') self.wm_panel = wm_core.WaferMapPanel( self, xyd, wafer_info, data_type='discrete', plot_die_centers=False, ) self.wafer_info = wafer_info # Hack! FixMe! self.mask_data = Mask("07G11") self.mask_data.die_xy = wafer_info.die_size self.mask_data.center_xy = wafer_info.center_xy self.mask_data.dia = wafer_info.dia self.read_mask_data(xyd) self.stats_block = StatsBlock(self) # Create the radius plots radius_sqrd_data = list( (wafer_info.die_size[0] * (wafer_info.center_xy[0] - die[0]))**2 + (wafer_info.die_size[1] * (wafer_info.center_xy[1] - die[1]))**2 for die in xyd) radius_data = list(math.sqrt(item) for item in radius_sqrd_data) self.radius_plots = RadiusPlots(self, radius_data) # Create our layout manager self.hbox = wx.BoxSizer(wx.HORIZONTAL) self.vbox = wx.BoxSizer(wx.VERTICAL) self.vbox_plots = wx.BoxSizer(wx.VERTICAL) self.vbox.Add(self.mask_lbl, 0, wx.LEFT, 5) self.vbox.Add(self.mask_lb, 0, wx.LEFT, 5) self.vbox.Add((-1, 10)) self.vbox.Add(self.map_lbl, 0, wx.LEFT, 5) self.vbox.Add(self.map_lb, 0, wx.LEFT, 5) self.vbox.Add((-1, 10)) self.vbox.Add(self.stats_block, 1, wx.EXPAND | wx.BOTTOM | wx.LEFT | wx.RIGHT, 5) self.hbox.Add(self.vbox, 0, wx.EXPAND) self.hbox.Add(self.wm_panel, 2, wx.EXPAND) self.vbox_plots.Add(self.radius_plots, 1, wx.EXPAND) self.hbox.Add(self.vbox_plots, 1, wx.EXPAND) self.SetSizer(self.hbox) # Bind events self._bind_events()