Index: src/sas/qtgui/Calculators/SldPanel.py
===================================================================
--- src/sas/qtgui/Calculators/SldPanel.py	(revision d738feb7407779519da80f88d490de676d63205b)
+++ src/sas/qtgui/Calculators/SldPanel.py	(revision 5c0e717a674c1d38556449d3d2473408bfae3319)
@@ -6,5 +6,5 @@
 
 from periodictable import formula as Formula
-from periodictable.xsf import xray_energy, xray_sld_from_atoms
+from periodictable.xsf import xray_energy, xray_sld
 from periodictable.nsf import neutron_scattering
 
@@ -21,11 +21,10 @@
     'MOLECULAR_FORMULA',
     'MASS_DENSITY',
-    'WAVELENGTH',
+    'NEUTRON_WAVELENGTH',
     'NEUTRON_SLD_REAL',
     'NEUTRON_SLD_IMAG',
-    'CU_KA_SLD_REAL',
-    'CU_KA_SLD_IMAG',
-    'MO_KA_SLD_REAL',
-    'MO_KA_SLD_IMAG',
+    'XRAY_WAVELENGTH',
+    'XRAY_SLD_REAL',
+    'XRAY_SLD_IMAG',
     'NEUTRON_INC_XS',
     'NEUTRON_ABS_XS',
@@ -34,64 +33,49 @@
 
 class SldResult(object):
-    def __init__(self, molecular_formula, mass_density, wavelength,
-        neutron_sld_real, neutron_sld_imag,
-        cu_ka_sld_real, cu_ka_sld_imag,
-        mo_ka_sld_real, mo_ka_sld_imag,
+    def __init__(self, molecular_formula, mass_density,
+        neutron_wavelength, neutron_sld_real, neutron_sld_imag,
+        xray_wavelength, xray_sld_real, xray_sld_imag,
         neutron_inc_xs, neutron_abs_xs, neutron_length):
 
         self.molecular_formula = molecular_formula
         self.mass_density = mass_density
-        self.wavelength = wavelength
+        self.neutron_wavelength = neutron_wavelength
         self.neutron_sld_real = neutron_sld_real
         self.neutron_sld_imag = neutron_sld_imag
-        self.cu_ka_sld_real = cu_ka_sld_real
-        self.cu_ka_sld_imag = cu_ka_sld_imag
-        self.mo_ka_sld_real = mo_ka_sld_real
-        self.mo_ka_sld_imag = mo_ka_sld_imag
+        self.xray_wavelength = xray_wavelength
+        self.xray_sld_real = xray_sld_real
+        self.xray_sld_imag = xray_sld_imag
         self.neutron_inc_xs = neutron_inc_xs
         self.neutron_abs_xs = neutron_abs_xs
         self.neutron_length = neutron_length
 
-def sldAlgorithm(molecular_formula, mass_density, wavelength):
-
-    sld_formula = Formula(molecular_formula, density=mass_density)
-
-    def calculate_sld(formula):
-        if len(formula.atoms) != 1:
-            raise NotImplementedError()
-        energy = xray_energy(list(formula.atoms.keys())[0].K_alpha)
-        return xray_sld_from_atoms(
-            sld_formula.atoms,
+def sldAlgorithm(molecular_formula, mass_density, neutron_wavelength, xray_wavelength):
+
+    xray_sld_real, xray_sld_imag = xray_sld(
+            compound=molecular_formula,
             density=mass_density,
-            energy=energy)
-
-    cu_real, cu_imag = calculate_sld(Formula("Cu"))
-    mo_real, mo_imag = calculate_sld(Formula("Mo"))
-
-    (sld_real, sld_imag, _), (_, neutron_abs_xs, neutron_inc_xs), neutron_length = \
+            wavelength=xray_wavelength)
+
+    (neutron_sld_real, neutron_sld_imag, _), (_, neutron_abs_xs, neutron_inc_xs), neutron_length = \
         neutron_scattering(
             compound=molecular_formula,
             density=mass_density,
-            wavelength=wavelength)
+            wavelength=neutron_wavelength)
 
     SCALE = 1e-6
 
     # neutron sld
