def __init__(self,
                 parent=None,
                 _larch=None,
                 prefix=None,
                 det_type='ME-4',
                 is_xsp3=False,
                 nmca=4,
                 size=(725, 580),
                 scandb_conn=None,
                 title='Epics XRF Display',
                 output_title='XRF',
                 **kws):

        self.det_type = det_type
        self.is_xsp3 = is_xsp3
        self.nmca = nmca
        self.det_fore = 1
        self.det_back = 0
        self.scandb = None
        if scandb_conn is not None:
            self.ConnectScanDB(**scandb_conn)

        self.onConnectEpics(event=None, prefix=prefix)

        XRFDisplayFrame.__init__(self,
                                 parent=parent,
                                 _larch=_larch,
                                 title=title,
                                 size=size,
                                 **kws)
 def onDelROI(self, event=None):
     roiname = self.get_roiname()
     errmsg = None
     if self.roilist_sel is None:
         errmsg = 'No ROI selected to delete.'
     if errmsg is not None:
         return Popup(self, errmsg, 'Cannot Delete ROI')
     self.det.del_roi(roiname)
     XRFDisplayFrame.onDelROI(self)
Beispiel #3
0
 def onDelROI(self, event=None):
     roiname = self.get_roiname()
     errmsg = None
     if self.roilist_sel is None:
         errmsg = 'No ROI selected to delete.'
     if errmsg is not None:
         return Popup(self, errmsg, 'Cannot Delete ROI')
     self.det.del_roi(roiname)
     XRFDisplayFrame.onDelROI(self)
Beispiel #4
0
    def __init__(self, parent=None, _larch=None, prefix=None,
                 det_type='ME-4',  ioc_type='Xspress3',
                 nmca=4, size=(725, 580),  scandb_conn=None,
                 title='Epics XRF Display',
                 output_title='XRF', **kws):

        self.det_type = det_type
        self.ioc_type = ioc_type
        self.nmca = nmca
        self.det_fore = 1
        self.det_back = 0
        self.scandb = None
        if scandb_conn is not None:
            self.ConnectScanDB(**scandb_conn)

        self.onConnectEpics(event=None, prefix=prefix)

        XRFDisplayFrame.__init__(self, parent=parent, _larch=_larch,
                                 title=title, size=size, **kws)
Beispiel #5
0
    def __init__(self, parent=None, _larch=None, prefix=None,
                 det_type='ME-4', ioc_type='Xspress3', nmca=4,
                 size=(725, 580), environ_file=None, scandb_conn=None,
                 title='Epics XRF Display', output_title='XRF', **kws):

        self.det_type = det_type
        self.ioc_type = ioc_type
        self.nmca = nmca
        self.det_fore = 1
        self.det_back = 0
        self.scandb = None
        self.environ = []
        if environ_file is not None:
            self.read_environfile(environ_file)
        if scandb_conn is not None:
            self.ConnectScanDB(**scandb_conn)

        self.onConnectEpics(event=None, prefix=prefix)

        XRFDisplayFrame.__init__(self, parent=parent, _larch=_larch,
                                 title=title, size=size, **kws)
Beispiel #6
0
    def onNewROI(self, event=None):
        roiname = self.get_roiname()
        errmsg = None
        if self.xmarker_left is None or self.xmarker_right is None:
            errmsg = 'Must select right and left markers to define ROI'
        elif roiname in self.wids['roilist'].GetStrings():
            errmsg = '%s is already in ROI list - use a unique name.' % roiname
        if errmsg is not None:
            return Popup(self, errmsg, 'Cannot Define ROI')

        confirmed = XRFDisplayFrame.onNewROI(self)
        if confirmed:
            self.det.add_roi(roiname, lo=self.xmarker_left,
                             hi=self.xmarker_right)
Beispiel #7
0
    def onNewROI(self, event=None):
        roiname = self.get_roiname()
        errmsg = None
        if self.xmarker_left is None or self.xmarker_right is None:
            errmsg = 'Must select right and left markers to define ROI'
        elif roiname in self.wids['roilist'].GetStrings():
            errmsg = '%s is already in ROI list - use a unique name.' % roiname
        if errmsg is not None:
            return Popup(self, errmsg, 'Cannot Define ROI')

        confirmed = XRFDisplayFrame.onNewROI(self)
        if confirmed:
            self.det.add_roi(roiname, lo=self.xmarker_left,
                             hi=self.xmarker_right)
 def onExit(self, event=None):
     self.onStop()
     XRFDisplayFrame.onExit(self)
 def onClose(self, event=None):
     self.onStop()
     XRFDisplayFrame.onClose(self)
Beispiel #10
0
 def onExit(self, event=None):
     self.onStop()
     XRFDisplayFrame.onExit(self)
Beispiel #11
0
 def onClose(self, event=None):
     self.onStop()
     XRFDisplayFrame.onClose(self)