Index: src/sas/sasgui/guiframe/gui_manager.py
===================================================================
--- src/sas/sasgui/guiframe/gui_manager.py	(revision 49165488dcf1dbf657666bc78e3d4b4904d1c094)
+++ src/sas/sasgui/guiframe/gui_manager.py	(revision 38beeabb5ee27ed084d34cff146a43b594e5192f)
@@ -77,9 +77,9 @@
     # clean all these module variables and put them into a config class
     # that can be passed by sasview.py.
-    logger.info(sys.executable)
-    logger.info(str(sys.argv))
+    logger.debug(sys.executable)
+    logger.debug(str(sys.argv))
     from sas import sasview as sasview
     app_path = os.path.dirname(sasview.__file__)
-    logger.info("Using application path: %s", app_path)
+    logger.debug("Using application path: %s", app_path)
     return app_path
 
@@ -109,5 +109,5 @@
         if fObj is not None:
             fObj.close()
-    logger.info("GuiManager loaded %s/%s" % (path, file))
+    logger.debug("GuiManager loaded %s/%s" % (path, file))
     return config_module
 
@@ -126,9 +126,9 @@
         # Didn't find local config, load the default
         import sas.sasgui.guiframe.config as config
-        logger.info("using default local_config")
+        logger.debug("using default local_config")
     else:
-        logger.info("found local_config in %s" % os.getcwd())
+        logger.debug("found local_config in %s" % os.getcwd())
 else:
-    logger.info("found local_config in %s" % PATH_APP)
+    logger.debug("found local_config in %s" % PATH_APP)
 
 from sas.sasgui.guiframe.customdir import SetupCustom
@@ -139,9 +139,9 @@
     if custom_config is None:
         msgConfig = "Custom_config file was not imported"
-        logger.info(msgConfig)
+        logger.debug(msgConfig)
     else:
-        logger.info("using custom_config in %s" % os.getcwd())
+        logger.debug("using custom_config in %s" % os.getcwd())
 else:
-    logger.info("using custom_config from %s" % c_conf_dir)
+    logger.debug("using custom_config from %s" % c_conf_dir)
 
 # read some constants from config
@@ -2156,8 +2156,6 @@
         if response is not None:
             try:
-                # 
                 content = response.read().strip()
-                logger.info("Connected to www.sasview.org. Latest version: %s"
-                             % (content))
+                logger.info("Connected to www.sasview.org. Latest version: %s", content)
                 version_info = json.loads(content)
             except:
Index: src/sas/sasgui/perspectives/calculator/sld_panel.py
===================================================================
--- src/sas/sasgui/perspectives/calculator/sld_panel.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/calculator/sld_panel.py	(revision fe09e9bb0ad6caa9284d13a5c7dfdfc420d0c28b)
@@ -60,5 +60,6 @@
         # Object that receive status event
         self.base = base
-        self.wavelength = WAVELENGTH
+        self.neutron_wavelength = WAVELENGTH
+        self.xray_source_input = WAVELENGTH
         self.parent = parent
         #layout attribute
@@ -67,19 +68,21 @@
         self.compound = ""
         self.density = ""
-        self.wavelength_ctl = None
+        self.neutron_wavelength_ctl = None
+        self.xray_source_input_ctl = None
+        self.xray_cbox = None
         self.neutron_sld_real_ctl = None
         self.neutron_sld_im_ctl = None
-        self.mo_ka_sld_real_ctl = None
-        self.mo_ka_sld_im_ctl = None
-        self.cu_ka_sld_real_ctl = None
-        self.cu_ka_sld_im_ctl = None
+        self.xray_sld_real_ctl = None
+        self.xray_sld_im_ctl = None
         self.neutron_abs_ctl = None
         self.neutron_inc_ctl = None
         self.neutron_length_ctl = None
         self.button_calculate = None
+        self.xray_source = None
         #Draw the panel
         self._do_layout()
         self.SetAutoLayout(True)
         self.Layout()
+        self.fill_xray_cbox()
 
     def _do_layout(self):
@@ -108,8 +111,17 @@
         self.density_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, -1))
         unit_density_txt = wx.StaticText(self, -1, unit_density)
-        wavelength_txt = wx.StaticText(self, -1, 'Wavelength ')
-        self.wavelength_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, -1))
-        self.wavelength_ctl.SetValue(str(self.wavelength))
-        unit_a_txt = wx.StaticText(self, -1, unit_a)
+        neutron_wavelength_txt = wx.StaticText(self, -1, 'Neutron wavelength')
+        self.neutron_wavelength_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, -1))
+        self.neutron_wavelength_ctl.SetValue(str(self.neutron_wavelength))
+        self.xray_source_input_txt = wx.StaticText(self, -1, 'X-ray wavelength')
+        self.xray_source_input_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, -1))
+        self.xray_source_input_ctl.SetValue(str(self.xray_source_input))
+        neutron_unit_a_txt = wx.StaticText(self, -1, unit_a)
+
+        self.xray_cbox = wx.ComboBox(self, -1, size=(70, 20), style=wx.CB_READONLY)
+        xray_cbox_tip = "Select an element, wavelength or energy"
+        self.xray_cbox.SetToolTipString(xray_cbox_tip)
+        wx.EVT_COMBOBOX(self.xray_cbox, -1, self.on_select_xray)
+
         iy = 0
         ix = 0
@@ -131,11 +143,21 @@
         iy += 1
         ix = 0
-        sizer_input.Add(wavelength_txt, (iy, ix), (1, 1),
-                             wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
-        ix += 1
-        sizer_input.Add(self.wavelength_ctl, (iy, ix), (1, 1),
-                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
-        ix += 1
-        sizer_input.Add(unit_a_txt, (iy, ix), (1, 1),
+        sizer_input.Add(neutron_wavelength_txt, (iy, ix), (1, 1),
+                             wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
+        ix += 1
+        sizer_input.Add(self.neutron_wavelength_ctl, (iy, ix), (1, 1),
+                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+        ix += 1
+        sizer_input.Add(neutron_unit_a_txt, (iy, ix), (1, 1),
+                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+        iy += 1
+        ix = 0
+        sizer_input.Add(self.xray_source_input_txt, (iy, ix), (1, 1),
+                             wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
+        ix += 1
+        sizer_input.Add(self.xray_source_input_ctl, (iy, ix), (1, 1),
+                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+        ix += 1
+        sizer_input.Add(self.xray_cbox, (iy, ix), (1, 1),
                             wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         boxsizer1.Add(sizer_input)
@@ -151,32 +173,21 @@
                                                  size=(_BOX_WIDTH, -1))
         self.neutron_sld_real_ctl.SetEditable(False)
-        self.neutron_sld_real_ctl.SetToolTipString("Neutron SLD real.")
+        self.neutron_sld_real_ctl.SetToolTipString("Neutron SLD real")
         self.neutron_sld_im_ctl = wx.TextCtrl(self, -1,
                                               size=(_BOX_WIDTH, -1))
         self.neutron_sld_im_ctl.SetEditable(False)
-        self.neutron_sld_im_ctl.SetToolTipString("Neutron SLD imaginary.")
+        self.neutron_sld_im_ctl.SetToolTipString("Neutron SLD imaginary")
         neutron_sld_units_txt = wx.StaticText(self, -1, unit_sld)
 
-        cu_ka_sld_txt = wx.StaticText(self, -1, 'Cu Ka SLD')
-        self.cu_ka_sld_real_ctl = wx.TextCtrl(self, -1,
+        xray_sld_txt = wx.StaticText(self, -1, 'X-ray SLD')
+        self.xray_sld_real_ctl = wx.TextCtrl(self, -1,
                                                size=(_BOX_WIDTH, -1))
-        self.cu_ka_sld_real_ctl.SetEditable(False)
-        self.cu_ka_sld_real_ctl.SetToolTipString("Cu Ka SLD real.")
-        self.cu_ka_sld_im_ctl = wx.TextCtrl(self, -1,
+        self.xray_sld_real_ctl.SetEditable(False)
+        self.xray_sld_real_ctl.SetToolTipString("X-ray SLD real")
+        self.xray_sld_im_ctl = wx.TextCtrl(self, -1,
                                             size=(_BOX_WIDTH, -1))
-        self.cu_ka_sld_im_ctl.SetEditable(False)
-        self.cu_ka_sld_im_ctl.SetToolTipString("Cu Ka SLD imaginary.")
-        cu_ka_sld_units_txt = wx.StaticText(self, -1, unit_sld)
-
-        mo_ka_sld_txt = wx.StaticText(self, -1, 'Mo Ka SLD')
-        self.mo_ka_sld_real_ctl = wx.TextCtrl(self, -1,
-                                               size=(_BOX_WIDTH, -1))
-        self.mo_ka_sld_real_ctl.SetEditable(False)
-        self.mo_ka_sld_real_ctl.SetToolTipString("Mo Ka SLD real.")
-        self.mo_ka_sld_im_ctl = wx.TextCtrl(self, -1,
-                                             size=(_BOX_WIDTH, -1))
-        self.mo_ka_sld_im_ctl.SetEditable(False)
-        self.mo_ka_sld_im_ctl.SetToolTipString("Mo Ka SLD imaginary.")
-        mo_ka_sld_units_txt = wx.StaticText(self, -1, unit_sld)
+        self.xray_sld_im_ctl.SetEditable(False)
+        self.xray_sld_im_ctl.SetToolTipString("X-ray SLD imaginary")
+        xray_sld_units_txt = wx.StaticText(self, -1, unit_sld)
 
         neutron_inc_txt = wx.StaticText(self, -1, 'Neutron Inc. Xs')
@@ -219,8 +230,8 @@
         iy += 1
         ix = 0
-        sizer_output.Add(cu_ka_sld_txt, (iy, ix), (1, 1),
-                             wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
-        ix += 1
-        sizer_output.Add(self.cu_ka_sld_real_ctl, (iy, ix), (1, 1),
+        sizer_output.Add(xray_sld_txt, (iy, ix), (1, 1),
+                             wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
+        ix += 1
+        sizer_output.Add(self.xray_sld_real_ctl, (iy, ix), (1, 1),
                             wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         ix += 1
@@ -228,24 +239,8 @@
                          (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         ix += 1
-        sizer_output.Add(self.cu_ka_sld_im_ctl,
+        sizer_output.Add(self.xray_sld_im_ctl,
                          (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         ix += 1
-        sizer_output.Add(cu_ka_sld_units_txt,
-                         (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0)
-        iy += 1
-        ix = 0
-        sizer_output.Add(mo_ka_sld_txt, (iy, ix), (1, 1),
-                             wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
-        ix += 1
-        sizer_output.Add(self.mo_ka_sld_real_ctl, (iy, ix), (1, 1),
-                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
-        ix += 1
-        sizer_output.Add(wx.StaticText(self, -1, i_complex),
-                         (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0)
-        ix += 1
-        sizer_output.Add(self.mo_ka_sld_im_ctl,
-                         (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0)
-        ix += 1
-        sizer_output.Add(mo_ka_sld_units_txt,
+        sizer_output.Add(xray_sld_units_txt,
                          (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         iy += 1
@@ -310,4 +305,29 @@
         self.SetSizer(vbox)
 
+    def fill_xray_cbox(self):
+        """
+        fill the x-ray combobox with the sources
+        """
+        source_list = ['[A]', '[keV]', 'Element']
+        for source in source_list:
+            pos = self.xray_cbox.Append(str(source))
+            self.xray_cbox.SetClientData(pos, str(source.strip()))
+        self.xray_cbox.SetSelection(0)
+        self.xray_source = source_list[0]
+
+    def on_select_xray(self, event=None):
+        """
+        On Selecting a source
+        """
+        item = event.GetEventObject()
+        self.xray_source = item.GetValue().strip()
+
+        if self.xray_source == "[A]":
+            self.xray_source_input_txt.SetLabel("X-ray wavelength")
+        elif self.xray_source == "[keV]":
+            self.xray_source_input_txt.SetLabel("X-ray energy")
+        elif self.xray_source == "Element":
+            self.xray_source_input_txt.SetLabel("X-ray source")
+
     def on_help(self, event):
         """
@@ -363,17 +383,42 @@
             msg += "Error for Density value :expect float"
 
-        self.wavelength = self.wavelength_ctl.GetValue()
-        if str(self.wavelength).lstrip().rstrip() == "":
-            self.wavelength = WAVELENGTH
-            self.wavelength_ctl.SetValue(str(WAVELENGTH))
-            self.wavelength_ctl.SetBackgroundColour(wx.WHITE)
-            self.wavelength_ctl.Refresh()
+        self.neutron_wavelength = self.neutron_wavelength_ctl.GetValue()
+        self.xray_source_input = self.xray_source_input_ctl.GetValue()
+
+        if str(self.neutron_wavelength).lstrip().rstrip() == "":
+            self.neutron_wavelength = WAVELENGTH
+            self.neutron_wavelength_ctl.SetValue(str(WAVELENGTH))
+            self.neutron_wavelength_ctl.SetBackgroundColour(wx.WHITE)
+            self.neutron_wavelength_ctl.Refresh()
             msg += "Default value for wavelength is 6.0"
         else:
-            if check_float(self.wavelength_ctl):
-                self.wavelength = float(self.wavelength)
+            if check_float(self.neutron_wavelength_ctl):
+                self.neutron_wavelength = float(self.neutron_wavelength)
             else:
                 flag = False
                 msg += "Error for wavelength value :expect float"
+
+        if str(self.xray_source_input).lstrip().rstrip() == "":
+            self.xray_source_input = WAVELENGTH
+            self.xray_source_input_ctl.SetValue(str(WAVELENGTH))
+            self.xray_source_input_ctl.SetBackgroundColour(wx.WHITE)
+            self.xray_source_input_ctl.Refresh()
+            msg += "Default value for wavelength is 6.0"
+        else:
+            if (self.xray_source == '[A]') or (self.xray_source == '[keV]'):
+                if check_float(self.xray_source_input_ctl):
+                    self.xray_source_input = float(self.xray_source_input)
+                else:
+                    flag = False
+                    msg += "Error for wavelength value :expect float"
+            elif (self.xray_source == 'Element'):
+                try:
+                    import periodictable
+                    exec("periodictable." + self.xray_source_input)
+                except AttributeError:
+                    flag = False
+                    msg += "X-ray element supplied isn't in the database"
+
+
 
         self.compound = self.compound_ctl.GetValue().lstrip().rstrip()
@@ -410,5 +455,4 @@
         return xray_sld_from_atoms(atom, density=density, energy=energy)
 
-
     def calculateSld(self, event):
         """
@@ -430,11 +474,18 @@
                         length = neutron_scattering(compound=self.compound,
                                    density=self.density,
-                                   wavelength=self.wavelength)
-            cu_real, cu_im = self.calculate_sld_helper(element="Cu",
-                                                 density=self.density,
-                                        molecule_formula=self.sld_formula)
-            mo_real, mo_im = self.calculate_sld_helper(element="Mo",
-                                                       density=self.density,
-                                     molecule_formula=self.sld_formula)
+                                   wavelength=self.neutron_wavelength)
+            if self.xray_source == "[A]":
+                energy = xray_energy(self.xray_source_input)
+                xray_real, xray_im = xray_sld_from_atoms(self.sld_formula.atoms,
+                                                         density=self.density,
+                                                         energy=energy)
+            elif self.xray_source == "[keV]":
+                xray_real, xray_im = xray_sld_from_atoms(self.sld_formula.atoms,
+                                                         density=self.density,
+                                                         energy=self.xray_source_input)
+            elif self.xray_source == "Element":
+                xray_real, xray_im = self.calculate_sld_helper(element=self.xray_source_input,
+                                                               density=self.density,
+                                                               molecule_formula=self.sld_formula)
             # set neutron sld values
             val = format_number(sld_real * _SCALE)
@@ -443,11 +494,7 @@
             self.neutron_sld_im_ctl.SetValue(val)
             # Compute the Cu SLD
-            self.cu_ka_sld_real_ctl.SetValue(format_number(cu_real * _SCALE))
-            val = format_number(math.fabs(cu_im) * _SCALE)
-            self.cu_ka_sld_im_ctl.SetValue(val)
-            # Compute the Mo SLD
-            self.mo_ka_sld_real_ctl.SetValue(format_number(mo_real * _SCALE))
-            val = format_number(math.fabs(mo_im) * _SCALE)
-            self.mo_ka_sld_im_ctl.SetValue(val)
+            self.xray_sld_real_ctl.SetValue(format_number(xray_real * _SCALE))
+            val = format_number(math.fabs(xray_im) * _SCALE)
+            self.xray_sld_im_ctl.SetValue(val)
             # set incoherence and absorption
             self.neutron_inc_ctl.SetValue(format_number(incoh))
@@ -456,5 +503,6 @@
             self.neutron_length_ctl.SetValue(format_number(length))
             # display wavelength
-            self.wavelength_ctl.SetValue(str(self.wavelength))
+            #self.wavelength_ctl.SetValue(str(self.wavelength))
+            #self.wavelength_ctl.SetValue(str(self.wavelength))
         except:
             if self.base is not None:
@@ -470,8 +518,6 @@
         self.neutron_sld_real_ctl.SetValue("")
         self.neutron_sld_im_ctl.SetValue("")
-        self.mo_ka_sld_real_ctl.SetValue("")
-        self.mo_ka_sld_im_ctl.SetValue("")
-        self.cu_ka_sld_real_ctl.SetValue("")
-        self.cu_ka_sld_im_ctl.SetValue("")
+        self.xray_sld_real_ctl.SetValue("")
+        self.xray_sld_im_ctl.SetValue("")
         self.neutron_abs_ctl.SetValue("")
         self.neutron_inc_ctl.SetValue("")