-    neutron_sld_real = SCALE * sld_real
-    neutron_sld_imag = SCALE * abs(sld_imag)
-
-    # Cu sld
-    cu_ka_sld_real = SCALE * cu_real
-    cu_ka_sld_imag = SCALE * abs(cu_imag)
-
-    # Mo sld
-    mo_ka_sld_real = SCALE * mo_real
-    mo_ka_sld_imag = SCALE * abs(mo_imag)
+    scaled_neutron_sld_real = SCALE * neutron_sld_real
+    scaled_neutron_sld_imag = SCALE * abs(neutron_sld_imag)
+
+    # xray sld
+    scaled_xray_sld_real = SCALE * xray_sld_real
+    scaled_xray_sld_imag = SCALE * abs(xray_sld_imag)
+
 
     return SldResult(
-        molecular_formula, mass_density, wavelength,
-        neutron_sld_real, neutron_sld_imag,
-        cu_ka_sld_real, cu_ka_sld_imag,
-        mo_ka_sld_real, mo_ka_sld_imag,
+        molecular_formula, mass_density,
+        neutron_wavelength, scaled_neutron_sld_real, scaled_neutron_sld_imag,
+        xray_wavelength, scaled_xray_sld_real, scaled_xray_sld_imag,
         neutron_inc_xs, neutron_abs_xs, neutron_length)
 
@@ -112,8 +96,6 @@
             MODEL.NEUTRON_SLD_REAL: self.ui.editNeutronSldReal,
             MODEL.NEUTRON_SLD_IMAG: self.ui.editNeutronSldImag,
-            MODEL.CU_KA_SLD_REAL: self.ui.editCuKaSldReal,
-            MODEL.CU_KA_SLD_IMAG: self.ui.editCuKaSldImag,
-            MODEL.MO_KA_SLD_REAL: self.ui.editMoKaSldReal,
-            MODEL.MO_KA_SLD_IMAG: self.ui.editMoKaSldImag,
+            MODEL.XRAY_SLD_REAL: self.ui.editXraySldReal,
+            MODEL.XRAY_SLD_IMAG: self.ui.editXraySldImag,
             MODEL.NEUTRON_INC_XS: self.ui.editNeutronIncXs,
             MODEL.NEUTRON_ABS_XS: self.ui.editNeutronAbsXs,
@@ -131,5 +113,6 @@
         rx = QtCore.QRegExp("[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?")
         self.ui.editMassDensity.setValidator(QtGui.QRegExpValidator(rx, self.ui.editMassDensity))
-        self.ui.editWavelength.setValidator(QtGui.QRegExpValidator(rx, self.ui.editWavelength))
+        self.ui.editNeutronWavelength.setValidator(QtGui.QRegExpValidator(rx, self.ui.editNeutronWavelength))
+        self.ui.editXrayWavelength.setValidator(QtGui.QRegExpValidator(rx, self.ui.editXrayWavelength))
 
         # signals
@@ -143,7 +126,8 @@
     def setupModel(self):
         self.model = QtGui.QStandardItemModel(self)
-        self.model.setItem(MODEL.MOLECULAR_FORMULA, QtGui.QStandardItem())
-        self.model.setItem(MODEL.MASS_DENSITY     , QtGui.QStandardItem())
-        self.model.setItem(MODEL.WAVELENGTH       , QtGui.QStandardItem())
+        self.model.setItem(MODEL.MOLECULAR_FORMULA , QtGui.QStandardItem())
+        self.model.setItem(MODEL.MASS_DENSITY      , QtGui.QStandardItem())
+        self.model.setItem(MODEL.NEUTRON_WAVELENGTH, QtGui.QStandardItem())
+        self.model.setItem(MODEL.XRAY_WAVELENGTH   , QtGui.QStandardItem())
 
         for key in list(self._getOutputs().keys()):
@@ -151,4 +135,9 @@
 
         self.model.dataChanged.connect(self.dataChanged)
+
+        self.ui.editMassDensity.textEdited.connect(self.recalculateSLD)
+        self.ui.editMolecularFormula.textEdited.connect(self.recalculateSLD)
+        self.ui.editNeutronWavelength.textEdited.connect(self.recalculateSLD)
+        self.ui.editXrayWavelength.textEdited.connect(self.recalculateSLD)
 
         self.modelReset()
@@ -158,7 +147,8 @@
         self.mapper.setModel(self.model)
         self.mapper.setOrientation(QtCore.Qt.Vertical)
-        self.mapper.addMapping(self.ui.editMolecularFormula, MODEL.MOLECULAR_FORMULA)
-        self.mapper.addMapping(self.ui.editMassDensity     , MODEL.MASS_DENSITY)
-        self.mapper.addMapping(self.ui.editWavelength      , MODEL.WAVELENGTH)
+        self.mapper.addMapping(self.ui.editMolecularFormula , MODEL.MOLECULAR_FORMULA)
+        self.mapper.addMapping(self.ui.editMassDensity      , MODEL.MASS_DENSITY)
+        self.mapper.addMapping(self.ui.editNeutronWavelength, MODEL.NEUTRON_WAVELENGTH)
+        self.mapper.addMapping(self.ui.editXrayWavelength   , MODEL.XRAY_WAVELENGTH)
 
         for key, edit in self._getOutputs().items():
@@ -170,5 +160,5 @@
         update = False
         for index in range(top.row(), bottom.row() + 1):
-            if (index == MODEL.MOLECULAR_FORMULA) or (index == MODEL.MASS_DENSITY) or (index == MODEL.WAVELENGTH):
+            if (index == MODEL.MOLECULAR_FORMULA) or (index == MODEL.MASS_DENSITY) or (index == MODEL.NEUTRON_WAVELENGTH) or (index == MODEL.XRAY_WAVELENGTH):
                 update = True
 
@@ -178,10 +168,12 @@
 
     def recalculateSLD(self):
-        formula = self.model.item(MODEL.MOLECULAR_FORMULA).text()
-        density = self.model.item(MODEL.MASS_DENSITY).text()
-        wavelength = self.model.item(MODEL.WAVELENGTH).text()
-        if len(formula) > 0 and len(density) > 0 and len(wavelength) > 0:
+        formula = self.ui.editMolecularFormula.text()
+        density = self.ui.editMassDensity.text()
+        neutronWavelength = self.ui.editNeutronWavelength.text()
+        xrayWavelength = self.ui.editXrayWavelength.text()
+
+        if len(formula) > 0 and len(density) > 0 and len(neutronWavelength) > 0 and len(xrayWavelength) > 0:
             try:
-                results = sldAlgorithm(str(formula), float(density), float(wavelength))
+                results = sldAlgorithm(str(formula), float(density), float(neutronWavelength), float(xrayWavelength))
 
                 def format(value):
@@ -191,9 +183,6 @@
                 self.model.item(MODEL.NEUTRON_SLD_IMAG).setText(format(results.neutron_sld_imag))
 
-                self.model.item(MODEL.CU_KA_SLD_REAL).setText(format(results.cu_ka_sld_real))
-                self.model.item(MODEL.CU_KA_SLD_IMAG).setText(format(results.cu_ka_sld_imag))
-
-                self.model.item(MODEL.MO_KA_SLD_REAL).setText(format(results.mo_ka_sld_real))
-                self.model.item(MODEL.MO_KA_SLD_IMAG).setText(format(results.mo_ka_sld_imag))
+                self.model.item(MODEL.XRAY_SLD_REAL).setText(format(results.xray_sld_real))
+                self.model.item(MODEL.XRAY_SLD_IMAG).setText(format(results.xray_sld_imag))
 
                 self.model.item(MODEL.NEUTRON_INC_XS).setText(format(results.neutron_inc_xs))
@@ -212,7 +201,9 @@
         #self.model.beginResetModel()
         try:
-            self.model.item(MODEL.MOLECULAR_FORMULA).setText("H2O")
-            self.model.item(MODEL.MASS_DENSITY     ).setText("1")
-            self.model.item(MODEL.WAVELENGTH       ).setText("6")
+            self.model.item(MODEL.MOLECULAR_FORMULA ).setText("H2O")
+            self.model.item(MODEL.MASS_DENSITY      ).setText("1.0")
+            self.model.item(MODEL.NEUTRON_WAVELENGTH).setText("6.0")
+            self.model.item(MODEL.XRAY_WAVELENGTH   ).setText("1.0")
+            self.recalculateSLD()
         finally:
             pass
Index: src/sas/qtgui/Calculators/UI/SldPanel.ui
===================================================================
--- src/sas/qtgui/Calculators/UI/SldPanel.ui	(revision d738feb7407779519da80f88d490de676d63205b)
+++ src/sas/qtgui/Calculators/UI/SldPanel.ui	(revision 5c0e717a674c1d38556449d3d2473408bfae3319)
@@ -7,6 +7,6 @@
     <x>0</x>
     <y>0</y>
-    <width>487</width>
-    <height>488</height>
+    <width>490</width>
+    <height>490</height>
    </rect>
   </property>
@@ -120,6 +120,28 @@
        <widget class="QLineEdit" name="editMassDensity"/>
       </item>
+      <item row="2" column="2">
+       <widget class="QLabel" name="label_12">
+        <property name="text">
+         <string>Ã
+</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_9">
+        <property name="text">
+         <string>Molecular Formula</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="label_11">
+        <property name="text">
+         <string>Neutron Wavelength</string>
+        </property>
+       </widget>
+      </item>
       <item row="2" column="1">
-       <widget class="QLineEdit" name="editWavelength">
+       <widget class="QLineEdit" name="editNeutronWavelength">
         <property name="styleSheet">
          <string notr="true"/>
@@ -130,23 +152,19 @@
        </widget>
       </item>
-      <item row="2" column="2">
-       <widget class="QLabel" name="label_12">
+      <item row="3" column="1">
+       <widget class="QLineEdit" name="editXrayWavelength"/>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="label_13">
+        <property name="text">
+         <string>X-Ray Wavelength</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="2">
+       <widget class="QLabel" name="label">
         <property name="text">
          <string>Ã
 </string>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="0">
-       <widget class="QLabel" name="label_9">
-        <property name="text">
-         <string>Molecular Formula</string>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="0">
-       <widget class="QLabel" name="label_11">
-        <property name="text">
-         <string>Wavelength</string>
         </property>
        </widget>
@@ -161,4 +179,14 @@
      </property>
      <layout class="QGridLayout" name="gridLayoutOutput">
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="editNeutronSldReal">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="readOnly">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
       <item row="0" column="0">
        <widget class="QLabel" name="label_17">
@@ -168,8 +196,25 @@
        </widget>
       </item>
-      <item row="0" column="1">
-       <widget class="QLineEdit" name="editNeutronSldReal">
-        <property name="readOnly">
-         <bool>true</bool>
+      <item row="5" column="0">
+       <widget class="QLabel" name="label_3">
+        <property name="text">
+         <string>Neutron 1/e length</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1">
+       <widget class="QLineEdit" name="editNeutronIncXs">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="readOnly">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="label_21">
+        <property name="text">
+         <string>Neutron Inc. Xs</string>
         </property>
        </widget>
@@ -182,8 +227,81 @@
        </widget>
       </item>
+      <item row="1" column="2">
+       <widget class="QLabel" name="label_20">
+        <property name="text">
+         <string>-i</string>
+        </property>
+       </widget>
+      </item>
       <item row="0" column="3">
        <widget class="QLineEdit" name="editNeutronSldImag">
-        <property name="readOnly">
-         <bool>true</bool>
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="readOnly">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="2" colspan="2">
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>cm</string>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="1">
+       <widget class="QLineEdit" name="editNeutronLength">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="readOnly">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="2" colspan="2">
+       <widget class="QLabel" name="label_24">
+        <property name="text">
+         <string>1/cm</string>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1">
+       <widget class="QLineEdit" name="editNeutronAbsXs">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="readOnly">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0">
+       <widget class="QLabel" name="label_23">
+        <property name="text">
+         <string>Neutron Abs. Xs</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="2" colspan="2">
+       <widget class="QLabel" name="label_22">
+        <property name="text">
+         <string>1/cm</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="4">
+       <widget class="QLabel" name="label_6">
+        <property name="text">
+         <string>1/Ã
+Â²</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_19">
+        <property name="text">
+         <string>X-Ray SLD</string>
         </property>
        </widget>
@@ -197,80 +315,5 @@
        </widget>
       </item>
-      <item row="1" column="0">
-       <widget class="QLabel" name="label_19">
-        <property name="text">
-         <string>Cu Ka SLD</string>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="1">
-       <widget class="QLineEdit" name="editCuKaSldReal">
-        <property name="styleSheet">
-         <string notr="true"/>
-        </property>
-        <property name="readOnly">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="2">
-       <widget class="QLabel" name="label_20">
-        <property name="text">
-         <string>-i</string>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="3">
-       <widget class="QLineEdit" name="editCuKaSldImag">
-        <property name="readOnly">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="4">
-       <widget class="QLabel" name="label_6">
-        <property name="text">
-         <string>1/Ã
-Â²</string>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="0">
-       <widget class="QLabel" name="label">
-        <property name="text">
-         <string>Mo Ka SLD</string>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="1">
-       <widget class="QLineEdit" name="editMoKaSldReal">
-        <property name="readOnly">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="2">
-       <widget class="QLabel" name="label_2">
-        <property name="text">
-         <string>-i</string>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="3">
-       <widget class="QLineEdit" name="editMoKaSldImag">
-        <property name="readOnly">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="4">
-       <widget class="QLabel" name="label_7">
-        <property name="text">
-         <string>1/Ã
-Â²</string>
-        </property>
-       </widget>
-      </item>
-      <item row="3" column="0" colspan="5">
+      <item row="2" column="0" colspan="5">
        <widget class="QFrame" name="frame">
         <property name="minimumSize">
@@ -294,64 +337,21 @@
        </widget>
       </item>
-      <item row="4" column="0">
-       <widget class="QLabel" name="label_21">
-        <property name="text">
-         <string>Neutron Inc. Xs</string>
-        </property>
-       </widget>
-      </item>
-      <item row="4" column="1">
-       <widget class="QLineEdit" name="editNeutronIncXs">
-        <property name="readOnly">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="4" column="2" colspan="2">
-       <widget class="QLabel" name="label_22">
-        <property name="text">
-         <string>1/cm</string>
-        </property>
-       </widget>
-      </item>
-      <item row="5" column="0">
-       <widget class="QLabel" name="label_23">
-        <property name="text">
-         <string>Neutron Abs. Xs</string>
-        </property>
-       </widget>
-      </item>
-      <item row="5" column="1">
-       <widget class="QLineEdit" name="editNeutronAbsXs">
-        <property name="readOnly">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="5" column="2" colspan="2">
-       <widget class="QLabel" name="label_24">
-        <property name="text">
-         <string>1/cm</string>
-        </property>
-       </widget>
-      </item>
-      <item row="6" column="0">
-       <widget class="QLabel" name="label_3">
-        <property name="text">
-         <string>Neutron 1/e length</string>
-        </property>
-       </widget>
-      </item>
-      <item row="6" column="1">
-       <widget class="QLineEdit" name="editNeutronLength">
-        <property name="readOnly">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="6" column="2" colspan="2">
-       <widget class="QLabel" name="label_4">
-        <property name="text">
-         <string>cm</string>
+      <item row="1" column="1">
+       <widget class="QLineEdit" name="editXraySldReal">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="readOnly">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="3">
+       <widget class="QLineEdit" name="editXraySldImag">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="readOnly">
+         <bool>true</bool>
         </property>
        </widget>
@@ -365,11 +365,7 @@
   <tabstop>editMolecularFormula</tabstop>
   <tabstop>editMassDensity</tabstop>
-  <tabstop>editWavelength</tabstop>
+  <tabstop>editNeutronWavelength</tabstop>
   <tabstop>editNeutronSldReal</tabstop>
   <tabstop>editNeutronSldImag</tabstop>
-  <tabstop>editCuKaSldReal</tabstop>
-  <tabstop>editCuKaSldImag</tabstop>
-  <tabstop>editMoKaSldReal</tabstop>
-  <tabstop>editMoKaSldImag</tabstop>
   <tabstop>editNeutronIncXs</tabstop>
   <tabstop>editNeutronAbsXs</tabstop>
