• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python datadialogs.GridParameters类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中nexpy.gui.datadialogs.GridParameters的典型用法代码示例。如果您正苦于以下问题:Python GridParameters类的具体用法?Python GridParameters怎么用?Python GridParameters使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了GridParameters类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: MaskDialog

class MaskDialog(BaseDialog):

    def __init__(self, parent=None):
        super(MaskDialog, self).__init__(parent)
        self.select_entry(self.choose_entry)
        self.parameters = GridParameters()
        self.parameters.add('mask', 'pilatus_mask/entry/mask', 'Mask Path')
        self.action_buttons(('Save Mask', self.save_mask))
        self.set_layout(self.entry_layout, self.parameters.grid(), 
                        self.action_buttons(('Save Mask', self.save_mask)), 
                        self.close_buttons())
        self.set_title('Mask Data')

    def save_mask(self):
        try:
            mask = self.treeview.tree[self.parameters['mask'].value]
            if mask.dtype != np.bool:
                raise NeXusError('Mask must be a Boolean array')
            elif len(mask.shape) == 1:
                raise NeXusError('Mask must be at least two-dimensional')
            elif len(mask.shape) > 2:
                mask = mask[0]                
            self.entry['instrument/detector/pixel_mask'] = mask
            self.entry['instrument/detector/pixel_mask_applied'] = False
        except NeXusError as error:
            report_error('Applying Mask', error)
开发者ID:,项目名称:,代码行数:26,代码来源:


示例2: SampleDialog

class SampleDialog(BaseDialog):

    def __init__(self, parent=None):
        super(SampleDialog, self).__init__(parent)

        self.sample = GridParameters()
        self.sample.add('sample', 'sample', 'Sample Name')
        self.sample.add('label', 'label', 'Sample Label')

        self.set_layout(self.directorybox('Choose Experiment Directory',
                                          default=False), 
                        self.sample.grid(header=False),
                        self.close_buttons(save=True))

        self.set_title('New Sample')

    def accept(self):
        home_directory = self.get_directory()
        self.mainwindow.default_directory = home_directory
        sample_directory = os.path.join(home_directory, 
                                        self.sample['sample'].value,
                                        self.sample['label'].value)
        if not os.path.exists(sample_directory):
            os.makedirs(sample_directory)
        super(SampleDialog, self).accept()
开发者ID:rayosborn,项目名称:nxpeaks,代码行数:25,代码来源:new_sample.py


示例3: EnergyDialog

class EnergyDialog(BaseDialog):

    def __init__(self, parent=None):
        super(EnergyDialog, self).__init__(parent)

        layout = QtGui.QVBoxLayout()

        self.select_entry()
        self.parameters = GridParameters()
        self.parameters.add('m1', self.entry['monitor1/distance'], 
                            'Monitor 1 Distance')
        self.parameters.add('m2', self.entry['monitor2/distance'], 
                            'Monitor 2 Distance')
        self.parameters.add('Ei', self.entry['instrument/monochromator/energy'], 
                            'Incident Energy')
        self.parameters.add('mod', self.entry['instrument/source/distance'], 
                            'Moderator Distance')
        layout.addLayout(self.entry_layout)
        layout.addLayout(self.parameters.grid())
        layout.addLayout(self.action_buttons(('Get Ei', self.get_ei)))
        layout.addWidget(self.close_buttons(save=True))
        self.setLayout(layout)
        self.setWindowTitle('Get Incident Energy')

        self.m1 = self.entry['monitor1']
        self.m2 = self.entry['monitor2'] 

    @property
    def m1_distance(self):
        return self.parameters['m1'].value - self.moderator_distance

    @property
    def m2_distance(self):
        return self.parameters['m2'].value - self.moderator_distance

    @property
    def Ei(self):
        return self.parameters['Ei'].value

    @property
    def moderator_distance(self):
        return self.parameters['mod'].value

    def get_ei(self):
        t = 2286.26 * self.m1_distance / np.sqrt(self.Ei)
        m1_time = self.m1[t-200.0:t+200.0].moment()
        t = 2286.26 * self.m2_distance / np.sqrt(self.Ei)
        m2_time = self.m2[t-200.0:t+200.0].moment()
        self.parameters['Ei'].value = (2286.26 * (self.m2_distance - self.m1_distance) /
                                       (m2_time - m1_time))**2

    def accept(self):
        try:
            self.parameters['Ei'].save()
        except NeXusError as error:
            report_error("Getting Incident Energy", error)
        super(EnergyDialog, self).accept()
开发者ID:aaron-parsons,项目名称:nexpy,代码行数:57,代码来源:get_ei.py


示例4: __init__

    def __init__(self, parent=None):
        super(FindDialog, self).__init__(parent)

        self.select_entry(self.choose_entry)

        self.parameters = GridParameters()
        self.parameters.add('threshold', '', 'Threshold')
        self.parameters.add('first', '', 'First Frame')
        self.parameters.add('last', '', 'Last Frame')
        find_layout = QtWidgets.QHBoxLayout()
        self.find_button = QtWidgets.QPushButton('Find Peaks')
        self.find_button.clicked.connect(self.find_peaks)
        self.peak_count = QtWidgets.QLabel()
        self.peak_count.setVisible(False)
        find_layout.addStretch()
        find_layout.addWidget(self.find_button)
        find_layout.addWidget(self.peak_count)
        find_layout.addStretch()
        self.set_layout(self.entry_layout, 
                        self.parameters.grid(),
                        find_layout,
                        self.progress_layout(save=True))
        self.progress_bar.setVisible(False)
        self.progress_bar.setValue(0)
        self.set_title('Find Peaks')
        self.reduce = None
开发者ID:rayosborn,项目名称:nxpeaks,代码行数:26,代码来源:find_peaks.py


示例5: __init__

    def __init__(self, parent=None):
        super(LatticeDialog, self).__init__(parent)

        self.select_entry(self.choose_entry)

        self.refine = NXRefine()

        self.parameters = GridParameters()
        self.parameters.add('symmetry', self.refine.symmetries, 'Symmetry',
                            slot=self.set_lattice_parameters)
        self.parameters.add('centring', self.refine.centrings, 'Cell Centring')
        self.parameters.add('a', self.refine.a, 'Unit Cell - a (Ang)',
                            slot=self.set_lattice_parameters)
        self.parameters.add('b', self.refine.b, 'Unit Cell - b (Ang)',
                            slot=self.set_lattice_parameters)
        self.parameters.add('c', self.refine.c, 'Unit Cell - c (Ang)',
                            slot=self.set_lattice_parameters)
        self.parameters.add('alpha', self.refine.alpha, 'Unit Cell - alpha (deg)', 
                            slot=self.set_lattice_parameters)
        self.parameters.add('beta', self.refine.beta, 'Unit Cell - beta (deg)',
                            slot=self.set_lattice_parameters)
        self.parameters.add('gamma', self.refine.gamma, 'Unit Cell - gamma (deg)', 
                            slot=self.set_lattice_parameters)
        self.parameters['symmetry'].value = self.refine.symmetry
        self.parameters['centring'].value = self.refine.centring
        action_buttons = self.action_buttons(('Plot', self.plot_lattice),
                                             ('Save', self.write_parameters))
        self.set_layout(self.entry_layout, self.parameters.grid(), 
                        action_buttons, self.close_buttons())
        self.set_title('Defining Lattice')
开发者ID:rayosborn,项目名称:nxpeaks,代码行数:30,代码来源:define_lattice.py


示例6: __init__

    def __init__(self, parent=None):
        super(RefineLatticeDialog, self).__init__(parent)

        self.select_entry(self.choose_entry)

        self.refine = NXRefine(self.entry)
        self.refine.read_parameters()

        self.parameters = GridParameters()
        self.parameters.add('symmetry', self.refine.symmetries, 'Symmetry', 
                            None, self.set_symmetry)
        self.parameters.add('a', self.refine.a, 'Unit Cell - a (Ang)', True)
        self.parameters.add('b', self.refine.b, 'Unit Cell - b (Ang)', True)
        self.parameters.add('c', self.refine.c, 'Unit Cell - c (Ang)', True)
        self.parameters.add('alpha', self.refine.alpha, 'Unit Cell - alpha (deg)', False)
        self.parameters.add('beta', self.refine.beta, 'Unit Cell - beta (deg)', False)
        self.parameters.add('gamma', self.refine.gamma, 'Unit Cell - gamma (deg)', False)
        self.parameters.add('wavelength', self.refine.wavelength, 'Wavelength (Ang)', False)
        self.parameters.add('distance', self.refine.distance, 'Distance (mm)', False)
        self.parameters.add('yaw', self.refine.yaw, 'Yaw (deg)', False)
        self.parameters.add('pitch', self.refine.pitch, 'Pitch (deg)', False)
        self.parameters.add('roll', self.refine.roll, 'Roll (deg)')
        self.parameters.add('xc', self.refine.xc, 'Beam Center - x', False)
        self.parameters.add('yc', self.refine.yc, 'Beam Center - y', False)
        self.parameters.add('phi_start', self.refine.phi_start, 'Phi Start (deg)', False)
        self.parameters.add('phi_step', self.refine.phi_step, 'Phi Step (deg)')
        self.parameters.add('chi_start', self.refine.chi_start, 'Chi Start (deg)', False)
        self.parameters.add('chi_step', self.refine.chi_step, 'Chi Step (deg)')
        self.parameters.add('omega_start', self.refine.omega_start, 'Omega Start (deg)', False)
        self.parameters.add('omega_step', self.refine.omega_step, 'Omega Step (deg)')
        self.parameters.add('polar', self.refine.polar_max, 
                            'Max. Polar Angle (deg)', None, self.set_polar_max)
        self.parameters.add('polar_tolerance', self.refine.polar_tolerance, 'Polar Angle Tolerance')
        self.parameters.add('peak_tolerance', self.refine.peak_tolerance, 'Peak Angle Tolerance')
        self.parameters.add('orientation_matrix', False, 'Orientation Matrix', False)

        self.refine_buttons = self.action_buttons(
                                  ('Refine Angles', self.refine_angles),
                                  ('Refine HKLs', self.refine_hkls),
                                  ('Restore', self.restore_parameters),
                                  ('Reset', self.reset_parameters))

        self.lattice_buttons = self.action_buttons(
                                   ('Plot', self.plot_lattice),
                                   ('List', self.list_peaks),
                                   ('Save', self.write_parameters))

        self.set_layout(self.entry_layout, self.parameters.grid(), 
                        self.refine_buttons, self.lattice_buttons,
                        self.close_buttons())

        self.parameters.grid_layout.setVerticalSpacing(1)
                                
        self.set_title('Refining Lattice')

        self.parameters['symmetry'].value = self.refine.symmetry
        self.set_symmetry()

        self.peaks_box = None
开发者ID:,项目名称:,代码行数:59,代码来源:


示例7: setup_scans

 def setup_scans(self):
     self.scan = GridParameters()
     self.scan.add('scan', 'scan', 'Scan Label')
     self.scan.add('temperature', 300.0, 'Temperature (K)')
     self.scan.add('phi_start', -5.0, 'Phi Start (deg)')
     self.scan.add('phi_end', 360.0, 'Phi End (deg)')
     self.scan.add('phi_step', 0.1, 'Phi Step (deg)')
     self.scan.add('frame_rate', 10, 'Frame Rate (Hz)')
     
     for position in range(1, 6):
         self.setup_position(position)
开发者ID:rayosborn,项目名称:nxpeaks,代码行数:11,代码来源:new_scan.py


示例8: setup_sample

 def setup_sample(self):
     self.scan_file['entry/sample'] = NXsample()
     self.scan_file['entry/sample/name'] = 'sample'
     self.scan_file['entry/sample/label'] = 'label'
     self.scan_file['entry/sample/temperature'] = NXfield(300.0, dtype=np.float32)
     self.scan_file['entry/sample/temperature'].attrs['units'] = 'K'
     self.sample = GridParameters()
     self.sample.add('sample', self.scan_file['entry/sample/name'], 'Sample Name')
     self.sample.add('label', self.scan_file['entry/sample/label'], 'Sample Label')
     self.sample.add('scan', 'scan', 'Scan Label')
     self.sample.add('temperature', self.scan_file['entry/sample/temperature'], 'Temperature (K)')
开发者ID:,项目名称:,代码行数:11,代码来源:


示例9: __init__

    def __init__(self, parent=None):
        super(SampleDialog, self).__init__(parent)

        self.sample = GridParameters()
        self.sample.add('sample', 'sample', 'Sample Name')
        self.sample.add('label', 'label', 'Sample Label')

        self.set_layout(self.directorybox('Choose Experiment Directory',
                                          default=False), 
                        self.sample.grid(header=False),
                        self.close_buttons(save=True))

        self.set_title('New Sample')
开发者ID:rayosborn,项目名称:nxpeaks,代码行数:13,代码来源:new_sample.py


示例10: __init__

 def __init__(self, parent=None):
     super(ConvertDialog, self).__init__(parent)
     self.select_entry()
     self.parameters = GridParameters()
     self.parameters.add('Ei', self.entry['instrument/monochromator/energy'],
                         'Incident Energy')
     self.parameters.add('dQ', self.round(np.sqrt(self.Ei/2)/50), 'Q Step')
     self.parameters.add('dE', self.round(self.Ei/50), 'Energy Step')
     self.set_layout(self.entry_layout, 
                     self.parameters.grid(),
                     self.action_buttons(('Plot', self.plot_data),
                                         ('Save', self.save_data)),
                     self.close_buttons())
     self.setWindowTitle('Converting to (Q,E)')
开发者ID:nexpy,项目名称:nexpy,代码行数:14,代码来源:convert_qe.py


示例11: __init__

    def __init__(self, parent=None):
        super(EnergyDialog, self).__init__(parent)

        self.select_entry()
        self.parameters = GridParameters()
        self.parameters.add("m1", self.entry["monitor1/distance"], "Monitor 1 Distance")
        self.parameters.add("m2", self.entry["monitor2/distance"], "Monitor 2 Distance")
        self.parameters.add("Ei", self.entry["instrument/monochromator/energy"], "Incident Energy")
        self.parameters.add("mod", self.entry["instrument/source/distance"], "Moderator Distance")
        action_buttons = self.action_buttons(("Get Ei", self.get_ei))
        self.set_layout(self.entry_layout, self.parameters.grid(), action_buttons, self.close_buttons(save=True))
        self.set_title("Get Incident Energy")

        self.m1 = self.entry["monitor1"]
        self.m2 = self.entry["monitor2"]
开发者ID:ericdill,项目名称:nexpy,代码行数:15,代码来源:get_ei.py


示例12: setup_scans

 def setup_scans(self):
     if self.scans:
         self.scans.delete_grid()
     self.scans = GridParameters()
     all_files = [self.sample+'_'+d+'.nxs' 
                 for d in os.listdir(self.sample_directory) 
                 if os.path.isdir(os.path.join(self.sample_directory, d))]
     filenames = sorted([f for f in all_files 
                 if os.path.exists(os.path.join(self.sample_directory, f))], 
                 key=natural_sort)
     for i, f in enumerate(filenames):
         scan = 'f%d' % i
         self.scans.add(scan, i+1, f, True, self.update_scans)
         self.scans[scan].checkbox.stateChanged.connect(self.update_scans)
     self.insert_layout(2, self.scans.grid(header=False))
开发者ID:rayosborn,项目名称:nxpeaks,代码行数:15,代码来源:make_scans.py


示例13: __init__

    def __init__(self, parent=None):
        super(Mask3DDialog, self).__init__(parent)

        self.select_entry(self.choose_entry)

        self.parameters = GridParameters()
        self.parameters.add('radius', 200, 'Radius')
        self.parameters.add('width', 3, 'Frame Width')
        self.set_layout(self.entry_layout, 
                        self.parameters.grid(),
                        self.action_buttons(('Calculate 3D Mask', self.calculate_mask)),
                        self.progress_layout(save=True))
        self.progress_bar.setVisible(False)
        self.progress_bar.setValue(0)
        self.set_title('Calculate 3D Mask')
        self.reduce = None
开发者ID:rayosborn,项目名称:nxpeaks,代码行数:16,代码来源:calculate_mask.py


示例14: setup_instrument

 def setup_instrument(self):
     entry = self.scan_file['entry']
     entry.instrument = NXinstrument()
     entry.instrument.monochromator = NXmonochromator()
     entry.instrument.detector = NXdetector()
     entry['instrument/monochromator/wavelength'] = NXfield(0.5, dtype=np.float32)
     entry['instrument/monochromator/wavelength'].attrs['units'] = 'Angstroms'
     entry['instrument/detector/distance'] = NXfield(100.0, dtype=np.float32)
     entry['instrument/detector/distance'].attrs['units'] = 'mm'
     entry['instrument/detector/pixel_size'] = NXfield(0.172, dtype=np.float32)
     entry['instrument/detector/pixel_size'].attrs['units'] = 'mm'
     self.instrument = GridParameters()
     self.instrument.add('wavelength', entry['instrument/monochromator/wavelength'], 'Wavelength (Ang)')
     self.instrument.add('distance', entry['instrument/detector/distance'], 'Detector Distance (mm)')
     self.instrument.add('pixel', entry['instrument/detector/pixel_size'], 'Pixel Size (mm)')
     self.instrument.add('positions', [0,1,2,3,4], 'Number of Detector Positions', slot=self.set_entries)
     self.instrument['positions'].value = '0'
开发者ID:,项目名称:,代码行数:17,代码来源:


示例15: __init__

    def __init__(self, parent=None):
        super(CalculateDialog, self).__init__(parent)
        
        self.select_entry(self.choose_entry)

        self.refine = NXRefine()

        self.parameters = GridParameters()
        self.parameters.add('wavelength', self.refine.wavelength, 'Wavelength (Ang)')
        self.parameters.add('distance', self.refine.distance, 'Detector Distance (mm)')
        self.parameters.add('xc', self.refine.xc, 'Beam Center - x')
        self.parameters.add('yc', self.refine.yc, 'Beam Center - y')
        self.parameters.add('pixel', self.refine.pixel_size, 'Pixel Size (mm)')
        action_buttons = self.action_buttons(('Plot', self.plot_lattice),
                                             ('Save', self.write_parameters))
        self.set_layout(self.entry_layout, self.parameters.grid(), 
                        action_buttons, self.close_buttons())
        self.set_title('Calculate Angles')
开发者ID:rayosborn,项目名称:nxpeaks,代码行数:18,代码来源:calculate_angles.py


示例16: __init__

    def __init__(self, parent=None):
        super(MaximumDialog, self).__init__(parent)

        self.select_entry(self.choose_entry)

        self.parameters = GridParameters()
        self.parameters.add('first', '', 'First Frame')
        self.parameters.add('last', '', 'Last Frame')

        self.output = QtWidgets.QLabel('Maximum Value:')
        self.set_layout(self.entry_layout, self.output,
                        self.parameters.grid(),
                        self.action_buttons(('Find Maximum', self.find_maximum)),
                        self.progress_layout(save=True))
        self.progress_bar.setVisible(False)
        self.progress_bar.setValue(0)
        self.set_title('Find Maximum Value')
        self.reduce = None
开发者ID:rayosborn,项目名称:nxpeaks,代码行数:18,代码来源:find_maximum.py


示例17: EnergyDialog

class EnergyDialog(BaseDialog):
    def __init__(self, parent=None):
        super(EnergyDialog, self).__init__(parent)

        self.select_entry()
        self.parameters = GridParameters()
        self.parameters.add("m1", self.entry["monitor1/distance"], "Monitor 1 Distance")
        self.parameters.add("m2", self.entry["monitor2/distance"], "Monitor 2 Distance")
        self.parameters.add("Ei", self.entry["instrument/monochromator/energy"], "Incident Energy")
        self.parameters.add("mod", self.entry["instrument/source/distance"], "Moderator Distance")
        action_buttons = self.action_buttons(("Get Ei", self.get_ei))
        self.set_layout(self.entry_layout, self.parameters.grid(), action_buttons, self.close_buttons(save=True))
        self.set_title("Get Incident Energy")

        self.m1 = self.entry["monitor1"]
        self.m2 = self.entry["monitor2"]

    @property
    def m1_distance(self):
        return self.parameters["m1"].value - self.moderator_distance

    @property
    def m2_distance(self):
        return self.parameters["m2"].value - self.moderator_distance

    @property
    def Ei(self):
        return self.parameters["Ei"].value

    @property
    def moderator_distance(self):
        return self.parameters["mod"].value

    def get_ei(self):
        t = 2286.26 * self.m1_distance / np.sqrt(self.Ei)
        m1_time = self.m1[t - 200.0 : t + 200.0].moment()
        t = 2286.26 * self.m2_distance / np.sqrt(self.Ei)
        m2_time = self.m2[t - 200.0 : t + 200.0].moment()
        self.parameters["Ei"].value = (2286.26 * (self.m2_distance - self.m1_distance) / (m2_time - m1_time)) ** 2

    def accept(self):
        try:
            self.parameters["Ei"].save()
        except NeXusError as error:
            report_error("Getting Incident Energy", error)
        super(EnergyDialog, self).accept()
开发者ID:ericdill,项目名称:nexpy,代码行数:46,代码来源:get_ei.py


