<commit_before>"""
This software was developed by the University of Tennessee as part of the
Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
project funded by the US National Science Foundation. 

See the license text in license.txt

copyright 2008, University of Tennessee
"""


import wx
import sys
import danse.common.plottools
from danse.common.plottools.PlotPanel import PlotPanel
from danse.common.plottools.plottables import Graph,Data1D
from sans.guicomm.events import EVT_NEW_PLOT
from sans.guicomm.events import StatusEvent ,NewPlotEvent


from SlicerParameters import SlicerEvent
from binder import BindArtist
(InternalEvent, EVT_INTERNAL)   = wx.lib.newevent.NewEvent()
#from SlicerParameters import SlicerEvent
#(InternalEvent, EVT_INTERNAL)   = wx.lib.newevent.NewEvent()
from Plotter1D import ModelPanel1D
DEFAULT_QMAX = 0.05

DEFAULT_QSTEP = 0.001
DEFAULT_BEAM = 0.005
BIN_WIDTH = 1.0
import pylab
from Plotter1D import PanelMenu

class ModelPanel2D( ModelPanel1D):
    """
        Plot panel for use with the GUI manager
    """
    
    ## Internal name for the AUI manager
    window_name = "plotpanel"
    ## Title to appear on top of the window
    window_caption = "Plot Panel"
    ## Flag to tell the GUI manager that this panel is not
    #  tied to any perspective
    ALWAYS_ON = True
    ## Group ID
    group_id = None
    
    
    def __init__(self, parent, id = -1,data2d=None, color = None,\
        dpi = None, style = wx.NO_FULL_REPAINT_ON_RESIZE, **kwargs):
        """
            Initialize the panel
        """
        ModelPanel1D.__init__(self, parent, id = id, style = style, **kwargs)
        
        ## Reference to the parent window
        self.parent = parent
        ## Plottables
        self.plots = {}
        self.data2D= data2d
        self.data =data2d.data
        ## Unique ID (from gui_manager)
        self.uid = None
        
        ## Action IDs for internal call-backs
        self.action_ids = {}
        self.connect = BindArtist(self.subplot.figure)
        
        # Beam stop
        self.beamstop_radius = DEFAULT_BEAM
        # Slicer
        """
        if data2d.xmax==None:
            data2d.xmax=DEFAULT_QMAX+self.qstep*0.01
        
        self.qmax = data2d.xmax
        if data2d.ymax==None:
            data2d.ymax=DEFAULT_QMAX+self.qstep*0.01
        self.imax = data2d.ymax
        """
        #self.radius = math.sqrt(data2d.)
        #self.qstep = DEFAULT_QSTEP
        #print "panel2D qmax",self.qmax,
        
        #self.x = pylab.arange(-1*self.qmax, self.qmax+self.qstep*0.01, self.qstep)
        #self.y = pylab.arange(-1*self.imax, self.imax+self.qstep*0.01, self.qstep)
        #self.slicer_z = 5
        self.slicer = None
        self.parent.Bind(EVT_INTERNAL, self._onEVT_INTERNAL)
        self.axes_frozen = False
        
       
        ## Graph        
        self.graph = Graph()
        self.graph.xaxis("\\rm{Q}", 'A^{-1}')<commit_msg>remove comment on plotter2D for slicer_z <commit_after>"""
This software was developed by the University of Tennessee as part of the
Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
project funded by the US National Science Foundation. 

See the license text in license.txt

copyright 2008, University of Tennessee
"""


import wx
import sys
import danse.common.plottools
from danse.common.plottools.PlotPanel import PlotPanel
from danse.common.plottools.plottables import Graph,Data1D
from sans.guicomm.events import EVT_NEW_PLOT
from sans.guicomm.events import StatusEvent ,NewPlotEvent


from SlicerParameters import SlicerEvent
from binder import BindArtist
(InternalEvent, EVT_INTERNAL)   = wx.lib.newevent.NewEvent()
#from SlicerParameters import SlicerEvent
#(InternalEvent, EVT_INTERNAL)   = wx.lib.newevent.NewEvent()
from Plotter1D import ModelPanel1D
DEFAULT_QMAX = 0.05

DEFAULT_QSTEP = 0.001
DEFAULT_BEAM = 0.005
BIN_WIDTH = 1.0
import pylab
from Plotter1D import PanelMenu

class ModelPanel2D( ModelPanel1D):
    """
        Plot panel for use with the GUI manager
    """
    
    ## Internal name for the AUI manager
    window_name = "plotpanel"
    ## Title to appear on top of the window
    window_caption = "Plot Panel"
    ## Flag to tell the GUI manager that this panel is not
    #  tied to any perspective
    ALWAYS_ON = True
    ## Group ID
    group_id = None
    
    
    def __init__(self, parent, id = -1,data2d=None, color = None,\
        dpi = None, style = wx.NO_FULL_REPAINT_ON_RESIZE, **kwargs):
        """
            Initialize the panel
        """
        ModelPanel1D.__init__(self, parent, id = id, style = style, **kwargs)
        
        ## Reference to the parent window
        self.parent = parent
        ## Plottables
        self.plots = {}
        self.data2D= data2d
        self.data =data2d.data
        ## Unique ID (from gui_manager)
        self.uid = None
        
        ## Action IDs for internal call-backs
        self.action_ids = {}
        self.connect = BindArtist(self.subplot.figure)
        
        # Beam stop
        self.beamstop_radius = DEFAULT_BEAM
        # Slicer
        """
        if data2d.xmax==None:
            data2d.xmax=DEFAULT_QMAX+self.qstep*0.01
        
        self.qmax = data2d.xmax
        if data2d.ymax==None:
            data2d.ymax=DEFAULT_QMAX+self.qstep*0.01
        self.imax = data2d.ymax
        """
        #self.radius = math.sqrt(data2d.)
        #self.qstep = DEFAULT_QSTEP
        #print "panel2D qmax",self.qmax,
        
        #self.x = pylab.arange(-1*self.qmax, self.qmax+self.qstep*0.01, self.qstep)
        #self.y = pylab.arange(-1*self.imax, self.imax+self.qstep*0.01, self.qstep)
        self.slicer_z = 5
        self.slicer = None
        self.parent.Bind(EVT_INTERNAL, self._onEVT_INTERNAL)
        self.axes_frozen = False
        
       
        ## Graph        
        self.graph = Graph()
        self.graph.xaxis("\\rm{Q}", 'A^{-1}')
{'fraction_non_alphanumeric': 0.09228441754916793, 'fraction_numerical': 0.017986216170785007, 'mean_word_length': 2.449275362318841, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3826919', 'n_tokens_mistral': 1995, 'n_tokens_neox': 1924, 'n_words': 491}