Index: src/sas/sasgui/perspectives/file_converter/converter_panel.py
===================================================================
--- src/sas/sasgui/perspectives/file_converter/converter_panel.py	(revision fe498b83c60d90385d24f137b55ab1ac6c88f718)
+++ src/sas/sasgui/perspectives/file_converter/converter_panel.py	(revision edf0e06c172ff52aeaae0a7fc8c7710ab31b39b4)
@@ -276,37 +276,30 @@
         return { 'frames': frames, 'inc': increment, 'file': single_file }
 
-    def on_convert(self, event):
-        """Called when the Convert button is clicked"""
-        if not self.validate_inputs():
-            return
-
-        self.sample.ID = self.title
-
-        try:
-            if self.data_type == 'ascii':
-                qdata = self.extract_ascii_data(self.q_input.GetPath())
-                iqdata = np.array([self.extract_ascii_data(self.iq_input.GetPath())])
-            elif self.data_type == 'otoko':
-                qdata, iqdata = self.extract_otoko_data(self.q_input.GetPath())
-            else: # self.data_type == 'bsl'
-
-                dataset = self.extract_bsl_data(self.iq_input.GetPath())
-                if dataset is None:
-                    # Cancelled by user
-                    return
-
-                w = NXcanSASWriter()
-                w.write(dataset, self.output.GetPath())
-
-                wx.PostEvent(self.parent.manager.parent,
-                    StatusEvent(status="Conversion completed."))
-                return
-
-        except Exception as ex:
-            msg = str(ex)
-            wx.PostEvent(self.parent.manager.parent,
-                StatusEvent(status=msg, info='error'))
-            return
-
+    def get_metadata(self):
+        # Prepare the metadata for writing to a file
+        if self.run is None:
+            self.run = []
+        elif not isinstance(self.run, list):
+            self.run = [self.run]
+
+        if self.title is None:
+            self.title = ''
+
+        metadata = {
+            'title': self.title,
+            'run': self.run,
+            'instrument': self.instrument,
+            'detector': [self.detector],
+            'sample': self.sample,
+            'source': self.source
+        }
+
+        return metadata
+
+    def convert_1d_data(self, qdata, iqdata):
+        """
+        Formats a 1D array of q_axis data and a 2D array of I axis data (where
+        each row of iqdata is a separate row), into an array of Data1D objects
+        """
         frames = []
         increment = 1
@@ -326,22 +319,5 @@
 
         output_path = self.output.GetPath()
-
-        # Prepare the metadata for writing to a file
-        if self.run is None:
-            self.run = []
-        elif not isinstance(self.run, list):
-            self.run = [self.run]
-
-        if self.title is None:
-            self.title = ''
-
-        metadata = {
-            'title': self.title,
-            'run': self.run,
-            'instrument': self.instrument,
-            'detector': [self.detector],
-            'sample': self.sample,
-            'source': self.source
-        }
+        metadata = self.get_metadata()
 
         frame_data = {}
@@ -362,6 +338,39 @@
                     setattr(datainfo, key, value)
 
-
         self.convert_to_cansas(frame_data, output_path, single_file)
+
+    def on_convert(self, event):
+        """Called when the Convert button is clicked"""
+        if not self.validate_inputs():
+            return
+
+        self.sample.ID = self.title
+
+        try:
+            if self.data_type == 'ascii':
+                qdata = self.extract_ascii_data(self.q_input.GetPath())
+                iqdata = np.array([self.extract_ascii_data(self.iq_input.GetPath())])
+                self.convert_1d_data(qdata, iqdata)
+            elif self.data_type == 'otoko':
+                qdata, iqdata = self.extract_otoko_data(self.q_input.GetPath())
+                self.convert_1d_data(qdata, iqdata)
+            else: # self.data_type == 'bsl'
+                dataset = self.extract_bsl_data(self.iq_input.GetPath())
+                if dataset is None:
+                    # Cancelled by user
+                    return
+
+                metadata = self.get_metadata()
+                for key, value in metadata.iteritems():
+                    setattr(dataset[0], key, value)
+
+                w = NXcanSASWriter()
+                w.write(dataset, self.output.GetPath())
+        except Exception as ex:
+            msg = str(ex)
+            wx.PostEvent(self.parent.manager.parent,
+                StatusEvent(status=msg, info='error'))
+            return
+
         wx.PostEvent(self.parent.manager.parent,
             StatusEvent(status="Conversion completed."))
@@ -454,8 +463,8 @@
             self.q_input.SetPath("")
             self.q_input.Disable()
-            self.radiation_input.Disable()
-            self.metadata_section.Collapse()
-            self.on_collapsible_pane(None)
-            self.metadata_section.Disable()
+            # self.radiation_input.Disable()
+            # self.metadata_section.Collapse()
+            # self.on_collapsible_pane(None)
+            # self.metadata_section.Disable()
             self.output.SetWildcard("NXcanSAS HDF5 File (*.h5)|*.h5")
         else:
