コード例 #1
0
 def set(self,value):
     class_name = getattr(self,"name",self.__class__.__name__)
     if not "{name}" in name: 
         if class_name: dbname = class_name+"."+name
         else: dbname = name
     else: dbname = name.replace("{name}",class_name)
     ##debug("persistent_property.set: %s: %r, %r: %r" % (name,self,class_name,dbname))
     from DB import dbput 
     dbput(dbname,repr(value))
コード例 #2
0
 def set_prefix(self, value):
     ##debug("EPICS_motor.prefix = %r" % value)
     from DB import dbput
     dbname = getattr(self, "__db_name__", "")
     if dbname:
         ##debug("EPICS_motor/"+dbname+".prefix: "+repr(value))
         dbput("EPICS_motor/" + dbname + ".prefix", repr(value))
     else:
         ##debug("EPCIS_motor.__my_prefix__ = %r" % value)
         self.__my_prefix__ = value
コード例 #3
0
 def save_settings(self):
     nrows = self.Descriptions.shape[0]
     for i in range(0, nrows):
         text = self.Descriptions[i].Value
         dbput("%s.line%d.description" % (self.name, i), text)
         text = self.Dates[i].Value
         dbput("%s.line%d.updated" % (self.name, i), text)
         for j in range(0, len(self.motors)):
             value = self.Positions[i, j].Value
             resname = "%s.line%d.%s" % (self.name, i, self.motor_names[j])
             dbput(resname, value)
コード例 #4
0
 def set_auto_reverse(self, value):
     dbput("sample_translation/auto_reverse", repr(int(value)))
コード例 #5
0
 def set_steps(self, value):
     from numpy import rint
     value = int(rint(value))
     dbput("sample_translation/steps", repr(value))
コード例 #6
0
 def set_rotation_center_y(self, value):
     x, y = self.rotation_center_x, self.rotation_center_y
     y = value
     dbput("sample.rotation_center", repr((x, y)))
コード例 #7
0
 def set_calibration_z(self, value):
     dbput("sample.calibration_z", repr(float(value)))
コード例 #8
0
 def set_calibrated_end_position_2(self, value):
     dbput("sample_translation/calibrated_end_position_2", repr(value))
コード例 #9
0
 def set_xy_rotating(self, value):
     dbput("sample.xy_rotating", repr(value))
コード例 #10
0
 def set_move_when_idle(self, value):
     dbput("sample_translation/move_when_idle", repr(int(value)))
コード例 #11
0
 def set_calibrated_start_position_1(self, value):
     dbput("sample_translation/calibrated_start_position_1", repr(value))
コード例 #12
0
 def set_current_configuration(self,value):
     from DB import dbput
     dbput("diffractometer.current_configuration",value)
コード例 #13
0
def save_configuration(name):
    """name: 'NIH Diffractometer' or 'BioCARS Diffractometer'"""
    from DB import dbput
    for par in configuration_parameters:
        dbput("diffractometer/"+name+"."+par,repr(getattr(diffractometer,par)))
コード例 #14
0
 def set_serial_port_name(self, value):
     from DB import dbput
     dbput(self.name + ".serial_port", value)
コード例 #15
0
 def set_repeats(self, value):
     dbput("sample_translation.repeats", repr(value))
コード例 #16
0
 def set_normal_start_position(self, value):
     dbput("sample_translation.start_position", repr(value))
コード例 #17
0
 def OnTextCtrl(self, event):
     """TextCtrl was modified..."""
     debug("TextCtrl: '%s'" % self.TextCtrl.Value)
     from DB import dbput
     dbput("EditableControls_Test.TextCtrl", self.TextCtrl.Value)
コード例 #18
0
 def OnComboBox(self, event):
     """ComboxBox was meodified..."""
     debug("ComboBox: '%s'" % self.ComboBox.Value)
     from DB import dbput
     dbput("EditableControls_Test.ComboBox", self.ComboBox.Value)
コード例 #19
0
 def set_temperature_correction(self, value):
     dbput("sample_translation/temperature_correction", repr(int(value)))
コード例 #20
0
 def set_ip_address(self, value):
     dbput("sample_translation/ip_address", value)
コード例 #21
0
 def set_calibration_temperature_2(self, value):
     dbput("sample_translation/calibration_temperature_2", repr(value))
コード例 #22
0
 def set_home_position(self, value):
     dbput("sample_translation/home", repr(value))
コード例 #23
0
 def set_voltage(self, value):
     from DB import dbput
     dbput("Ensemble.illuminator.voltage", str(value))
コード例 #24
0
 def set_park_position(self, value):
     dbput("sample_translation/park", repr(value))
コード例 #25
0
 def set_phi_scale(self, value):
     dbput("sample.phi_scale", repr(float(value)))
コード例 #26
0
 def set_normal_end_position(self, value):
     dbput("sample_translation/end_position", repr(value))
コード例 #27
0
 def set_click_center_z(self, value):
     dbput("sample.click_center_z", repr(float(value)))
コード例 #28
0
 def set_acceleration(self, value):
     dbput("sample_translation/acceleration", repr(value))
コード例 #29
0
 def set_phi_motor_name(self, name):
     dbput("sample.phi_motor_name", repr(name))
コード例 #30
0
 def set_port(self, value):
     dbput("sample_translation/port", repr(value))