示例18: setup_instrument

 def setup_instrument(self):
     entry = self.experiment_file['entry']
     entry.instrument = NXinstrument()
     entry.instrument.monochromator = NXmonochromator()
     entry.instrument.detector = NXdetector()
     entry['instrument/monochromator/wavelength'] = NXfield(0.5, dtype=np.float32)
     entry['instrument/monochromator/wavelength'].attrs['units'] = 'Angstroms'
     entry['instrument/monochromator/energy'] = NXfield(12.398419739640717/0.5, dtype=np.float32)
     entry['instrument/monochromator/energy'].attrs['units'] = 'keV'
     entry['instrument/detector/distance'] = NXfield(100.0, dtype=np.float32)
     entry['instrument/detector/distance'].attrs['units'] = 'mm'
     self.instrument = GridParameters()
     self.instrument.add('experiment', 'experiment', 'Experiment Name')
     self.instrument.add('wavelength', entry['instrument/monochromator/wavelength'], 'Wavelength (Ang)')
     self.instrument.add('distance', entry['instrument/detector/distance'], 'Detector Distance (mm)')
     detector_list = sorted(list(set([detector().name for detector in ALL_DETECTORS.values()])))
     self.instrument.add('detector', detector_list, 'Detector')
     self.instrument['detector'].value = 'Pilatus CdTe 2M'
     self.instrument.add('positions', [0,1,2,3,4], 'Number of Detector Positions', slot=self.set_entries)
     self.instrument['positions'].value = '0'
开发者ID:rayosborn,项目名称:nxpeaks,代码行数:20,代码来源:new_experiment.py


示例19: __init__

    def __init__(self, parent=None):

        super(EnergyDialog, self).__init__(parent)

        self.select_entry()
        self.parameters = GridParameters()
        self.parameters.add('m1', self.entry['monitor1/distance'], 
                            'Monitor 1 Distance')
        self.parameters.add('m2', self.entry['monitor2/distance'], 
                            'Monitor 2 Distance')
        self.parameters.add('Ei', self.entry['instrument/monochromator/energy'], 
                            'Incident Energy')
        self.parameters.add('mod', self.entry['instrument/source/distance'], 
                            'Moderator Distance')
        action_buttons = self.action_buttons(('Get Ei', self.get_ei))
        self.set_layout(self.entry_layout, self.parameters.grid(), 
                        action_buttons, self.close_buttons(save=True))
        self.set_title('Get Incident Energy')

        self.m1 = self.entry['monitor1']
        self.m2 = self.entry['monitor2'] 
开发者ID:nexpy,项目名称:nexpy,代码行数:21,代码来源:get_ei.py


示例20: __init__

    def __init__(self, parent=None):
        super(OrientationDialog, self).__init__(parent)

        self.select_entry(self.choose_entry)

        self.refine = NXRefine(self.entry)
        self.refine.read_parameters()

        self.parameters = GridParameters()
        self.parameters.add('phi_start', self.refine.phi, 'Phi Start (deg)')
        self.parameters.add('phi_step', self.refine.phi_step, 'Phi Step (deg)')
        self.parameters.add('chi', self.refine.chi, 'Chi (deg)')
        self.parameters.add('omega', self.refine.omega, 'Omega (deg)')
        self.parameters.add('polar', self.refine.polar_max, 
                            'Max. Polar Angle (deg)')
        self.parameters.add('polar_tolerance', self.refine.polar_tolerance, 
                            'Polar Angle Tolerance')
        self.parameters.add('peak_tolerance', self.refine.peak_tolerance, 
                            'Peak Angle Tolerance')
        action_buttons = self.action_buttons(
                             ('Generate Grains', self.generate_grains),
                             ('List Peaks', self.list_peaks))
        self.grain_layout = QtWidgets.QHBoxLayout()
        self.grain_combo = QtWidgets.QComboBox()
        self.grain_combo.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToContents)
        self.grain_combo.currentIndexChanged.connect(self.set_grain)
        self.grain_textbox = QtWidgets.QLabel()
        self.grain_layout.addWidget(self.grain_combo)
        self.grain_layout.addStretch()
        self.grain_layout.addWidget(self.grain_textbox)
        bottom_layout = QtWidgets.QHBoxLayout()
        self.result_textbox = QtWidgets.QLabel()
        bottom_layout.addWidget(self.result_textbox)
        bottom_layout.addStretch()
        bottom_layout.addWidget(self.close_buttons())
        self.set_layout(self.entry_layout, self.parameters.grid(), 
                        action_buttons, bottom_layout)
        self.set_title('Defining Orientation')
开发者ID:rayosborn,项目名称:nxpeaks,代码行数:38,代码来源:define_orientation.py



注:本文中的nexpy.gui.datadialogs.GridParameters类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python utils.datetimeNow函数代码示例发布时间:2022-05-27
下一篇:
Python newspaper.Source类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap