def __init__(self, parent=None):
     parameters = [
         [[PropertyPanel, "Port", device, "COMM"], {
             "refresh_period": 1.0
         }],
         [[PropertyPanel, "Nom. update rate", device, "SCAN"], {
             "format": "%.3f",
             "unit": "s",
             "refresh_period": 1.0
         }],
         [[PropertyPanel, "Act. update rate", device, "SCANT"], {
             "format": "%.3f",
             "unit": "s",
             "refresh_period": 1.0
         }],
     ]
     BasePanel.__init__(
         self,
         parent=parent,
         name=self.name,
         title=self.title,
         parameters=parameters,
         standard_view=self.standard_view,
         subname=True,
     )
 def __init__(self,parent=None):
     Xray_Beam_Position_Check.__init__(self)
     
     parameters = [
         [[BeamProfile,  "Image",                  self                      ],{}],
         [[TweakPanel,   "Saturation level",       self,"saturation_level"   ],{"digits":0}],
         [[PropertyPanel,"Image timestamp",        self,"image_timestamp"    ],{"type":"date","read_only":True}],
         [[PropertyPanel,"Image usable",           self,"image_OK"           ],{"type":"Unusable/OK","read_only":True}],
         [[PropertyPanel,"Overloaded pixels",      self,"image_overloaded"   ],{"read_only":True}],
         [[PropertyPanel,"Signal-to-noise ratio",  self,"SNR"                ],{"digits":1,"read_only":True}],
         [[PropertyPanel,"X Beam [mm]",            self,"x_beam"             ],{"digits":3,"read_only":True}],
         [[PropertyPanel,"Y Beam [mm]",            self,"y_beam"             ],{"digits":3,"read_only":True}],
         [[PropertyPanel,"X Error [mm]",           self,"x_error"            ],{"digits":3,"read_only":True}],
         [[PropertyPanel,"Y Error [mm]",           self,"y_error"            ],{"digits":3,"read_only":True}],
         [[PropertyPanel,"X Beam avg. [mm]",       self,"x_average"          ],{"digits":3,"read_only":True}],
         [[PropertyPanel,"Y Beam avg. [mm]",       self,"y_average"          ],{"digits":3,"read_only":True}],
         [[TweakPanel,   "X [mrad]",               self,"x_control"          ],{"digits":4}],
         [[TweakPanel,   "Y [V]",                  self,"y_control"          ],{"digits":4}],
         [[PropertyPanel,"X Corr. [mrad]",         self,"x_control_corrected"],{"digits":4,"read_only":True}],
         [[PropertyPanel,"Y Corr. [V]",            self,"y_control_corrected"],{"digits":4,"read_only":True}],
         [[TogglePanel,  "Acquire Image",          self,"acquire_image_running"],{"type":"Start/Cancel"}],
         [[ButtonPanel,  "Correction",             self,"apply_correction"   ],{"label":"Apply"}],
         [[ButtonPanel,  "X Correction",           self,"apply_x_correction" ],{"label":"Apply"}],
         [[ButtonPanel,  "Y Correction",           self,"apply_y_correction" ],{"label":"Apply"}],
     ]
     BasePanel.__init__(self,
         parent=parent,
         name=self.name,
         title=self.title,
         parameters=parameters,
         standard_view=self.standard_view,
         subpanels=[Settings],
     )
 def __init__(self,parent=None):
     BasePanel.__init__(self,
         parent=parent,
         name=self.name,
         title=self.title,
         icon="Tool",
         parameters=self.parameters,
         standard_view=self.standard_view,
     )
Example #4
0
    def __init__(self, parent=None):
        Xray_Beam_Check.__init__(self)

        parameters = [
            [[
                PropertyPanel, "Timing System", self,
                "timing_system_ip_address"
            ], {}],
            [[PropertyPanel, "Oscilloscope", self, "scope_ip_address"], {}],
            [[PropertyPanel, "X1 Motor", self, "x1_motor"], {}],
            [[PropertyPanel, "X2 Motor", self, "x2_motor"], {}],
            [[PropertyPanel, "Y Motor", self, "y_motor"], {}],
            [[TweakPanel, "X Resolution [mrad]", self, "x_resolution"], {
                "digits": 4
            }],
            [[TweakPanel, "Y Resolution [V]", self, "y_resolution"], {
                "digits": 4
            }],
            [[TweakPanel, "X Scan Step [mrad]", self, "dx_scan"], {
                "digits": 4
            }],
            [[TweakPanel, "Y Scan Step [V]", self, "dy_scan"], {
                "digits": 4
            }],
            [[PropertyPanel, "X Aperture Motor", self, "x_aperture_motor"],
             {}],
            [[PropertyPanel, "Y Aperture Motor", self, "y_aperture_motor"],
             {}],
            [[TweakPanel, "X Aperture [mm]", self, "x_aperture"], {
                "digits": 4
            }],
            [[TweakPanel, "Y Aperture [mm]", self, "y_aperture"], {
                "digits": 4
            }],
            [[TweakPanel, "X Aperture (scan) [mm]", self, "x_aperture_scan"], {
                "digits": 4
            }],
            [[TweakPanel, "Y Aperture (scan) [mm]", self, "y_aperture_scan"], {
                "digits": 4
            }],
            [[TweakPanel, "X Aperture (norm) [mm]", self, "x_aperture_norm"], {
                "digits": 4
            }],
            [[TweakPanel, "Y Aperture (norm) [mm]", self, "y_aperture_norm"], {
                "digits": 4
            }],
        ]
        BasePanel.__init__(
            self,
            parent=parent,
            name=self.name,
            title=self.title,
            parameters=parameters,
            standard_view=self.standard_view,
            subname=False,
        )
 def __init__(self, parent=None):
     BasePanel.__init__(
         self,
         parent=parent,
         name=self.name,
         title=self.title,
         layout=self.layout,
         standard_view=self.standard_view,
         label_width=170,
         icon="BioCARS",
     )
Example #6
0
 def __init__(self,parent=None):
     BasePanel.__init__(self,
         parent=parent,
         name=self.name,
         title=self.title,
         parameters=self.parameters,
         standard_view=self.standard_view,
         subname=True,
         refresh=True,
         live=True,
         label_width=90,
     )
 def __init__(self, parent=None):
     BasePanel.__init__(
         self,
         parent=parent,
         name=self.name,
         title=self.title,
         parameters=self.parameters,
         standard_view=self.standard_view,
         refresh=True,
         live=True,
         label_width=90,
         icon="Omega Thermocouple Reader",
     )
Example #8
0
 def __init__(self, parent=None):
     BasePanel.__init__(
         self,
         parent=parent,
         name=self.name,
         title=self.title,
         parameters=self.parameters,
         standard_view=self.standard_view,
         label_width=90,
         refresh=True,
         live=True,
     )
     self.Bind(wx.EVT_CLOSE, self.OnClose)
Example #9
0
 def __init__(self,parent=None,update=lambda: None):
     from Panel import PropertyPanel
     BasePanel.__init__(self,parent=parent,
         name=self.name,
         title=self.title,
         icon=self.icon,
         component=PropertyPanel,
         parameters=self.parameters,
         standard_view=self.standard_view,
         label_width=250,
         refresh=True,
         live=True,
     )
 def __init__(self,parent=None):
     BasePanel.__init__(self,
         parent=parent,
         name=self.name,
         title=self.title,
         icon="ADXV",
         parameters=self.parameters,
         standard_view=self.standard_view,
         label_width=140,
         width=260,
         refresh=False,
         live=False,
     )
     self.Bind(wx.EVT_CLOSE,self.OnClose)
 def __init__(self, parent=None):
     BasePanel.__init__(
         self,
         parent=parent,
         name=self.name,
         title=self.title,
         icon="Rayonix Detector",
         parameters=self.parameters,
         standard_view=self.standard_view,
         label_width=180,
         refresh=False,
         live=False,
     )
     self.Bind(wx.EVT_CLOSE, self.OnClose)
     rayonix_detector.limit_files_enabled = True
Example #12
0
 def __init__(self,PV,parent=None):        
     from channel_archiver import channel_archiver
     log = channel_archiver.logfile(PV)
     parameters = [
         [[TimeChart,"Data",log,"date time","value"],{"refresh_period":2}],
     ]
     BasePanel.__init__(self,
         name=self.name,
         title=self.title,
         icon="Archiver",
         parent=parent,
         parameters=parameters,
         standard_view=self.standard_view,
         refresh=False,
         live=False,
     )
 def __init__(self, parent=None):
     parameters = [
         [[PropertyPanel, "RF output", device, "VAL"], {
             "type": "OFF/ON",
             "refresh_period": 1.0
         }],
         [[PropertyPanel, "Scan Time", device, "SCAN"], {
             "unit": "s",
             "refresh_period": 1.0
         }],
     ]
     BasePanel.__init__(
         self,
         parent=parent,
         name=self.name,
         icon=self.icon,
         title=self.title,
         parameters=parameters,
         standard_view=self.standard_view,
         subname=True,
         subpanels=[SettingsPanel],
     )
 def __init__(self,parent=None):
     Xray_Beam_Position_Check.__init__(self)
     
     parameters = [
         [[PropertyPanel,"Timing System",      self,"timing_system_ip_address"],{}],
         [[PropertyPanel,"X1 Motor",           self,"x1_motor"             ],{}],
         [[PropertyPanel,"X2 Motor",           self,"x2_motor"             ],{}],
         [[PropertyPanel,"Y Motor",            self,"y_motor"              ],{}],
         ##[[TweakPanel,   "X Resolution [mrad]",self,"x_resolution"      ],{"digits":4}],
         ##[[TweakPanel,   "Y Resolution [V]",   self,"y_resolution"      ],{"digits":4}],
         [[PropertyPanel,"X Aperture Motor",   self,"x_aperture_motor"     ],{}],
         [[PropertyPanel,"Y Aperture Motor",   self,"y_aperture_motor"     ],{}],
         [[TweakPanel,   "X Aperture [mm]",    self,"x_aperture"        ],{"digits":4}],
         [[TweakPanel,   "Y Aperture [mm]",    self,"y_aperture"        ],{"digits":4}],
         [[TweakPanel,   "X Aperture (scan) [mm]",self,"x_aperture_scan"],{"digits":4}],
         [[TweakPanel,   "Y Aperture (scan) [mm]",self,"y_aperture_scan"],{"digits":4}],
         [[TweakPanel,   "X Aperture (norm) [mm]",self,"x_aperture_norm"],{"digits":4}],
         [[TweakPanel,   "Y Aperture (norm) [mm]",self,"y_aperture_norm"],{"digits":4}],
         [[TweakPanel,   "Calibration X [mrad/mm]",self,"x_gain"             ],{"digits":4}],
         [[TweakPanel,   "Calibration Y [V/mm]",   self,"y_gain"             ],{"digits":4}],
         [[PropertyPanel,"History Length",         self,"history_length"     ],{}],
         [[TweakPanel,   "Average count",          self,"average_samples"    ],{"digits":0}],
         [[TweakPanel,   "ROI center X [mm]",      self,"x_ROI_center"       ],{"digits":3}],
         [[TweakPanel,   "ROI center Y [mm]",      self,"y_ROI_center"       ],{"digits":3}],
         [[TweakPanel,   "ROI width [mm]",         self,"ROI_width"          ],{"digits":3}],
         [[TweakPanel,   "Nominal X [mm]",         self,"x_nominal"          ],{"digits":3}],
         [[TweakPanel,   "Nominal Y [mm]",         self,"y_nominal"          ],{"digits":3}],
         [[PropertyPanel,"Image filename",         self,"image_filename"     ],{"read_only":True}],
     ]
     BasePanel.__init__(self,
         parent=parent,
         name=self.name,
         title=self.title,
         parameters=parameters,
         standard_view=self.standard_view,
         subname=True,
     )
    def __init__(self,parent=None):
        from Panel import PropertyPanel
        from Timing_Setup_Panel import Timing_Setup_Panel
        from Timing_Channel_Configuration_Panel import Timing_Channel_Configuration_Panel
        from Timing_Calibration_Panel import Timing_Calibration_Panel
        from Timing_Clock_Configuration_Panel import Timing_Clock_Configuration_Panel
        from PP_Modes_Panel import PP_Modes_Panel
        from Sequence_Modes_Panel import Sequence_Modes_Panel
        from Timing_Configuration_Panel import Timing_Configuration_Panel

        BasePanel.__init__(self,parent=parent,
            name=self.name,
            title=self.title,
            icon=self.icon,
            component=PropertyPanel,
            parameters=self.parameters,
            standard_view=self.standard_view,
            label_width=180,
            refresh=True,
            live=True,
            subpanels=[
                ["Setup...",                Timing_Setup_Panel],
                ["Channel Configuration...",Timing_Channel_Configuration_Panel],
                ["Calibration...",          Timing_Calibration_Panel],
                ["Clock Configuration...",  Timing_Clock_Configuration_Panel],
                ["PP Modes...",             PP_Modes_Panel],
                ["Sequence Modes...",       Sequence_Modes_Panel],
                ["Configuration...",        Timing_Configuration_Panel],
            ],
            buttons=[
                ["Cal..",Timing_Calibration_Panel],
                ["Conf..",Timing_Channel_Configuration_Panel],
                ["Setup..",Timing_Setup_Panel],
                ["Modes..",PP_Modes_Panel],
            ],
        )
Example #16
0
    def __init__(self, parent=None):
        Xray_Beam_Check.__init__(self)

        parameters = [
            [[PropertyPanel, "Timing Mode", self.settings, "timing_mode"], {
                "choices": self.settings.timing_modes
            }],
            [[PropertyPanel, "Beamline Mode", self.settings, "beamline_mode"],
             {
                 "choices": self.settings.beamline_modes
             }],
            [[
                TimeChart, "X Control History", self.log, "date time",
                "x_control"
            ], {
                "axis_label": "Control X [mrad]",
                "name": self.name + ".TimeChart"
            }],
            [[
                TimeChart, "Y Control History", self.log, "date time",
                "y_control"
            ], {
                "axis_label": "Control Y [V]",
                "name": self.name + ".TimeChart"
            }],
            [[PropertyPanel, "Logfile", self.log, "filename"], {}],
            [[TweakPanel, "X [mrad]", self, "x_control"], {
                "digits": 4
            }],
            [[TweakPanel, "Y [V]", self, "y_control"], {
                "digits": 4
            }],
            [[PropertyPanel, "X Corr. [mrad]", self, "x_control_corrected"], {
                "digits": 4,
                "read_only": True
            }],
            [[PropertyPanel, "Y Corr. [V]", self, "y_control_corrected"], {
                "digits": 4,
                "read_only": True
            }],
            [[TogglePanel, "X Scan", self, "x_scan_running"], {
                "type": "Start/Cancel"
            }],
            [[TogglePanel, "Y Scan", self, "y_scan_running"], {
                "type": "Start/Cancel"
            }],
            [[ButtonPanel, "X Correction", self, "apply_x_correction"], {
                "label": "Apply"
            }],
            [[ButtonPanel, "Y Correction", self, "apply_y_correction"], {
                "label": "Apply"
            }],
        ]
        BasePanel.__init__(
            self,
            parent=parent,
            name=self.name,
            title=self.title,
            parameters=parameters,
            standard_view=self.standard_view,
            subpanels=[Settings],
        )
Example #17
0
    def __init__(self, parent=None):
        Xray_Beam_Stabilization.__init__(self)

        parameters = [
            [[BeamProfile, "Image", self], {}],
            [[TimeChart, "History X", self.log, "date time", "x"], {
                "axis_label": "X [mm]",
                "name": self.name + ".TimeChart"
            }],
            [[TimeChart, "History Y", self.log, "date time", "y"], {
                "axis_label": "Y [mm]",
                "name": self.name + ".TimeChart"
            }],
            [[
                TimeChart, "History Control X", self.log, "date time",
                "x_control"
            ], {
                "axis_label": "Control X [mrad]",
                "name": self.name + ".TimeChart"
            }],
            [[
                TimeChart, "History Control Y", self.log, "date time",
                "y_control"
            ], {
                "axis_label": "Control Y [V]",
                "name": self.name + ".TimeChart"
            }],
            [[PropertyPanel, "History Length", self, "history_length"], {}],
            [[PropertyPanel, "History filter", self, "history_filter"], {
                "choices": ["", "1pulses", "5pulses"]
            }],
            [[PropertyPanel, "Logfile", self.log, "filename"], {}],
            [[PropertyPanel, "Image filename", self, "image_basename"], {
                "read_only": True
            }],
            [[PropertyPanel, "Image timestamp", self, "image_timestamp"], {
                "type": "date",
                "read_only": True
            }],
            [[PropertyPanel, "Analysis filter", self, "analysis_filter"], {
                "choices": ["", "1pulses", "5pulses"]
            }],
            [[PropertyPanel, "Image usable", self, "image_OK"], {
                "type": "Unusable/OK",
                "read_only": True
            }],
            [[PropertyPanel, "Overloaded pixels", self, "image_overloaded"], {
                "read_only": True
            }],
            [[PropertyPanel, "Signal-to-noise ratio", self, "SNR"], {
                "digits": 1,
                "read_only": True
            }],
            [[TogglePanel, "Auto update", self, "auto_update"], {
                "type": "Off/On"
            }],
            [[TweakPanel, "Average count", self, "average_samples"], {
                "digits": 0
            }],
            [[TweakPanel, "ROI center X [mm]", self, "x_ROI_center"], {
                "digits": 3
            }],
            [[TweakPanel, "ROI center Y [mm]", self, "y_ROI_center"], {
                "digits": 3
            }],
            [[TweakPanel, "ROI width [mm]", self, "ROI_width"], {
                "digits": 3
            }],
            [[TweakPanel, "Saturation level", self, "saturation_level"], {
                "digits": 0
            }],
            [[TweakPanel, "Nominal X [mm]", self, "x_nominal"], {
                "digits": 3
            }],
            [[TweakPanel, "Nominal Y [mm]", self, "y_nominal"], {
                "digits": 3
            }],
            [[PropertyPanel, "Beam X [mm]", self, "x_beam"], {
                "digits": 3,
                "read_only": True
            }],
            [[PropertyPanel, "Beam Y [mm]", self, "y_beam"], {
                "digits": 3,
                "read_only": True
            }],
            [[PropertyPanel, "Beam X avg. [mm]", self, "x_average"], {
                "digits": 3,
                "read_only": True
            }],
            [[PropertyPanel, "Beam Y avg. [mm]", self, "y_average"], {
                "digits": 3,
                "read_only": True
            }],
            [[TweakPanel, "Calibration X [mrad/mm]", self, "x_gain"], {
                "digits": 4
            }],
            [[TweakPanel, "Calibration Y [V/mm]", self, "y_gain"], {
                "digits": 4
            }],
            [[PropertyPanel, "Control X PV", self, "x_PV"], {}],
            [[PropertyPanel, "Control Y PV", self, "y_PV"], {}],
            [[PropertyPanel, "Control X read PV", self, "x_read_PV"], {}],
            [[PropertyPanel, "Control Y read PV", self, "y_read_PV"], {}],
            [[TweakPanel, "Control X [mrad]", self, "x_control"], {
                "digits": 4
            }],
            [[TweakPanel, "Control Y [V]", self, "y_control"], {
                "digits": 4
            }],
            [[TweakPanel, "Control X avg. [mrad]", self, "x_control_average"],
             {
                 "digits": 4
             }],
            [[TweakPanel, "Control Y avg. [V]", self, "y_control_average"], {
                "digits": 4
            }],
            [[
                PropertyPanel, "Control X corr. [mrad]", self,
                "x_control_corrected"
            ], {
                "digits": 4,
                "read_only": True
            }],
            [[
                PropertyPanel, "Control Y corr. [V]", self,
                "y_control_corrected"
            ], {
                "digits": 4,
                "read_only": True
            }],
            [[TogglePanel, "Stabilization X", self, "x_enabled"], {
                "type": "Off/On"
            }],
            [[TogglePanel, "Stabilization Y", self, "y_enabled"], {
                "type": "Off/On"
            }],
            [[ButtonPanel, "Correct X", self, "apply_x_correction"], {
                "label": "Correct X"
            }],
            [[ButtonPanel, "Correct Y", self, "apply_y_correction"], {
                "label": "Correct Y"
            }],
            [[ButtonPanel, "Correct Position", self, "apply_correction"], {
                "label": "Correct"
            }],
        ]
        BasePanel.__init__(
            self,
            parent=parent,
            name=self.name,
            title="X-Ray Beam Stabilization",
            parameters=parameters,
            standard_view=self.standard_view,
            refresh=True,
            live=True,
        )
Example #18
0
    def __init__(self,parent=None,update=None):
        if update is not None: self.update = update
        if self.update is None:
            from Ensemble_SAXS_pp import Ensemble_SAXS
            self.update = [Ensemble_SAXS.update]

        from timing_system import timing_system
        self.object = timing_system

        self.standard_view = ["#"]+[str(timing_system.channels[i].channel_number+1)
                         for i in range(0,len(timing_system.channels))]

        import wx
        self.layout = [[
            "#",
            [wx.StaticText,[],{"label":"PP","size":(35,-1)}],
            [wx.StaticText,[],{"label":"I/O","size":(50,-1)}],
            [wx.StaticText,[],{"label":"Description","size":(140,-1)}],
            [wx.StaticText,[],{"label":"Mnemonic","size":(75,-1)}],
            [wx.StaticText,[],{"label":"Special\nPP","size":(75,-1)}],
            [wx.StaticText,[],{"label":"Special\nHW","size":(70,-1)}],
            [wx.StaticText,[],{"label":"Offset\nHW","size":(100,-1)}],
            [wx.StaticText,[],{"label":"Offset\nsign","size":(50,-1)}],
            [wx.StaticText,[],{"label":"Duration\nHW","size":(75,-1)}],
            [wx.StaticText,[],{"label":"Duration\nHW reg","size":(75,-1)}],
            [wx.StaticText,[],{"label":"Offset\nPP ticks","size":(70,-1)}],
            [wx.StaticText,[],{"label":"Duration\nPP ticks","size":(75,-1)}],
            [wx.StaticText,[],{"label":"Cont.","size":(45,-1)}],
            [wx.StaticText,[],{"label":"Slaved","size":(72,-1)}],
            [wx.StaticText,[],{"label":"Gated","size":(72,-1)}],
            [wx.StaticText,[],{"label":"Count\nEnabled","size":(50,-1)}],
            [wx.StaticText,[],{"label":"State","size":(60,-1)}],
        ]]
        from Panel import PropertyPanel,TogglePanel
        from numpy import inf
        self.layout += [[
            str(timing_system.channels[i].channel_number+1),
            [TogglePanel,  [],{"name":"channels[%d].PP_enabled"%i,"type":"/PP","width":35,"refresh_period":inf}],
            [PropertyPanel,[],{"name":"channels[%d].input.count"%i,"type":"Out/IN","width":50,"refresh_period":inf}],
            [PropertyPanel,[],{"name":"channels[%d].description"%i,"width":140,"refresh_period":inf}],
            [PropertyPanel,[],{"name":"channels[%d].mnemonic"%i,"width":75,"refresh_period":inf}],
            [PropertyPanel,[],{"name":"channels[%d].special"%i,"width":75,"refresh_period":inf}],
            [PropertyPanel,[],{"name":"channels[%d].specout.count"%i,"type":"/70MHz/diag1/diag2","width":70,"refresh_period":inf}],
            [PropertyPanel,[],{"name":"channels[%d].offset_HW"%i,"type":"time.6","width":100,"refresh_period":inf}],
            [PropertyPanel,[],{"name":"channels[%d].offset_sign"%i,"type":"float","width":50,"refresh_period":inf}],
            [PropertyPanel,[],{"name":"channels[%d].pulse_length_HW"%i,"type":"time","width":75,"refresh_period":inf}],
            [PropertyPanel,[],{"name":"channels[%d].pulse.value"%i,"type":"time","width":75,"refresh_period":inf}],
            [PropertyPanel,[],{"name":"channels[%d].offset_PP"%i,"type":"float","width":70,"refresh_period":inf}],
            [PropertyPanel,[],{"name":"channels[%d].pulse_length_PP"%i,"type":"float","width":70,"refresh_period":inf}],
            [TogglePanel,  [],{"name":"channels[%d].enable.count"%i,"type":"/Cont","width":45,"refresh_period":inf}],
            [PropertyPanel,[],{"name":"channels[%d].timed"%i,"width":72,"refresh_period":inf}],
            [PropertyPanel,[],{"name":"channels[%d].gated"%i,"width":72,"refresh_period":inf}],
            [PropertyPanel,[],{"name":"channels[%d].counter_enabled"%i,"type":"/On","width":50,"refresh_period":inf}],
            [PropertyPanel,[],{"name":"channels[%d].output_status"%i,"width":60,"refresh_period":inf}],
        ] for i in range(0,len(timing_system.channels))]

        BasePanel.__init__(self,
            parent=parent,
            name=self.name,
            title=self.title,
            icon=self.icon,
            object=self.object,
            layout=self.layout,
            standard_view=self.standard_view,
            label_width=25,
            refresh=True,
            live=True,
            update=update,
        )
    def __init__(self, parent=None, update=None, *args, **kwargs):
        if update is not None: self.update = update
        if self.update is None:
            from Ensemble_SAXS_pp import Ensemble_SAXS
            self.update = [Ensemble_SAXS.update]
            ##from timing_sequence import timing_sequencer
            ##update=[timing_sequencer.cache_clear,timing_sequencer.update]

        from timing_system import timing_system
        self.parameters = [
            [[
                timing_system.channels.xosct,
                "X-ray Scope Trigger",
            ], {
                "update": self.update
            }],
            [[
                timing_system.channels.delay,
                "Laser to X-ray Delay",
            ], {
                "update": self.update
            }],
            [[
                timing_system.channels.psod3,
                "Ps Laser Osc. Delay",
            ], {
                "update": self.update
            }],
            ##[[timing_system.channels.psd1,     "Ps Laser Osc. Delay GigaBaudics",],{"update": self.update}],
            [[
                timing_system.channels.pst,
                "Ps Laser Trigger",
            ], {
                "update": self.update
            }],
            [[
                timing_system.channels.nsq,
                "Ns Laser Q-Switch Trigger",
            ], {
                "update": self.update
            }],
            [[
                timing_system.channels.nsf,
                "Ns Laser Flash Lamp Trigger",
            ], {
                "update": self.update
            }],
            [[
                timing_system.channels.losct,
                "Laser Scope Trigger",
            ], {
                "update": self.update
            }],
            [[
                timing_system.channels.lcam,
                "Laser Camera Trigger",
            ], {
                "update": self.update
            }],
            [[
                timing_system.hlcnd,
                "Heatload Chopper Phase",
            ], {
                "keep_value": True
            }],
            [[
                timing_system.hlcad,
                "Heatload Chop. Act. Phase",
            ], {
                "keep_value": True
            }],
            [[
                timing_system.channels.hsc.delay,
                "High-Speed Chopper Phase",
            ], {
                "update": self.update,
                "keep_value": True
            }],
            [[
                timing_system.p0_shift,
                "P0 Shift",
            ], {}],
            [[
                timing_system.channels.ms,
                "X-ray Shutter Delay",
            ], {
                "update": self.update
            }],
            [[
                timing_system.channels.ms,
                "X-ray Shutter Pulse Length",
            ], {
                "update": self.update,
                "attribute": "pulse_length"
            }],
            [[
                timing_system.channels.xdet,
                "X-ray Detector Delay",
            ], {
                "update": self.update
            }],
            [[
                timing_system.channels.xdet,
                "X-ray Detector Pulse Length",
            ], {
                "update": self.update,
                "attribute": "pulse_length"
            }],
            [[
                timing_system.channels.trans,
                "Sample Transl. Delay",
            ], {
                "update": self.update
            }],
            [[
                timing_system.channels.trans,
                "Sample Transl. Pulse Length",
            ], {
                "update": self.update,
                "attribute": "pulse_length"
            }],
        ]
        BasePanel.__init__(self,
                           parent=parent,
                           name=self.name,
                           icon=self.icon,
                           title=self.title,
                           component=CalibrationControl,
                           parameters=self.parameters,
                           standard_view=self.standard_view,
                           label_width=250,
                           refresh=False,
                           live=False,
                           *args,
                           **kwargs)
Example #20
0
    def __init__(self,
                 parent=None,
                 configuration=None,
                 name=None,
                 globals=None,
                 locals=None):
        if configuration is not None: self.configuration = configuration
        elif name is not None:
            from configuration import configuration
            self.configuration = configuration(name,
                                               globals=globals,
                                               locals=locals)
        else:
            raise RuntimeError(
                "SavedPositionsPanel requires 'configuration' or 'name'")

        parameters = [
            [[PropertyPanel, "Rows", self.configuration, "nrows"], {}],
            [[PropertyPanel, "Title", self.configuration, "title"], {}],
            [[PropertyPanel, "Mnemonic", self.configuration, "name"], {}],
            [[
                PropertyPanel, "Python code", self.configuration,
                "motor_names[:]"
            ], {}],
            [[
                PropertyPanel, "Column mnemonics", self.configuration,
                "names[:]"
            ], {}],
            [[
                PropertyPanel, "Column labels", self.configuration,
                "motor_labels[:]"
            ], {}],
            [[PropertyPanel, "Column widths", self.configuration, "widths[:]"],
             {}],
            [[
                PropertyPanel, "Column formats", self.configuration,
                "formats[:]"
            ], {}],
            [[PropertyPanel, "Tolerances", self.configuration, "tolerance[:]"],
             {}],
            [[
                PropertyPanel, "Name width", self.configuration,
                "description_width"
            ], {}],
            [[PropertyPanel, "Row height", self.configuration, "row_height"],
             {}],
            [[
                PropertyPanel, "Apply buttons", self.configuration,
                "show_apply_buttons"
            ], {}],
            [[
                PropertyPanel, "Apply button label", self.configuration,
                "apply_button_label"
            ], {}],
            [[
                PropertyPanel, "Update buttons", self.configuration,
                "show_define_buttons"
            ], {}],
            [[
                PropertyPanel, "Update button label", self.configuration,
                "define_button_label"
            ], {}],
            [[
                PropertyPanel, "Stop button", self.configuration,
                "show_stop_button"
            ], {}],
            [[PropertyPanel, "Go To", self.configuration, "serial"], {
                "type":
                "All motors at once/One motor at a time (left to right)"
            }],
            [[PropertyPanel, "Vertical", self.configuration, "vertical"], {}],
            [[
                PropertyPanel, "Multiple Selections", self.configuration,
                "multiple_selections"
            ], {}],
        ]
        from numpy import inf
        BasePanel.__init__(
            self,
            parent=parent,
            name=self.name,
            title=self.title,
            parameters=parameters,
            standard_view=self.standard_view,
            subname=True,
            label_width=130,
            width=250,
            refresh_period=1.0,
        )