Ejemplo n.º 1
0
 def roi_width_slider(self, text='ROI Width :'):
     roi_width_layout = QtGui.QHBoxLayout()
     roi_width_layout.addWidget(QtGui.QLabel(text))
     self.roi_width = QtGui.QSlider(Qt.Horizontal)
     self.wLabel = QtGui.QLabel('200 eV')
     self.roi_width.setMinimum(2)
     self.roi_width.setMaximum(100)
     self.roi_width.setValue(20)
     self.roi_width.setTickPosition(QtGui.QSlider.TicksBelow)
     self.roi_peak.setTickInterval(1)
     roi_width_layout.addWidget(self.roi_width)
     self.roi_width.valueChanged.connect(self.setRoi)
     roi_width_layout.addWidget(self.wLabel)
     return roi_width_layout
Ejemplo n.º 2
0
 def roi_peak_slider(self, text='ROI Peak :'):
     roi_peak_layout = QtGui.QHBoxLayout()
     roi_peak_layout.addWidget(QtGui.QLabel(text))
     self.roi_peak = QtGui.QSlider(Qt.Horizontal)
     self.pLabel = QtGui.QLabel('800 eV')
     self.roi_peak.setMinimum(0)
     self.roi_peak.setMaximum(256)
     self.roi_peak.setValue(80)
     self.roi_peak.setTickPosition(QtGui.QSlider.TicksBelow)
     self.roi_peak.setTickInterval(1)
     roi_peak_layout.addWidget(self.roi_peak)
     self.roi_peak.valueChanged.connect(self.setRoi)
     roi_peak_layout.addWidget(self.pLabel)
     return roi_peak_layout
Ejemplo n.º 3
0
    def __init__(self, parent=None):

        super(MapDialog, self).__init__(parent)

        self.select_entry()
        dets_list = {}
        self.dets = self.entry['instrument/fluorescence']
        self.signal_combo = self.select_box(self.dets, default='sdd3')
        self.axes = self.entry['sample/positioner']
        self.axis1_combo = self.select_box(self.axes, default='hex_xp')
        self.axis2_combo = self.select_box(self.axes, default='hex_yp')
        
        
        roi_peak_layout = QtGui.QHBoxLayout()
        roi_peak_layout.addWidget(QtGui.QLabel('ROI Peak'))
        self.roi_peak = QtGui.QSlider(Qt.Horizontal)
        self.pLabel = QtGui.QLineEdit()
        self.pLabel.setText('800')
        self.pLabel.setSizePolicy(QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum))
        self.pLabel.setAlignment(Qt.AlignRight) 
        self.roi_peak.setMinimum(0)
        self.roi_peak.setMaximum(256)
        self.roi_peak.setValue(80)
        self.roi_peak.setTickPosition(QtGui.QSlider.TicksBelow)
        self.roi_peak.setTickInterval(1)
        roi_peak_layout.addWidget(self.roi_peak)
        self.roi_peak.valueChanged.connect(self.setRoi)
        self.pLabel.returnPressed.connect(self.setRoi2)
        self.pUnits = QtGui.QLabel('eV')
        roi_peak_layout.addWidget(self.pLabel)
        roi_peak_layout.addWidget(self.pUnits)


        roi_width_layout = QtGui.QHBoxLayout()
        roi_width_layout.addWidget(QtGui.QLabel('ROI Width'))
        self.roi_width = QtGui.QSlider(Qt.Horizontal)
        self.wLabel = QtGui.QLineEdit()
        self.wLabel.setText('200')
        self.wLabel.setSizePolicy(QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum))
        self.wLabel.setAlignment(Qt.AlignRight) 
        self.roi_width.setMinimum(2)
        self.roi_width.setMaximum(100)
        self.roi_width.setValue(20)
        self.roi_width.setTickPosition(QtGui.QSlider.TicksBelow)
        self.roi_peak.setTickInterval(1)
        roi_width_layout.addWidget(self.roi_width)

        self.roi_width.valueChanged.connect(self.setRoi)
        self.wLabel.returnPressed.connect(self.setRoi2)
        self.signal_combo.activated.connect(self.setRoi)
        self.axis1_combo.activated.connect(self.setRoi)
        self.axis2_combo.activated.connect(self.setRoi)
        self.entry_box.activated.connect(self.setRoi)
        
        self.wUnits = QtGui.QLabel('eV')
        roi_width_layout.addWidget(self.wLabel)
        roi_width_layout.addWidget(self.wUnits)

        lab_sig_layout = QtGui.QHBoxLayout()
        self.lab_sig = self.labels('Detector :', align='left')
        lab_sig_layout.addLayout(self.lab_sig)
        lab_sig_layout.addWidget(self.signal_combo)
        lab_sig_layout.addStretch()
        
        lab_axis1_layout = QtGui.QHBoxLayout()
        self.lab_axis1 = self.labels('X-Axis :', align='left')
        lab_axis1_layout.addLayout(self.lab_axis1)
        lab_axis1_layout.addWidget(self.axis1_combo)
        lab_axis1_layout.addStretch()

        lab_axis2_layout = QtGui.QHBoxLayout()
        self.lab_axis2 = self.labels('Y-Axis :', align='left')
        lab_axis2_layout.addLayout(self.lab_axis2)
        lab_axis2_layout.addWidget(self.axis2_combo)
        lab_axis2_layout.addStretch()

        self.set_layout(self.entry_layout, lab_sig_layout, lab_axis1_layout,
                            lab_axis2_layout, roi_peak_layout, roi_width_layout, self.close_buttons())
        self.set_title('Convert to 2D map')