Python wx 模块,SUNKEN_BORDER 实例源码

我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用wx.SUNKEN_BORDER

项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Sum or Subtract Arrays")
        title.SetToolTipNew("Sum or subtract array2 from array 1")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File 1: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename1 = TextPanelObject(self, "Input File 2: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename1, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "output.npy",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.addsub = RadioBoxNew(self, label="Add or Subtract:", choices=['Add','Subtract'],  majorDimension=2, style=wx.RA_SPECIFY_COLS)
        self.addsub.SetToolTipNew("Add or Subtract")
        vbox.Add(self.addsub, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Rotate Support Array")
        title.SetToolTipNew("Rotate support (binary complex) arrays only. \nStrange results will ensue if used on data arrays.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "data_rotated.npy",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.rotationaxis = SpinnerObject(self,"Axis:",3,1,1,1,150,150)
        self.rotationaxis.label.SetToolTipNew("Rotation axis.")
        vbox.Add(self.rotationaxis, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.rotationangle = SpinnerObject(self,"Angle:",360,-360,1,0,150,150)
        self.rotationangle.label.SetToolTipNew("Rotation angle in degrees.")
        vbox.Add(self.rotationangle, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="Create binary mask from Numpy array")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,'*.npy')
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "mask.npy",150,'*.npy')
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.max = SpinnerObject(self,"Maximum Value:",MAX_INT,MIN_INT,1.0,MAX_INT,150,150)
        self.max.label.SetToolTipNew("Data within the min/max range "+os.linesep+"will result in a non-zero mask value.")
        self.min = SpinnerObject(self,"Minimum Value:",MAX_INT,MIN_INT,1,50.0,150,150)
        self.min.label.SetToolTipNew("Data within the min/max range "+os.linesep+"will result in a non-zero mask value.")
        vbox.Add(self.max, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add(self.min, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Bin Numpy Array")
        title.SetToolTipNew("Input array will be binned "+os.linesep+"according to the values below.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        title2 = wx.StaticText(self, label="Bin dimensions: ")
        vbox.Add(title2 ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.bdims=[{} for i in range(3)]
        self.bdims[0] = SpinnerObject(self,"x",MAX_INT_16,1,1,1,20,60)
        self.bdims[1] = SpinnerObject(self,"y",MAX_INT_16,1,1,1,20,60)
        self.bdims[2] = SpinnerObject(self,"z",MAX_INT_16,1,1,1,20,60)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        hbox.Add(self.bdims[0], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox.Add(self.bdims[1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox.Add(self.bdims[2], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        vbox.Add(hbox, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Threshold data in Numpy array")
        title.SetToolTipNew("Data outside range is set to zero.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,'*.npy')
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "data_thresh.npy",150,'*.npy')
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.max = SpinnerObject(self,"Maximum Value:",MAX_INT,MIN_INT,1.0,MAX_INT,150,150)
        self.max.label.SetToolTipNew("Data within the min/max range "+os.linesep+"will result in a non-zero mask value.")
        self.min = SpinnerObject(self,"Minimum Value:",MAX_INT,MIN_INT,1,50.0,150,150)
        self.min.label.SetToolTipNew("Data within the min/max range "+os.linesep+"will result in a non-zero mask value.")
        vbox.Add(self.max, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add(self.min, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="Filter array with median filter.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,'*.npy')
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "output.npy",150,'*.npy')
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        title2 = wx.StaticText(self, label="Filter kernel dimensions: ")
        vbox.Add(title2 ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.kdims=[{} for i in range(3)]
        self.kdims[0] = SpinnerObject(self,"x",MAX_INT_16,1,1,3,20,60)
        self.kdims[1] = SpinnerObject(self,"y",MAX_INT_16,1,1,3,20,60)
        self.kdims[2] = SpinnerObject(self,"z",MAX_INT_16,1,1,1,20,60)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        hbox.Add(self.kdims[0], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox.Add(self.kdims[1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox.Add(self.kdims[2], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        vbox.Add(hbox, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.maxdev = SpinnerObject(self,"Normal deviation:",MAX_INT_16,0.0,0.1,0.5,150,150)
        self.maxdev.label.SetToolTipNew("Maximum element-wise normal deviation.")
        vbox.Add(self.maxdev, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self,parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="Numpy array with coordinates to VTK array")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input file: ", "input.npy",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.coords_filename = TextPanelObject(self, "Co-ord's file: ", "coordinates.npy",150,'*.npy')
        vbox.Add(self.coords_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.output_filename = TextPanelObject(self, "Output file: ", "output.vtk",150,"VTK files (*.vtk)|*.vtk|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.rbampphase = wx.RadioBox(self, label="Type", choices=['Amplitude','Phase'],  majorDimension=2, style=wx.RA_SPECIFY_COLS)
        vbox.Add(self.rbampphase,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        self.start_iter = None
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="HIO Algorithm")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.exp_amps = TextPanelObject(self, "Exp Amp: ", "",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.exp_amps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.chkbox_sqrt_expamps = wx.CheckBox(self, -1, 'Square Root Exp Amp', (50, 10))
        self.chkbox_sqrt_expamps.SetValue(True)
        vbox.Add(self.chkbox_sqrt_expamps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.support = TextPanelObject(self,"Support: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        self.support.label.SetToolTipNew("Support. If empty, previous instance will be used.")
        vbox.Add(self.support, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.beta = SpinnerObject(self,"Beta: ",1.0,0.0,0.01,0.9,100,100)
        vbox.Add(self.beta, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niter = SpinnerObject(self,"Iterations: ",MAX_INT,1,1,1,100,100)
        vbox.Add(self.niter, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        self.start_iter = None
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="ER Algorithm")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.exp_amps = TextPanelObject(self, "Exp Amp: ", "",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.exp_amps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.chkbox_sqrt_expamps = wx.CheckBox(self, -1, 'Square Root Exp Amp', (50, 10))
        self.chkbox_sqrt_expamps.SetValue(True)
        vbox.Add(self.chkbox_sqrt_expamps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.support = TextPanelObject(self,"Support: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        self.support.label.SetToolTipNew("Support. If empty, previous instance will be used.")
        vbox.Add(self.support, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        #self.mask = TextPanelObject(self,"Mask: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        #vbox.Add(self.mask, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niter = SpinnerObject(self,"Iterations: ",MAX_INT,1,1,1,100,100)
        vbox.Add(self.niter, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        self.start_iter = None
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="Phase-Only Algorithm")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.exp_amps = TextPanelObject(self, "Exp Amp: ", "",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.exp_amps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.chkbox_sqrt_expamps = wx.CheckBox(self, -1, 'Square Root Exp Amp', (50, 10))
        self.chkbox_sqrt_expamps.SetValue(True)
        vbox.Add(self.chkbox_sqrt_expamps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.support = TextPanelObject(self,"Support: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        self.support.label.SetToolTipNew("Support. If empty, previous instance will be used.")
        vbox.Add(self.support, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.mask = TextPanelObject(self,"Mask: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.mask, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niter = SpinnerObject(self,"Iterations: ",MAX_INT,1,1,1,100,100)
        vbox.Add(self.niter, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        self.start_iter = None
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="HIO Algorithm with positivity constraint")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.exp_amps = TextPanelObject(self, "Exp Amp: ", "",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.exp_amps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.chkbox_sqrt_expamps = wx.CheckBox(self, -1, 'Square Root Exp Amp', (50, 10))
        self.chkbox_sqrt_expamps.SetValue(True)
        vbox.Add(self.chkbox_sqrt_expamps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.support = TextPanelObject(self,"Support: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        self.support.label.SetToolTipNew("Support. If empty, previous instance will be used.")
        vbox.Add(self.support, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.mask = TextPanelObject(self,"Mask: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.mask, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.beta = SpinnerObject(self,"Beta: ",1.0,0.0,0.01,0.9,100,100)
        vbox.Add(self.beta, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niter = SpinnerObject(self,"Iterations: ",MAX_INT,1,1,1,100,100)
        vbox.Add(self.niter, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def _init_ctrls(self, parent):
        wx.SplitterWindow.__init__(self, parent,
                                   style=wx.SUNKEN_BORDER | wx.SP_3D)
        self.SetMinimumPaneSize(1)

        self._init_MenuItems()

        if self.VARIABLE_PANEL_TYPE is not None:
            self.VariableEditor = VariablePanel(self, self, self.Controler, self.VARIABLE_PANEL_TYPE, self.Debug)
            self.VariableEditor.SetTagName(self.TagName)
        else:
            self.VariableEditor = None

        self._init_Editor(self)

        if self.Editor is not None and self.VariableEditor is not None:
            self.SplitHorizontally(self.VariableEditor, self.Editor, 200)
        elif self.VariableEditor is not None:
            self.Initialize(self.VariableEditor)
        elif self.Editor is not None:
            self.Initialize(self.Editor)
项目:irida-miseq-uploader    作者:phac-nml    | 项目源码 | 文件源码
def __init__(self, parent, run, api):
        """Initialize the RunPanel.

        Args:
            parent: The parent Window for this panel.
            run: The sequencing run that should be displayed.
            api: An initialized instance of an API for interacting with IRIDA.
        """
        ScrolledPanel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        box = wx.StaticBox(self, label=run.sample_sheet_name)
        self._timer = wx.Timer(self)

        self._run = run

        self._progress_value = 0
        self._last_progress = 0
        self._last_timer_progress = 0
        self._sample_panels = {}
        # the current overall progress for the run is calculated as a percentage
        # of the total file size of all samples in the run.
        self._progress_max = sum(sample.get_files_size() for sample in run.samples_to_upload)
        logging.info("Total file size for run is {}".format(self._progress_max))

        self._sizer = wx.StaticBoxSizer(box, wx.VERTICAL)

        pub.subscribe(self._upload_started, run.upload_started_topic)
        pub.subscribe(self._handle_progress, run.upload_progress_topic)
        pub.subscribe(self._upload_complete, run.upload_completed_topic)
        pub.subscribe(self._upload_failed, run.upload_failed_topic)

        for sample in run.sample_list:
            self._sample_panels[sample.get_id()] = SamplePanel(self, sample, run, api)
            self._sizer.Add(self._sample_panels[sample.get_id()], flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=5)

        self.SetSizer(self._sizer)
        self.Bind(wx.EVT_TIMER, self._update_progress_timer, self._timer)
        self.Layout()
        self.SetupScrolling()
项目:cebl    作者:idfah    | 项目源码 | 文件源码
def initMPlayer(self):
        self.mplayer = widgets.MPlayerPanel(self,
                cwd=self.pg.defaultMusicDir, style=wx.SUNKEN_BORDER)
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent,ancestor):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Pipeline Comments:")
        title.SetToolTipNew("Pipeline Comments.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.txt = wx.TextCtrl(self, style=wx.TE_BESTWRAP | wx.TE_MULTILINE)
        self.txt.Enable(True)
        vbox.Add(self.txt, 1, wx.EXPAND | wx.ALL, 2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Scale Arrays")
        title.SetToolTipNew("Scale array by a specified factor")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "output.npy",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.scale = SpinnerObject(self,"Scale factor:",MAX_INT,0.0,1.0,1.0,150,150)
        self.scale.label.SetToolTipNew("Scale factor.")
        vbox.Add(self.scale, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        self.panelphase = self.GetParent().GetParent().GetParent()
        self.font = self.GetParent().font
        self.file = None
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="Convert HDF5 to Numpy array.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input HDF5 File: ", "",150,"HDF files (*.hdf)|*.hdf|HDF5 files (*.h5)|*.h5|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        label = wx.StaticText(self, -1,"HDF Key Path:" , style =wx.ALIGN_RIGHT, size=(150,-1) )
        label.SetFont(self.font)
        hbox.Add( label, 0, wx.CENTER )
        def OnEdit(event):
            self.objectpath.ChangeValue(event.GetString())
        self.objectpath = TextCtrlNew(self, -1)
        self.objectpath.SetFont(self.font)
        self.objectpath.SetValue("")
        self.objectpath.SetToolTipNew("Comma separated key names.")
        self.objectpath.Bind(wx.EVT_TEXT_ENTER, OnEdit)
        hbox.Add( self.objectpath, 1, wx.CENTER |wx.EXPAND )
        self.button = ButtonNew(self, -1, "Browse")
        self.button.SetFont(self.font)
        self.button.SetToolTipNew("Browse for HDF5 key path.")
        self.button.Bind(wx.EVT_BUTTON, self.OnBrowse)
        hbox.Add( self.button, 0, wx.LEFT|wx.CENTER)
        vbox.Add(hbox, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "output.npy",150,'*.npy')
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="Convert SPE to Numpy array")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input SPE File: ", "",150,'*.SPE')
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "",150,'*.npy')
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="Convert Image file to Numpy array")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input Image File: ", "",150,"PNG files (*.png)|*.png|JPEG files (*.jpg)|*.jpg|PPM files (*.ppm)|*.ppm|TIF files (*.tif)|*.tif|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "",150,'*.npy')
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Load Array to Memory Location")
        title.SetToolTipNew("Memory locations: memory0, memory1, ... , memory9")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "memory0",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Save Array from Memory Location")
        title.SetToolTipNew("Memory locations: memory0, memory1, ... , memory9")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "memory0",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Save Fourier Tranform of Point Spread function.")
        title.SetToolTipNew("Save Fourier Tranform of Point Spread function.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Auto Centre Numpy Array")
        title.SetToolTipNew("Input array will be Auto Centred "+os.linesep+"according to the brightest voxel.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="Fill Numpy array with Gaussian distribution.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,'*.npy')
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "data_gaussian.npy",150,'*.npy')
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.sigma = SpinnerObject(self,"Sigma:",MAX_INT_16,0.0,0.1,2.0,150,150)
        self.sigma.label.SetToolTipNew("Standard deviation.")
        vbox.Add(self.sigma, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Fourier Transform Array")
        title.SetToolTipNew("Fourier Transform Input Array.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.rbdirection = wx.RadioBox(self, label="To:", choices=['Fourier Space','Real Space',],  majorDimension=2, style=wx.RA_SPECIFY_COLS)
        vbox.Add(self.rbdirection ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Conjugate and Reflect Array")
        title.SetToolTipNew("Conjugate and Reflect Array.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Make Cuboid Support")
        title.SetToolTipNew("Support is made using the (x,y,z) values below."+os.linesep+"If an additional numpy array is supplied, its "+os.linesep+"dimensions will be used.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.filename = TextPanelObject(self, "Support File: ", "support.npy",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.fromfile = TextPanelObject(self, "(x,y,z) from array: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.fromfile, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        title2 = wx.StaticText(self, label="(x,y,z) from dimensions: ")
        vbox.Add(title2 ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.dims=[{} for i in range(3)]
        self.dims[0] = SpinnerObject(self,"x",MAX_INT_16,1,1,1,20,60)
        self.dims[1] = SpinnerObject(self,"y",MAX_INT_16,1,1,1,20,60)
        self.dims[2] = SpinnerObject(self,"z",MAX_INT_16,1,1,1,20,60)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        hbox.Add(self.dims[0], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox.Add(self.dims[1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox.Add(self.dims[2], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        vbox.Add(hbox, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        title3 = wx.StaticText(self, label="Support size: ")
        vbox.Add(title3 ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.sdims=[{} for i in range(3)]
        self.sdims[0] = SpinnerObject(self,"sx",MAX_INT_16,1,1,1,20,60)
        self.sdims[1] = SpinnerObject(self,"sy",MAX_INT_16,1,1,1,20,60)
        self.sdims[2] = SpinnerObject(self,"sz",MAX_INT_16,1,1,1,20,60)
        hbox1 = wx.BoxSizer(wx.HORIZONTAL)
        hbox1.Add(self.sdims[0], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox1.Add(self.sdims[1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox1.Add(self.sdims[2], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        vbox.Add(hbox1, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self,parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="Numpy array to VTK array")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input file: ", "input.npy",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.output_filename = TextPanelObject(self, "Output file: ", "output.vtk",150,"VTK files (*.vtk)|*.vtk|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.rbampphase = wx.RadioBox(self, label="Type", choices=['Amplitude','Phase'],  majorDimension=2, style=wx.RA_SPECIFY_COLS)
        vbox.Add(self.rbampphase,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        self.start_iter = None
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Input Array Start")
        title.SetToolTipNew("Phase reconstruction will begin with this array.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,'*.npy')
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        self.start_iter = None
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="ER Mask Algorithm")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.exp_amps = TextPanelObject(self, "Exp Amp: ", "",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.exp_amps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.chkbox_sqrt_expamps = wx.CheckBox(self, -1, 'Square Root Exp Amp', (50, 10))
        self.chkbox_sqrt_expamps.SetValue(True)
        vbox.Add(self.chkbox_sqrt_expamps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.support = TextPanelObject(self,"Support: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        self.support.label.SetToolTipNew("Support. If empty, previous instance will be used.")
        vbox.Add(self.support, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.mask = TextPanelObject(self,"Mask: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.mask, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niter = SpinnerObject(self,"Iterations: ",MAX_INT,1,1,1,100,100)
        vbox.Add(self.niter, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.chkbox = CheckBoxNew(self, -1, 'Relax Modulus Constraint', size=(200, 20))
        self.chkbox.SetToolTipNew("Do not apply modulus constraint if the change in amplitude"+os.linesep+" is within the Poisson noise.")
        self.chkbox.Bind(wx.EVT_CHECKBOX, self.OnCheck)
        vbox.Add(self.chkbox, 0,flag=wx.EXPAND|wx.LEFT|wx.RIGHT, border=2)
        self.niter_relax = SpinnerObject(self,"Relax iters: ",MAX_INT,0,1,0,100,100)
        self.niter_relax.label.SetToolTipNew("Reduce the relaxtion to zero linearly over this many iterations.")
        self.niter_relax.Disable()
        vbox.Add(self.niter_relax, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.chkbox.Hide()
        self.niter_relax.Hide()
        vbox.Add((-1, 5))
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        self.start_iter = None
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="RAAR Algorithm")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.exp_amps = TextPanelObject(self, "Exp Amp: ", "",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.exp_amps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.chkbox_sqrt_expamps = wx.CheckBox(self, -1, 'Square Root Exp Amp', (50, 10))
        self.chkbox_sqrt_expamps.SetValue(True)
        vbox.Add(self.chkbox_sqrt_expamps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.support = TextPanelObject(self,"Support: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        self.support.label.SetToolTipNew("Support. If empty, previous instance will be used.")
        vbox.Add(self.support, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.mask = TextPanelObject(self,"Mask: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.mask, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.beta = SpinnerObject(self,"Beta: ",1.0,0.0,0.01,0.9,100,100)
        vbox.Add(self.beta, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niter = SpinnerObject(self,"Iterations: ",MAX_INT,1,1,1,100,100)
        vbox.Add(self.niter, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.chkbox = CheckBoxNew(self, -1, 'Relax Modulus Constraint', size=(200, 20))
        self.chkbox.SetToolTipNew("Do not apply modulus constraint if the change in amplitude"+os.linesep+" is within the Poisson noise.")
        self.chkbox.Bind(wx.EVT_CHECKBOX, self.OnCheck)
        vbox.Add(self.chkbox, 0,flag=wx.EXPAND|wx.LEFT|wx.RIGHT, border=2)
        self.niter_relax = SpinnerObject(self,"Relax iters: ",MAX_INT,0,1,0,100,100)
        self.niter_relax.label.SetToolTipNew("Reduce the relaxtion to zero linearly over this many iterations.")
        self.niter_relax.Disable()
        vbox.Add(self.niter_relax, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.chkbox.Hide()
        self.niter_relax.Hide()
        vbox.Add((-1, 5))
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        self.start_iter = None
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="HIO Algorithm")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.exp_amps = TextPanelObject(self, "Exp Amp: ", "",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.exp_amps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.chkbox_sqrt_expamps = wx.CheckBox(self, -1, 'Square Root Exp Amp', (50, 10))
        self.chkbox_sqrt_expamps.SetValue(True)
        vbox.Add(self.chkbox_sqrt_expamps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.support = TextPanelObject(self,"Support: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        self.support.label.SetToolTipNew("Support. If empty, previous instance will be used.")
        vbox.Add(self.support, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.mask = TextPanelObject(self,"Mask: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.mask, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.beta = SpinnerObject(self,"Beta: ",1.0,0.0,0.01,0.9,100,100)
        vbox.Add(self.beta, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niter = SpinnerObject(self,"Iterations: ",MAX_INT,1,1,1,100,100)
        vbox.Add(self.niter, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.chkbox = CheckBoxNew(self, -1, 'Relax Modulus Constraint', size=(200, 20))
        self.chkbox.SetToolTipNew("Do not apply modulus constraint if the change in amplitude"+os.linesep+" is within the Poisson noise.")
        self.chkbox.Bind(wx.EVT_CHECKBOX, self.OnCheck)
        vbox.Add(self.chkbox, 0,flag=wx.EXPAND|wx.LEFT|wx.RIGHT, border=2)
        self.niter_relax = SpinnerObject(self,"Relax iters: ",MAX_INT,0,1,0,100,100)
        self.niter_relax.label.SetToolTipNew("Reduce the relaxtion to zero linearly over this many iterations.")
        self.niter_relax.Disable()
        vbox.Add(self.niter_relax, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.chkbox.Hide()
        self.niter_relax.Hide()
        vbox.Add((-1, 5))
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        from math import pi
        self.start_iter = None
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="Phase Constrained HIO Algorithm")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.exp_amps = TextPanelObject(self, "Exp Amp: ", "",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.exp_amps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.chkbox_sqrt_expamps = wx.CheckBox(self, -1, 'Square Root Exp Amp', (50, 10))
        self.chkbox_sqrt_expamps.SetValue(True)
        vbox.Add(self.chkbox_sqrt_expamps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.support = TextPanelObject(self,"Support: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        self.support.label.SetToolTipNew("Support. If empty, previous instance will be used.")
        vbox.Add(self.support, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.mask = TextPanelObject(self,"Mask: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.mask, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.beta = SpinnerObject(self,"Beta: ",1.0,0.0,0.01,0.9,100,100)
        vbox.Add(self.beta, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niter = SpinnerObject(self,"Iterations: ",MAX_INT,1,1,1,100,100)
        vbox.Add(self.niter, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.phasemax = SpinnerObject(self,"Phase Max: ",pi,0.0,0.01,pi,100,150)
        vbox.Add(self.phasemax, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.phasemin = SpinnerObject(self,"Phase Min: ",0.0,-pi,0.01,-pi,100,150)
        vbox.Add(self.phasemin, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        self.start_iter = None
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Save sequence data to Numpy array")
        title.SetToolTipNew("Save sequence to Numpy array. "+os.linesep+"No co-ordinate transformation is performed.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "output.npy",150,'*.npy')
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        self.start_iter = None
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Save residual data")
        title.SetToolTipNew("Save residual error data to file (ascii format).")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "output_residual.csv",150,'*.csv')
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        self.start_iter = None
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Save Coordinates to Numpy array")
        title.SetToolTipNew("Save coordinates to Numpy array. "+os.linesep+"A prior co-ordinate transformation\nshould have occured.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "output_coordinates.npy",150,'*.npy')
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label=" Interpolate array with coordinates onto a regular grid Numpy array")
        title.SetToolTipNew("")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input file: ", "output.npy",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.coords_filename = TextPanelObject(self, "Input Co-ord's: ", "coordinates.npy",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.coords_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output file: ", "output_interpolated.npy",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 10))
        title2 = StaticTextNew(self, label=" Array grid size (i,j,k): ")
        title2.SetToolTipNew("Grid Size")
        vbox.Add(title2 ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.spacer=[{} for i in range(3)]
        self.spacer[0] = SpinnerObject(self,"i",MAX_INT_16,1,1,100,20,100)
        self.spacer[1] = SpinnerObject(self,"j",MAX_INT_16,1,1,100,20,100)
        self.spacer[2] = SpinnerObject(self,"k",MAX_INT_16,1,1,100,20,100)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        hbox.Add(self.spacer[0], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=2)
        hbox.Add(self.spacer[1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=2)
        hbox.Add(self.spacer[2], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=2)
        vbox.Add(hbox, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 10))
        self.interp_range = SpinnerObject(self,"Interpolation Range:",1.0,0.0,0.001,0.001,180,100)
        self.interp_range.label.SetToolTipNew(" Specify influence distance of each input point. This distance is "+os.linesep+" a fraction of the length of the diagonal of the sample space. "+os.linesep+" Thus, values of 1.0 will cause each input point to influence "+os.linesep+" all points in the structured point dataset. Values less than 1.0 "+os.linesep+" can improve performance significantly.")
        vbox.Add(self.interp_range, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def MakeRange(self, i, inc=1.0):
        if len(self.parent.datarangelist) < (i+1):
            min = self.scalebar_ranges[i][0]
            max = self.scalebar_ranges[i][1]
            self.parent.datarangelist.append( [min, max] )
            current_min = min
            current_max = max
        else:
            min = self.parent.datarangelist[i][0]
            max = self.parent.datarangelist[i][1]
            current_min = self.scalebar_ranges[i][0]
            current_max = self.scalebar_ranges[i][1]
        label= "Range %d"%((i+1))
        range = abs(max - min)
        if range > MAX_INT:
            newinc = range/MAX_INT
        else:
            newinc = inc
        self.sbox.append( wx.StaticBox(self, label=label, style=wx.SUNKEN_BORDER) )
        self.sboxs.append( wx.StaticBoxSizer(self.sbox[-1],wx.VERTICAL) )
        self.shbox.append( wx.BoxSizer(wx.HORIZONTAL) )
        self.valuemax.append( SpinnerObject(self,"Max:",max,min,newinc,current_max,50,150) )
        self.shbox[-1].Add(self.valuemax[-1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.shbox[-1].Add((5, -1))
        self.valuemin.append( SpinnerObject(self,"Min:",max,min,newinc,current_min,50,150) )
        self.shbox[-1].Add(self.valuemin[-1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.sboxs[-1].Add(self.shbox[-1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.vbox.Add(self.sboxs[-1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent, name, library, default=None):
        wx.Dialog.__init__(self,
                           name='BrowseValueDialog', parent=parent,
                           style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER,
                           title=_('Browse %s values library') % name)

        self.staticText1 = wx.StaticText(
              label=_('Choose a value for %s:') % name, name='staticText1', parent=self,
              pos=wx.Point(0, 0), size=wx.DefaultSize, style=0)

        self.ValuesLibrary = wx.TreeCtrl(
              name='ValuesLibrary', parent=self, pos=wx.Point(0, 0),
              size=wx.Size(400, 200), style=wx.TR_HAS_BUTTONS | wx.TR_SINGLE | wx.SUNKEN_BORDER | wx.TR_HIDE_ROOT | wx.TR_LINES_AT_ROOT)

        self.ButtonSizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)

        self.Bind(wx.EVT_BUTTON, self.OnOK, id=self.ButtonSizer.GetAffirmativeButton().GetId())

        self.flexGridSizer1 = wx.FlexGridSizer(cols=1, hgap=0, rows=3, vgap=10)

        self.flexGridSizer1.AddWindow(self.staticText1,   0, border=20, flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)
        self.flexGridSizer1.AddWindow(self.ValuesLibrary, 0, border=20, flag=wx.GROW | wx.LEFT | wx.RIGHT)
        self.flexGridSizer1.AddSizer(self.ButtonSizer,    0, border=20, flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)

        self.flexGridSizer1.AddGrowableCol(0)
        self.flexGridSizer1.AddGrowableRow(1)

        self.SetSizer(self.flexGridSizer1)
        self.Fit()

        root = self.ValuesLibrary.AddRoot("")
        self.GenerateValuesLibraryBranch(root, library, default)
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.ListCtrl.__init__(self, parent, -1, style=wx.LC_REPORT | wx.SUNKEN_BORDER)
        CheckListCtrlMixin.__init__(self)
        ListCtrlAutoWidthMixin.__init__(self)
        #wx.ListCtrl.InsertStringItem(
        #
项目:pyvmwareclient    作者:wbugbofh    | 项目源码 | 文件源码
def __init__(self, parent):
        """Constructor"""
        wx.Panel.__init__(self, parent, -1, style=wx.WANTS_CHARS)

        # self.Bind(wx.EVT_BUTTON, self.OnSelectFont, btn)

        self.list_ctrl = theListCtrl(self, -1, style=wx.LC_REPORT | wx.LC_HRULES | wx.LC_VRULES | wx.SUNKEN_BORDER)
        st1 = wx.StaticText(self, label=' Cadena Busqueda')
        self.cadenaBusqueda = wx.TextCtrl(self)
        btnbusqueda = wx.Button(self, label="Buscar")
        btnrecargaVM = wx.Button(self, label="Actualizar VM")

        name_rows = ['Carpeta', 'Nombre', 'IP', 'Estado', 'pregunta', 'Disco Path', 'Sistema', 'Notas', 'uuid']

        # cargamos los nombres de los elementos
        for x in range(len(name_rows)):
            self.list_ctrl.InsertColumn(x, name_rows[x])

        # conexion = conectar_con_vcenter(self, id)
        self.tabla = []
        self.tabla = sacar_listado_capertas(conexion)
        self.vm_buscados = []

        self.cargardatos_en_listctrl(self.tabla)

        # para la ordenacion--- llama a Getlistctrl
        self.itemDataMap = self.tabla
        listmix.ColumnSorterMixin.__init__(self, len(name_rows))
        self.list_ctrl.Bind(wx.EVT_LIST_ITEM_SELECTED, self.onItemSelected, self.list_ctrl)
        # self.list_ctrl.Bind(wx.EVT_CONTEXT_MENU, self.onItemSelected, self.list_ctrl)

        # Metemos las cosas en le ventana en orden
        txtcontador = wx.StaticText(self, label='total VM: ' + str(len(self.tabla)))
        sizer = wx.BoxSizer(wx.VERTICAL)
        hbox1 = wx.BoxSizer(wx.HORIZONTAL)
        hbox1.Add(st1, wx.ALL | wx.ALIGN_CENTER, 5)
        hbox1.Add(self.cadenaBusqueda, wx.ALL | wx.ALIGN_CENTER, 5)
        hbox1.Add(btnbusqueda, 0, wx.ALL | wx.ALIGN_RIGHT | wx.ALIGN_CENTER, 5)
        hbox1.Add(btnrecargaVM, 0, wx.ALL | wx.ALIGN_RIGHT | wx.ALIGN_CENTER, 5)
        hbox1.Add(txtcontador, wx.ALL | wx.ALIGN_CENTER, 5)
        sizer.Add(hbox1, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP | wx.ALIGN_CENTER, border=2)
        self.Bind(wx.EVT_BUTTON, self.busquedadatos, btnbusqueda)
        self.Bind(wx.EVT_BUTTON, self.recarga_VM, btnrecargaVM)

        sizer.Add(self.list_ctrl, 1, wx.ALL | wx.EXPAND, 5)
        self.SetSizer(sizer)

        # tools for search an debug (to use uncomment the next line, works only linux)
        # wx.lib.inspection.InspectionTool().Show()

    # ----------------------------------------------------------------------
    # Used by the ColumnSorterMixin, see wx/lib/mixins/listctrl.py
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        self.panelphase = self.GetParent().GetParent().GetParent()
        self.font = self.GetParent().font
        self.file = None
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="Fill blank voxels lines in raw data.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        label = wx.StaticText(self, -1,"ROI:" , style =wx.ALIGN_RIGHT, size=(150,-1) )
        label.SetFont(self.font)
        hbox.Add( label, 0, wx.CENTER )
        def OnEdit(event):
            self.objectpath.ChangeValue(event.GetString())
        self.objectpath = TextCtrlNew(self, -1)
        self.objectpath.SetFont(self.font)
        self.objectpath.SetValue("")
        self.objectpath.SetToolTipNew("Region of Interest")
        self.objectpath.Bind(wx.EVT_TEXT_ENTER, OnEdit)
        hbox.Add( self.objectpath, 1, wx.CENTER |wx.EXPAND )
        self.button = ButtonNew(self, -1, "Browse")
        self.button.SetFont(self.font)
        self.button.SetToolTipNew("Browse for ROI.")
        self.button.Bind(wx.EVT_BUTTON, self.OnBrowse)
        hbox.Add( self.button, 0, wx.LEFT|wx.CENTER)
        vbox.Add(hbox, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "output.npy",150,'*.npy')
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((0,10))
        title2 = wx.StaticText(self, label="Filter kernel dimensions: ")
        vbox.Add(title2 ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.kdims=[{} for i in range(3)]
        self.kdims[0] = SpinnerObject(self,"x",MAX_INT_16,1,1,3,20,60)
        self.kdims[1] = SpinnerObject(self,"y",MAX_INT_16,1,1,3,20,60)
        self.kdims[2] = SpinnerObject(self,"z",MAX_INT_16,1,1,1,20,60)
        hbox1 = wx.BoxSizer(wx.HORIZONTAL)
        hbox1.Add(self.kdims[0], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox1.Add(self.kdims[1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox1.Add(self.kdims[2], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        vbox.Add(hbox1, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Crop and Pad Numpy Array")
        title.SetToolTipNew("Input array will be cropped and then "+os.linesep+"padded according to the values below.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        title2 = wx.StaticText(self, label="Crop dimensions: Start: ")
        vbox.Add(title2 ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.csdims=[{} for i in range(3)]
        self.csdims[0] = SpinnerObject(self,"i",MAX_INT_16,0,1,0,20,60)
        self.csdims[1] = SpinnerObject(self,"j",MAX_INT_16,0,1,0,20,60)
        self.csdims[2] = SpinnerObject(self,"k",MAX_INT_16,0,1,0,20,60)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        hbox.Add(self.csdims[0], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox.Add(self.csdims[1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox.Add(self.csdims[2], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        vbox.Add(hbox, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        title3 = wx.StaticText(self, label="Crop dimensions: End: ")
        vbox.Add(title3 ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.cedims=[{} for i in range(3)]
        self.cedims[0] = SpinnerObject(self,"i",MAX_INT_16,0,1,0,20,60)
        self.cedims[1] = SpinnerObject(self,"j",MAX_INT_16,0,1,0,20,60)
        self.cedims[2] = SpinnerObject(self,"k",MAX_INT_16,0,1,0,20,60)
        hbox1 = wx.BoxSizer(wx.HORIZONTAL)
        hbox1.Add(self.cedims[0], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox1.Add(self.cedims[1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox1.Add(self.cedims[2], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        vbox.Add(hbox1, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        title4 = wx.StaticText(self, label="Pad dimensions: Start: ")
        vbox.Add(title4 ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.psdims=[{} for i in range(3)]
        self.psdims[0] = SpinnerObject(self,"i",MAX_INT_16,0,1,0,20,60)
        self.psdims[1] = SpinnerObject(self,"j",MAX_INT_16,0,1,0,20,60)
        self.psdims[2] = SpinnerObject(self,"k",MAX_INT_16,0,1,0,20,60)
        hbox2 = wx.BoxSizer(wx.HORIZONTAL)
        hbox2.Add(self.psdims[0], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox2.Add(self.psdims[1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox2.Add(self.psdims[2], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        vbox.Add(hbox2, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        title5 = wx.StaticText(self, label="Pad dimensions: End: ")
        vbox.Add(title5 ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.pedims=[{} for i in range(3)]
        self.pedims[0] = SpinnerObject(self,"i",MAX_INT_16,0,1,0,20,60)
        self.pedims[1] = SpinnerObject(self,"j",MAX_INT_16,0,1,0,20,60)
        self.pedims[2] = SpinnerObject(self,"k",MAX_INT_16,0,1,0,20,60)
        hbox3 = wx.BoxSizer(wx.HORIZONTAL)
        hbox3.Add(self.pedims[0], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox3.Add(self.pedims[1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox3.Add(self.pedims[2], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        vbox.Add(hbox3, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Replace Voxels in Numpy Array")
        title.SetToolTipNew("Useful for viewing data with a cut-out section.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Input File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.output_filename = TextPanelObject(self, "Output File: ", "",150,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.output_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        title2 = wx.StaticText(self, label="Start dimensions:")
        vbox.Add(title2 ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.sdims=[{} for i in range(3)]
        self.sdims[0] = SpinnerObject(self,"i",MAX_INT_16,0,1,0,20,60)
        self.sdims[1] = SpinnerObject(self,"j",MAX_INT_16,0,1,0,20,60)
        self.sdims[2] = SpinnerObject(self,"k",MAX_INT_16,0,1,0,20,60)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        hbox.Add(self.sdims[0], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox.Add(self.sdims[1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox.Add(self.sdims[2], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        vbox.Add(hbox, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        title3 = wx.StaticText(self, label="End dimensions:")
        vbox.Add(title3 ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.edims=[{} for i in range(3)]
        self.edims[0] = SpinnerObject(self,"i",MAX_INT_16,0,1,0,20,60)
        self.edims[1] = SpinnerObject(self,"j",MAX_INT_16,0,1,0,20,60)
        self.edims[2] = SpinnerObject(self,"k",MAX_INT_16,0,1,0,20,60)
        hbox1 = wx.BoxSizer(wx.HORIZONTAL)
        hbox1.Add(self.edims[0], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox1.Add(self.edims[1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox1.Add(self.edims[2], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        vbox.Add(hbox1, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        sbox1 = wx.StaticBox(self, label="Complex Value", style=wx.SUNKEN_BORDER)
        sboxs1 = wx.StaticBoxSizer(sbox1,wx.VERTICAL)
        hbox2 = wx.BoxSizer(wx.HORIZONTAL)
        self.real = SpinnerObject(self,"Real:",MAX_INT_16,MIN_INT_16,0.1,1.0,50,150)
        hbox2.Add(self.real, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        hbox2.Add((5, -1))
        self.imag = SpinnerObject(self,"Imag:",MAX_INT_16,MIN_INT_16,0.1,0.0,50,150)
        hbox2.Add(self.imag, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        sboxs1.Add(hbox2, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add(sboxs1, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self,parent,ancestor):
        from math import pi
        self.ancestor = ancestor
        wx.ScrolledWindow.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="View Support array")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.support = TextPanelObject(self, "Support: ", "",100,'*.npy')
        vbox.Add(self.support, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.input_filename = TextPanelObject(self, "Data array: ", "",100,'*.npy')
        vbox.Add(self.input_filename, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.sbox1 = wx.StaticBox(self, label="Isosurface", style=wx.BORDER_DEFAULT)
        self.sboxs1 = wx.StaticBoxSizer(self.sbox1,wx.VERTICAL)
        self.hbox1 = wx.BoxSizer(wx.HORIZONTAL)
        self.contour_support = SpinnerObject(self,"Support:",1.0,0.0,0.1,0.5,100,100)
        self.hbox1.Add(self.contour_support,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.hbox1.Add((20, -1))
        self.opacity = SpinnerObject(self,"Opacity:",1.0,0.0,0.1,0.5,130,100)
        self.hbox1.Add(self.opacity,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.sboxs1.Add(self.hbox1,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.hbox2 = wx.BoxSizer(wx.HORIZONTAL)
        self.contour = SpinnerObject(self,"Data:",MAX_INT,MIN_INT,1,100,100,100)
        self.hbox2.Add(self.contour,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.hbox2.Add((20, -1))
        self.feature_angle = SpinnerObject(self,"Feature Angle:",180,0,1,90,130,100)
        self.hbox2.Add(self.feature_angle,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.sboxs1.Add(self.hbox2,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.sboxs1.Add((-1, 5))
        vbox.Add(self.sboxs1,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1, 5))
        self.hbox6 = wx.BoxSizer(wx.HORIZONTAL)
        self.chkbox_axes = wx.CheckBox(self, -1, 'View axes', size=(200, 20))
        self.chkbox_axes.SetValue(False)
        self.hbox6.Add(self.chkbox_axes, 1,flag=wx.EXPAND|wx.LEFT|wx.RIGHT, border=2)
        self.hbox6.Add((-1, 5))
        self.axes_fontfactor = SpinnerObject(self,"Font Factor:",MAX_INT,1,1,2,100,100)
        self.hbox6.Add(self.axes_fontfactor, 0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT, border=2)
        vbox.Add(self.hbox6, 0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP|wx.BOTTOM, border=2)
        vbox.Add((-1, 5))
        button_view = wx.Button(self, label="View", size=(70, 30))
        button_view.Bind(wx.EVT_BUTTON, self.SeqParser )
        vbox.Add(button_view,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
        self.FitInside()
        self.SetScrollRate(5, 5)
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        from math import pi
        self.start_iter = None
        self.parent = parent
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = StaticTextNew(self, label="Phase Gradient Constrained HIO Algorithm")
        title.SetToolTipNew("Phase is constrained in the direction "+os.linesep+"of the Q-vector.")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.exp_amps = TextPanelObject(self, "Exp Amp: ", "",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.exp_amps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.chkbox_sqrt_expamps = wx.CheckBox(self, -1, 'Square Root Exp Amp', (50, 10))
        self.chkbox_sqrt_expamps.SetValue(True)
        vbox.Add(self.chkbox_sqrt_expamps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.support = TextPanelObject(self,"Support: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        self.support.label.SetToolTipNew("Support. If empty, previous instance will be used.")
        vbox.Add(self.support, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.mask = TextPanelObject(self,"Mask: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.mask, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.beta = SpinnerObject(self,"Beta: ",1.0,0.0,0.01,0.9,100,100)
        vbox.Add(self.beta, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niter = SpinnerObject(self,"Iterations: ",MAX_INT,1,1,1,100,100)
        vbox.Add(self.niter, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.phasemax = SpinnerObject(self,"Phase Max: ",2.0*pi,0.0,0.01,pi,100,150)
        vbox.Add(self.phasemax, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.phasemin = SpinnerObject(self,"Phase Min: ",2.0*pi,0.0,0.01,0.0,100,150)
        vbox.Add(self.phasemin, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.qx = NumberObject(self,"Q,x:",0.0,80)
        self.qx.label.SetToolTipNew("Q vector, x component direction.")
        vbox.Add(self.qx ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.qy = NumberObject(self,"Q,y:",0.0,80)
        self.qy.label.SetToolTipNew("Q vector, y component direction.")
        vbox.Add(self.qy ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.qz = NumberObject(self,"Q,z:",0.0,80)
        self.qz.label.SetToolTipNew("Q vector, z component direction.")
        vbox.Add(self.qz ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.ttheta = 0.0
        self.phi = 0.0
        self.waveln = 0.0
        vbox.Add((-1,20))
        self.buttonq = wx.Button(self, label="Calculate Q", size=(100, 30))
        vbox.Add(self.buttonq, flag=wx.EXPAND|wx.LEFT|wx.RIGHT, border=20)
        self.Bind(wx.EVT_BUTTON, self.OnCalcQ, self.buttonq)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        self.start_iter = None
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="HIO Algorithm with Partial Coherence Optimisation")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.exp_amps = TextPanelObject(self, "Exp Amp: ", "",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.exp_amps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.chkbox_sqrt_expamps = wx.CheckBox(self, -1, 'Square Root Exp Amp', (50, 10))
        self.chkbox_sqrt_expamps.SetValue(True)
        vbox.Add(self.chkbox_sqrt_expamps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.support = TextPanelObject(self,"Support: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        self.support.label.SetToolTipNew("Support. If empty, previous instance will be used.")
        vbox.Add(self.support, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.mask = TextPanelObject(self,"Mask: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.mask, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.beta = SpinnerObject(self,"Beta: ",1.0,0.0,0.01,0.9,100,100)
        vbox.Add(self.beta, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niter = SpinnerObject(self,"Iterations: ",MAX_INT,1,1,1,100,100)
        vbox.Add(self.niter, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((1,5))
        self.niterrlpre = SpinnerObject(self,"Iterations preceding R-L optimisation:", MAX_INT,1,1,100,300,100)
        self.niterrlpre.label.SetToolTipNew("Number of HIO iterations performed before R-L Optimisation occurs.")
        vbox.Add(self.niterrlpre, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niterrl = SpinnerObject(self,"R-L iterations: ",MAX_INT,1,1,10,300,100)
        self.niterrl.label.SetToolTipNew("Number of Richardon-Lucy iterations.")
        vbox.Add(self.niterrl, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niterrlinterval = SpinnerObject(self,"Interval between R-L optimisation: ",MAX_INT,1,1,50,300,100)
        self.niterrlinterval.label.SetToolTipNew("")
        vbox.Add(self.niterrlinterval, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.accel = SpinnerObject(self,"Acceleration: ",MAX_INT_16,1,1,1,100,100)
        vbox.Add(self.accel, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((1,5))
        self.gammaHWHM = SpinnerObject(self,"Initial PSF HWHM: ",MAX_INT_16,0.0,0.01,0.2,300,100)
        self.gammaHWHM.label.SetToolTipNew("HWHM of initial FT'd Lorentzian PSF.")
        vbox.Add(self.gammaHWHM, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        title1 = wx.StaticText(self, label="Zero fill end dimensions of PSF:")
        vbox.Add(title1 ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.zedims=[{} for i in range(3)]
        self.zedims[0] = SpinnerObject(self,"i",MAX_INT_16,0,1,9,20,60)
        self.zedims[1] = SpinnerObject(self,"j",MAX_INT_16,0,1,9,20,60)
        self.zedims[2] = SpinnerObject(self,"k",MAX_INT_16,0,1,9,20,60)
        hbox1 = wx.BoxSizer(wx.HORIZONTAL)
        hbox1.Add(self.zedims[0], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox1.Add(self.zedims[1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox1.Add(self.zedims[2], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        vbox.Add(hbox1, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((1,5))
        self.chkbox_reset_gamma = wx.CheckBox(self, -1, 'Reset PSF before the next R-L optimisation cycle.', (50, 10))
        self.chkbox_reset_gamma.SetValue(False)
        vbox.Add(self.chkbox_reset_gamma, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        self.start_iter = None
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="ER Mask Algorithm with Partial Coherence Optimisation")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.exp_amps = TextPanelObject(self, "Exp Amp: ", "",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.exp_amps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.chkbox_sqrt_expamps = wx.CheckBox(self, -1, 'Square Root Exp Amp', (50, 10))
        self.chkbox_sqrt_expamps.SetValue(True)
        vbox.Add(self.chkbox_sqrt_expamps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.support = TextPanelObject(self,"Support: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        self.support.label.SetToolTipNew("Support. If empty, previous instance will be used.")
        vbox.Add(self.support, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.mask = TextPanelObject(self,"Mask: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.mask, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niter = SpinnerObject(self,"Iterations: ",MAX_INT,1,1,1,100,100)
        vbox.Add(self.niter, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((1,5))
        self.niterrlpre = SpinnerObject(self,"Iterations preceding R-L optimisation:", MAX_INT,1,1,100,300,100)
        self.niterrlpre.label.SetToolTipNew("Number of ER iterations performed before R-L Optimisation occurs.")
        vbox.Add(self.niterrlpre, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niterrl = SpinnerObject(self,"R-L iterations: ",MAX_INT,1,1,10,300,100)
        self.niterrl.label.SetToolTipNew("Number of Richardon-Lucy iterations.")
        vbox.Add(self.niterrl, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niterrlinterval = SpinnerObject(self,"Interval between R-L optimisation: ",MAX_INT,1,1,50,300,100)
        self.niterrlinterval.label.SetToolTipNew("")
        vbox.Add(self.niterrlinterval, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.accel = SpinnerObject(self,"Acceleration: ",MAX_INT_16,1,1,1,100,100)
        vbox.Add(self.accel, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((1,5))
        self.gammaHWHM = SpinnerObject(self,"Initial PSF HWHM: ",MAX_INT_16,0.0,0.01,0.2,300,100)
        self.gammaHWHM.label.SetToolTipNew("HWHM of initial FT'd Lorentzian PSF.")
        vbox.Add(self.gammaHWHM, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        title1 = wx.StaticText(self, label="Zero fill end dimensions of PSF:")
        vbox.Add(title1 ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.zedims=[{} for i in range(3)]
        self.zedims[0] = SpinnerObject(self,"i",MAX_INT_16,0,1,9,20,60)
        self.zedims[1] = SpinnerObject(self,"j",MAX_INT_16,0,1,9,20,60)
        self.zedims[2] = SpinnerObject(self,"k",MAX_INT_16,0,1,9,20,60)
        hbox1 = wx.BoxSizer(wx.HORIZONTAL)
        hbox1.Add(self.zedims[0], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox1.Add(self.zedims[1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox1.Add(self.zedims[2], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        vbox.Add(hbox1, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((1,5))
        self.chkbox_reset_gamma = wx.CheckBox(self, -1, 'Reset PSF before the next R-L optimisation cycle.', (50, 10))
        self.chkbox_reset_gamma.SetValue(False)
        vbox.Add(self.chkbox_reset_gamma, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        self.start_iter = None
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="HPR Algorithm with Partial Coherence Optimisation")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.exp_amps = TextPanelObject(self, "Exp Amp: ", "",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.exp_amps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.chkbox_sqrt_expamps = wx.CheckBox(self, -1, 'Square Root Exp Amp', (50, 10))
        self.chkbox_sqrt_expamps.SetValue(True)
        vbox.Add(self.chkbox_sqrt_expamps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.support = TextPanelObject(self,"Support: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        self.support.label.SetToolTipNew("Support. If empty, previous instance will be used.")
        vbox.Add(self.support, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.mask = TextPanelObject(self,"Mask: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.mask, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.beta = SpinnerObject(self,"Beta: ",1.0,0.0,0.01,0.9,100,100)
        vbox.Add(self.beta, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niter = SpinnerObject(self,"Iterations: ",MAX_INT,1,1,1,100,100)
        vbox.Add(self.niter, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((1,5))
        self.niterrlpre = SpinnerObject(self,"Iterations preceding R-L optimisation:", MAX_INT,1,1,100,300,100)
        self.niterrlpre.label.SetToolTipNew("Number of HPR iterations performed before R-L Optimisation occurs.")
        vbox.Add(self.niterrlpre, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niterrl = SpinnerObject(self,"R-L iterations: ",MAX_INT,1,1,10,300,100)
        self.niterrl.label.SetToolTipNew("Number of Richardon-Lucy iterations.")
        vbox.Add(self.niterrl, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niterrlinterval = SpinnerObject(self,"Interval between R-L optimisation: ",MAX_INT,1,1,50,300,100)
        self.niterrlinterval.label.SetToolTipNew("")
        vbox.Add(self.niterrlinterval, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.accel = SpinnerObject(self,"Acceleration: ",MAX_INT_16,1,1,1,100,100)
        vbox.Add(self.accel, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((1,5))
        self.gammaHWHM = SpinnerObject(self,"Initial PSF HWHM: ",MAX_INT_16,0.0,0.01,0.2,300,100)
        self.gammaHWHM.label.SetToolTipNew("HWHM of initial FT'd Lorentzian PSF.")
        vbox.Add(self.gammaHWHM, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        title1 = wx.StaticText(self, label="Zero fill end dimensions of PSF:")
        vbox.Add(title1 ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.zedims=[{} for i in range(3)]
        self.zedims[0] = SpinnerObject(self,"i",MAX_INT_16,0,1,9,20,60)
        self.zedims[1] = SpinnerObject(self,"j",MAX_INT_16,0,1,9,20,60)
        self.zedims[2] = SpinnerObject(self,"k",MAX_INT_16,0,1,9,20,60)
        hbox1 = wx.BoxSizer(wx.HORIZONTAL)
        hbox1.Add(self.zedims[0], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox1.Add(self.zedims[1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox1.Add(self.zedims[2], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        vbox.Add(hbox1, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((1,5))
        self.chkbox_reset_gamma = wx.CheckBox(self, -1, 'Reset PSF before the next R-L optimisation cycle.', (50, 10))
        self.chkbox_reset_gamma.SetValue(False)
        vbox.Add(self.chkbox_reset_gamma, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent):
        self.start_iter = None
        wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
        vbox = wx.BoxSizer(wx.VERTICAL)
        title = wx.StaticText(self, label="RAAR Algorithm with Partial Coherence Optimisation")
        vbox.Add(title ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.exp_amps = TextPanelObject(self, "Exp Amp: ", "",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.exp_amps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.chkbox_sqrt_expamps = wx.CheckBox(self, -1, 'Square Root Exp Amp', (50, 10))
        self.chkbox_sqrt_expamps.SetValue(True)
        vbox.Add(self.chkbox_sqrt_expamps, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.support = TextPanelObject(self,"Support: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        self.support.label.SetToolTipNew("Support. If empty, previous instance will be used.")
        vbox.Add(self.support, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.mask = TextPanelObject(self,"Mask: ","",100,"Numpy files (*.npy)|*.npy|All files (*.*)|*.*")
        vbox.Add(self.mask, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.beta = SpinnerObject(self,"Beta: ",1.0,0.0,0.01,0.9,100,100)
        vbox.Add(self.beta, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niter = SpinnerObject(self,"Iterations: ",MAX_INT,1,1,1,100,100)
        vbox.Add(self.niter, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((1,5))
        self.niterrlpre = SpinnerObject(self,"Iterations preceding R-L optimisation:", MAX_INT,1,1,100,300,100)
        self.niterrlpre.label.SetToolTipNew("Number of RAAR iterations performed before R-L Optimisation occurs.")
        vbox.Add(self.niterrlpre, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niterrl = SpinnerObject(self,"R-L iterations: ",MAX_INT,1,1,10,300,100)
        self.niterrl.label.SetToolTipNew("Number of Richardon-Lucy iterations.")
        vbox.Add(self.niterrl, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.niterrlinterval = SpinnerObject(self,"Interval between R-L optimisation: ",MAX_INT,1,1,50,300,100)
        self.niterrlinterval.label.SetToolTipNew("")
        vbox.Add(self.niterrlinterval, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.accel = SpinnerObject(self,"Acceleration: ",MAX_INT_16,1,1,1,100,100)
        vbox.Add(self.accel, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((1,5))
        self.gammaHWHM = SpinnerObject(self,"Initial PSF HWHM: ",MAX_INT_16,0.0,0.01,0.2,300,100)
        self.gammaHWHM.label.SetToolTipNew("HWHM of initial FT'd Lorentzian PSF.")
        vbox.Add(self.gammaHWHM, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        title1 = wx.StaticText(self, label="Zero fill end dimensions of PSF:")
        vbox.Add(title1 ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.zedims=[{} for i in range(3)]
        self.zedims[0] = SpinnerObject(self,"i",MAX_INT_16,0,1,9,20,60)
        self.zedims[1] = SpinnerObject(self,"j",MAX_INT_16,0,1,9,20,60)
        self.zedims[2] = SpinnerObject(self,"k",MAX_INT_16,0,1,9,20,60)
        hbox1 = wx.BoxSizer(wx.HORIZONTAL)
        hbox1.Add(self.zedims[0], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox1.Add(self.zedims[1], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        hbox1.Add(self.zedims[2], 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=10)
        vbox.Add(hbox1, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((1,5))
        self.chkbox_reset_gamma = wx.CheckBox(self, -1, 'Reset PSF before the next R-L optimisation cycle.', (50, 10))
        self.chkbox_reset_gamma.SetValue(False)
        vbox.Add(self.chkbox_reset_gamma, 0,  flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, border=5)
        self.SetAutoLayout(True)
        self.SetSizer( vbox )