Index: setup.py
===================================================================
--- setup.py	(revision 76263a5d301e7c8953e1024ee20856783c271a1b)
+++ setup.py	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -136,6 +136,6 @@
 # sans.dataloader
 package_dir["sans.dataloader"] = os.path.join("src", "sans", "dataloader")
-package_data["sans.dataloader.readers"] = ['defaults.xml']
-packages.extend(["sans.dataloader","sans.dataloader.readers"])
+package_data["sans.dataloader.readers"] = ['defaults.xml','schema/*.xsd']
+packages.extend(["sans.dataloader","sans.dataloader.readers","sans.dataloader.readers.schema"])
 
 # sans.calculator
Index: src/sans/dataloader/readers/cansas_constants.py
===================================================================
--- src/sans/dataloader/readers/cansas_constants.py	(revision eda89725afadff916f49a3a51d5823023263ff33)
+++ src/sans/dataloader/readers/cansas_constants.py	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -0,0 +1,573 @@
+## Left off at SASInstrument, line 178
+
+class cansasConstants:
+    CANSAS_NS = {
+                 "1.0" : {
+                          "ns" : "cansas1d/1.0", 
+                          "schema" : "cansas1d_v1_0.xsd"
+                          },
+                 "1.1" : {
+                          "ns" : "urn:cansas1d:1.1", 
+                          "schema" : "cansas1d_v1_1.xsd"
+                          }
+                 }
+    CANSAS_FORMAT = {
+                     "SASentry" : {
+                                   "units_optional" : True,
+                                   "variable" : " ",
+                                   "storeas" : "content",
+                                   "attributes" : {"name" : {"variable" : "{0}.run_name[node_value] = \"{1}\""}},
+                                   "children" : {
+                                                 "Title" : {"variable" : "{0}.title = \"{1}\""},
+                                                 "Run" : {
+                                                          "variable" : "{0}.run.append(\"{1}\")",
+                                                          "attributes" : {"name" : {"variable" : "{0}.run_name[node_value] = \"{1}\""}}
+                                                          },
+                                                 "SASdata" : {
+                                                              "attributes" : {"name" : {"variable" : "{0}.meta_data[\"{2}\"] = \"{1}\"",}},
+                                                              "children" : {"Idata" : {
+                                                                                       "storeas" : "float",
+                                                                                       "variable" : None,
+                                                                                       "units_optional" : False,
+                                                                                       "attributes" : {
+                                                                                                       "name" : {
+                                                                                                                 "variable" : "{0}.meta_data[\"{2}\"] = \"{1}\"",
+                                                                                                                 "storeas" : "content",
+                                                                                                                 },
+                                                                                                       "timestamp" : {
+                                                                                                                      "variable" : "{0}.meta_data[\"{2}\"] = \"{1}\"",
+                                                                                                                      "storeas" : "content",
+                                                                                                                      }
+                                                                                                        },
+                                                                                       "children" : {
+                                                                                                     "Q" : {
+                                                                                                            "variable" : "{0}.x = numpy.append({0}.x, {1})",
+                                                                                                            "unit" : "_xunit",
+                                                                                                            "attributes" : {
+                                                                                                                            "unit" : {
+                                                                                                                                      "variable" : "{0}._xunit",
+                                                                                                                                      "storeas" : "content"
+                                                                                                                                      }
+                                                                                                                            }
+                                                                                                            },
+                                                                                                     "I" : {
+                                                                                                            "variable" : "{0}.y = numpy.append({0}.y, {1})",
+                                                                                                            "unit" : "_yunit",
+                                                                                                            "attributes" : {
+                                                                                                                            "unit" : {
+                                                                                                                                      "variable" : "{0}._yunit",
+                                                                                                                                      "storeas" : "content"
+                                                                                                                                      }
+                                                                                                                            }
+                                                                                                            },
+                                                                                                     "Idev" : {
+                                                                                                               "variable" : "{0}.dy = numpy.append({0}.dy, {1})",
+                                                                                                               "attributes" : {
+                                                                                                                               "unit" : {
+                                                                                                                                         "variable" : "{0}.meta_data[\"{2}\"] = \"{1}\"",
+                                                                                                                                         "storeas" : "content"
+                                                                                                                                         }
+                                                                                                                               },
+                                                                                                               },
+                                                                                                     "Qdev" : {
+                                                                                                               "variable" : "{0}.dx = numpy.append({0}.dx, {1})",
+                                                                                                               "attributes" : {
+                                                                                                                               "unit" : {
+                                                                                                                                         "variable" : "{0}.meta_data[\"{2}\"] = \"{1}\"",
+                                                                                                                                         "storeas" : "content"
+                                                                                                                                         }
+                                                                                                                               },
+                                                                                                               },
+                                                                                                     "dQw" : {
+                                                                                                              "variable" : "{0}.dxw = numpy.append({0}.dxw, {1})",
+                                                                                                              "attributes" : {
+                                                                                                                              "unit" : {
+                                                                                                                                        "variable" : "{0}.meta_data[\"{2}\"] = \"{1}\"",
+                                                                                                                                        "storeas" : "content"
+                                                                                                                                        }
+                                                                                                                              },
+                                                                                                              },
+                                                                                                     "dQl" : {
+                                                                                                              "variable" : "{0}.dxl = numpy.append({0}.dxl, {1})",
+                                                                                                              "attributes" : {
+                                                                                                                              "unit" : {
+                                                                                                                                        "variable" : "{0}.meta_data[\"{2}\"] = \"{1}\"",
+                                                                                                                                        "storeas" : "content"
+                                                                                                                                        }
+                                                                                                                              },
+                                                                                                              },
+                                                                                                     "Qmean" : {
+                                                                                                                "storeas" : "content",
+                                                                                                                "variable" : "{0}.meta_data[\"{2}\"] = {1}",
+                                                                                                                "attributes" : {"unit" : {"variable" : "{0}.meta_data[\"{2}\"] = \"{1}\""}},
+                                                                                                                },
+                                                                                                     "Shadowfactor" : {
+                                                                                                                       "variable" : "{0}.meta_data[\"{2}\"] = \"{1}\"",
+                                                                                                                       "storeas" : "content",
+                                                                                                                       },
+                                                                                                     "<any>" : {
+                                                                                                                "variable" : "{0}.meta_data[\"{2}\"] = \"{1}\"",
+                                                                                                                "storeas" : "content",
+                                                                                                                }
+                                                                                                     }
+                                                                                       },
+                                                                            "<any>" : {"variable" : "{0}.meta_data[\"{2}\"] = \"{1}\"",}
+                                                                            }
+                                                              },
+                                                 "SAStransmission_spectrum" : {
+                                                                               "children" : {
+                                                                                             "Tdata" : {
+                                                                                                        "children" : {
+                                                                                                                      "Lambda" : {
+                                                                                                                                  "variable" : "{0}.meta_data[\"{2}\"] = \"{1}\"",
+                                                                                                                                  "attributes" : {"unit" : {"variable" : "{0}.meta_data[\"{2}\"] = \"{1}\""}}
+                                                                                                                                  },
+                                                                                                                      "T" : {
+                                                                                                                             "variable" : "{0}.meta_data[\"{2}\"] = \"{1}\"",
+                                                                                                                             "attributes" : {"unit" : {"variable" : "{0}.meta_data[\"{2}\"] = \"{1}\""}}
+                                                                                                                             },
+                                                                                                                      "Tdev" : {
+                                                                                                                                "variable" : "{0}.meta_data[\"{2}\"] = \"{1}\"",
+                                                                                                                                "attributes" : {"unit" : {"variable" : "{0}.meta_data[\"{2}\"] = \"{1}\""}}
+                                                                                                                                },
+                                                                                                                      "<any>" : {"variable" : "{0}.meta_data[\"{2}\"] = \"{1}\""},
+                                                                                                                      }
+                                                                                                        },
+                                                                                             "<any>" : {"variable" : "{0}.meta_data[\"{2}\"] = \"{1}\""},
+                                                                                             },
+                                                                               "attributes" : {"name" : {"variable" : "{0}.meta_data[\"{2}\"] = \"{1}\""},
+                                                                                               "timestamp" : {"variable" : "{0}.meta_data[\"{2}\"] = \"{1}\""},}
+                                                                               },
+                                                 "SASsample" : {
+                                                                "attributes" : {"name" : {"variable" : "{0}.sample.name = \"{1}\""},},
+                                                                "children" : {
+                                                                              "ID" : {"variable" : "{0}.sample.ID = \"{1}\""},
+                                                                              "thickness" : {
+                                                                                             "variable" : "{0}.sample.thickness = {1}",
+                                                                                             "unit" : "sample.thickness_unit",
+                                                                                             "storeas" : "float",
+                                                                                             "attributes" : {
+                                                                                                             "units" : {
+                                                                                                                        "variable" : "{0}.sample.thickness_unit = \"{1}\"",
+                                                                                                                        "storeas" : "content"
+                                                                                                                        }
+                                                                                                             },
+                                                                                             },
+                                                                              "transmission" : {
+                                                                                                "variable" : "{0}.sample.transmission = {1}",
+                                                                                                "storeas" : "float",
+                                                                                                }, 
+                                                                              "temperature" : {
+                                                                                               "variable" : "{0}.sample.temperature = {1}",
+                                                                                               "unit" : "sample.temperature_unit",
+                                                                                               "storeas" : "float",
+                                                                                               "attributes" : {
+                                                                                                               "units" : {
+                                                                                                                          "variable" : "{0}.sample.temperature_unit = \"{1}\"",
+                                                                                                                          "storeas" : "content"
+                                                                                                                          }
+                                                                                                               },
+                                                                                               }, 
+                                                                              "position" : {
+                                                                                            "children" : {
+                                                                                                          "x" : {
+                                                                                                                 "variable" : "{0}.sample.position.x = {1}",
+                                                                                                                 "unit" : "sample.position_unit",
+                                                                                                                 "storeas" : "float",
+                                                                                                                 "attributes" : {
+                                                                                                                                 "units" : {
+                                                                                                                                            "variable" : "{0}.sample.position_unit = \"{1}\"",
+                                                                                                                                            "storeas" : "content"
+                                                                                                                                            }
+                                                                                                                                 }
+                                                                                                                 },
+                                                                                                          "y" : {
+                                                                                                                 "variable" : "{0}.sample.position.y = {1}",
+                                                                                                                 "unit" : "sample.position_unit",
+                                                                                                                 "attributes" : {
+                                                                                                                                 "units" : {
+                                                                                                                                            "variable" : "{0}.sample.position_unit = \"{1}\"",
+                                                                                                                                            "storeas" : "content"
+                                                                                                                                            }
+                                                                                                                                 }
+                                                                                                                 },
+                                                                                                          "z" : {
+                                                                                                                 "variable" : "{0}.sample.position.z = {1}",
+                                                                                                                 "unit" : "sample.position_unit",
+                                                                                                                 "attributes" : {
+                                                                                                                                 "units" : {
+                                                                                                                                            "variable" : "{0}.sample.position_unit = \"{1}\"",
+                                                                                                                                            "storeas" : "content"
+                                                                                                                                            }
+                                                                                                                                 }
+                                                                                                                 },
+                                                                                                          },
+                                                                                            },
+                                                                              "orientation" : {
+                                                                                               "children" : {
+                                                                                                             "roll" : {
+                                                                                                                       "variable" : "{0}.sample.orientation.x = {1}",
+                                                                                                                       "unit" : "sample.orientation_unit",
+                                                                                                                       "storeas" : "float",
+                                                                                                                       "attributes" : {
+                                                                                                                                       "units" : {
+                                                                                                                                                  "variable" : "{0}.sample.orientation_unit = \"{1}\"",
+                                                                                                                                                  "storeas" : "content"
+                                                                                                                                                  }
+                                                                                                                                       }
+                                                                                                                       },
+                                                                                                             "pitch" : {
+                                                                                                                       "variable" : "{0}.sample.orientation.y = {1}",
+                                                                                                                       "unit" : "sample.orientation_unit",
+                                                                                                                       "storeas" : "float",
+                                                                                                                       "attributes" : {
+                                                                                                                                       "units" : {
+                                                                                                                                                  "variable" : "{0}.sample.orientation_unit = \"{1}\"",
+                                                                                                                                                  "storeas" : "content"
+                                                                                                                                                  }
+                                                                                                                                       }
+                                                                                                                       },
+                                                                                                             "yaw" : {
+                                                                                                                       "variable" : "{0}.sample.orientation.z = {1}",
+                                                                                                                       "unit" : "sample.orientation_unit",
+                                                                                                                       "storeas" : "float",
+                                                                                                                       "attributes" : {
+                                                                                                                                       "units" : {
+                                                                                                                                                  "variable" : "{0}.sample.orientation_unit = \"{1}\"",
+                                                                                                                                                  "storeas" : "content"
+                                                                                                                                                  }
+                                                                                                                                       }
+                                                                                                                       },
+                                                                                                             },
+                                                                                               },
+                                                                              "details" : {"variable" : "{0}.sample.details.append(\"{1}\")"},
+                                                                              "<any>" : {"variable" : "{0}.meta_data[\"{2}\"] = \"{1}\""}
+                                                                              },
+                                                                },
+                                                 "SASinstrument" : {
+                                                                    "children" : {
+                                                                                  "name" : {"variable" : "{0}.instrument = \"{1}\""},
+                                                                                  "SASsource" : {
+                                                                                                 "attributes" : {"name" : {"variable" : "{0}.source.name = \"{1}\""}},
+                                                                                                 "children" : {
+                                                                                                               "radiation" : {"variable" : "{0}.source.radiation = \"{1}\""},
+                                                                                                               "beam_size" : {
+                                                                                                                              "attributes" : {"name" : {"variable" : "{0}.source.beam_size_name = \"{1}\""}},
+                                                                                                                              "children" : {
+                                                                                                                                            "x" : {
+                                                                                                                                                   "variable" : "{0}.source.beam_size.x = {1}",
+                                                                                                                                                   "unit" : "source.beam_size_unit",
+                                                                                                                                                   "storeas" : "float",
+                                                                                                                                                   "attributes" : {
+                                                                                                                                                                   "unit" : "{0}.source.beam_size_unit = \"{1}\"",
+                                                                                                                                                                   "storeas" : "content"
+                                                                                                                                                                   }
+                                                                                                                                                   },
+                                                                                                                                            "y" : {
+                                                                                                                                                   "variable" : "{0}.source.beam_size.y = {1}",
+                                                                                                                                                   "unit" : "source.beam_size_unit",
+                                                                                                                                                   "storeas" : "float",
+                                                                                                                                                   "attributes" : {
+                                                                                                                                                                   "unit" : "{0}.source.beam_size_unit = \"{1}\"",
+                                                                                                                                                                   "storeas" : "content"
+                                                                                                                                                                   }
+                                                                                                                                                   },
+                                                                                                                                            "z" : {
+                                                                                                                                                   "variable" : "{0}.source.beam_size.z = {1}",
+                                                                                                                                                   "unit" : "source.beam_size_unit",
+                                                                                                                                                   "storeas" : "float",
+                                                                                                                                                   "attributes" : {
+                                                                                                                                                                   "unit" : "{0}.source.beam_size_unit = \"{1}\"",
+                                                                                                                                                                   "storeas" : "content"
+                                                                                                                                                                   }
+                                                                                                                                                   },
+                                                                                                                                            }
+                                                                                                                              },
+                                                                                                               "beam_shape" : {"variable" : "{0}.source.beam_shape = \"{1}\""},
+                                                                                                               "wavelength" : {
+                                                                                                                               "variable" : "{0}.source.wavelength = {1}",
+                                                                                                                               "unit" : "source.wavelength_unit",
+                                                                                                                               "storeas" : "float",
+                                                                                                                               "attributes" : {
+                                                                                                                                               "unit" : {
+                                                                                                                                                         "variable" : "{0}.source.wavelength_unit = \"{1}\"",
+                                                                                                                                                         "storeas" : "content"
+                                                                                                                                                         },
+                                                                                                                                               }
+                                                                                                                               },
+                                                                                                               "wavelength_min" : {
+                                                                                                                                  "variable" : "{0}.source.wavelength_min = {1}",
+                                                                                                                                  "unit" : "source.wavelength_min_unit",
+                                                                                                                                  "storeas" : "float",
+                                                                                                                                  "attributes" : {
+                                                                                                                                                  "unit" : {
+                                                                                                                                                            "variable" : "{0}.source.wavelength_min_unit = \"{1}\"",  
+                                                                                                                                                            "storeas" : "content"
+                                                                                                                                                            },
+                                                                                                                                                  }
+                                                                                                                                  },
+                                                                                                               "wavelength_max" : {
+                                                                                                                                   "variable" : "{0}.source.wavelength_max = {1}",
+                                                                                                                                   "unit" : "source.wavelength_max_unit",
+                                                                                                                                   "storeas" : "float",
+                                                                                                                                   "attributes" : {
+                                                                                                                                                   "unit" : {
+                                                                                                                                                             "variable" : "{0}.source.wavelength_max_unit = \"{1}\"",
+                                                                                                                                                             "storeas" : "content"
+                                                                                                                                                             },
+                                                                                                                                                   }
+                                                                                                                                   },
+                                                                                                               "wavelength_spread" : {
+                                                                                                                                      "variable" : "{0}.source.wavelength_spread = {1}",
+                                                                                                                                      "unit" : "source.wavelength_spread_unit",
+                                                                                                                                      "storeas" : "float",
+                                                                                                                                      "attributes" : {
+                                                                                                                                                      "unit" : {"variable" : "{0}.source.wavelength_spread_unit = \"{1}\""},
+                                                                                                                                                      "storeas" : "content"
+                                                                                                                                                      }
+                                                                                                                                      },
+                                                                                                               },
+                                                                                                 },
+                                                                                  "SAScollimation" : {
+                                                                                                      "attributes" : {"name" : {"variable" : "{0}.name = \"{1}\""}},
+                                                                                                      "variable" : None,
+                                                                                                      "children" : {
+                                                                                                                    "length" : {
+                                                                                                                                "variable" : "{0}.length = {1}",
+                                                                                                                                "unit" : "length_unit",
+                                                                                                                                "storeas" : "float",
+                                                                                                                                "attributes" : {
+                                                                                                                                                "storeas" : "content",
+                                                                                                                                                "unit" : {"variable" : "{0}.length_unit = \"{1}\""}
+                                                                                                                                                },
+                                                                                                                                },
+                                                                                                                    "aperture" : {
+                                                                                                                                  "attributes" : {
+                                                                                                                                                  "name" : {"variable" : "{0}.name = \"{1}\""},
+                                                                                                                                                  "type" : {"variable" : "{0}.type = \"{1}\""},
+                                                                                                                                                  },
+                                                                                                                                  "children" : {
+                                                                                                                                                "size" : {
+                                                                                                                                                          "attributes" : {"unit" : {"variable" : "{0}.size_unit = \"{1}\""}},
+                                                                                                                                                          "children" : {
+                                                                                                                                                                        "storeas" : "float",
+                                                                                                                                                                        "x" : {
+                                                                                                                                                                               "variable" : "{0}.size.x = {1}",
+                                                                                                                                                                               "unit" : "size_unit",
+                                                                                                                                                                               "storeas" : "float",
+                                                                                                                                                                               "attributes" : {
+                                                                                                                                                                                               "unit" : {
+                                                                                                                                                                                                         "variable" : "{0}.size_unit = \"{1}\"",
+                                                                                                                                                                                                         "storeas" : "content"
+                                                                                                                                                                                                         },                                    }
+                                                                                                                                                                               },
+                                                                                                                                                                        "y" : {
+                                                                                                                                                                               "variable" : "{0}.size.y = {1}",
+                                                                                                                                                                               "unit" : "size_unit",
+                                                                                                                                                                               "storeas" : "float",
+                                                                                                                                                                               "attributes" : {
+                                                                                                                                                                                               "unit" : {
+                                                                                                                                                                                                         "variable" : "{0}.size_unit = \"{1}\"",
+                                                                                                                                                                                                         "storeas" : "content"
+                                                                                                                                                                                                         },
+                                                                                                                                                                                               }
+                                                                                                                                                                               },
+                                                                                                                                                                        "z" : {
+                                                                                                                                                                               "variable" : "{0}.size.z = {1}",
+                                                                                                                                                                               "unit" : "size_unit",
+                                                                                                                                                                               "storeas" : "float",
+                                                                                                                                                                               "attributes" : {
+                                                                                                                                                                                               "unit" : {
+                                                                                                                                                                                                         "variable" : "{0}.size_unit = \"{1}\"",
+                                                                                                                                                                                                         "storeas" : "content"
+                                                                                                                                                                                                         },
+                                                                                                                                                                                              }
+                                                                                                                                                                               },
+                                                                                                                                                                        }
+                                                                                                                                                          },
+                                                                                                                                                "distance" : {"attributes" : {"unit" : {"variable" : "{0}.distance_unit = \"{1}\""}},
+                                                                                                                                                              "variable" : "{0}.distance = {1}",
+                                                                                                                                                              "unit" : "length_unit",
+                                                                                                                                                              }
+                                                                                                                                                }
+                                                                                                                                  },
+                                                                                                                    },
+                                                                                                      },
+                                                                                  "SASdetector" : {
+                                                                                                   "storeas" : "float",
+                                                                                                   "variable" : None,
+                                                                                                   "attributes" : {
+                                                                                                                   "name" : {
+                                                                                                                             "storeas" : "content",
+                                                                                                                             "variable" : "{0}.name = \"{1}\"",
+                                                                                                                             }
+                                                                                                                   },
+                                                                                                   "children" : {
+                                                                                                                 "name" : {
+                                                                                                                           "storeas" : "content",
+                                                                                                                           "variable" : "{0}.name = \"{1}\"",
+                                                                                                                           },
+                                                                                                                 "SDD" : {
+                                                                                                                          "variable" : "{0}.distance = {1}",
+                                                                                                                          "unit" : "distance_unit",
+                                                                                                                          "attributes" : {
+                                                                                                                                          "unit" : {
+                                                                                                                                                    "variable" : "{0}.distance_unit = \"{1}\"",
+                                                                                                                                                    "storeas" : "content"
+                                                                                                                                                    }
+                                                                                                                                          },
+                                                                                                                          },
+                                                                                                                 "offset" : {
+                                                                                                                             "children" : {
+                                                                                                                                           "x" : {
+                                                                                                                                                  "variable" : "{0}.offset.x = {1}",
+                                                                                                                                                  "unit" : "offset_unit",
+                                                                                                                                                  "attributes" : {
+                                                                                                                                                                  "unit" : {
+                                                                                                                                                                            "variable" : "{0}.offset_unit = \"{1}\"",
+                                                                                                                                                                            "storeas" : "content"
+                                                                                                                                                                            },
+                                                                                                                                                                  }
+                                                                                                                                                  },
+                                                                                                                                           "y" : {
+                                                                                                                                                  "variable" : "{0}.offset.y = {1}",
+                                                                                                                                                  "unit" : "offset_unit",
+                                                                                                                                                  "attributes" : {
+                                                                                                                                                                  "unit" : {
+                                                                                                                                                                            "variable" : "{0}.offset_unit = \"{1}\"",
+                                                                                                                                                                            "storeas" : "content"
+                                                                                                                                                                            },
+                                                                                                                                                                  }
+                                                                                                                                                  },
+                                                                                                                                           "z" : {
+                                                                                                                                                  "variable" : "{0}.offset.z = {1}",
+                                                                                                                                                  "unit" : "offset_unit",
+                                                                                                                                                  "attributes" : {
+                                                                                                                                                                  "unit" : {
+                                                                                                                                                                            "variable" : "{0}.offset_unit = \"{1}\"",
+                                                                                                                                                                            "storeas" : "content"
+                                                                                                                                                                            },
+                                                                                                                                                                  }
+                                                                                                                                                  },
+                                                                                                                                           }
+                                                                                                                             },
+                                                                                                                 "orientation" : {
+                                                                                                                                  "children" : {
+                                                                                                                                                "roll" : {
+                                                                                                                                                          "variable" : "{0}.orientation.x = {1}",
+                                                                                                                                                          "unit" : "orientation_unit",
+                                                                                                                                                          "attributes" : {
+                                                                                                                                                                          "unit" : "{0}.orientation_unit = \"{1}\"",
+                                                                                                                                                                          "storeas" : "content"
+                                                                                                                                                                          }
+                                                                                                                                                          },
+                                                                                                                                                "pitch" : {
+                                                                                                                                                           "variable" : "{0}.orientation.y = {1}",
+                                                                                                                                                           "unit" : "orientation_unit",
+                                                                                                                                                           "attributes" : {
+                                                                                                                                                                           "unit" : "{0}.orientation_unit = \"{1}\"",
+                                                                                                                                                                           "storeas" : "content"
+                                                                                                                                                                           }
+                                                                                                                                                           },
+                                                                                                                                                "yaw" : {
+                                                                                                                                                         "variable" : "{0}.orientation.z = {1}",
+                                                                                                                                                         "unit" : "orientation_unit",
+                                                                                                                                                         "attributes" : {
+                                                                                                                                                                         "unit" : "{0}.orientation_unit = \"{1}\"",
+                                                                                                                                                                         "storeas" : "content"
+                                                                                                                                                                         }
+                                                                                                                                                         },
+                                                                                                                                                }
+                                                                                                                                  },
+                                                                                                                 "beam_center" : {
+                                                                                                                                  "children" : {
+                                                                                                                                                "x" : {
+                                                                                                                                                       "variable" : "{0}.beam_center.x = {1}",
+                                                                                                                                                       "unit" : "beam_center_unit",
+                                                                                                                                                       "attributes" : {
+                                                                                                                                                                       "unit" : "{0}.beam_center_unit = \"{1}\"",
+                                                                                                                                                                       "storeas" : "content"
+                                                                                                                                                                       }
+                                                                                                                                                  },
+                                                                                                                                                "y" : {
+                                                                                                                                                       "variable" : "{0}.beam_center.y = {1}",
+                                                                                                                                                       "unit" : "beam_center_unit",
+                                                                                                                                                       "attributes" : {
+                                                                                                                                                                       "unit" : "{0}.beam_center_unit = \"{1}\"",
+                                                                                                                                                                       "storeas" : "content"
+                                                                                                                                                                       }
+                                                                                                                                                       },
+                                                                                                                                                "z" : {
+                                                                                                                                                       "variable" : "{0}.beam_center.z = {1}",
+                                                                                                                                                       "unit" : "beam_center_unit",
+                                                                                                                                                       "attributes" : {
+                                                                                                                                                                       "unit" : "{0}.beam_center_unit = \"{1}\"",
+                                                                                                                                                                       "storeas" : "content"
+                                                                                                                                                                       }
+                                                                                                                                                       },
+                                                                                                                                                }
+                                                                                                                                  },
+                                                                                                                 "pixel_size" : {
+                                                                                                                                 "children" : {
+                                                                                                                                               "x" : {
+                                                                                                                                                      "variable" : "{0}.pixel_size.x = {1}",
+                                                                                                                                                      "unit" : "pixel_size_unit",
+                                                                                                                                                      "attributes" : {
+                                                                                                                                                                      "unit" : "{0}.pixel_size_unit = \"{1}\"",
+                                                                                                                                                                      "storeas" : "content"
+                                                                                                                                                                      }
+                                                                                                                                                      },
+                                                                                                                                                "y" : {
+                                                                                                                                                       "variable" : "{0}.pixel_size.y = {1}",
+                                                                                                                                                       "unit" : "pixel_size_unit",
+                                                                                                                                                      "attributes" : {
+                                                                                                                                                                       "unit" : "{0}.pixel_size_unit = \"{1}\"",
+                                                                                                                                                                       "storeas" : "content"
+                                                                                                                                                                       }
+                                                                                                                                                       },
+                                                                                                                                                "z" : {
+                                                                                                                                                       "variable" : "{0}.pixel_size.z = {1}",
+                                                                                                                                                       "unit" : "pixel_size_unit",
+                                                                                                                                                      "attributes" : {
+                                                                                                                                                                       "unit" : "{0}.pixel_size_unit = \"{1}\"",
+                                                                                                                                                                       "storeas" : "content"
+                                                                                                                                                                       }
+                                                                                                                                                       },
+                                                                                                                                                }
+                                                                                                                                  },
+                                                                                                                 "slit_length" : {
+                                                                                                                                  "variable" : "{0}.slit_length = {1}",
+                                                                                                                                  "unit" : "slit_length_unit",
+                                                                                                                                  "attributes" : {
+                                                                                                                                                  "unit" : {
+                                                                                                                                                            "variable" : "{0}.slit_length_unit = \"{1}\"",
+                                                                                                                                                            "storeas" : "content"
+                                                                                                                                                            }
+                                                                                                                                                  }
+                                                                                                                                  }
+                                                                                                                  },
+                                                                                                   },
+                                                                                   },
+                                                                    },
+                                                 "SASprocess" : {
+                                                                 "variable" : " ",
+                                                                 "children" : {
+                                                                               "name" : {"variable" : "{0}.name = \"{1}\""},
+                                                                               "date" : {"variable" : "{0}.date = \"{1}\""},
+                                                                               "description" : {"variable" : "{0}.description = \"{1}\""},
+                                                                               "term" : {
+                                                                                         "variable" : None,
+                                                                                         "attributes" : {
+                                                                                                         "unit" : {"variable" : None},
+                                                                                                         "name" : {"variable" : None}
+                                                                                                         }
+                                                                                         },
+                                                                               "SASprocessnote" : {"children" : {"<any>" : {"variable" : "{0}.notes.append(\"{2}: {1}\")"}}},
+                                                                               "<any>" : {"variable" : "{0}.notes.append(\"{2}: {1}\")",}
+                                                                               },
+                                                                 },
+                                                 "SASnote" : {"variable" : "{0}.notes.append(\"{1}\")"},
+                                                 "<any>" : {"variable" : "{0}.meta_data[\"{2}\" = \"{1}\""},
+                                                 }
+                                   }
+                     }
Index: src/sans/dataloader/readers/cansas_reader.py
===================================================================
--- src/sans/dataloader/readers/cansas_reader.py	(revision ffbe487235261db53473e1fe28d7b1953c7e31dd)
+++ src/sans/dataloader/readers/cansas_reader.py	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -1,4 +1,4 @@
 """
-    CanSAS data reader
+    CanSAS data reader - new recursive cansasVersion.
 """
 ############################################################################
@@ -13,18 +13,4 @@
 #############################################################################
 
-# Known issue: reader not compatible with multiple SASdata entries
-# within a single SASentry. Will raise a runtime error.
-
-#TODO: check that all vectors are written only if they have at 
-#    least one non-empty value
-#TODO: Writing only allows one SASentry per file.
-#     Would be best to allow multiple entries.
-#TODO: Store error list
-#TODO: Allow for additional meta data for each section
-#TODO: Notes need to be implemented. They can be any XML 
-#    structure in version 1.0
-#      Process notes have the same problem.
-#TODO: Unit conversion is not complete (temperature units are missing)
-
 import logging
 import numpy
@@ -36,6 +22,8 @@
 from sans.dataloader.data_info import Process
 from sans.dataloader.data_info import Aperture
-from lxml import etree
+import xml_reader
 import xml.dom.minidom
+from cansas_constants import cansasConstants
+
 _ZERO = 1e-16
 HAS_CONVERTER = True
@@ -44,6 +32,7 @@
 except:
     HAS_CONVERTER = False
-
-CANSAS_NS = "cansas1d/1.0"
+    
+CANSAS_FORMAT = cansasConstants.CANSAS_FORMAT
+CANSAS_NS = cansasConstants.CANSAS_NS
 ALLOW_ALL = True
 
@@ -67,5 +56,5 @@
         return True
     return False
-
+                
 
 def get_content(location, node):
@@ -109,498 +98,334 @@
     return value, attr
 
-            
-class Reader:
+
+
+class CANSASError(Exception):
+    """Base class all CANSAS reader exceptions are derived"""
+    pass
+
+class NotCANSASFileError(CANSASError):
+    def __init__(self):
+        self.value = "This is not a proper CanSAS file."
+    def __str__(self):
+        return repr(self.value)
+
+class Reader():
     """
     Class to load cansas 1D XML files
     
     :Dependencies:
-        The CanSas reader requires PyXML 0.8.4 or later.
-    """
-    ## CanSAS version
-    version = '1.0'
-    ## File type
-    type_name = "CanSAS 1D"
-    ## Wildcards
-    type = ["CanSAS 1D files (*.xml)|*.xml",
-                        "CanSAS 1D AVE files (*.AVEx)|*.AVEx",
-                         "CanSAS 1D AVE files (*.ABSx)|*.ABSx"]
-
-    ## List of allowed extensions
-    ext = ['.xml', '.XML', '.avex', '.AVEx', '.absx', 'ABSx']
+        The CanSAS reader requires PyXML 0.8.4 or later.
+    """
+    ##CanSAS version - defaults to version 1.0
+    cansasVersion = "1.0"
+    ##Data reader
+    reader = xml_reader.XMLreader()
+    errors = []
     
     def __init__(self):
         ## List of errors
         self.errors = []
-    
-    def read(self, path):
-        """
-        Load data file
-        
-        :param path: file path
-        
-        :return: Data1D object if a single SASentry was found, 
-                    or a list of Data1D objects if multiple entries were found,
-                    or None of nothing was found
+        
+    def isCansas(self):
+        """
+        Checks to see if the xml file is a CanSAS file
+        """
+        if self.reader.validateXML():
+            xmlns = self.reader.xmlroot.keys()
+            if (CANSAS_NS.get(self.cansasVersion).get("ns") == self.reader.xmlroot.get(xmlns[1]).rsplit(" ")[0]):
+                return True
+        return False
+    
+    def read(self, xml):
+        """
+        Validate and read in an xml file in the canSAS format.
+        
+        :param xml: A canSAS file path in proper XML format
+        """
+        # X - Q value; Y - Intensity (Abs)
+        x = numpy.empty(0)
+        y = numpy.empty(0)
+        dx = numpy.empty(0)
+        dy = numpy.empty(0)
+        dxl = numpy.empty(0)
+        dxw = numpy.empty(0)
+        
+        # output - Final list of Data1D objects
+        output = []
+        # ns - Namespace hierarchy for current xml object
+        ns = []
+        
+        try:
+            # Load in the xml file and get the cansas version from the header
+            self.reader.setXMLFile(xml)
+            root = self.reader.xmlroot
+            self.cansasVersion = root.get("version")
+            # Generic values for the cansas file based on the version
+            cansas_defaults = CANSAS_NS.get(self.cansasVersion)
+        
+            # Link a schema to the XML file.
+            basename = os.path.basename(xml)
+            base_name = xml_reader.__file__
+            base = base_name.split("\\sans\\")[0]
+            schema_path = "{0}\\sans\\dataloader\\readers\\schema\\{1}".format(base, cansas_defaults.get("schema")).replace("\\", "/")
+            self.reader.setSchema(schema_path)
+        
+            # Try to load the file, but raise an error if unable to.
+            # Check the file matches the XML schema
+            if self.isCansas():
+                # Get each SASentry from the XML file and add it to a list.
+                entry_list = root.xpath('/ns:SASroot/ns:SASentry',
+                                             namespaces={'ns': cansas_defaults.get("ns")})
+                ns.append("SASentry")
+                
+                # If there are multiple files, modify the name for each is unique
+                multipleFiles = len(entry_list) - 1
+                n = 0
+                name = basename
+                # Parse each SASentry item
+                for entry in entry_list:
                     
-        :raise RuntimeError: when the file can't be opened
-        :raise ValueError: when the length of the data vectors are inconsistent
-        """
-        output = []
-        if os.path.isfile(path):
-            basename = os.path.basename(path)
-            root, extension = os.path.splitext(basename)
-            if ALLOW_ALL or extension.lower() in self.ext:
-                try:
-                    tree = etree.parse(path, parser=etree.ETCompatXMLParser())
-                    # Check the format version number
-                    # Specifying the namespace will take care of the file
-                    # format version
-                    root = tree.getroot()
+                    # Define a new Data1D object with zeroes for x and y
+                    data1D = Data1D(x,y,dx,dy)
+                    data1D.dxl = dxl
+                    data1D.dxw = dxw
                     
-                    entry_list = root.xpath('/ns:SASroot/ns:SASentry',
-                                             namespaces={'ns': CANSAS_NS})
+                    # If more than one SASentry, number each in order
+                    if multipleFiles:
+                        name += "_{0}".format(n)
+                        n += 1
                     
-                    for entry in entry_list:
-                        self.errors = []
-                        sas_entry = self._parse_entry(entry)
-                        sas_entry.filename = basename
-                        
-                        # Store loading process information
-                        sas_entry.errors = self.errors
-                        sas_entry.meta_data['loader'] = self.type_name
-                        output.append(sas_entry)
-                except:
-                    raise RuntimeError, "%s cannot be read \n" % path
-        else:
-            raise RuntimeError, "%s is not a file" % path
-        # Return output consistent with the loader's api
-        if len(output) == 0:
-            #cannot return none when it cannot read
-            #return None
-            raise RuntimeError, "%s cannot be read \n" % path
-        elif len(output) == 1:
-            return output[0]
-        else:
-            return output
-                
-    def _parse_entry(self, dom):
-        """
-        Parse a SASentry
-        
-        :param node: SASentry node
-        
-        :return: Data1D object
-        """
-        x = numpy.zeros(0)
-        y = numpy.zeros(0)
-        
-        data_info = Data1D(x, y)
-        
-        # Look up title
-        self._store_content('ns:Title', dom, 'title', data_info)
-        
-        # Look up run number
-        nodes = dom.xpath('ns:Run', namespaces={'ns': CANSAS_NS})
-        for item in nodes:
-            if item.text is not None:
-                value = item.text.strip()
-                if len(value) > 0:
-                    data_info.run.append(value)
-                    if item.get('name') is not None:
-                        data_info.run_name[value] = item.get('name')
-                           
-        # Look up instrument name
-        self._store_content('ns:SASinstrument/ns:name', dom, 'instrument',
-                             data_info)
-
-        # Notes
-        note_list = dom.xpath('ns:SASnote', namespaces={'ns': CANSAS_NS})
-        for note in note_list:
+                    # Set the Data1D name and then parse the entry. The entry is appended to a list of entry values
+                    data1D.filename = name
+                    data1D.meta_data["loader"] = "CanSAS 1D"
+                    return_value, extras = self._parse_entry(entry, ns, data1D)
+                    del extras[:]
+                    
+                    #Final cleanup - Remove empty nodes, verify array sizes are correct
+                    return_value.errors = self.errors
+                    del self.errors[:]
+                    numpy.trim_zeros(return_value.x)
+                    numpy.trim_zeros(return_value.y)
+                    numpy.trim_zeros(return_value.dy)
+                    size_dx = return_value.dx.size
+                    size_dxl = return_value.dxl.size
+                    size_dxw = return_value.dxw.size
+                    if size_dxl == 0 and size_dxw == 0:
+                        return_value.dxl = None
+                        return_value.dxw = None
+                        numpy.trim_zeros(return_value.dx)
+                    elif size_dx == 0:
+                        return_value.dx = None
+                        size_dx = size_dxl
+                        numpy.trim_zeros(return_value.dxl)
+                        numpy.trim_zeros(return_value.dxw)
+                    
+                    output.append(return_value)
+            else:
+                # If the file does not match the schema, raise this error
+                raise RuntimeError, "%s cannot be read \n" % xml
+        # If an exception occurs while loading the file, give a descriptive output.
+        except Exception:
+            raise RuntimeError, "%s cannot be read \n" % xml
+            
+        # Return a list of parsed entries that dataloader can manage
+        return output
+    
+    def _create_unique_key(self, dictionary, name, i):
+        if dictionary.get(name) is not None:
+            i += 1
+            name = name.split("_")[0]
+            name += "_{0}".format(i)
+            name = self._create_unique_key(dictionary, name, i)
+        return name
+    
+    def _iterate_namespace(self, ns):
+        # The current level to look through in cansas_constants.
+        current_level = CANSAS_FORMAT.get("SASentry")
+        # Defaults for variable and datatype
+        ns_variable = "{0}.meta_data[\"{2}\"] = \"{1}\""
+        ns_datatype = "content"
+        ns_optional = True
+        for name in ns:
+            if name != "SASentry":
+                current_level = current_level.get("children").get(name, "")
+                if current_level == "":
+                    current_level = current_level.get("<any>", "")
+                cl_variable = current_level.get("variable", "")
+                cl_datatype = current_level.get("storeas", "")
+                cl_units_optional = current_level.get("units_required", "")
+                # Where are how to store the variable for the given namespace
+                # The CANSAS_CONSTANTS tree is hierarchical, so is no value, inherit
+                ns_variable = cl_variable if cl_variable != "" else ns_variable
+                ns_datatype = cl_datatype if cl_datatype != "" else ns_datatype
+                ns_optional = cl_units_optional if cl_units_optional != ns_optional else ns_optional
+        return current_level, ns_variable, ns_datatype, ns_optional
+    
+    def _unit_conversion(self, new_current_level, attr, data1D, node_value, optional = True):
+        value_unit = ''
+        if 'unit' in attr and 'unit' in new_current_level:
             try:
-                if note.text is not None:
-                    note_value = note.text.strip()
-                    if len(note_value) > 0:
-                        data_info.notes.append(note_value)
-            except:
-                err_mess = "cansas_reader.read: error processing"
-                err_mess += " entry notes\n  %s" % sys.exc_value
-                self.errors.append(err_mess)
-                logging.error(err_mess)
-        
-        # Sample info ###################
-        entry = get_content('ns:SASsample', dom)
-        if entry is not None:
-            data_info.sample.name = entry.get('name')
-            
-        self._store_content('ns:SASsample/ns:ID',
-                     dom, 'ID', data_info.sample)
-        self._store_float('ns:SASsample/ns:thickness',
-                     dom, 'thickness', data_info.sample)
-        self._store_float('ns:SASsample/ns:transmission',
-                     dom, 'transmission', data_info.sample)
-        self._store_float('ns:SASsample/ns:temperature',
-                     dom, 'temperature', data_info.sample)
-        
-        nodes = dom.xpath('ns:SASsample/ns:details',
-                          namespaces={'ns': CANSAS_NS})
-        for item in nodes:
+                if isinstance(node_value, float) is False:
+                    exec("node_value = float({0})".format(node_value))
+                default_unit = None
+                unitname = new_current_level.get("unit")
+                exec "default_unit = data1D.{0}.lower()".format(unitname)
+                local_unit = attr['unit'].lower()
+                if local_unit != default_unit:
+                    if HAS_CONVERTER == True:
+                        try:
+                            data_conv_q = Converter(attr['unit'])
+                            value_unit = default_unit
+                            exec "node_value = data_conv_q(node_value, units=data1D.{0})".format(unitname)
+                        except:
+                            msg = "CanSAS reader: could not convert "
+                            msg += "Q unit [%s]; " % attr['unit'],
+                            exec "msg += \"expecting [%s]\n  %s\" % (data1D.{0}, sys.exc_info()[1])".format(unitname)
+                            raise ValueError, msg
+                    else:
+                        value_unit = local_unit
+                        err_mess = "CanSAS reader: unrecognized %s unit [%s];"\
+                        % (node_value, default_unit)
+                        err_mess += " expecting [%s]" % local_unit
+                        self.errors.append(err_mess)
+                        if optional:
+                            logging.info(err_mess)
+                        else:
+                            raise ValueError, err_mess
+            except Exception as e:
+                msg = "CanSAS reader: could not convert "
+                msg += "Q unit [%s]; " % attr['unit'],
+                exec "msg += \"expecting [%s]\n  %s\" % (data1D.{0}, sys.exc_info()[1])".format(unitname)
+                self.errors.append(msg)
+                raise ValueError, msg
+        elif 'unit' in attr:
+            value_unit = attr['unit']
+        node_value = "float({0})".format(node_value)
+        return node_value, value_unit
+    
+    def _parse_entry(self, dom, ns, data1D, extras = []):
+        """
+        Parse a SASEntry - new recursive method for parsing the dom of
+            the CanSAS data format. This will allow multiple data files
+            and extra nodes to be read in simultaneously.
+        
+        :param dom: dom object with a namespace base of ns
+        :param ns: A list of element names that lead up to the dom object
+        :param data1D: The data1D object that will be modified
+        """
+         
+        # A portion of every namespace entry
+        base_ns = "{0}{1}{2}".format("{", CANSAS_NS.get(self.cansasVersion).get("ns"), "}")
+        unit = ''
+        
+        # Go through each child in the parent element
+        for node in dom:
             try:
-                if item.text is not None:
-                    detail_value = item.text.strip()
-                    if len(detail_value) > 0:
-                        data_info.sample.details.append(detail_value)
-            except:
-                err_mess = "cansas_reader.read: error processing "
-                err_mess += " sample details\n  %s" % sys.exc_value
-                self.errors.append(err_mess)
-                logging.error(err_mess)
-        
-        # Position (as a vector)
-        self._store_float('ns:SASsample/ns:position/ns:x',
-                     dom, 'position.x', data_info.sample)
-        self._store_float('ns:SASsample/ns:position/ns:y',
-                     dom, 'position.y', data_info.sample)
-        self._store_float('ns:SASsample/ns:position/ns:z',
-                     dom, 'position.z', data_info.sample)
-        
-        # Orientation (as a vector)
-        self._store_float('ns:SASsample/ns:orientation/ns:roll',
-                     dom, 'orientation.x', data_info.sample)
-        self._store_float('ns:SASsample/ns:orientation/ns:pitch',
-                     dom, 'orientation.y', data_info.sample)
-        self._store_float('ns:SASsample/ns:orientation/ns:yaw',
-                     dom, 'orientation.z', data_info.sample)
-       
-        # Source info ###################
-        entry = get_content('ns:SASinstrument/ns:SASsource', dom)
-        if entry is not None:
-            data_info.source.name = entry.get('name')
-        
-        self._store_content('ns:SASinstrument/ns:SASsource/ns:radiation',
-                     dom, 'radiation', data_info.source)
-        self._store_content('ns:SASinstrument/ns:SASsource/ns:beam_shape',
-                     dom, 'beam_shape', data_info.source)
-        self._store_float('ns:SASinstrument/ns:SASsource/ns:wavelength',
-                     dom, 'wavelength', data_info.source)
-        self._store_float('ns:SASinstrument/ns:SASsource/ns:wavelength_min',
-                     dom, 'wavelength_min', data_info.source)
-        self._store_float('ns:SASinstrument/ns:SASsource/ns:wavelength_max',
-                     dom, 'wavelength_max', data_info.source)
-        self._store_float('ns:SASinstrument/ns:SASsource/ns:wavelength_spread',
-                     dom, 'wavelength_spread', data_info.source)
-        
-        # Beam size (as a vector)   
-        entry = get_content('ns:SASinstrument/ns:SASsource/ns:beam_size', dom)
-        if entry is not None:
-            data_info.source.beam_size_name = entry.get('name')
-            
-        self._store_float('ns:SASinstrument/ns:SASsource/ns:beam_size/ns:x',
-                     dom, 'beam_size.x', data_info.source)
-        self._store_float('ns:SASinstrument/ns:SASsource/ns:beam_size/ns:y',
-                     dom, 'beam_size.y', data_info.source)
-        self._store_float('ns:SASinstrument/ns:SASsource/ns:beam_size/ns:z',
-                     dom, 'beam_size.z', data_info.source)
-        
-        # Collimation info ###################
-        nodes = dom.xpath('ns:SASinstrument/ns:SAScollimation',
-                          namespaces={'ns': CANSAS_NS})
-        for item in nodes:
-            collim = Collimation()
-            if item.get('name') is not None:
-                collim.name = item.get('name')
-            self._store_float('ns:length', item, 'length', collim)
-            
-            # Look for apertures
-            apert_list = item.xpath('ns:aperture', namespaces={'ns': CANSAS_NS})
-            for apert in apert_list:
-                aperture = Aperture()
-                
-                # Get the name and type of the aperture
-                aperture.name = apert.get('name')
-                aperture.type = apert.get('type')
+                # Get the element name and set the current ns level
+                tagname = node.tag.replace(base_ns, "")
+                tagname_original = tagname
+                ns.append(tagname)
+                attr = node.attrib
+                
+                # Look for special cases
+                save_data1D = data1D
+                if tagname == "SASdetector":
+                    data1D = Detector()
+                elif tagname == "SAScollimation":
+                    data1D = Collimation()
+                elif tagname == "SASprocess":
+                    data1D = Process()
+                    for child in node:
+                        if child.tag.replace(base_ns, "") == "term":
+                            term_attr = {}
+                            for attr in child.keys():
+                                term_attr[attr] = child.get(attr).strip()
+                            if child.text is not None:
+                                term_attr['value'] = child.text.strip()
+                                data1D.term.append(term_attr)
+                elif tagname == "aperture":
+                    data1D = Aperture()
+                
+                # Get where to store content
+                new_current_level, ns_variable, ns_datatype, optional = self._iterate_namespace(ns)
+                # If the element is a child element, recurse
+                if node.getchildren() is not None:
+                    # Returned value is new Data1D object with all previous and new values in it.
+                    data1D, extras = self._parse_entry(node, ns, data1D, extras)
                     
-                self._store_float('ns:distance', apert, 'distance', aperture)
-                
-                entry = get_content('ns:size', apert)
-                if entry is not None:
-                    aperture.size_name = entry.get('name')
-                
-                self._store_float('ns:size/ns:x', apert, 'size.x', aperture)
-                self._store_float('ns:size/ns:y', apert, 'size.y', aperture)
-                self._store_float('ns:size/ns:z', apert, 'size.z', aperture)
-                
-                collim.aperture.append(aperture)
-                
-            data_info.collimation.append(collim)
-        
-        # Detector info ######################
-        nodes = dom.xpath('ns:SASinstrument/ns:SASdetector',
-                           namespaces={'ns': CANSAS_NS})
-        for item in nodes:
-            
-            detector = Detector()
-            
-            self._store_content('ns:name', item, 'name', detector)
-            self._store_float('ns:SDD', item, 'distance', detector)
-            
-            # Detector offset (as a vector)
-            self._store_float('ns:offset/ns:x', item, 'offset.x', detector)
-            self._store_float('ns:offset/ns:y', item, 'offset.y', detector)
-            self._store_float('ns:offset/ns:z', item, 'offset.z', detector)
-            
-            # Detector orientation (as a vector)
-            self._store_float('ns:orientation/ns:roll', item, 'orientation.x',
-                               detector)
-            self._store_float('ns:orientation/ns:pitch', item, 'orientation.y',
-                               detector)
-            self._store_float('ns:orientation/ns:yaw', item, 'orientation.z',
-                               detector)
-            
-            # Beam center (as a vector)
-            self._store_float('ns:beam_center/ns:x', item, 'beam_center.x',
-                               detector)
-            self._store_float('ns:beam_center/ns:y', item, 'beam_center.y',
-                              detector)
-            self._store_float('ns:beam_center/ns:z', item, 'beam_center.z',
-                               detector)
-            
-            # Pixel size (as a vector)
-            self._store_float('ns:pixel_size/ns:x', item, 'pixel_size.x',
-                               detector)
-            self._store_float('ns:pixel_size/ns:y', item, 'pixel_size.y',
-                               detector)
-            self._store_float('ns:pixel_size/ns:z', item, 'pixel_size.z',
-                               detector)
-            
-            self._store_float('ns:slit_length', item, 'slit_length', detector)
-            
-            data_info.detector.append(detector)
-
-        # Processes info ######################
-        nodes = dom.xpath('ns:SASprocess', namespaces={'ns': CANSAS_NS})
-        for item in nodes:
-            process = Process()
-            self._store_content('ns:name', item, 'name', process)
-            self._store_content('ns:date', item, 'date', process)
-            self._store_content('ns:description', item, 'description', process)
-            
-            term_list = item.xpath('ns:term', namespaces={'ns': CANSAS_NS})
-            for term in term_list:
-                try:
-                    term_attr = {}
-                    for attr in term.keys():
-                        term_attr[attr] = term.get(attr).strip()
-                    if term.text is not None:
-                        term_attr['value'] = term.text.strip()
-                        process.term.append(term_attr)
-                except:
-                    err_mess = "cansas_reader.read: error processing "
-                    err_mess += " process term\n  %s" % sys.exc_value
-                    self.errors.append(err_mess)
-                    logging.error(err_mess)
-            
-            note_list = item.xpath('ns:SASprocessnote',
-                                   namespaces={'ns': CANSAS_NS})
-            for note in note_list:
-                if note.text is not None:
-                    process.notes.append(note.text.strip())
-            
-            data_info.process.append(process)
-            
-        # Data info ######################
-        nodes = dom.xpath('ns:SASdata', namespaces={'ns': CANSAS_NS})
-        if len(nodes) > 1:
-            msg = "CanSAS reader is not compatible with multiple"
-            msg += " SASdata entries"
-            raise RuntimeError, msg
-        
-        nodes = dom.xpath('ns:SASdata/ns:Idata', namespaces={'ns': CANSAS_NS})
-
-        x = numpy.zeros(0)
-        y = numpy.zeros(0)
-        dx = numpy.zeros(0)
-        dy = numpy.zeros(0)
-        dxw = numpy.zeros(0)
-        dxl = numpy.zeros(0)
-        
-        for item in nodes:
-            _x, attr = get_float('ns:Q', item)
-            _dx, attr_d = get_float('ns:Qdev', item)
-            _dxl, attr_l = get_float('ns:dQl', item)
-            _dxw, attr_w = get_float('ns:dQw', item)
-            if _dx == None:
-                _dx = 0.0
-            if _dxl == None:
-                _dxl = 0.0
-            if _dxw == None:
-                _dxw = 0.0
-                
-            if 'unit' in attr and \
-                attr['unit'].lower() != data_info.x_unit.lower():
-                if HAS_CONVERTER == True:
-                    try:
-                        data_conv_q = Converter(attr['unit'])
-                        _x = data_conv_q(_x, units=data_info.x_unit)
-                    except:
-                        msg = "CanSAS reader: could not convert "
-                        msg += "Q unit [%s]; " % attr['unit'],
-                        msg += "expecting [%s]\n  %s" % (data_info.x_unit,
-                                                         sys.exc_value)
-                        raise ValueError, msg
-                        
+                #Get the information from the node
+                node_value = node.text
+                if node_value is not None:
+                    node_value = node_value.strip().replace("\r"," ").replace("\n"," ")
+                if node_value == "":
+                    node_value = None
+                
+                # If the value is a float, compile with units.
+                if ns_datatype == "float":
+                    # If an empty value is given, store as zero.
+                    if node_value is None:
+                        node_value = "0.0"
+                    elif node_value.isspace():
+                        node_value = "0.0"
+                    node_value, unit = self._unit_conversion(new_current_level, attr, data1D, node_value, optional)
+                    
+                # If appending to a dictionary (meta_data | run_name), name sure the key is unique
+                if ns_variable == "{0}.meta_data[\"{2}\"] = \"{1}\"":
+                    # If we are within a Process, Detector, Collimation or Aperture instance, pull out old data1D
+                    tagname = self._create_unique_key(data1D.meta_data, tagname, 0)
+                    if isinstance(data1D, Data1D) == False:
+                        store_me = ns_variable.format("data1D", node_value, tagname)
+                        extras.append(store_me)
+                        ns_variable = None
+                if ns_variable == "{0}.run_name[\"{2}\"] = \"{1}\"":
+                    tagname = self._create_unique_key(data1D.run_name, tagname, 0)
+                
+                # Check for Data1D object and any extra commands to save
+                if isinstance(data1D, Data1D):
+                    for item in extras:
+                        exec item
+                # Don't bother saving empty information unless it is a float
+                if ns_variable is not None and node_value is not None and node_value.isspace() == False:
+                    # Format a string and then execute it.
+                    store_me = ns_variable.format("data1D", node_value, tagname)
+                    exec store_me
+                # Get attributes and process them
+                if attr is not None:
+                    for key in node.keys():
+                        try:
+                            cansas_attrib = new_current_level.get("attributes").get(key)
+                            attrib_variable = cansas_attrib.get("variable")
+                            if key == 'unit' and unit != '':
+                                attrib_value = unit
+                            else:
+                                attrib_value = node.attrib[key]
+                            store_attr = attrib_variable.format("data1D", attrib_value, key)
+                            exec store_attr
+                        except AttributeError as e:
+                            pass
+                            
+                     
+            except Exception as e:
+                exc_type, exc_obj, exc_tb = sys.exc_info()
+                fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
+                print(e, exc_type, fname, exc_tb.tb_lineno, tagname, exc_obj)
+            finally:
+                # Save special cases in original data1D object and then restore the data1D
+                if tagname_original == "SASdetector":
+                    save_data1D.detector.append(data1D)
+                elif tagname_original == "SAScollimation":
+                    save_data1D.collimation.append(data1D)
+                elif tagname_original == "SASprocess":
+                    save_data1D.process.append(data1D)
+                elif tagname_original == "aperture":
+                    save_data1D.aperture.append(data1D)
                 else:
-                    msg = "CanSAS reader: unrecognized Q unit [%s]; "\
-                    % attr['unit']
-                    msg += "expecting [%s]" % data_info.x_unit
-                    raise ValueError, msg
-                        
-            # Error in Q
-            if 'unit' in attr_d and \
-                attr_d['unit'].lower() != data_info.x_unit.lower():
-                if HAS_CONVERTER == True:
-                    try:
-                        data_conv_q = Converter(attr_d['unit'])
-                        _dx = data_conv_q(_dx, units=data_info.x_unit)
-                    except:
-                        msg = "CanSAS reader: could not convert dQ unit [%s]; "\
-                        % attr['unit']
-                        msg += " expecting "
-                        msg += "[%s]\n  %s" % (data_info.x_unit, sys.exc_value)
-                        raise ValueError, msg
-                        
-                else:
-                    msg = "CanSAS reader: unrecognized dQ unit [%s]; "\
-                    % attr['unit']
-                    msg += "expecting [%s]" % data_info.x_unit
-                    raise ValueError, msg
-                        
-            # Slit length
-            if 'unit' in attr_l and \
-                attr_l['unit'].lower() != data_info.x_unit.lower():
-                if HAS_CONVERTER == True:
-                    try:
-                        data_conv_q = Converter(attr_l['unit'])
-                        _dxl = data_conv_q(_dxl, units=data_info.x_unit)
-                    except:
-                        msg = "CanSAS reader: could not convert dQl unit [%s];"\
-                        % attr['unit']
-                        msg += " expecting [%s]\n  %s" % (data_info.x_unit,
-                                                          sys.exc_value)
-                        raise ValueError, msg 
-                else:
-                    msg = "CanSAS reader: unrecognized dQl unit [%s];"\
-                    % attr['unit']
-                    msg += " expecting [%s]" % data_info.x_unit
-                    raise ValueError, msg
-                        
-            # Slit width
-            if 'unit' in attr_w and \
-            attr_w['unit'].lower() != data_info.x_unit.lower():
-                if HAS_CONVERTER == True:
-                    try:
-                        data_conv_q = Converter(attr_w['unit'])
-                        _dxw = data_conv_q(_dxw, units=data_info.x_unit)
-                    except:
-                        msg = "CanSAS reader: could not convert dQw unit [%s];"\
-                        % attr['unit']
-                        msg += " expecting [%s]\n  %s" % (data_info.x_unit,
-                                                          sys.exc_value)
-                        raise ValueError, msg
-                        
-                else:
-                    msg = "CanSAS reader: unrecognized dQw unit [%s];"\
-                    % attr['unit']
-                    msg += " expecting [%s]" % data_info.x_unit
-                    raise ValueError, msg
-            _y, attr = get_float('ns:I', item)
-            _dy, attr_d = get_float('ns:Idev', item)
-            if _dy == None:
-                _dy = 0.0
-            if 'unit' in attr and \
-            attr['unit'].lower() != data_info.y_unit.lower():
-                if HAS_CONVERTER == True:
-                    try:
-                        data_conv_i = Converter(attr['unit'])
-                        _y = data_conv_i(_y, units=data_info.y_unit)
-                    except:
-                        if attr['unit'].lower() == 'count':
-                            pass
-                        else:
-                            msg = "CanSAS reader: could not"
-                            msg += " convert I(q) unit [%s];" % str(attr['unit'])
-                            msg += " expecting [%s]\n" % str(data_info.y_unit)
-                            msg += "  %s" % str(sys.exc_value)
-                            raise ValueError, msg
-                else:
-                    msg = "CanSAS reader: unrecognized I(q) unit [%s];"\
-                    % attr['unit']
-                    msg += " expecting [%s]" % data_info.y_unit
-                    raise ValueError, msg 
-                        
-            if 'unit' in attr_d and \
-            attr_d['unit'].lower() != data_info.y_unit.lower():
-                if HAS_CONVERTER == True:
-                    try:
-                        data_conv_i = Converter(attr_d['unit'])
-                        _dy = data_conv_i(_dy, units=data_info.y_unit)
-                    except:
-                        if attr_d['unit'].lower() == 'count':
-                            pass
-                        else:
-                            msg = "CanSAS reader: could not convert dI(q) unit "
-                            msg += "[%s]; expecting [%s]\n  %s" % (attr_d['unit'],
-                                                 data_info.y_unit, sys.exc_value)
-                            raise ValueError, msg
-                else:
-                    msg = "CanSAS reader: unrecognized dI(q) unit [%s]; "\
-                    % attr_d['unit']
-                    msg += "expecting [%s]" % data_info.y_unit
-                    raise ValueError, msg
-                
-            if _x is not None and _y is not None:
-                x = numpy.append(x, _x)
-                y = numpy.append(y, _y)
-                dx = numpy.append(dx, _dx)
-                dy = numpy.append(dy, _dy)
-                dxl = numpy.append(dxl, _dxl)
-                dxw = numpy.append(dxw, _dxw)
-        # Zeros in dx, dy
-        if not numpy.all(dx == 0):
-            dx[dx == 0] = _ZERO
-        if not numpy.all(dy == 0):
-            dy[dy == 0] = _ZERO
-       
-        data_info.x = x[x != 0]
-        data_info.y = y[x != 0]
-        data_info.dx = dx[x != 0]
-        
-        data_info.dy = dy[x != 0]
-        data_info.dxl = dxl[x != 0]
-        data_info.dxw = dxw[x != 0]
-        
-        data_conv_q = None
-        data_conv_i = None
-        
-        if HAS_CONVERTER == True and data_info.x_unit != '1/A':
-            data_conv_q = Converter('1/A')
-            # Test it
-            data_conv_q(1.0, data_info.x_unit)
-            
-        if HAS_CONVERTER == True and data_info.y_unit != '1/cm':
-            data_conv_i = Converter('1/cm')
-            # Test it
-            data_conv_i(1.0, data_info.y_unit)
-                
-        if data_conv_q is not None:
-            data_info.xaxis("\\rm{Q}", data_info.x_unit)
-        else:
-            data_info.xaxis("\\rm{Q}", 'A^{-1}')
-        if data_conv_i is not None:
-            data_info.yaxis("\\rm{Intensity}", data_info.y_unit)
-        else:
-            data_info.yaxis("\\rm{Intensity}", "cm^{-1}")
-
-        return data_info
-
+                    save_data1D = data1D
+                data1D = save_data1D
+                # Remove tagname from ns to restore original base
+                ns.remove(tagname_original)
+        
+        return data1D, extras
+        
     def _to_xml_doc(self, datainfo):
         """
@@ -615,10 +440,10 @@
         doc = xml.dom.minidom.Document()
         main_node = doc.createElement("SASroot")
-        main_node.setAttribute("version", self.version)
-        main_node.setAttribute("xmlns", "cansas1d/%s" % self.version)
+        main_node.setAttribute("cansasVersion", self.cansasVersion)
+        main_node.setAttribute("xmlns", "cansas1d/%s" % self.cansasVersion)
         main_node.setAttribute("xmlns:xsi",
                                "http://www.w3.org/2001/XMLSchema-instance")
         main_node.setAttribute("xsi:schemaLocation",
-                               "cansas1d/%s http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd" % self.version)
+                               "cansas1d/%s http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd" % self.cansasVersion)
         
         doc.appendChild(main_node)
@@ -861,83 +686,2 @@
         fd.write(doc.toprettyxml())
         fd.close()
-        
-    def _store_float(self, location, node, variable, storage, optional=True):
-        """
-        Get the content of a xpath location and store
-        the result. Check that the units are compatible
-        with the destination. The value is expected to
-        be a float.
-        
-        The xpath location might or might not exist.
-        If it does not exist, nothing is done
-        
-        :param location: xpath location to fetch
-        :param node: node to read the data from
-        :param variable: name of the data member to store it in [string]
-        :param storage: data object that has the 'variable' data member
-        :param optional: if True, no exception will be raised
-            if unit conversion can't be done
-
-        :raise ValueError: raised when the units are not recognized
-        """
-        entry = get_content(location, node)
-        try:
-            value = float(entry.text)
-        except:
-            value = None
-            
-        if value is not None:
-            # If the entry has units, check to see that they are
-            # compatible with what we currently have in the data object
-            units = entry.get('unit')
-            if units is not None:
-                toks = variable.split('.')
-                local_unit = None
-                exec "local_unit = storage.%s_unit" % toks[0]
-                if local_unit != None and units.lower() != local_unit.lower():
-                    if HAS_CONVERTER == True:
-                        try:
-                            conv = Converter(units)
-                            exec "storage.%s = %g" % (variable,
-                                            conv(value, units=local_unit))
-                        except:
-                            err_mess = "CanSAS reader: could not convert"
-                            err_mess += " %s unit [%s]; expecting [%s]\n  %s" \
-                                % (variable, units, local_unit, sys.exc_value)
-                            self.errors.append(err_mess)
-                            if optional:
-                                logging.info(err_mess)
-                            else:
-                                raise ValueError, err_mess
-                    else:
-                        err_mess = "CanSAS reader: unrecognized %s unit [%s];"\
-                        % (variable, units)
-                        err_mess += " expecting [%s]" % local_unit
-                        self.errors.append(err_mess)
-                        if optional:
-                            logging.info(err_mess)
-                        else:
-                            raise ValueError, err_mess
-                else:
-                    exec "storage.%s = value" % variable
-            else:
-                exec "storage.%s = value" % variable
-                
-    def _store_content(self, location, node, variable, storage):
-        """
-        Get the content of a xpath location and store
-        the result. The value is treated as a string.
-        
-        The xpath location might or might not exist.
-        If it does not exist, nothing is done
-        
-        :param location: xpath location to fetch
-        :param node: node to read the data from
-        :param variable: name of the data member to store it in [string]
-        :param storage: data object that has the 'variable' data member
-        
-        :return: return a list of errors
-        """
-        entry = get_content(location, node)
-        if entry is not None and entry.text is not None:
-            exec "storage.%s = entry.text.strip()" % variable
Index: c/sans/dataloader/readers/cansas_reader_new.py
===================================================================
--- src/sans/dataloader/readers/cansas_reader_new.py	(revision ffbe487235261db53473e1fe28d7b1953c7e31dd)
+++ 	(revision )
@@ -1,558 +1,0 @@
-"""
-    CanSAS data reader
-"""
-############################################################################
-#This software was developed by the University of Tennessee as part of the
-#Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
-#project funded by the US National Science Foundation. 
-#If you use DANSE applications to do scientific research that leads to 
-#publication, we ask that you acknowledge the use of the software with the 
-#following sentence:
-#This work benefited from DANSE software developed under NSF award DMR-0520547. 
-#copyright 2008,2009 University of Tennessee
-#############################################################################
-
-# Known issue: reader not compatible with multiple SASdata entries
-# within a single SASentry. Will raise a runtime error.
-
-#TODO: check that all vectors are written only if they have at 
-#    least one non-empty value
-#TODO: Writing only allows one SASentry per file.
-#     Would be best to allow multiple entries.
-#TODO: Store error list
-#TODO: Allow for additional meta data for each section
-#TODO: Notes need to be implemented. They can be any XML 
-#    structure in version 1.0
-#      Process notes have the same problem.
-#TODO: Unit conversion is not complete (temperature units are missing)
-
-import logging
-import numpy
-import os
-import sys
-from sans.dataloader.data_info import Data1D
-from sans.dataloader.data_info import Collimation
-from sans.dataloader.data_info import Detector
-from sans.dataloader.data_info import Process
-from sans.dataloader.data_info import Aperture
-from lxml import etree
-import xml.dom.minidom
-_ZERO = 1e-16
-HAS_CONVERTER = True
-try:
-    from sans.data_util.nxsunit import Converter
-except:
-    HAS_CONVERTER = False
-
-CANSAS_NS = "cansas1d/1.0"
-ALLOW_ALL = True
-
-
-def write_node(doc, parent, name, value, attr={}):
-    """
-    :param doc: document DOM
-    :param parent: parent node
-    :param name: tag of the element
-    :param value: value of the child text node
-    :param attr: attribute dictionary
-    
-    :return: True if something was appended, otherwise False
-    """
-    if value is not None:
-        node = doc.createElement(name)
-        node.appendChild(doc.createTextNode(str(value)))
-        for item in attr:
-            node.setAttribute(item, attr[item])
-        parent.appendChild(node)
-        return True
-    return False
-
-
-def get_content(location, node):
-    """
-    Get the first instance of the content of a xpath location.
-    
-    :param location: xpath location
-    :param node: node to start at
-    
-    :return: Element, or None
-    """
-    nodes = node.xpath(location, namespaces={'ns': CANSAS_NS})
-    
-    if len(nodes) > 0:
-        return nodes[0]
-    else:
-        return None
-
-
-def get_float(location, node):
-    """
-    Get the content of a node as a float
-    
-    :param location: xpath location
-    :param node: node to start at
-    """
-    nodes = node.xpath(location, namespaces={'ns': CANSAS_NS})
-    
-    value = None
-    attr = {}
-    if len(nodes) > 0:
-        try:
-            value = float(nodes[0].text)
-        except:
-            # Could not pass, skip and return None
-            msg = "cansas_reader.get_float: could not "
-            msg += " convert '%s' to float" % nodes[0].text
-            logging.error(msg)
-        if nodes[0].get('unit') is not None:
-            attr['unit'] = nodes[0].get('unit')
-    return value, attr
-
-            
-class Reader:
-    """
-    Class to load cansas 1D XML files
-    
-    :Dependencies:
-        The CanSas reader requires PyXML 0.8.4 or later.
-    """
-    ## CanSAS version
-    version = '1.0'
-    ## File type
-    type_name = "CanSAS 1D"
-    ## Wildcards
-    type = ["CanSAS 1D files (*.xml)|*.xml",
-                        "CanSAS 1D AVE files (*.AVEx)|*.AVEx",
-                         "CanSAS 1D AVE files (*.ABSx)|*.ABSx"]
-
-    ## List of allowed extensions
-    ext = ['.xml', '.XML', '.avex', '.AVEx', '.absx', 'ABSx']
-    
-    def __init__(self):
-        ## List of errors
-        self.errors = []
-    
-
-    def read(self, path):
-        output = []
-        ns = []
-        if os.path.isfile(path):
-            basename = os.path.basename(path)
-            root, extension = os.path.splitext(basename)
-            if ALLOW_ALL or extension.lower() in self.ext:
-                try:
-                    tree = etree.parse(path, parser=etree.ETCompatXMLParser())
-                    # Check the format version number
-                    # Specifying the namespace will take care of the file
-                    # format version
-                    root = tree.getroot()
-                    output.append("I made it here 1")
-                    base_ns = '/ns:SASroot/ns:SASentry'
-                    ns.append('SASroot')
-                    ns.append('SASentry')
-                    entry_list = root.xpath(base_ns,
-                                             namespaces={'ns': CANSAS_NS})
-                    
-                    output.append("I made it here 2")
-                    for entry in entry_list:
-                        output.append(etree.tostring(entry))
-                        new_name_entry = self._parse_entry(entry, ns)
-                        output.append(new_name_entry)
-                except Exception as e:
-                    exc_type, exc_obj, exc_tb = sys.exc_info()
-                    fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
-                    print(exc_type, fname, exc_tb.tb_lineno, output)
-                
-            return output
-        
-    def _parse_entry(self, dom, ns):
-        """
-        Parse a SASEntry - new recursive method for parsing the dom of
-            the CanSAS data format. This will allow multiple data files
-            and extra nodes to be read in simultaneously.
-        
-        :param dom: dom object with a namespace base of ns
-        
-        :param ns: A list of namespaces that lead up to the dom object
-        """
-        
-        # base method variables
-        # namespace - the full dom namespace of the current level
-        # tag - the name of the tag at the current level
-        # text - The text of the current tag
-        # attributes - A dictionary of attributes of the current tag
-        # level - The recursion level within the DOM. Used for determining
-        #        how to apply the data
-        namespace = ''
-        tag = ''
-        text = ''
-        attributes = {}
-        namespace_dictionary = {}
-        level = len(ns)
-        
-        for name in ns:
-            namespace += 'ns:' + name + "/"
-        try:
-            nodes = dom.xpath(namespace, namespaces={'ns': CANSAS_NS})
-            
-            for node in nodes:
-                nodes_in_node = len(node)
-                if nodes_in_node > 1:
-                    ns.append(node.tag)
-                    self._parse_entry_new(node, ns)
-                else:
-                    fullns = ''
-                    tag = node.tag
-                    text = node.text
-                    for name, value in node.items():
-                        attributes.append(name, value)
-                        basenamespace = ns.pop().strip('SAS')
-                        name_space_dictionary.append(tag, text, attributes)
-                        dictionary.append(namespace, name_space_dictionary)
-            
-        except Exception as e:
-            exc_type, exc_obj, exc_tb = sys.exc_info()
-            fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
-            dictionary.append("{!s}, {!s}, {!s}".format(exc_type, fname, exc_tb.tb_lineno))
-        
-        return dictionary
-            
-    def _to_xml_doc(self, datainfo):
-        """
-        Create an XML document to contain the content of a Data1D
-        
-        :param datainfo: Data1D object
-        """
-        
-        if not issubclass(datainfo.__class__, Data1D):
-            raise RuntimeError, "The cansas writer expects a Data1D instance"
-        
-        doc = xml.dom.minidom.Document()
-        main_node = doc.createElement("SASroot")
-        main_node.setAttribute("version", self.version)
-        main_node.setAttribute("xmlns", "cansas1d/%s" % self.version)
-        main_node.setAttribute("xmlns:xsi",
-                               "http://www.w3.org/2001/XMLSchema-instance")
-        main_node.setAttribute("xsi:schemaLocation",
-                               "cansas1d/%s http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd" % self.version)
-        
-        doc.appendChild(main_node)
-        
-        entry_node = doc.createElement("SASentry")
-        main_node.appendChild(entry_node)
-        
-        write_node(doc, entry_node, "Title", datainfo.title)
-        for item in datainfo.run:
-            runname = {}
-            if item in datainfo.run_name and \
-            len(str(datainfo.run_name[item])) > 1:
-                runname = {'name': datainfo.run_name[item]}
-            write_node(doc, entry_node, "Run", item, runname)
-        
-        # Data info
-        node = doc.createElement("SASdata")
-        entry_node.appendChild(node)
-        
-        for i in range(len(datainfo.x)):
-            pt = doc.createElement("Idata")
-            node.appendChild(pt)
-            write_node(doc, pt, "Q", datainfo.x[i], {'unit': datainfo.x_unit})
-            if len(datainfo.y) >= i:
-                write_node(doc, pt, "I", datainfo.y[i],
-                            {'unit': datainfo.y_unit})
-            if datainfo.dx != None and len(datainfo.dx) >= i:
-                write_node(doc, pt, "Qdev", datainfo.dx[i],
-                            {'unit': datainfo.x_unit})
-            if datainfo.dxl != None and len(datainfo.dxl) >= i:
-                write_node(doc, pt, "dQl", datainfo.dxl[i],
-                            {'unit': datainfo.x_unit})
-            if datainfo.dxw != None and len(datainfo.dxw) >= i:
-                write_node(doc, pt, "dQw", datainfo.dxw[i],
-                            {'unit': datainfo.x_unit})
-            if datainfo.dy != None and len(datainfo.dy) >= i:
-                write_node(doc, pt, "Idev", datainfo.dy[i],
-                            {'unit': datainfo.y_unit})
-
-        # Sample info
-        sample = doc.createElement("SASsample")
-        if datainfo.sample.name is not None:
-            sample.setAttribute("name", str(datainfo.sample.name))
-        entry_node.appendChild(sample)
-        write_node(doc, sample, "ID", str(datainfo.sample.ID))
-        write_node(doc, sample, "thickness", datainfo.sample.thickness,
-                   {"unit": datainfo.sample.thickness_unit})
-        write_node(doc, sample, "transmission", datainfo.sample.transmission)
-        write_node(doc, sample, "temperature", datainfo.sample.temperature,
-                   {"unit": datainfo.sample.temperature_unit})
-        
-        for item in datainfo.sample.details:
-            write_node(doc, sample, "details", item)
-        
-        pos = doc.createElement("position")
-        written = write_node(doc, pos, "x", datainfo.sample.position.x,
-                             {"unit": datainfo.sample.position_unit})
-        written = written | write_node(doc, pos, "y",
-                                       datainfo.sample.position.y,
-                                       {"unit": datainfo.sample.position_unit})
-        written = written | write_node(doc, pos, "z",
-                                       datainfo.sample.position.z,
-                                       {"unit": datainfo.sample.position_unit})
-        if written == True:
-            sample.appendChild(pos)
-        
-        ori = doc.createElement("orientation")
-        written = write_node(doc, ori, "roll",
-                             datainfo.sample.orientation.x,
-                             {"unit": datainfo.sample.orientation_unit})
-        written = written | write_node(doc, ori, "pitch",
-                                       datainfo.sample.orientation.y,
-                                    {"unit": datainfo.sample.orientation_unit})
-        written = written | write_node(doc, ori, "yaw",
-                                       datainfo.sample.orientation.z,
-                                    {"unit": datainfo.sample.orientation_unit})
-        if written == True:
-            sample.appendChild(ori)
-        
-        # Instrument info
-        instr = doc.createElement("SASinstrument")
-        entry_node.appendChild(instr)
-        
-        write_node(doc, instr, "name", datainfo.instrument)
-        
-        #   Source
-        source = doc.createElement("SASsource")
-        if datainfo.source.name is not None:
-            source.setAttribute("name", str(datainfo.source.name))
-        instr.appendChild(source)
-        
-        write_node(doc, source, "radiation", datainfo.source.radiation)
-        write_node(doc, source, "beam_shape", datainfo.source.beam_shape)
-        size = doc.createElement("beam_size")
-        if datainfo.source.beam_size_name is not None:
-            size.setAttribute("name", str(datainfo.source.beam_size_name))
-        written = write_node(doc, size, "x", datainfo.source.beam_size.x,
-                             {"unit": datainfo.source.beam_size_unit})
-        written = written | write_node(doc, size, "y",
-                                       datainfo.source.beam_size.y,
-                                       {"unit": datainfo.source.beam_size_unit})
-        written = written | write_node(doc, size, "z",
-                                       datainfo.source.beam_size.z,
-                                       {"unit": datainfo.source.beam_size_unit})
-        if written == True:
-            source.appendChild(size)
-            
-        write_node(doc, source, "wavelength",
-                   datainfo.source.wavelength,
-                   {"unit": datainfo.source.wavelength_unit})
-        write_node(doc, source, "wavelength_min",
-                   datainfo.source.wavelength_min,
-                   {"unit": datainfo.source.wavelength_min_unit})
-        write_node(doc, source, "wavelength_max",
-                   datainfo.source.wavelength_max,
-                   {"unit": datainfo.source.wavelength_max_unit})
-        write_node(doc, source, "wavelength_spread",
-                   datainfo.source.wavelength_spread,
-                   {"unit": datainfo.source.wavelength_spread_unit})
-        
-        #   Collimation
-        for item in datainfo.collimation:
-            coll = doc.createElement("SAScollimation")
-            if item.name is not None:
-                coll.setAttribute("name", str(item.name))
-            instr.appendChild(coll)
-            
-            write_node(doc, coll, "length", item.length,
-                       {"unit": item.length_unit})
-            
-            for apert in item.aperture:
-                ap = doc.createElement("aperture")
-                if apert.name is not None:
-                    ap.setAttribute("name", str(apert.name))
-                if apert.type is not None:
-                    ap.setAttribute("type", str(apert.type))
-                coll.appendChild(ap)
-                
-                write_node(doc, ap, "distance", apert.distance,
-                           {"unit": apert.distance_unit})
-                
-                size = doc.createElement("size")
-                if apert.size_name is not None:
-                    size.setAttribute("name", str(apert.size_name))
-                written = write_node(doc, size, "x", apert.size.x,
-                                     {"unit": apert.size_unit})
-                written = written | write_node(doc, size, "y", apert.size.y,
-                                               {"unit": apert.size_unit})
-                written = written | write_node(doc, size, "z", apert.size.z,
-                                               {"unit": apert.size_unit})
-                if written == True:
-                    ap.appendChild(size)
-
-        #   Detectors
-        for item in datainfo.detector:
-            det = doc.createElement("SASdetector")
-            written = write_node(doc, det, "name", item.name)
-            written = written | write_node(doc, det, "SDD", item.distance,
-                                           {"unit": item.distance_unit})
-            written = written | write_node(doc, det, "slit_length",
-                                           item.slit_length,
-                                           {"unit": item.slit_length_unit})
-            if written == True:
-                instr.appendChild(det)
-            
-            off = doc.createElement("offset")
-            written = write_node(doc, off, "x", item.offset.x,
-                                 {"unit": item.offset_unit})
-            written = written | write_node(doc, off, "y", item.offset.y,
-                                           {"unit": item.offset_unit})
-            written = written | write_node(doc, off, "z", item.offset.z,
-                                           {"unit": item.offset_unit})
-            if written == True:
-                det.appendChild(off)
-            
-            center = doc.createElement("beam_center")
-            written = write_node(doc, center, "x", item.beam_center.x,
-                                 {"unit": item.beam_center_unit})
-            written = written | write_node(doc, center, "y",
-                                           item.beam_center.y,
-                                           {"unit": item.beam_center_unit})
-            written = written | write_node(doc, center, "z",
-                                           item.beam_center.z,
-                                           {"unit": item.beam_center_unit})
-            if written == True:
-                det.appendChild(center)
-                
-            pix = doc.createElement("pixel_size")
-            written = write_node(doc, pix, "x", item.pixel_size.x,
-                                 {"unit": item.pixel_size_unit})
-            written = written | write_node(doc, pix, "y", item.pixel_size.y,
-                                           {"unit": item.pixel_size_unit})
-            written = written | write_node(doc, pix, "z", item.pixel_size.z,
-                                           {"unit": item.pixel_size_unit})
-            if written == True:
-                det.appendChild(pix)
-                
-            ori = doc.createElement("orientation")
-            written = write_node(doc, ori, "roll", item.orientation.x,
-                                 {"unit": item.orientation_unit})
-            written = written | write_node(doc, ori, "pitch",
-                                           item.orientation.y,
-                                           {"unit": item.orientation_unit})
-            written = written | write_node(doc, ori, "yaw",
-                                           item.orientation.z,
-                                           {"unit": item.orientation_unit})
-            if written == True:
-                det.appendChild(ori)
-                
-        # Processes info
-        for item in datainfo.process:
-            node = doc.createElement("SASprocess")
-            entry_node.appendChild(node)
-
-            write_node(doc, node, "name", item.name)
-            write_node(doc, node, "date", item.date)
-            write_node(doc, node, "description", item.description)
-            for term in item.term:
-                value = term['value']
-                del term['value']
-                write_node(doc, node, "term", value, term)
-            for note in item.notes:
-                write_node(doc, node, "SASprocessnote", note)
-        
-        # Return the document, and the SASentry node associated with
-        # the data we just wrote
-        return doc, entry_node
-            
-    def write(self, filename, datainfo):
-        """
-        Write the content of a Data1D as a CanSAS XML file
-        
-        :param filename: name of the file to write
-        :param datainfo: Data1D object
-        """
-        # Create XML document
-        doc, _ = self._to_xml_doc(datainfo)
-        # Write the file
-        fd = open(filename, 'w')
-        fd.write(doc.toprettyxml())
-        fd.close()
-        
-    def _store_float(self, location, node, variable, storage, optional=True):
-        """
-        Get the content of a xpath location and store
-        the result. Check that the units are compatible
-        with the destination. The value is expected to
-        be a float.
-        
-        The xpath location might or might not exist.
-        If it does not exist, nothing is done
-        
-        :param location: xpath location to fetch
-        :param node: node to read the data from
-        :param variable: name of the data member to store it in [string]
-        :param storage: data object that has the 'variable' data member
-        :param optional: if True, no exception will be raised
-            if unit conversion can't be done
-
-        :raise ValueError: raised when the units are not recognized
-        """
-        entry = get_content(location, node)
-        try:
-            value = float(entry.text)
-        except:
-            value = None
-            
-        if value is not None:
-            # If the entry has units, check to see that they are
-            # compatible with what we currently have in the data object
-            units = entry.get('unit')
-            if units is not None:
-                toks = variable.split('.')
-                local_unit = None
-                exec "local_unit = storage.%s_unit" % toks[0]
-                if local_unit != None and units.lower() != local_unit.lower():
-                    if HAS_CONVERTER == True:
-                        try:
-                            conv = Converter(units)
-                            exec "storage.%s = %g" % (variable,
-                                            conv(value, units=local_unit))
-                        except:
-                            err_mess = "CanSAS reader: could not convert"
-                            err_mess += " %s unit [%s]; expecting [%s]\n  %s" \
-                                % (variable, units, local_unit, sys.exc_value)
-                            self.errors.append(err_mess)
-                            if optional:
-                                logging.info(err_mess)
-                            else:
-                                raise ValueError, err_mess
-                    else:
-                        err_mess = "CanSAS reader: unrecognized %s unit [%s];"\
-                        % (variable, units)
-                        err_mess += " expecting [%s]" % local_unit
-                        self.errors.append(err_mess)
-                        if optional:
-                            logging.info(err_mess)
-                        else:
-                            raise ValueError, err_mess
-                else:
-                    exec "storage.%s = value" % variable
-            else:
-                exec "storage.%s = value" % variable
-                
-    def _store_content(self, location, node, variable, storage):
-        """
-        Get the content of a xpath location and store
-        the result. The value is treated as a string.
-        
-        The xpath location might or might not exist.
-        If it does not exist, nothing is done
-        
-        :param location: xpath location to fetch
-        :param node: node to read the data from
-        :param variable: name of the data member to store it in [string]
-        :param storage: data object that has the 'variable' data member
-        
-        :return: return a list of errors
-        """
-        entry = get_content(location, node)
-        if entry is not None and entry.text is not None:
-            exec "storage.%s = entry.text.strip()" % variable
Index: src/sans/dataloader/readers/xml_reader.py
===================================================================
--- src/sans/dataloader/readers/xml_reader.py	(revision eda89725afadff916f49a3a51d5823023263ff33)
+++ src/sans/dataloader/readers/xml_reader.py	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -0,0 +1,90 @@
+"""
+    Generic XML reader
+"""
+############################################################################
+#This software was developed by the University of Tennessee as part of the
+#Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
+#project funded by the US National Science Foundation. 
+#If you use DANSE applications to do scientific research that leads to 
+#publication, we ask that you acknowledge the use of the software with the 
+#following sentence:
+#This work benefited from DANSE software developed under NSF award DMR-0520547. 
+#copyright 2008,2009 University of Tennessee
+#############################################################################
+
+from lxml import etree
+parser = etree.ETCompatXMLParser()
+
+class XMLreader():
+    
+    
+    def __init__(self, xml = None, schema = None, root = None):
+        self.xml = xml
+        self.schema = schema
+        if xml is not None:
+            self.setXMLFile(xml, root)
+        else:
+            self.xmldoc = None
+            self.xmlroot = None
+        if schema is not None:
+            self.setSchema(schema)
+        else:
+            self.schemadoc = None
+    
+    def reader(self):
+        """
+        Read in an XML file into memory and return an lxml dictionary
+        """
+        if self.validateXML():
+            self.xmldoc = etree.parse(self.xml, parser = parser)
+        else:
+            raise ValidationError(self, self.findInvalidXML())
+        return self.xmldoc
+    
+    def setXMLFile(self, xml, root = None):
+        try:
+            self.xml = xml
+            self.xmldoc = etree.parse(self.xml, parser = parser)
+            self.xmlroot = self.xmldoc.getroot()
+        except Exception as e:
+            ##!TODO: raise exception if no xml is passed to this function
+            print "No xml file was found!"
+    
+    def setSchema(self, schema):
+        try:
+            self.schema = schema
+            self.schemadoc = etree.parse(self.schema, parser = parser)
+        except Exception as e:
+            ##!TODO: raise exception if no schema is passed to this function
+            print "No schema file was found!"
+    
+    def validateXML(self):
+        """
+        Checks to see if the XML file meets the schema
+        """
+        valid = True
+        if self.schema is not None:
+            self.parseSchemaAndDoc()
+            schemaCheck = etree.XMLSchema(self.schemadoc)
+            valid = schemaCheck.validate(self.xmldoc)
+        return valid
+    
+    def findInvalidXML(self):
+        """
+        Finds the first offending element that should not be present in an XML file
+        """
+        firstError = ""
+        self.parseSchemaAndDoc()
+        schema = etree.XMLSchema(self.schemadoc)
+        try:
+            firstError = schema.assertValid(self.xmldoc)
+        except etree.DocumentInvalid as e:
+            firstError = str(e)
+        return firstError
+    
+    def parseSchemaAndDoc(self):
+        """
+        Creates a dictionary of the parsed schema and xml files.
+        """
+        self.setXMLFile(self.xml)
+        self.setSchema(self.schema)
Index: test/sansdataloader/test/ISIS_1_0.xml
===================================================================
--- test/sansdataloader/test/ISIS_1_0.xml	(revision eda89725afadff916f49a3a51d5823023263ff33)
+++ test/sansdataloader/test/ISIS_1_0.xml	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -0,0 +1,178 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="cansasxml-html.xsl" ?>
+<SASroot version="1.0"
+		 xmlns="cansas1d/1.0"
+		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		 xsi:schemaLocation="cansas1d/1.0 http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd">
+	<SASentry name="79680main_1D_2.2_10.0">
+		<Title>TK49 c10_SANS</Title>
+		<Run>79680</Run>
+		<SASdata>
+			<Idata><Q unit="1/A">0.009</Q><I unit="1/cm">85.3333</I><Idev unit="1/cm">0.852491</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.011</Q><I unit="1/cm">72.5398</I><Idev unit="1/cm">0.639548</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.013</Q><I unit="1/cm">63.3582</I><Idev unit="1/cm">0.494127</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.015</Q><I unit="1/cm">57.0952</I><Idev unit="1/cm">0.414116</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.017</Q><I unit="1/cm">51.0139</I><Idev unit="1/cm">0.35145</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.019</Q><I unit="1/cm">46.4746</I><Idev unit="1/cm">0.308755</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.021</Q><I unit="1/cm">41.7191</I><Idev unit="1/cm">0.271641</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.023</Q><I unit="1/cm">37.4208</I><Idev unit="1/cm">0.244658</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.025</Q><I unit="1/cm">33.7352</I><Idev unit="1/cm">0.219594</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.027</Q><I unit="1/cm">30.6073</I><Idev unit="1/cm">0.203138</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.029</Q><I unit="1/cm">27.7309</I><Idev unit="1/cm">0.185859</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.031</Q><I unit="1/cm">25.2579</I><Idev unit="1/cm">0.171356</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.033</Q><I unit="1/cm">22.7712</I><Idev unit="1/cm">0.159062</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.035</Q><I unit="1/cm">20.5323</I><Idev unit="1/cm">0.146135</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.037</Q><I unit="1/cm">19.0744</I><Idev unit="1/cm">0.136393</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.039</Q><I unit="1/cm">17.2832</I><Idev unit="1/cm">0.127623</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.041</Q><I unit="1/cm">15.7399</I><Idev unit="1/cm">0.118288</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.043</Q><I unit="1/cm">14.5598</I><Idev unit="1/cm">0.111759</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.045</Q><I unit="1/cm">13.5906</I><Idev unit="1/cm">0.105148</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.047</Q><I unit="1/cm">12.6707</I><Idev unit="1/cm">0.0996579</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.049</Q><I unit="1/cm">11.5247</I><Idev unit="1/cm">0.0929646</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.051</Q><I unit="1/cm">10.7089</I><Idev unit="1/cm">0.0888575</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.053</Q><I unit="1/cm">10.1436</I><Idev unit="1/cm">0.0849394</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.055</Q><I unit="1/cm">9.49446</I><Idev unit="1/cm">0.0811205</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.057</Q><I unit="1/cm">8.80775</I><Idev unit="1/cm">0.0773967</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.059</Q><I unit="1/cm">8.33366</I><Idev unit="1/cm">0.0748147</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.061</Q><I unit="1/cm">7.79157</I><Idev unit="1/cm">0.0720107</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.063</Q><I unit="1/cm">7.25902</I><Idev unit="1/cm">0.0693582</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.065</Q><I unit="1/cm">7.04789</I><Idev unit="1/cm">0.0677591</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.067</Q><I unit="1/cm">6.53311</I><Idev unit="1/cm">0.0652207</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.069</Q><I unit="1/cm">6.2453</I><Idev unit="1/cm">0.0642016</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.071</Q><I unit="1/cm">5.94152</I><Idev unit="1/cm">0.0625768</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.073</Q><I unit="1/cm">5.70816</I><Idev unit="1/cm">0.0612955</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.075</Q><I unit="1/cm">5.24449</I><Idev unit="1/cm">0.060141</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.077</Q><I unit="1/cm">5.08291</I><Idev unit="1/cm">0.0582239</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.079</Q><I unit="1/cm">4.88135</I><Idev unit="1/cm">0.057969</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.081</Q><I unit="1/cm">4.60942</I><Idev unit="1/cm">0.056813</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.083</Q><I unit="1/cm">4.46606</I><Idev unit="1/cm">0.0569381</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.085</Q><I unit="1/cm">4.32473</I><Idev unit="1/cm">0.0558766</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.087</Q><I unit="1/cm">4.14144</I><Idev unit="1/cm">0.0552525</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.089</Q><I unit="1/cm">3.86504</I><Idev unit="1/cm">0.0544569</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.091</Q><I unit="1/cm">3.74272</I><Idev unit="1/cm">0.0529596</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.093</Q><I unit="1/cm">3.68281</I><Idev unit="1/cm">0.052891</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.095</Q><I unit="1/cm">3.46991</I><Idev unit="1/cm">0.0517565</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.097</Q><I unit="1/cm">3.37244</I><Idev unit="1/cm">0.0509328</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.099</Q><I unit="1/cm">3.27074</I><Idev unit="1/cm">0.0505183</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.101</Q><I unit="1/cm">3.13326</I><Idev unit="1/cm">0.0490847</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.103</Q><I unit="1/cm">3.01387</I><Idev unit="1/cm">0.0487012</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.105</Q><I unit="1/cm">2.87628</I><Idev unit="1/cm">0.0484307</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.107</Q><I unit="1/cm">2.85043</I><Idev unit="1/cm">0.0476786</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.109</Q><I unit="1/cm">2.72799</I><Idev unit="1/cm">0.0475526</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.111</Q><I unit="1/cm">2.61206</I><Idev unit="1/cm">0.0467475</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.113</Q><I unit="1/cm">2.58895</I><Idev unit="1/cm">0.0469767</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.115</Q><I unit="1/cm">2.45987</I><Idev unit="1/cm">0.0460139</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.117</Q><I unit="1/cm">2.37723</I><Idev unit="1/cm">0.045272</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.119</Q><I unit="1/cm">2.34122</I><Idev unit="1/cm">0.0453741</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.121</Q><I unit="1/cm">2.21745</I><Idev unit="1/cm">0.0444485</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.123</Q><I unit="1/cm">2.12646</I><Idev unit="1/cm">0.0438385</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.125</Q><I unit="1/cm">2.11264</I><Idev unit="1/cm">0.0441662</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.127</Q><I unit="1/cm">2.07523</I><Idev unit="1/cm">0.0438979</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.129</Q><I unit="1/cm">2.03548</I><Idev unit="1/cm">0.0442422</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.131</Q><I unit="1/cm">1.92452</I><Idev unit="1/cm">0.0435959</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.133</Q><I unit="1/cm">1.90866</I><Idev unit="1/cm">0.0437401</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.135</Q><I unit="1/cm">1.91252</I><Idev unit="1/cm">0.0443163</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.137</Q><I unit="1/cm">1.80405</I><Idev unit="1/cm">0.043466</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.139</Q><I unit="1/cm">1.72166</I><Idev unit="1/cm">0.0429246</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.141</Q><I unit="1/cm">1.67199</I><Idev unit="1/cm">0.042469</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.143</Q><I unit="1/cm">1.63282</I><Idev unit="1/cm">0.0430074</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.145</Q><I unit="1/cm">1.63712</I><Idev unit="1/cm">0.0438557</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.147</Q><I unit="1/cm">1.5862</I><Idev unit="1/cm">0.0434135</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.149</Q><I unit="1/cm">1.56121</I><Idev unit="1/cm">0.0432591</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.151</Q><I unit="1/cm">1.49764</I><Idev unit="1/cm">0.0426577</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.153</Q><I unit="1/cm">1.53828</I><Idev unit="1/cm">0.0446481</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.155</Q><I unit="1/cm">1.47366</I><Idev unit="1/cm">0.0441973</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.157</Q><I unit="1/cm">1.40582</I><Idev unit="1/cm">0.0430461</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.159</Q><I unit="1/cm">1.40491</I><Idev unit="1/cm">0.0439883</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.161</Q><I unit="1/cm">1.34639</I><Idev unit="1/cm">0.044193</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.163</Q><I unit="1/cm">1.32238</I><Idev unit="1/cm">0.0438008</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.165</Q><I unit="1/cm">1.33885</I><Idev unit="1/cm">0.0445383</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.167</Q><I unit="1/cm">1.29608</I><Idev unit="1/cm">0.0451575</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.169</Q><I unit="1/cm">1.30562</I><Idev unit="1/cm">0.0460656</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.171</Q><I unit="1/cm">1.17147</I><Idev unit="1/cm">0.0435717</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.173</Q><I unit="1/cm">1.18565</I><Idev unit="1/cm">0.0449072</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.175</Q><I unit="1/cm">1.18944</I><Idev unit="1/cm">0.0465319</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.177</Q><I unit="1/cm">1.17055</I><Idev unit="1/cm">0.0456562</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.179</Q><I unit="1/cm">1.08571</I><Idev unit="1/cm">0.0453852</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.181</Q><I unit="1/cm">1.06208</I><Idev unit="1/cm">0.0463335</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.183</Q><I unit="1/cm">1.06187</I><Idev unit="1/cm">0.0458284</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.185</Q><I unit="1/cm">1.02727</I><Idev unit="1/cm">0.0472613</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.187</Q><I unit="1/cm">0.995169</I><Idev unit="1/cm">0.0465526</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.189</Q><I unit="1/cm">1.02569</I><Idev unit="1/cm">0.0483728</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.191</Q><I unit="1/cm">0.981154</I><Idev unit="1/cm">0.0490559</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.193</Q><I unit="1/cm">1.01831</I><Idev unit="1/cm">0.0502348</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.195</Q><I unit="1/cm">0.968102</I><Idev unit="1/cm">0.0504426</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.197</Q><I unit="1/cm">0.940656</I><Idev unit="1/cm">0.0512734</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.199</Q><I unit="1/cm">1.05762</I><Idev unit="1/cm">0.0547469</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.201</Q><I unit="1/cm">0.949872</I><Idev unit="1/cm">0.055229</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.203</Q><I unit="1/cm">0.891716</I><Idev unit="1/cm">0.0531346</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.205</Q><I unit="1/cm">0.876084</I><Idev unit="1/cm">0.0548681</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.207</Q><I unit="1/cm">0.932101</I><Idev unit="1/cm">0.0576812</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.209</Q><I unit="1/cm">0.927755</I><Idev unit="1/cm">0.0593404</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.211</Q><I unit="1/cm">0.87669</I><Idev unit="1/cm">0.0600369</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.213</Q><I unit="1/cm">0.809125</I><Idev unit="1/cm">0.0588107</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.215</Q><I unit="1/cm">0.941202</I><Idev unit="1/cm">0.0659121</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.217</Q><I unit="1/cm">0.946175</I><Idev unit="1/cm">0.0690784</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.219</Q><I unit="1/cm">0.859875</I><Idev unit="1/cm">0.0674435</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.221</Q><I unit="1/cm">0.959508</I><Idev unit="1/cm">0.0718856</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.223</Q><I unit="1/cm">0.763222</I><Idev unit="1/cm">0.0702866</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.225</Q><I unit="1/cm">0.785467</I><Idev unit="1/cm">0.0742144</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.227</Q><I unit="1/cm">0.81876</I><Idev unit="1/cm">0.074266</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.229</Q><I unit="1/cm">0.678311</I><Idev unit="1/cm">0.0722578</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.231</Q><I unit="1/cm">0.761442</I><Idev unit="1/cm">0.0814516</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.233</Q><I unit="1/cm">0.757076</I><Idev unit="1/cm">0.0825262</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.235</Q><I unit="1/cm">0.600636</I><Idev unit="1/cm">0.075041</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.237</Q><I unit="1/cm">0.685635</I><Idev unit="1/cm">0.0842392</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.239</Q><I unit="1/cm">0.799186</I><Idev unit="1/cm">0.0974365</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.241</Q><I unit="1/cm">0.737526</I><Idev unit="1/cm">0.0957286</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.243</Q><I unit="1/cm">0.716415</I><Idev unit="1/cm">0.0970448</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.245</Q><I unit="1/cm">0.720413</I><Idev unit="1/cm">0.0981996</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.247</Q><I unit="1/cm">0.604059</I><Idev unit="1/cm">0.100869</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.249</Q><I unit="1/cm">0.649073</I><Idev unit="1/cm">0.109281</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.251</Q><I unit="1/cm">0.700691</I><Idev unit="1/cm">0.114325</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.253</Q><I unit="1/cm">0.586789</I><Idev unit="1/cm">0.108324</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.255</Q><I unit="1/cm">0.765838</I><Idev unit="1/cm">0.139579</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.257</Q><I unit="1/cm">0.828968</I><Idev unit="1/cm">0.156723</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.259</Q><I unit="1/cm">0.616499</I><Idev unit="1/cm">0.137866</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.261</Q><I unit="1/cm">0.526011</I><Idev unit="1/cm">0.126209</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.263</Q><I unit="1/cm">0.51277</I><Idev unit="1/cm">0.126339</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.265</Q><I unit="1/cm">0.604189</I><Idev unit="1/cm">0.166393</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.267</Q><I unit="1/cm">0.738765</I><Idev unit="1/cm">0.194006</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.269</Q><I unit="1/cm">0.462803</I><Idev unit="1/cm">0.155354</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.271</Q><I unit="1/cm">0.478694</I><Idev unit="1/cm">0.171676</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.273</Q><I unit="1/cm">0.711983</I><Idev unit="1/cm">0.255539</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.275</Q><I unit="1/cm">0.473304</I><Idev unit="1/cm">0.230752</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.277</Q><I unit="1/cm">0.536817</I><Idev unit="1/cm">0.262627</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.279</Q><I unit="1/cm">0.660654</I><Idev unit="1/cm">0.297519</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.281</Q><I unit="1/cm">0.408902</I><Idev unit="1/cm">0.24585</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.283</Q><I unit="1/cm">0</I><Idev unit="1/cm">0</Idev><Qdev unit="1/A">0</Qdev></Idata>
+		</SASdata>
+		<SASsample>
+			<ID>TK49 c10_SANS</ID>
+		</SASsample>
+		<SASinstrument>
+			<name>LOQ</name>
+			<SASsource>
+				<radiation>neutron</radiation>
+			</SASsource>
+			<SAScollimation/>
+			<SASdetector>
+				<name>HAB</name>
+				<SDD unit="m">0.575</SDD>
+			</SASdetector>
+			<SASdetector>
+				<name>main-detector-bank</name>
+				<SDD unit="m">4.14502</SDD>
+			</SASdetector>
+		</SASinstrument>
+		<SASprocess>
+			<name>Mantid generated CanSAS1D XML</name>
+			<date>02-Aug-2013 16:54:14</date>
+			<term name="svn">2.5.3</term>
+			<term name="user_file">K:/masks/MASKLOQ_MAN_132E_Lu_Banjo_12mm.txt</term>
+			<SASprocessnote/>
+		</SASprocess>
+		<SASnote>
+		</SASnote>
+	</SASentry>
+</SASroot>
Index: test/sansdataloader/test/ISIS_1_1.xml
===================================================================
--- test/sansdataloader/test/ISIS_1_1.xml	(revision eda89725afadff916f49a3a51d5823023263ff33)
+++ test/sansdataloader/test/ISIS_1_1.xml	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -0,0 +1,319 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="cansas1d.xsl" ?>
+<SASroot version="1.1"
+		 xmlns="urn:cansas1d:1.1"
+		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		 xsi:schemaLocation="urn:cansas1d:1.1 http://www.cansas.org/formats/1.1/cansas1d.xsd"
+		>
+	<SASentry name="79680main_1D_2.2_10.0">
+		<Title>TK49 c10_SANS</Title>
+		<Run>79680</Run>
+		<SASdata>
+			<Idata><Q unit="1/A">0.009</Q><I unit="1/cm">85.3333</I><Idev unit="1/cm">0.852491</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.011</Q><I unit="1/cm">72.5398</I><Idev unit="1/cm">0.639548</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.013</Q><I unit="1/cm">63.3582</I><Idev unit="1/cm">0.494127</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.015</Q><I unit="1/cm">57.0952</I><Idev unit="1/cm">0.414116</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.017</Q><I unit="1/cm">51.0139</I><Idev unit="1/cm">0.35145</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.019</Q><I unit="1/cm">46.4746</I><Idev unit="1/cm">0.308755</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.021</Q><I unit="1/cm">41.7191</I><Idev unit="1/cm">0.271641</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.023</Q><I unit="1/cm">37.4208</I><Idev unit="1/cm">0.244658</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.025</Q><I unit="1/cm">33.7352</I><Idev unit="1/cm">0.219594</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.027</Q><I unit="1/cm">30.6073</I><Idev unit="1/cm">0.203138</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.029</Q><I unit="1/cm">27.7309</I><Idev unit="1/cm">0.185859</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.031</Q><I unit="1/cm">25.2579</I><Idev unit="1/cm">0.171356</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.033</Q><I unit="1/cm">22.7712</I><Idev unit="1/cm">0.159062</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.035</Q><I unit="1/cm">20.5323</I><Idev unit="1/cm">0.146135</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.037</Q><I unit="1/cm">19.0744</I><Idev unit="1/cm">0.136393</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.039</Q><I unit="1/cm">17.2832</I><Idev unit="1/cm">0.127623</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.041</Q><I unit="1/cm">15.7399</I><Idev unit="1/cm">0.118288</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.043</Q><I unit="1/cm">14.5598</I><Idev unit="1/cm">0.111759</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.045</Q><I unit="1/cm">13.5906</I><Idev unit="1/cm">0.105148</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.047</Q><I unit="1/cm">12.6707</I><Idev unit="1/cm">0.0996579</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.049</Q><I unit="1/cm">11.5247</I><Idev unit="1/cm">0.0929646</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.051</Q><I unit="1/cm">10.7089</I><Idev unit="1/cm">0.0888575</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.053</Q><I unit="1/cm">10.1436</I><Idev unit="1/cm">0.0849394</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.055</Q><I unit="1/cm">9.49446</I><Idev unit="1/cm">0.0811205</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.057</Q><I unit="1/cm">8.80775</I><Idev unit="1/cm">0.0773967</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.059</Q><I unit="1/cm">8.33366</I><Idev unit="1/cm">0.0748147</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.061</Q><I unit="1/cm">7.79157</I><Idev unit="1/cm">0.0720107</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.063</Q><I unit="1/cm">7.25902</I><Idev unit="1/cm">0.0693582</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.065</Q><I unit="1/cm">7.04789</I><Idev unit="1/cm">0.0677591</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.067</Q><I unit="1/cm">6.53311</I><Idev unit="1/cm">0.0652207</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.069</Q><I unit="1/cm">6.2453</I><Idev unit="1/cm">0.0642016</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.071</Q><I unit="1/cm">5.94152</I><Idev unit="1/cm">0.0625768</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.073</Q><I unit="1/cm">5.70816</I><Idev unit="1/cm">0.0612955</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.075</Q><I unit="1/cm">5.24449</I><Idev unit="1/cm">0.060141</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.077</Q><I unit="1/cm">5.08291</I><Idev unit="1/cm">0.0582239</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.079</Q><I unit="1/cm">4.88135</I><Idev unit="1/cm">0.057969</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.081</Q><I unit="1/cm">4.60942</I><Idev unit="1/cm">0.056813</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.083</Q><I unit="1/cm">4.46606</I><Idev unit="1/cm">0.0569381</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.085</Q><I unit="1/cm">4.32473</I><Idev unit="1/cm">0.0558766</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.087</Q><I unit="1/cm">4.14144</I><Idev unit="1/cm">0.0552525</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.089</Q><I unit="1/cm">3.86504</I><Idev unit="1/cm">0.0544569</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.091</Q><I unit="1/cm">3.74272</I><Idev unit="1/cm">0.0529596</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.093</Q><I unit="1/cm">3.68281</I><Idev unit="1/cm">0.052891</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.095</Q><I unit="1/cm">3.46991</I><Idev unit="1/cm">0.0517565</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.097</Q><I unit="1/cm">3.37244</I><Idev unit="1/cm">0.0509328</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.099</Q><I unit="1/cm">3.27074</I><Idev unit="1/cm">0.0505183</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.101</Q><I unit="1/cm">3.13326</I><Idev unit="1/cm">0.0490847</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.103</Q><I unit="1/cm">3.01387</I><Idev unit="1/cm">0.0487012</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.105</Q><I unit="1/cm">2.87628</I><Idev unit="1/cm">0.0484307</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.107</Q><I unit="1/cm">2.85043</I><Idev unit="1/cm">0.0476786</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.109</Q><I unit="1/cm">2.72799</I><Idev unit="1/cm">0.0475526</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.111</Q><I unit="1/cm">2.61206</I><Idev unit="1/cm">0.0467475</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.113</Q><I unit="1/cm">2.58895</I><Idev unit="1/cm">0.0469767</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.115</Q><I unit="1/cm">2.45987</I><Idev unit="1/cm">0.0460139</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.117</Q><I unit="1/cm">2.37723</I><Idev unit="1/cm">0.045272</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.119</Q><I unit="1/cm">2.34122</I><Idev unit="1/cm">0.0453741</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.121</Q><I unit="1/cm">2.21745</I><Idev unit="1/cm">0.0444485</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.123</Q><I unit="1/cm">2.12646</I><Idev unit="1/cm">0.0438385</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.125</Q><I unit="1/cm">2.11264</I><Idev unit="1/cm">0.0441662</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.127</Q><I unit="1/cm">2.07523</I><Idev unit="1/cm">0.0438979</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.129</Q><I unit="1/cm">2.03548</I><Idev unit="1/cm">0.0442422</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.131</Q><I unit="1/cm">1.92452</I><Idev unit="1/cm">0.0435959</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.133</Q><I unit="1/cm">1.90866</I><Idev unit="1/cm">0.0437401</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.135</Q><I unit="1/cm">1.91252</I><Idev unit="1/cm">0.0443163</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.137</Q><I unit="1/cm">1.80405</I><Idev unit="1/cm">0.043466</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.139</Q><I unit="1/cm">1.72166</I><Idev unit="1/cm">0.0429246</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.141</Q><I unit="1/cm">1.67199</I><Idev unit="1/cm">0.042469</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.143</Q><I unit="1/cm">1.63282</I><Idev unit="1/cm">0.0430074</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.145</Q><I unit="1/cm">1.63712</I><Idev unit="1/cm">0.0438557</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.147</Q><I unit="1/cm">1.5862</I><Idev unit="1/cm">0.0434135</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.149</Q><I unit="1/cm">1.56121</I><Idev unit="1/cm">0.0432591</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.151</Q><I unit="1/cm">1.49764</I><Idev unit="1/cm">0.0426577</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.153</Q><I unit="1/cm">1.53828</I><Idev unit="1/cm">0.0446481</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.155</Q><I unit="1/cm">1.47366</I><Idev unit="1/cm">0.0441973</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.157</Q><I unit="1/cm">1.40582</I><Idev unit="1/cm">0.0430461</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.159</Q><I unit="1/cm">1.40491</I><Idev unit="1/cm">0.0439883</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.161</Q><I unit="1/cm">1.34639</I><Idev unit="1/cm">0.044193</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.163</Q><I unit="1/cm">1.32238</I><Idev unit="1/cm">0.0438008</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.165</Q><I unit="1/cm">1.33885</I><Idev unit="1/cm">0.0445383</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.167</Q><I unit="1/cm">1.29608</I><Idev unit="1/cm">0.0451575</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.169</Q><I unit="1/cm">1.30562</I><Idev unit="1/cm">0.0460656</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.171</Q><I unit="1/cm">1.17147</I><Idev unit="1/cm">0.0435717</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.173</Q><I unit="1/cm">1.18565</I><Idev unit="1/cm">0.0449072</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.175</Q><I unit="1/cm">1.18944</I><Idev unit="1/cm">0.0465319</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.177</Q><I unit="1/cm">1.17055</I><Idev unit="1/cm">0.0456562</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.179</Q><I unit="1/cm">1.08571</I><Idev unit="1/cm">0.0453852</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.181</Q><I unit="1/cm">1.06208</I><Idev unit="1/cm">0.0463335</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.183</Q><I unit="1/cm">1.06187</I><Idev unit="1/cm">0.0458284</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.185</Q><I unit="1/cm">1.02727</I><Idev unit="1/cm">0.0472613</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.187</Q><I unit="1/cm">0.995169</I><Idev unit="1/cm">0.0465526</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.189</Q><I unit="1/cm">1.02569</I><Idev unit="1/cm">0.0483728</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.191</Q><I unit="1/cm">0.981154</I><Idev unit="1/cm">0.0490559</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.193</Q><I unit="1/cm">1.01831</I><Idev unit="1/cm">0.0502348</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.195</Q><I unit="1/cm">0.968102</I><Idev unit="1/cm">0.0504426</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.197</Q><I unit="1/cm">0.940656</I><Idev unit="1/cm">0.0512734</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.199</Q><I unit="1/cm">1.05762</I><Idev unit="1/cm">0.0547469</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.201</Q><I unit="1/cm">0.949872</I><Idev unit="1/cm">0.055229</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.203</Q><I unit="1/cm">0.891716</I><Idev unit="1/cm">0.0531346</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.205</Q><I unit="1/cm">0.876084</I><Idev unit="1/cm">0.0548681</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.207</Q><I unit="1/cm">0.932101</I><Idev unit="1/cm">0.0576812</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.209</Q><I unit="1/cm">0.927755</I><Idev unit="1/cm">0.0593404</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.211</Q><I unit="1/cm">0.87669</I><Idev unit="1/cm">0.0600369</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.213</Q><I unit="1/cm">0.809125</I><Idev unit="1/cm">0.0588107</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.215</Q><I unit="1/cm">0.941202</I><Idev unit="1/cm">0.0659121</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.217</Q><I unit="1/cm">0.946175</I><Idev unit="1/cm">0.0690784</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.219</Q><I unit="1/cm">0.859875</I><Idev unit="1/cm">0.0674435</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.221</Q><I unit="1/cm">0.959508</I><Idev unit="1/cm">0.0718856</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.223</Q><I unit="1/cm">0.763222</I><Idev unit="1/cm">0.0702866</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.225</Q><I unit="1/cm">0.785467</I><Idev unit="1/cm">0.0742144</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.227</Q><I unit="1/cm">0.81876</I><Idev unit="1/cm">0.074266</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.229</Q><I unit="1/cm">0.678311</I><Idev unit="1/cm">0.0722578</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.231</Q><I unit="1/cm">0.761442</I><Idev unit="1/cm">0.0814516</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.233</Q><I unit="1/cm">0.757076</I><Idev unit="1/cm">0.0825262</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.235</Q><I unit="1/cm">0.600636</I><Idev unit="1/cm">0.075041</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.237</Q><I unit="1/cm">0.685635</I><Idev unit="1/cm">0.0842392</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.239</Q><I unit="1/cm">0.799186</I><Idev unit="1/cm">0.0974365</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.241</Q><I unit="1/cm">0.737526</I><Idev unit="1/cm">0.0957286</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.243</Q><I unit="1/cm">0.716415</I><Idev unit="1/cm">0.0970448</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.245</Q><I unit="1/cm">0.720413</I><Idev unit="1/cm">0.0981996</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.247</Q><I unit="1/cm">0.604059</I><Idev unit="1/cm">0.100869</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.249</Q><I unit="1/cm">0.649073</I><Idev unit="1/cm">0.109281</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.251</Q><I unit="1/cm">0.700691</I><Idev unit="1/cm">0.114325</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.253</Q><I unit="1/cm">0.586789</I><Idev unit="1/cm">0.108324</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.255</Q><I unit="1/cm">0.765838</I><Idev unit="1/cm">0.139579</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.257</Q><I unit="1/cm">0.828968</I><Idev unit="1/cm">0.156723</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.259</Q><I unit="1/cm">0.616499</I><Idev unit="1/cm">0.137866</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.261</Q><I unit="1/cm">0.526011</I><Idev unit="1/cm">0.126209</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.263</Q><I unit="1/cm">0.51277</I><Idev unit="1/cm">0.126339</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.265</Q><I unit="1/cm">0.604189</I><Idev unit="1/cm">0.166393</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.267</Q><I unit="1/cm">0.738765</I><Idev unit="1/cm">0.194006</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.269</Q><I unit="1/cm">0.462803</I><Idev unit="1/cm">0.155354</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.271</Q><I unit="1/cm">0.478694</I><Idev unit="1/cm">0.171676</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.273</Q><I unit="1/cm">0.711983</I><Idev unit="1/cm">0.255539</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.275</Q><I unit="1/cm">0.473304</I><Idev unit="1/cm">0.230752</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.277</Q><I unit="1/cm">0.536817</I><Idev unit="1/cm">0.262627</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.279</Q><I unit="1/cm">0.660654</I><Idev unit="1/cm">0.297519</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.281</Q><I unit="1/cm">0.408902</I><Idev unit="1/cm">0.24585</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.283</Q><I unit="1/cm">0</I><Idev unit="1/cm">0</Idev><Qdev unit="1/A">0</Qdev></Idata>
+		</SASdata>
+		<SAStransmission_spectrum name="sample">
+			<Tdata><Lambda unit="A">2.2385</Lambda><T unit="none">0.81703</T><Tdev unit="none">0.0130497</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.31685</Lambda><T unit="none">0.801978</T><Tdev unit="none">0.0120051</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.39794</Lambda><T unit="none">0.782436</T><Tdev unit="none">0.0112577</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.48186</Lambda><T unit="none">0.795586</T><Tdev unit="none">0.01104</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.56873</Lambda><T unit="none">0.794175</T><Tdev unit="none">0.0107071</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.65864</Lambda><T unit="none">0.807059</T><Tdev unit="none">0.010757</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.75169</Lambda><T unit="none">0.797216</T><Tdev unit="none">0.0106204</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.848</Lambda><T unit="none">0.811763</T><Tdev unit="none">0.0107288</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.94768</Lambda><T unit="none">0.805778</T><Tdev unit="none">0.0105482</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.05085</Lambda><T unit="none">0.787672</T><Tdev unit="none">0.0103436</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.15763</Lambda><T unit="none">0.804061</T><Tdev unit="none">0.0105877</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.26814</Lambda><T unit="none">0.799089</T><Tdev unit="none">0.0105895</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.38253</Lambda><T unit="none">0.810401</T><Tdev unit="none">0.0109026</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.50092</Lambda><T unit="none">0.797859</T><Tdev unit="none">0.0108399</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.62345</Lambda><T unit="none">0.801003</T><Tdev unit="none">0.0110517</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.75027</Lambda><T unit="none">0.78509</T><Tdev unit="none">0.0110209</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.88153</Lambda><T unit="none">0.785537</T><Tdev unit="none">0.0111882</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.01738</Lambda><T unit="none">0.758743</T><Tdev unit="none">0.0110145</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.15799</Lambda><T unit="none">0.767664</T><Tdev unit="none">0.0110323</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.30352</Lambda><T unit="none">0.772965</T><Tdev unit="none">0.0110456</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.45414</Lambda><T unit="none">0.773616</T><Tdev unit="none">0.0109689</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.61004</Lambda><T unit="none">0.72275</T><Tdev unit="none">0.0106718</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.77139</Lambda><T unit="none">0.754627</T><Tdev unit="none">0.0107276</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.93839</Lambda><T unit="none">0.759325</T><Tdev unit="none">0.0105454</Tdev></Tdata>
+			<Tdata><Lambda unit="A">5.11123</Lambda><T unit="none">0.7544</T><Tdev unit="none">0.0106594</Tdev></Tdata>
+			<Tdata><Lambda unit="A">5.29012</Lambda><T unit="none">0.75748</T><Tdev unit="none">0.0107767</Tdev></Tdata>
+			<Tdata><Lambda unit="A">5.47528</Lambda><T unit="none">0.746847</T><Tdev unit="none">0.0107133</Tdev></Tdata>
+			<Tdata><Lambda unit="A">5.66691</Lambda><T unit="none">0.740591</T><Tdev unit="none">0.0109161</Tdev></Tdata>
+			<Tdata><Lambda unit="A">5.86525</Lambda><T unit="none">0.752582</T><Tdev unit="none">0.0113942</Tdev></Tdata>
+			<Tdata><Lambda unit="A">6.07054</Lambda><T unit="none">0.733384</T><Tdev unit="none">0.0114788</Tdev></Tdata>
+			<Tdata><Lambda unit="A">6.28301</Lambda><T unit="none">0.740944</T><Tdev unit="none">0.0120655</Tdev></Tdata>
+			<Tdata><Lambda unit="A">6.50291</Lambda><T unit="none">0.731187</T><Tdev unit="none">0.0119684</Tdev></Tdata>
+			<Tdata><Lambda unit="A">6.73051</Lambda><T unit="none">0.72167</T><Tdev unit="none">0.0125797</Tdev></Tdata>
+			<Tdata><Lambda unit="A">6.96608</Lambda><T unit="none">0.720803</T><Tdev unit="none">0.0135324</Tdev></Tdata>
+			<Tdata><Lambda unit="A">7.2099</Lambda><T unit="none">0.704751</T><Tdev unit="none">0.0140129</Tdev></Tdata>
+			<Tdata><Lambda unit="A">7.46224</Lambda><T unit="none">0.700147</T><Tdev unit="none">0.014837</Tdev></Tdata>
+			<Tdata><Lambda unit="A">7.72342</Lambda><T unit="none">0.707843</T><Tdev unit="none">0.015985</Tdev></Tdata>
+			<Tdata><Lambda unit="A">7.99374</Lambda><T unit="none">0.68084</T><Tdev unit="none">0.0167449</Tdev></Tdata>
+			<Tdata><Lambda unit="A">8.27352</Lambda><T unit="none">0.690755</T><Tdev unit="none">0.0181648</Tdev></Tdata>
+			<Tdata><Lambda unit="A">8.56309</Lambda><T unit="none">0.695218</T><Tdev unit="none">0.0197214</Tdev></Tdata>
+			<Tdata><Lambda unit="A">8.8628</Lambda><T unit="none">0.663369</T><Tdev unit="none">0.0205081</Tdev></Tdata>
+			<Tdata><Lambda unit="A">9.173</Lambda><T unit="none">0.656758</T><Tdev unit="none">0.0219522</Tdev></Tdata>
+			<Tdata><Lambda unit="A">9.49406</Lambda><T unit="none">0.668971</T><Tdev unit="none">0.0248015</Tdev></Tdata>
+			<Tdata><Lambda unit="A">9.82867</Lambda><T unit="none">0.643715</T><Tdev unit="none">0.0263197</Tdev></Tdata>
+			<Tdata><Lambda unit="A">5</Lambda><T unit="none">-3.78577e-270</T><Tdev unit="none">-8.61158e-315</Tdev></Tdata>
+			<Tdata><Lambda unit="A">-1.24052e-265</Lambda><T unit="none">0.0130497</T><Tdev unit="none">3919.89</Tdev></Tdata>
+			<Tdata><Lambda unit="A">6.22902e-151</Lambda><T unit="none">0.0120051</T><Tdev unit="none">4462.63</Tdev></Tdata>
+			<Tdata><Lambda unit="A">6.22902e-151</Lambda><T unit="none">0.0112577</T><Tdev unit="none">4830.61</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.18146e+15</Lambda><T unit="none">0.01104</T><Tdev unit="none">5193.21</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.18146e+15</Lambda><T unit="none">0.0107071</T><Tdev unit="none">5501.58</Tdev></Tdata>
+			<Tdata><Lambda unit="A">5.83244e-320</Lambda><T unit="none">0.010757</T><Tdev unit="none">5628.96</Tdev></Tdata>
+			<Tdata><Lambda unit="A">5.82009e-73</Lambda><T unit="none">0.0106204</T><Tdev unit="none">5634.75</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.86436e+126</Lambda><T unit="none">0.0107288</T><Tdev unit="none">5724.73</Tdev></Tdata>
+			<Tdata><Lambda unit="A">6.43127e+247</Lambda><T unit="none">0.0105482</T><Tdev unit="none">5835.49</Tdev></Tdata>
+			<Tdata><Lambda unit="A">6.43127e+247</Lambda><T unit="none">0.0103436</T><Tdev unit="none">5798.97</Tdev></Tdata>
+			<Tdata><Lambda unit="A">-2.37127e+226</Lambda><T unit="none">0.0105877</T><Tdev unit="none">5767.32</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.86442e+126</Lambda><T unit="none">0.0105895</T><Tdev unit="none">5694.24</Tdev></Tdata>
+			<Tdata><Lambda unit="A">5.52737e-309</Lambda><T unit="none">0.0109026</T><Tdev unit="none">5525.05</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.46672e-310</Lambda><T unit="none">0.0108399</T><Tdev unit="none">5417.49</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.66641e+178</Lambda><T unit="none">0.0110517</T><Tdev unit="none">5253.01</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.66641e+178</Lambda><T unit="none">0.0110209</T><Tdev unit="none">5074.68</Tdev></Tdata>
+			<Tdata><Lambda unit="A">8.62375e+211</Lambda><T unit="none">0.0111882</T><Tdev unit="none">4929.65</Tdev></Tdata>
+			<Tdata><Lambda unit="A">8.62375e+211</Lambda><T unit="none">0.0110145</T><Tdev unit="none">4745.3</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.03531e-87</Lambda><T unit="none">0.0110323</T><Tdev unit="none">4841.86</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.97389e-39</Lambda><T unit="none">0.0110456</T><Tdev unit="none">4897.12</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.97389e-39</Lambda><T unit="none">0.0109689</T><Tdev unit="none">4974.21</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.18818e-212</Lambda><T unit="none">0.0106718</T><Tdev unit="none">4586.67</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.38734e+245</Lambda><T unit="none">0.0107276</T><Tdev unit="none">4948.31</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.38734e+245</Lambda><T unit="none">0.0105454</T><Tdev unit="none">5184.8</Tdev></Tdata>
+			<Tdata><Lambda unit="A">-1.81729e+131</Lambda><T unit="none">0.0106594</T><Tdev unit="none">5008.83</Tdev></Tdata>
+			<Tdata><Lambda unit="A">-1.81729e+131</Lambda><T unit="none">0.0107767</T><Tdev unit="none">4940.5</Tdev></Tdata>
+			<Tdata><Lambda unit="A">6.44115e-232</Lambda><T unit="none">0.0107133</T><Tdev unit="none">4859.81</Tdev></Tdata>
+			<Tdata><Lambda unit="A">6.44115e-232</Lambda><T unit="none">0.0109161</T><Tdev unit="none">4602.81</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.36995e+245</Lambda><T unit="none">0.0113942</T><Tdev unit="none">4362.55</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.36995e+245</Lambda><T unit="none">0.0114788</T><Tdev unit="none">4081.97</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.9782e-39</Lambda><T unit="none">0.0120655</T><Tdev unit="none">3771.18</Tdev></Tdata>
+			<Tdata><Lambda unit="A">5.83667e-73</Lambda><T unit="none">0.0119684</T><Tdev unit="none">3732.39</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.74941e+64</Lambda><T unit="none">0.0125797</T><Tdev unit="none">3291.09</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.74941e+64</Lambda><T unit="none">0.0135324</T><Tdev unit="none">2837.17</Tdev></Tdata>
+			<Tdata><Lambda unit="A">-1.81729e+131</Lambda><T unit="none">0.0140129</T><Tdev unit="none">2529.37</Tdev></Tdata>
+			<Tdata><Lambda unit="A">-1.81729e+131</Lambda><T unit="none">0.014837</T><Tdev unit="none">2226.82</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.40721e-280</Lambda><T unit="none">0.015985</T><Tdev unit="none">1960.88</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.40721e-280</Lambda><T unit="none">0.0167449</T><Tdev unit="none">1653.2</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.84467e+19</Lambda><T unit="none">0.0181648</T><Tdev unit="none">1446.05</Tdev></Tdata>
+			<Tdata><Lambda unit="A">5.67321e+216</Lambda><T unit="none">0.0197214</T><Tdev unit="none">1242.7</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.49371e+245</Lambda><T unit="none">0.0205081</T><Tdev unit="none">1046.31</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.49371e+245</Lambda><T unit="none">0.0219522</T><Tdev unit="none">895.069</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.69054e+192</Lambda><T unit="none">0.0248015</T><Tdev unit="none">727.543</Tdev></Tdata>
+			<Tdata><Lambda unit="A">8.62169e+211</Lambda><T unit="none">0.0263197</T><Tdev unit="none">598.171</Tdev></Tdata>
+			<Tdata><Lambda unit="A">8.62169e+211</Lambda><T unit="none">-8.61158e-315</T><Tdev unit="none">-8.61158e-315</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.74996e-68</Lambda><T unit="none">3919.89</T><Tdev unit="none">2.2385</Tdev></Tdata>
+			<Tdata><Lambda unit="A">8.75213e-78</Lambda><T unit="none">4462.63</T><Tdev unit="none">2.31685</Tdev></Tdata>
+			<Tdata><Lambda unit="A">-3.14339e-315</Lambda><T unit="none">4830.61</T><Tdev unit="none">2.39794</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.08255e-226</Lambda><T unit="none">5193.21</T><Tdev unit="none">2.48186</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.07499e+102</Lambda><T unit="none">5501.58</T><Tdev unit="none">2.56873</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.07499e+102</Lambda><T unit="none">5628.96</T><Tdev unit="none">2.65864</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.07508e+102</Lambda><T unit="none">5634.75</T><Tdev unit="none">2.75169</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.07508e+102</Lambda><T unit="none">5724.73</T><Tdev unit="none">2.848</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.81253e-303</Lambda><T unit="none">5835.49</T><Tdev unit="none">2.94768</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.35808e-312</Lambda><T unit="none">5798.97</T><Tdev unit="none">3.05085</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.07513e+102</Lambda><T unit="none">5767.32</T><Tdev unit="none">3.15763</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.07513e+102</Lambda><T unit="none">5694.24</T><Tdev unit="none">3.26814</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.38311e-315</Lambda><T unit="none">5525.05</T><Tdev unit="none">3.38253</Tdev></Tdata>
+			<Tdata><Lambda unit="A">8.52704e-316</Lambda><T unit="none">5417.49</T><Tdev unit="none">3.50092</Tdev></Tdata>
+			<Tdata><Lambda unit="A">0</Lambda><T unit="none">5253.01</T><Tdev unit="none">3.62345</Tdev></Tdata>
+			<Tdata><Lambda unit="A">0</Lambda><T unit="none">5074.68</T><Tdev unit="none">3.75027</Tdev></Tdata>
+			<Tdata><Lambda unit="A">0</Lambda><T unit="none">4929.65</T><Tdev unit="none">3.88153</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.54616e-315</Lambda><T unit="none">4745.3</T><Tdev unit="none">4.01738</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.54616e-315</Lambda><T unit="none">4841.86</T><Tdev unit="none">4.15799</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.71357e+104</Lambda><T unit="none">4897.12</T><Tdev unit="none">4.30352</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.72432e+104</Lambda><T unit="none">4974.21</T><Tdev unit="none">4.45414</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.15015e+102</Lambda><T unit="none">4586.67</T><Tdev unit="none">4.61004</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.07508e+102</Lambda><T unit="none">4948.31</T><Tdev unit="none">4.77139</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.53041e-315</Lambda><T unit="none">5184.8</T><Tdev unit="none">4.93839</Tdev></Tdata>
+			<Tdata><Lambda unit="A">0</Lambda><T unit="none">5008.83</T><Tdev unit="none">5.11123</Tdev></Tdata>
+			<Tdata><Lambda unit="A">0</Lambda><T unit="none">4940.5</T><Tdev unit="none">5.29012</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.00379e-270</Lambda><T unit="none">4859.81</T><Tdev unit="none">5.47528</Tdev></Tdata>
+			<Tdata><Lambda unit="A">2.00379e-270</Lambda><T unit="none">4602.81</T><Tdev unit="none">5.66691</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.58351e-312</Lambda><T unit="none">4362.55</T><Tdev unit="none">5.86525</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.7472e-287</Lambda><T unit="none">4081.97</T><Tdev unit="none">6.07054</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.74845e-287</Lambda><T unit="none">3771.18</T><Tdev unit="none">6.28301</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.24882e-290</Lambda><T unit="none">3732.39</T><Tdev unit="none">6.50291</Tdev></Tdata>
+			<Tdata><Lambda unit="A">NaN</Lambda><T unit="none">3291.09</T><Tdev unit="none">6.73051</Tdev></Tdata>
+			<Tdata><Lambda unit="A">NaN</Lambda><T unit="none">2837.17</T><Tdev unit="none">6.96608</Tdev></Tdata>
+			<Tdata><Lambda unit="A">NaN</Lambda><T unit="none">2529.37</T><Tdev unit="none">7.2099</Tdev></Tdata>
+			<Tdata><Lambda unit="A">NaN</Lambda><T unit="none">2226.82</T><Tdev unit="none">7.46224</Tdev></Tdata>
+			<Tdata><Lambda unit="A">1.07499e+102</Lambda><T unit="none">1960.88</T><Tdev unit="none">7.72342</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.32977e-311</Lambda><T unit="none">1653.2</T><Tdev unit="none">7.99374</Tdev></Tdata>
+			<Tdata><Lambda unit="A">7.19961e-310</Lambda><T unit="none">1446.05</T><Tdev unit="none">8.27352</Tdev></Tdata>
+			<Tdata><Lambda unit="A">7.19962e-310</Lambda><T unit="none">1242.7</T><Tdev unit="none">8.56309</Tdev></Tdata>
+			<Tdata><Lambda unit="A">8.20107e-316</Lambda><T unit="none">1046.31</T><Tdev unit="none">8.8628</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.18299e-314</Lambda><T unit="none">895.069</T><Tdev unit="none">9.173</Tdev></Tdata>
+			<Tdata><Lambda unit="A">7.42699e-314</Lambda><T unit="none">727.543</T><Tdev unit="none">9.49406</Tdev></Tdata>
+			<Tdata><Lambda unit="A">4.24399e-314</Lambda><T unit="none">598.171</T><Tdev unit="none">9.82867</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.16202e-322</Lambda><T unit="none">-8.61158e-315</T><Tdev unit="none">-3.78577e-270</Tdev></Tdata>
+			<Tdata><Lambda unit="A">0</Lambda><T unit="none">2.2385</T><Tdev unit="none">0.00307782</Tdev></Tdata>
+			<Tdata><Lambda unit="A">0</Lambda><T unit="none">2.31685</T><Tdev unit="none">0.00300224</Tdev></Tdata>
+			<Tdata><Lambda unit="A">3.53041e-315</Lambda><T unit="none">2.39794</T><Tdev unit="none">0.00292546</Tdev></Tdata>
+		</SAStransmission_spectrum>
+		<SASsample>
+			<ID>TK49 c10_SANS</ID>
+		</SASsample>
+		<SASinstrument>
+			<name>LOQ</name>
+			<SASsource>
+				<radiation>neutron</radiation>
+			</SASsource>
+			<SAScollimation/>
+			<SASdetector>
+				<name>HAB</name>
+				<SDD unit="m">0.575</SDD>
+			</SASdetector>
+			<SASdetector>
+				<name>main-detector-bank</name>
+				<SDD unit="m">4.14502</SDD>
+			</SASdetector>
+		</SASinstrument>
+		<SASprocess>
+			<name>Mantid generated CanSAS1D XML</name>
+			<date>02-Aug-2013 16:53:56</date>
+			<term name="svn">2.5.3</term>
+			<term name="user_file">K:/masks/MASKLOQ_MAN_132E_Lu_Banjo_12mm.txt</term>
+			<SASprocessnote/>
+		</SASprocess>
+		<SASnote>
+		</SASnote>
+	</SASentry>
+</SASroot>
Index: test/sansdataloader/test/ISIS_1_1_notrans.xml
===================================================================
--- test/sansdataloader/test/ISIS_1_1_notrans.xml	(revision eda89725afadff916f49a3a51d5823023263ff33)
+++ test/sansdataloader/test/ISIS_1_1_notrans.xml	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -0,0 +1,179 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="cansas1d.xsl" ?>
+<SASroot version="1.1"
+		 xmlns="urn:cansas1d:1.1"
+		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		 xsi:schemaLocation="urn:cansas1d:1.1 http://www.cansas.org/formats/1.1/cansas1d.xsd"
+		>
+	<SASentry name="79680main_1D_2.2_10.0">
+		<Title>TK49 c10_SANS</Title>
+		<Run>79680</Run>
+		<SASdata>
+			<Idata><Q unit="1/A">0.009</Q><I unit="1/cm">85.3333</I><Idev unit="1/cm">0.852491</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.011</Q><I unit="1/cm">72.5398</I><Idev unit="1/cm">0.639548</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.013</Q><I unit="1/cm">63.3582</I><Idev unit="1/cm">0.494127</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.015</Q><I unit="1/cm">57.0952</I><Idev unit="1/cm">0.414116</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.017</Q><I unit="1/cm">51.0139</I><Idev unit="1/cm">0.35145</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.019</Q><I unit="1/cm">46.4746</I><Idev unit="1/cm">0.308755</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.021</Q><I unit="1/cm">41.7191</I><Idev unit="1/cm">0.271641</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.023</Q><I unit="1/cm">37.4208</I><Idev unit="1/cm">0.244658</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.025</Q><I unit="1/cm">33.7352</I><Idev unit="1/cm">0.219594</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.027</Q><I unit="1/cm">30.6073</I><Idev unit="1/cm">0.203138</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.029</Q><I unit="1/cm">27.7309</I><Idev unit="1/cm">0.185859</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.031</Q><I unit="1/cm">25.2579</I><Idev unit="1/cm">0.171356</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.033</Q><I unit="1/cm">22.7712</I><Idev unit="1/cm">0.159062</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.035</Q><I unit="1/cm">20.5323</I><Idev unit="1/cm">0.146135</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.037</Q><I unit="1/cm">19.0744</I><Idev unit="1/cm">0.136393</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.039</Q><I unit="1/cm">17.2832</I><Idev unit="1/cm">0.127623</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.041</Q><I unit="1/cm">15.7399</I><Idev unit="1/cm">0.118288</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.043</Q><I unit="1/cm">14.5598</I><Idev unit="1/cm">0.111759</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.045</Q><I unit="1/cm">13.5906</I><Idev unit="1/cm">0.105148</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.047</Q><I unit="1/cm">12.6707</I><Idev unit="1/cm">0.0996579</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.049</Q><I unit="1/cm">11.5247</I><Idev unit="1/cm">0.0929646</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.051</Q><I unit="1/cm">10.7089</I><Idev unit="1/cm">0.0888575</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.053</Q><I unit="1/cm">10.1436</I><Idev unit="1/cm">0.0849394</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.055</Q><I unit="1/cm">9.49446</I><Idev unit="1/cm">0.0811205</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.057</Q><I unit="1/cm">8.80775</I><Idev unit="1/cm">0.0773967</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.059</Q><I unit="1/cm">8.33366</I><Idev unit="1/cm">0.0748147</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.061</Q><I unit="1/cm">7.79157</I><Idev unit="1/cm">0.0720107</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.063</Q><I unit="1/cm">7.25902</I><Idev unit="1/cm">0.0693582</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.065</Q><I unit="1/cm">7.04789</I><Idev unit="1/cm">0.0677591</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.067</Q><I unit="1/cm">6.53311</I><Idev unit="1/cm">0.0652207</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.069</Q><I unit="1/cm">6.2453</I><Idev unit="1/cm">0.0642016</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.071</Q><I unit="1/cm">5.94152</I><Idev unit="1/cm">0.0625768</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.073</Q><I unit="1/cm">5.70816</I><Idev unit="1/cm">0.0612955</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.075</Q><I unit="1/cm">5.24449</I><Idev unit="1/cm">0.060141</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.077</Q><I unit="1/cm">5.08291</I><Idev unit="1/cm">0.0582239</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.079</Q><I unit="1/cm">4.88135</I><Idev unit="1/cm">0.057969</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.081</Q><I unit="1/cm">4.60942</I><Idev unit="1/cm">0.056813</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.083</Q><I unit="1/cm">4.46606</I><Idev unit="1/cm">0.0569381</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.085</Q><I unit="1/cm">4.32473</I><Idev unit="1/cm">0.0558766</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.087</Q><I unit="1/cm">4.14144</I><Idev unit="1/cm">0.0552525</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.089</Q><I unit="1/cm">3.86504</I><Idev unit="1/cm">0.0544569</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.091</Q><I unit="1/cm">3.74272</I><Idev unit="1/cm">0.0529596</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.093</Q><I unit="1/cm">3.68281</I><Idev unit="1/cm">0.052891</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.095</Q><I unit="1/cm">3.46991</I><Idev unit="1/cm">0.0517565</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.097</Q><I unit="1/cm">3.37244</I><Idev unit="1/cm">0.0509328</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.099</Q><I unit="1/cm">3.27074</I><Idev unit="1/cm">0.0505183</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.101</Q><I unit="1/cm">3.13326</I><Idev unit="1/cm">0.0490847</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.103</Q><I unit="1/cm">3.01387</I><Idev unit="1/cm">0.0487012</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.105</Q><I unit="1/cm">2.87628</I><Idev unit="1/cm">0.0484307</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.107</Q><I unit="1/cm">2.85043</I><Idev unit="1/cm">0.0476786</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.109</Q><I unit="1/cm">2.72799</I><Idev unit="1/cm">0.0475526</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.111</Q><I unit="1/cm">2.61206</I><Idev unit="1/cm">0.0467475</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.113</Q><I unit="1/cm">2.58895</I><Idev unit="1/cm">0.0469767</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.115</Q><I unit="1/cm">2.45987</I><Idev unit="1/cm">0.0460139</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.117</Q><I unit="1/cm">2.37723</I><Idev unit="1/cm">0.045272</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.119</Q><I unit="1/cm">2.34122</I><Idev unit="1/cm">0.0453741</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.121</Q><I unit="1/cm">2.21745</I><Idev unit="1/cm">0.0444485</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.123</Q><I unit="1/cm">2.12646</I><Idev unit="1/cm">0.0438385</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.125</Q><I unit="1/cm">2.11264</I><Idev unit="1/cm">0.0441662</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.127</Q><I unit="1/cm">2.07523</I><Idev unit="1/cm">0.0438979</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.129</Q><I unit="1/cm">2.03548</I><Idev unit="1/cm">0.0442422</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.131</Q><I unit="1/cm">1.92452</I><Idev unit="1/cm">0.0435959</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.133</Q><I unit="1/cm">1.90866</I><Idev unit="1/cm">0.0437401</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.135</Q><I unit="1/cm">1.91252</I><Idev unit="1/cm">0.0443163</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.137</Q><I unit="1/cm">1.80405</I><Idev unit="1/cm">0.043466</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.139</Q><I unit="1/cm">1.72166</I><Idev unit="1/cm">0.0429246</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.141</Q><I unit="1/cm">1.67199</I><Idev unit="1/cm">0.042469</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.143</Q><I unit="1/cm">1.63282</I><Idev unit="1/cm">0.0430074</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.145</Q><I unit="1/cm">1.63712</I><Idev unit="1/cm">0.0438557</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.147</Q><I unit="1/cm">1.5862</I><Idev unit="1/cm">0.0434135</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.149</Q><I unit="1/cm">1.56121</I><Idev unit="1/cm">0.0432591</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.151</Q><I unit="1/cm">1.49764</I><Idev unit="1/cm">0.0426577</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.153</Q><I unit="1/cm">1.53828</I><Idev unit="1/cm">0.0446481</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.155</Q><I unit="1/cm">1.47366</I><Idev unit="1/cm">0.0441973</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.157</Q><I unit="1/cm">1.40582</I><Idev unit="1/cm">0.0430461</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.159</Q><I unit="1/cm">1.40491</I><Idev unit="1/cm">0.0439883</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.161</Q><I unit="1/cm">1.34639</I><Idev unit="1/cm">0.044193</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.163</Q><I unit="1/cm">1.32238</I><Idev unit="1/cm">0.0438008</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.165</Q><I unit="1/cm">1.33885</I><Idev unit="1/cm">0.0445383</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.167</Q><I unit="1/cm">1.29608</I><Idev unit="1/cm">0.0451575</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.169</Q><I unit="1/cm">1.30562</I><Idev unit="1/cm">0.0460656</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.171</Q><I unit="1/cm">1.17147</I><Idev unit="1/cm">0.0435717</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.173</Q><I unit="1/cm">1.18565</I><Idev unit="1/cm">0.0449072</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.175</Q><I unit="1/cm">1.18944</I><Idev unit="1/cm">0.0465319</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.177</Q><I unit="1/cm">1.17055</I><Idev unit="1/cm">0.0456562</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.179</Q><I unit="1/cm">1.08571</I><Idev unit="1/cm">0.0453852</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.181</Q><I unit="1/cm">1.06208</I><Idev unit="1/cm">0.0463335</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.183</Q><I unit="1/cm">1.06187</I><Idev unit="1/cm">0.0458284</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.185</Q><I unit="1/cm">1.02727</I><Idev unit="1/cm">0.0472613</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.187</Q><I unit="1/cm">0.995169</I><Idev unit="1/cm">0.0465526</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.189</Q><I unit="1/cm">1.02569</I><Idev unit="1/cm">0.0483728</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.191</Q><I unit="1/cm">0.981154</I><Idev unit="1/cm">0.0490559</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.193</Q><I unit="1/cm">1.01831</I><Idev unit="1/cm">0.0502348</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.195</Q><I unit="1/cm">0.968102</I><Idev unit="1/cm">0.0504426</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.197</Q><I unit="1/cm">0.940656</I><Idev unit="1/cm">0.0512734</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.199</Q><I unit="1/cm">1.05762</I><Idev unit="1/cm">0.0547469</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.201</Q><I unit="1/cm">0.949872</I><Idev unit="1/cm">0.055229</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.203</Q><I unit="1/cm">0.891716</I><Idev unit="1/cm">0.0531346</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.205</Q><I unit="1/cm">0.876084</I><Idev unit="1/cm">0.0548681</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.207</Q><I unit="1/cm">0.932101</I><Idev unit="1/cm">0.0576812</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.209</Q><I unit="1/cm">0.927755</I><Idev unit="1/cm">0.0593404</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.211</Q><I unit="1/cm">0.87669</I><Idev unit="1/cm">0.0600369</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.213</Q><I unit="1/cm">0.809125</I><Idev unit="1/cm">0.0588107</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.215</Q><I unit="1/cm">0.941202</I><Idev unit="1/cm">0.0659121</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.217</Q><I unit="1/cm">0.946175</I><Idev unit="1/cm">0.0690784</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.219</Q><I unit="1/cm">0.859875</I><Idev unit="1/cm">0.0674435</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.221</Q><I unit="1/cm">0.959508</I><Idev unit="1/cm">0.0718856</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.223</Q><I unit="1/cm">0.763222</I><Idev unit="1/cm">0.0702866</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.225</Q><I unit="1/cm">0.785467</I><Idev unit="1/cm">0.0742144</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.227</Q><I unit="1/cm">0.81876</I><Idev unit="1/cm">0.074266</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.229</Q><I unit="1/cm">0.678311</I><Idev unit="1/cm">0.0722578</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.231</Q><I unit="1/cm">0.761442</I><Idev unit="1/cm">0.0814516</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.233</Q><I unit="1/cm">0.757076</I><Idev unit="1/cm">0.0825262</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.235</Q><I unit="1/cm">0.600636</I><Idev unit="1/cm">0.075041</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.237</Q><I unit="1/cm">0.685635</I><Idev unit="1/cm">0.0842392</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.239</Q><I unit="1/cm">0.799186</I><Idev unit="1/cm">0.0974365</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.241</Q><I unit="1/cm">0.737526</I><Idev unit="1/cm">0.0957286</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.243</Q><I unit="1/cm">0.716415</I><Idev unit="1/cm">0.0970448</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.245</Q><I unit="1/cm">0.720413</I><Idev unit="1/cm">0.0981996</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.247</Q><I unit="1/cm">0.604059</I><Idev unit="1/cm">0.100869</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.249</Q><I unit="1/cm">0.649073</I><Idev unit="1/cm">0.109281</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.251</Q><I unit="1/cm">0.700691</I><Idev unit="1/cm">0.114325</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.253</Q><I unit="1/cm">0.586789</I><Idev unit="1/cm">0.108324</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.255</Q><I unit="1/cm">0.765838</I><Idev unit="1/cm">0.139579</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.257</Q><I unit="1/cm">0.828968</I><Idev unit="1/cm">0.156723</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.259</Q><I unit="1/cm">0.616499</I><Idev unit="1/cm">0.137866</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.261</Q><I unit="1/cm">0.526011</I><Idev unit="1/cm">0.126209</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.263</Q><I unit="1/cm">0.51277</I><Idev unit="1/cm">0.126339</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.265</Q><I unit="1/cm">0.604189</I><Idev unit="1/cm">0.166393</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.267</Q><I unit="1/cm">0.738765</I><Idev unit="1/cm">0.194006</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.269</Q><I unit="1/cm">0.462803</I><Idev unit="1/cm">0.155354</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.271</Q><I unit="1/cm">0.478694</I><Idev unit="1/cm">0.171676</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.273</Q><I unit="1/cm">0.711983</I><Idev unit="1/cm">0.255539</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.275</Q><I unit="1/cm">0.473304</I><Idev unit="1/cm">0.230752</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.277</Q><I unit="1/cm">0.536817</I><Idev unit="1/cm">0.262627</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.279</Q><I unit="1/cm">0.660654</I><Idev unit="1/cm">0.297519</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.281</Q><I unit="1/cm">0.408902</I><Idev unit="1/cm">0.24585</Idev><Qdev unit="1/A">0</Qdev></Idata>
+			<Idata><Q unit="1/A">0.283</Q><I unit="1/cm">0</I><Idev unit="1/cm">0</Idev><Qdev unit="1/A">0</Qdev></Idata>
+		</SASdata>
+		<SASsample>
+			<ID>TK49 c10_SANS</ID>
+		</SASsample>
+		<SASinstrument>
+			<name>LOQ</name>
+			<SASsource>
+				<radiation>neutron</radiation>
+			</SASsource>
+			<SAScollimation/>
+			<SASdetector>
+				<name>HAB</name>
+				<SDD unit="m">0.575</SDD>
+			</SASdetector>
+			<SASdetector>
+				<name>main-detector-bank</name>
+				<SDD unit="m">4.14502</SDD>
+			</SASdetector>
+		</SASinstrument>
+		<SASprocess>
+			<name>Mantid generated CanSAS1D XML</name>
+			<date>02-Aug-2013 16:53:56</date>
+			<term name="svn">2.5.3</term>
+			<term name="user_file">K:/masks/MASKLOQ_MAN_132E_Lu_Banjo_12mm.txt</term>
+			<SASprocessnote/>
+		</SASprocess>
+		<SASnote>
+		</SASnote>
+	</SASentry>
+</SASroot>
Index: test/sansdataloader/test/cansas1d.xml
===================================================================
--- test/sansdataloader/test/cansas1d.xml	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ test/sansdataloader/test/cansas1d.xml	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -49,5 +49,5 @@
 			
 		</SASsample>
-		<SASinstrument name="TEST instrument">
+		<SASinstrument>
 			<name>canSAS instrument</name>
 			<SASsource name="source name">
@@ -85,13 +85,13 @@
 					4.150
 				</SDD>
-				<orientation>
+				<offset>
+                    <x unit="mm">1</x>
+                    <y unit="mm">2</y>
+                </offset>
+                <orientation>
 					<roll unit="degree">1.00</roll>
 					<pitch unit="degree">0.00</pitch>
 					<yaw unit="degree">0.00</yaw>
 				</orientation>
-				<offset>
-					<x unit="mm">1</x>
-					<y unit="mm">2</y>
-				</offset>
 				<beam_center>
 					<x unit="mm">322.64</x>
@@ -135,5 +135,5 @@
 			<term name="ABS:IZERO">230.09</term>
 			<term name="ABS:XSECT" unit="mm">1</term>
-			<SASprocessnote/>
+			<SASprocessnote>No Information</SASprocessnote>
 		</SASprocess>
 		<SASnote />
Index: test/sansdataloader/test/cansas1d_badunits.xml
===================================================================
--- test/sansdataloader/test/cansas1d_badunits.xml	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ test/sansdataloader/test/cansas1d_badunits.xml	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -49,5 +49,5 @@
 			
 		</SASsample>
-		<SASinstrument name="TEST instrument">
+		<SASinstrument>
 			<name>canSAS instrument</name>
 			<SASsource name="source name">
@@ -85,13 +85,13 @@
 					4.150
 				</SDD>
-				<orientation>
+				<offset>
+                    <x unit="nm">1000000</x>
+                    <y unit="micron">2000</y>
+                </offset>
+                <orientation>
 					<roll unit="radian">.0174533</roll>
 					<pitch unit="rad">0.00</pitch>
 					<yaw unit="radian">0.00</yaw>
 				</orientation>
-				<offset>
-					<x unit="nm">1000000</x>
-					<y unit="micron">2000</y>
-				</offset>
 				<beam_center>
 					<x unit="m">.32264</x>
Index: test/sansdataloader/test/cansas1d_slit.xml
===================================================================
--- test/sansdataloader/test/cansas1d_slit.xml	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ test/sansdataloader/test/cansas1d_slit.xml	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -14,7 +14,7 @@
 				<I unit="1/cm">1000</I>
 				<Idev unit="1/cm">3</Idev>
+				<dQw unit="1/A">0.001</dQw>
 				<dQl unit="1/A">0.005</dQl>
-				<dQw unit="1/A">0.001</dQw>
-				<Shadowfactor><!-- Shadowfactor is optional --></Shadowfactor>
+                <Shadowfactor><!-- Shadowfactor is optional --></Shadowfactor>
 			</Idata>
 			<Idata>
@@ -22,7 +22,7 @@
 				<I unit="1/cm">1001</I>
 				<Idev unit="1/cm">4</Idev>
+				<dQw unit="1/A">0.001</dQw>
 				<dQl unit="1/A">0.005</dQl>
-				<dQw unit="1/A">0.001</dQw>
-				<Shadowfactor><!-- Shadowfactor is optional --></Shadowfactor>
+                <Shadowfactor><!-- Shadowfactor is optional --></Shadowfactor>
 			</Idata>
 		</SASdata>
@@ -49,5 +49,5 @@
 			
 		</SASsample>
-		<SASinstrument name="TEST instrument">
+		<SASinstrument>
 			<name>canSAS instrument</name>
 			<SASsource name="source name">
@@ -85,13 +85,13 @@
 					4.150
 				</SDD>
-				<orientation>
+				<offset>
+                    <x unit="mm">1</x>
+                    <y unit="mm">2</y>
+                </offset>
+                <orientation>
 					<roll unit="degree">1.00</roll>
 					<pitch unit="degree">0.00</pitch>
 					<yaw unit="degree">0.00</yaw>
 				</orientation>
-				<offset>
-					<x unit="mm">1</x>
-					<y unit="mm">2</y>
-				</offset>
 				<beam_center>
 					<x unit="mm">322.64</x>
Index: test/sansdataloader/test/cansas1d_units.xml
===================================================================
--- test/sansdataloader/test/cansas1d_units.xml	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ test/sansdataloader/test/cansas1d_units.xml	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -11,5 +11,5 @@
 		<SASdata>
 			<Idata>
-				<Q unit="1/nm">0.2</Q>
+				<Q unit="1/nm">0.002</Q>
 				<I unit="1/nm">0.0001</I>
 				<Idev unit="1/nm">.0000003</Idev>
@@ -49,5 +49,5 @@
 			
 		</SASsample>
-		<SASinstrument name="TEST instrument">
+		<SASinstrument>
 			<name>canSAS instrument</name>
 			<SASsource name="source name">
@@ -85,13 +85,13 @@
 					4.150
 				</SDD>
-				<orientation>
+				<offset>
+                    <x unit="nm">1000000</x>
+                    <y unit="micron">2000</y>
+                </offset>
+                <orientation>
 					<roll unit="radian">.0174533</roll>
 					<pitch unit="rad">0.00</pitch>
 					<yaw unit="radian">0.00</yaw>
 				</orientation>
-				<offset>
-					<x unit="nm">1000000</x>
-					<y unit="micron">2000</y>
-				</offset>
 				<beam_center>
 					<x unit="m">.32264</x>
Index: test/sansdataloader/test/cansas1d_v1_0.xsd
===================================================================
--- test/sansdataloader/test/cansas1d_v1_0.xsd	(revision eda89725afadff916f49a3a51d5823023263ff33)
+++ test/sansdataloader/test/cansas1d_v1_0.xsd	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="xsd-documentation.xsl" ?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"  jaxb:version="2.0"
+	targetNamespace="cansas1d/1.0" xmlns:tns="cansas1d/1.0"
+	elementFormDefault="qualified">
+
+<!-- JAXB: http://java.sun.com/developer/technicalArticles/WebServices/jaxb/ -->
+
+	<complexType name="floatUnitType">
+		<simpleContent>
+			<extension base="float">
+				<attribute name="unit" type="string" use="required" />
+			</extension>
+		</simpleContent>
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<group name="positionGroup">
+		<sequence>
+			<element name="x" type="tns:floatUnitType" minOccurs="0" maxOccurs="1" />
+			<element name="y" type="tns:floatUnitType" minOccurs="0" maxOccurs="1" />
+			<element name="z" type="tns:floatUnitType" minOccurs="0" maxOccurs="1" />
+		</sequence>
+	</group>
+
+	<complexType name="positionType">
+		<group ref="tns:positionGroup" />
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<group name="orientationGroup">
+		<sequence>
+			<element name="roll" type="tns:floatUnitType" minOccurs="0"  maxOccurs="1" />
+			<element name="pitch" type="tns:floatUnitType" minOccurs="0" maxOccurs="1" />
+			<element name="yaw" type="tns:floatUnitType" minOccurs="0"   maxOccurs="1" />
+		</sequence>
+	</group>
+
+	<complexType name="orientationType">
+		<group ref="tns:orientationGroup" />
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="IdataType">
+		<sequence>
+			<element name="Q" minOccurs="1" maxOccurs="1"    type="tns:floatUnitType" />
+			<element name="I" minOccurs="1" maxOccurs="1"    type="tns:floatUnitType" />
+			<element name="Idev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+			<xsd:choice>
+				<!-- [ [Qdev] | [[dQw] | [dQl]] ] -->
+				<element name="Qdev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+				<xsd:sequence>
+					<element name="dQw" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+					<element name="dQl" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+				</xsd:sequence>
+			</xsd:choice>
+			<element name="Qmean" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+			<element name="Shadowfactor" minOccurs="0" maxOccurs="1" type="float" default="1.0" />
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+		</sequence>
+	</complexType>
+
+	<complexType name="SASdataType">
+		<sequence>
+			<element name="Idata" minOccurs="1" maxOccurs="unbounded" type="tns:IdataType" />
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="SASsampleType">
+		<sequence>
+			<element name="ID" minOccurs="1" maxOccurs="1" type="string" />
+			<element name="thickness" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="transmission" minOccurs="0" maxOccurs="1" type="float" />
+			<element name="temperature" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="position" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+			<element name="orientation" minOccurs="0" maxOccurs="1" type="tns:orientationType" />
+			<element name="details" minOccurs="0" maxOccurs="unbounded" />
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="termType">
+		<simpleContent>
+			<extension base="string">
+				<attribute name="name" type="string" use="optional" default="" />
+				<attribute name="unit" type="string" use="optional"/>
+			</extension>
+		</simpleContent>
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="SASprocessType">
+		<annotation>
+			<appinfo>
+				<!-- JAXB: simplify class name -->
+				<jaxb:property name="SASprocess" />
+			</appinfo>
+		</annotation>
+		<sequence>
+			<element name="name" minOccurs="0" maxOccurs="1"
+				type="string" default="">
+				<annotation>
+					<appinfo>
+						<!-- Remap collision of Name when using JAXB -->
+						<jaxb:property name="SASprocessName" />
+					</appinfo>
+				</annotation>
+			</element>
+			<element name="date" minOccurs="0" maxOccurs="1" type="string" />
+			<element name="description" minOccurs="0" maxOccurs="1" />
+			<element name="term" minOccurs="0" maxOccurs="unbounded" type="tns:termType" />
+			<element name="SASprocessnote" minOccurs="1" maxOccurs="unbounded" />
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="">
+			<annotation>
+				<appinfo>
+					<!-- Remap collision of Name when using JAXB -->
+					<jaxb:property name="SASprocessNameAttr" />
+				</appinfo>
+			</annotation>
+		</attribute>
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="SASsourceType">
+		<sequence>
+			<element name="radiation" minOccurs="1" maxOccurs="1" type="string" />
+			<element name="beam_size" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+			<element name="beam_shape" minOccurs="0" maxOccurs="1" type="string" />
+			<element name="wavelength" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="wavelength_min" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="wavelength_max" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="wavelength_spread" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<complexType name="SAScollimationType">
+		<sequence>
+			<element name="length" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="aperture" minOccurs="0"
+				maxOccurs="unbounded">
+				<complexType>
+					<sequence>
+						<element name="size" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+						<element name="distance" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+					</sequence>
+					<attribute name="name" type="string" use="optional" default="" />
+					<attribute name="type" type="string" use="optional" default="" />
+				</complexType>
+			</element>
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<complexType name="SASdetectorType">
+		<sequence>
+			<element name="name" minOccurs="1" maxOccurs="1" type="string" default=""/>
+			<element name="SDD" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="offset" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+			<element name="orientation" minOccurs="0" maxOccurs="1" type="tns:orientationType" />
+			<element name="beam_center" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+			<element name="pixel_size" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+			<element name="slit_length" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+		</sequence>
+	</complexType>
+
+	<complexType name="SASinstrumentType">
+		<sequence>
+			<element name="name" type="string" minOccurs="1" maxOccurs="1" default="" />
+			<element name="SASsource" type="tns:SASsourceType" minOccurs="1" maxOccurs="1" />
+			<element name="SAScollimation" type="tns:SAScollimationType" minOccurs="1" maxOccurs="unbounded" />
+			<element name="SASdetector" type="tns:SASdetectorType" minOccurs="1" maxOccurs="unbounded" />
+		</sequence>
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="SASentryType">
+		<sequence>
+			<element name="Title" minOccurs="1" maxOccurs="1" type="string" />
+			<element name="Run" minOccurs="1" maxOccurs="unbounded">
+				<xsd:complexType>
+					<simpleContent>
+						<extension base="string">
+							<attribute name="name" type="string" use="optional" default="" />
+						</extension>
+					</simpleContent>
+				</xsd:complexType>
+			</element>
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+			<element name="SASdata" minOccurs="1" maxOccurs="unbounded" type="tns:SASdataType" />
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other">
+				<!-- Is a second *any* element needed here? -->
+				<annotation>
+					<appinfo>
+						<!-- Remap collision of Any when using JAXB --> 
+						<jaxb:property name="SASentryAny2" />
+					</appinfo>
+				</annotation>
+			</xsd:any>
+			<element name="SASsample" type="tns:SASsampleType" />
+			<element name="SASinstrument" type="tns:SASinstrumentType" minOccurs="1" maxOccurs="1" />
+			<element name="SASprocess" type="tns:SASprocessType" minOccurs="0" maxOccurs="unbounded" />
+			<element name="SASnote" minOccurs="1" maxOccurs="unbounded" />
+				<!-- SASnote is a free-form element.
+					Do not define any content for it or it will become restrictive.
+				-->
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="SASrootType">
+		<sequence>
+			<element name="SASentry" minOccurs="1" maxOccurs="unbounded" type="tns:SASentryType" />
+		</sequence>
+		<attribute name="version" type="string" fixed="1.0" use="required" />
+	</complexType>
+
+	<element name="SASroot" type="tns:SASrootType" />
+
+</schema>
Index: test/sansdataloader/test/cansas1d_v1_1.xsd
===================================================================
--- test/sansdataloader/test/cansas1d_v1_1.xsd	(revision eda89725afadff916f49a3a51d5823023263ff33)
+++ test/sansdataloader/test/cansas1d_v1_1.xsd	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -0,0 +1,271 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="xsd-documentation.xsl" ?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"  jaxb:version="2.0"
+	targetNamespace="urn:cansas1d:1.1" xmlns:tns="urn:cansas1d:1.1"
+	elementFormDefault="qualified">
+
+<!-- 
+Copyright (c) 2013, UChicago Argonne, LLC
+This file is distributed subject to a Software License Agreement found
+in the file LICENSE that is included with this distribution. 
+ -->
+ 
+<!-- JAXB: http://java.sun.com/developer/technicalArticles/WebServices/jaxb/ -->
+
+	<complexType name="floatUnitType">
+		<simpleContent>
+			<extension base="float">
+				<attribute name="unit" type="string" use="required" />
+			</extension>
+		</simpleContent>
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<group name="positionGroup">
+		<sequence>
+			<element name="x" type="tns:floatUnitType" minOccurs="0" maxOccurs="1" />
+			<element name="y" type="tns:floatUnitType" minOccurs="0" maxOccurs="1" />
+			<element name="z" type="tns:floatUnitType" minOccurs="0" maxOccurs="1" />
+		</sequence>
+	</group>
+
+	<complexType name="positionType">
+		<group ref="tns:positionGroup" />
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<group name="orientationGroup">
+		<sequence>
+			<element name="roll" type="tns:floatUnitType" minOccurs="0"  maxOccurs="1" />
+			<element name="pitch" type="tns:floatUnitType" minOccurs="0" maxOccurs="1" />
+			<element name="yaw" type="tns:floatUnitType" minOccurs="0"   maxOccurs="1" />
+		</sequence>
+	</group>
+
+	<complexType name="orientationType">
+		<group ref="tns:orientationGroup" />
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+	
+	<complexType name="IdataType">
+		<sequence>
+			<element name="Q" minOccurs="1" maxOccurs="1"    type="tns:floatUnitType" />
+			<element name="I" minOccurs="1" maxOccurs="1"    type="tns:floatUnitType" />
+			<element name="Idev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+			<xsd:choice>
+				<!-- [ [Qdev] | [[dQw] | [dQl]] ] -->
+				<element name="Qdev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+				<xsd:sequence>
+					<element name="dQw" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+					<element name="dQl" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+				</xsd:sequence>
+			</xsd:choice>
+			<element name="Qmean" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+			<element name="Shadowfactor" minOccurs="0" maxOccurs="1" type="float" default="1.0" />
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+		</sequence>
+	</complexType>
+	
+	<complexType name="SASdataType">
+		<sequence minOccurs="1" maxOccurs="1">  <!-- http://svn.cansas.org/trac/ticket/21 -->
+			<sequence>
+				<element name="Idata" minOccurs="1" maxOccurs="unbounded" type="tns:IdataType" />
+			</sequence>
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+		<attribute name="timestamp" type="dateTime" use="optional" />
+	</complexType>
+	
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+	
+	<complexType name="TdataType">
+			<sequence>
+				<element name="Lambda" minOccurs="1" maxOccurs="1"    type="tns:floatUnitType" />
+				<element name="T" minOccurs="1" maxOccurs="1"    type="tns:floatUnitType" />
+				<element name="Tdev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+				<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+		</sequence>
+	</complexType>
+	
+	<complexType name="SAStransmission_spectrumType">
+		<sequence minOccurs="1" maxOccurs="1">
+			<sequence minOccurs="1" maxOccurs="1">
+				<element name="Tdata" minOccurs="1" maxOccurs="unbounded" type="tns:TdataType" />
+			</sequence>
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+		<attribute name="timestamp" type="dateTime" use="optional" />
+	</complexType>
+	
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="SASsampleType">
+		<sequence>
+			<element name="ID" minOccurs="1" maxOccurs="1" type="string" />
+			<element name="thickness" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="transmission" minOccurs="0" maxOccurs="1" type="float" />
+			<element name="temperature" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="position" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+			<element name="orientation" minOccurs="0" maxOccurs="1" type="tns:orientationType" />
+			<element name="details" minOccurs="0" maxOccurs="unbounded" />
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="termType">
+		<simpleContent>
+			<extension base="string">
+				<attribute name="name" type="string" use="optional" default="" />
+				<attribute name="unit" type="string" use="optional"/>
+			</extension>
+		</simpleContent>
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="SASprocessType">
+		<annotation>
+			<appinfo>
+				<!-- JAXB: simplify class name -->
+				<jaxb:property name="SASprocess" />
+			</appinfo>
+		</annotation>
+		<sequence>
+			<element name="name" minOccurs="0" maxOccurs="1"
+				type="string" default="">
+				<annotation>
+					<appinfo>
+						<!-- Remap collision of Name when using JAXB -->
+						<jaxb:property name="SASprocessName" />
+					</appinfo>
+				</annotation>
+			</element>
+			<element name="date" minOccurs="0" maxOccurs="1" type="string" />
+			<element name="description" minOccurs="0" maxOccurs="1" />
+			<element name="term" minOccurs="0" maxOccurs="unbounded" type="tns:termType" />
+			<element name="SASprocessnote" minOccurs="1" maxOccurs="unbounded" />
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="">
+			<annotation>
+				<appinfo>
+					<!-- Remap collision of Name when using JAXB -->
+					<jaxb:property name="SASprocessNameAttr" />
+				</appinfo>
+			</annotation>
+		</attribute>
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="SASsourceType">
+		<sequence>
+			<element name="radiation" minOccurs="1" maxOccurs="1" type="string" />
+			<element name="beam_size" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+			<element name="beam_shape" minOccurs="0" maxOccurs="1" type="string" />
+			<element name="wavelength" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="wavelength_min" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="wavelength_max" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="wavelength_spread" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<complexType name="SAScollimationType">
+		<sequence>
+			<element name="length" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="aperture" minOccurs="0"
+				maxOccurs="unbounded">
+				<complexType>
+					<sequence>
+						<element name="size" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+						<element name="distance" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+					</sequence>
+					<attribute name="name" type="string" use="optional" default="" />
+					<attribute name="type" type="string" use="optional" default="" />
+				</complexType>
+			</element>
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<complexType name="SASdetectorType">
+		<sequence>
+			<element name="name" minOccurs="1" maxOccurs="1" type="string" default=""/>
+			<element name="SDD" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="offset" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+			<element name="orientation" minOccurs="0" maxOccurs="1" type="tns:orientationType" />
+			<element name="beam_center" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+			<element name="pixel_size" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+			<element name="slit_length" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+		</sequence>
+	</complexType>
+
+	<complexType name="SASinstrumentType">
+		<sequence>
+			<element name="name" type="string" minOccurs="1" maxOccurs="1" default="" />
+			<element name="SASsource" type="tns:SASsourceType" minOccurs="1" maxOccurs="1" />
+			<element name="SAScollimation" type="tns:SAScollimationType" minOccurs="1" maxOccurs="unbounded" />
+			<element name="SASdetector" type="tns:SASdetectorType" minOccurs="1" maxOccurs="unbounded" />
+		</sequence>
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="SASentryType">
+		<sequence>
+			<element name="Title" minOccurs="1" maxOccurs="1" type="string" />
+			<element name="Run" minOccurs="1" maxOccurs="unbounded">
+				<xsd:complexType>
+					<simpleContent>
+						<extension base="string">
+							<attribute name="name" type="string" use="optional" default="" />
+						</extension>
+					</simpleContent>
+				</xsd:complexType>
+			</element>
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+			<element name="SASdata" minOccurs="1" maxOccurs="unbounded" type="tns:SASdataType" />
+			<element name="SAStransmission_spectrum" minOccurs="0" maxOccurs="unbounded" type="tns:SAStransmission_spectrumType"/>
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other">
+				<!-- Is a second *any* element needed here? -->
+				<annotation>
+					<appinfo>
+						<!-- Remap collision of Any when using JAXB --> 
+						<jaxb:property name="SASentryAny2" />
+					</appinfo>
+				</annotation>
+			</xsd:any>
+			<element name="SASsample" type="tns:SASsampleType" />
+			<element name="SASinstrument" type="tns:SASinstrumentType" minOccurs="1" maxOccurs="1" />
+			<element name="SASprocess" type="tns:SASprocessType" minOccurs="0" maxOccurs="unbounded" />
+			<element name="SASnote" minOccurs="1" maxOccurs="unbounded" />
+				<!-- SASnote is a free-form element.
+					Do not define any content for it or it will become restrictive.
+				-->
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="SASrootType">
+		<sequence>
+			<element name="SASentry" minOccurs="1" maxOccurs="unbounded" type="tns:SASentryType" />
+		</sequence>
+		<attribute name="version" type="string" fixed="1.1" use="required" />
+	</complexType>
+
+	<element name="SASroot" type="tns:SASrootType" />
+
+</schema>
Index: test/sansdataloader/test/cansas_test_modified.xml
===================================================================
--- test/sansdataloader/test/cansas_test_modified.xml	(revision eda89725afadff916f49a3a51d5823023263ff33)
+++ test/sansdataloader/test/cansas_test_modified.xml	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -0,0 +1,109 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="example.xsl" ?>
+<SASroot version="1.0"
+    xmlns="cansas1d/1.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="cansas1d/1.0 http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd"
+    >
+	<SASentry>
+		<Title>ILL-D11 example1: 2A 5mM 0%D2O</Title>
+		<Run>g013586.001</Run>
+		<SASdata>
+			<Idata><Q unit="1/A">  0.000E+00 </Q><I unit="1/cm">  0.0000E+00 </I><Idev unit="1/cm">  0.000E+00 </Idev><Qdev unit="1/A">  0.00E+00 </Qdev></Idata>
+			<Idata><Q unit="1/A">  1.047E-03 </Q><I unit="1/cm">  0.0000E+00 </I><Idev unit="1/cm">  0.000E+00 </Idev><Qdev unit="1/A">  9.14E-04 </Qdev></Idata>
+			<Idata><Q unit="1/A">  2.094E-03 </Q><I unit="1/cm">  0.0000E+00 </I><Idev unit="1/cm">  0.000E+00 </Idev><Qdev unit="1/A">  9.32E-04 </Qdev></Idata>
+			<Idata><Q unit="1/A">  3.142E-03 </Q><I unit="1/cm">  0.0000E+00 </I><Idev unit="1/cm">  0.000E+00 </Idev><Qdev unit="1/A">  9.61E-04 </Qdev></Idata>
+			<Idata><Q unit="1/A">  4.189E-03 </Q><I unit="1/cm">  0.0000E+00 </I><Idev unit="1/cm">  0.000E+00 </Idev><Qdev unit="1/A">  1.00E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  5.364E-03 </Q><I unit="1/cm">  5.4484E+00 </I><Idev unit="1/cm">  1.647E-01 </Idev><Qdev unit="1/A">  1.05E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  6.255E-03 </Q><I unit="1/cm">  4.9963E+00 </I><Idev unit="1/cm">  9.122E-02 </Idev><Qdev unit="1/A">  1.10E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  7.299E-03 </Q><I unit="1/cm">  4.6705E+00 </I><Idev unit="1/cm">  7.450E-02 </Idev><Qdev unit="1/A">  1.17E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  8.340E-03 </Q><I unit="1/cm">  4.2690E+00 </I><Idev unit="1/cm">  5.745E-02 </Idev><Qdev unit="1/A">  1.23E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  9.395E-03 </Q><I unit="1/cm">  4.0078E+00 </I><Idev unit="1/cm">  5.484E-02 </Idev><Qdev unit="1/A">  1.31E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  1.045E-02 </Q><I unit="1/cm">  3.8409E+00 </I><Idev unit="1/cm">  4.939E-02 </Idev><Qdev unit="1/A">  1.38E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  1.151E-02 </Q><I unit="1/cm">  3.6579E+00 </I><Idev unit="1/cm">  4.750E-02 </Idev><Qdev unit="1/A">  1.47E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  1.258E-02 </Q><I unit="1/cm">  3.4413E+00 </I><Idev unit="1/cm">  4.344E-02 </Idev><Qdev unit="1/A">  1.55E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  1.362E-02 </Q><I unit="1/cm">  3.2571E+00 </I><Idev unit="1/cm">  4.197E-02 </Idev><Qdev unit="1/A">  1.64E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  1.465E-02 </Q><I unit="1/cm">  3.0475E+00 </I><Idev unit="1/cm">  4.016E-02 </Idev><Qdev unit="1/A">  1.72E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  1.570E-02 </Q><I unit="1/cm">  2.9447E+00 </I><Idev unit="1/cm">  3.703E-02 </Idev><Qdev unit="1/A">  1.81E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  1.674E-02 </Q><I unit="1/cm">  2.8542E+00 </I><Idev unit="1/cm">  3.706E-02 </Idev><Qdev unit="1/A">  1.90E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  1.779E-02 </Q><I unit="1/cm">  2.6221E+00 </I><Idev unit="1/cm">  3.293E-02 </Idev><Qdev unit="1/A">  2.00E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  1.886E-02 </Q><I unit="1/cm">  2.5466E+00 </I><Idev unit="1/cm">  3.318E-02 </Idev><Qdev unit="1/A">  2.09E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  1.989E-02 </Q><I unit="1/cm">  2.4346E+00 </I><Idev unit="1/cm">  3.203E-02 </Idev><Qdev unit="1/A">  2.19E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  2.093E-02 </Q><I unit="1/cm">  2.2702E+00 </I><Idev unit="1/cm">  3.034E-02 </Idev><Qdev unit="1/A">  2.28E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  2.198E-02 </Q><I unit="1/cm">  2.2182E+00 </I><Idev unit="1/cm">  3.011E-02 </Idev><Qdev unit="1/A">  2.38E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  2.303E-02 </Q><I unit="1/cm">  2.0914E+00 </I><Idev unit="1/cm">  2.798E-02 </Idev><Qdev unit="1/A">  2.48E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  2.408E-02 </Q><I unit="1/cm">  2.0097E+00 </I><Idev unit="1/cm">  2.795E-02 </Idev><Qdev unit="1/A">  2.57E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  2.511E-02 </Q><I unit="1/cm">  1.9056E+00 </I><Idev unit="1/cm">  2.684E-02 </Idev><Qdev unit="1/A">  2.67E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  2.617E-02 </Q><I unit="1/cm">  1.8275E+00 </I><Idev unit="1/cm">  2.559E-02 </Idev><Qdev unit="1/A">  2.77E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  2.724E-02 </Q><I unit="1/cm">  1.7406E+00 </I><Idev unit="1/cm">  2.508E-02 </Idev><Qdev unit="1/A">  2.87E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  2.828E-02 </Q><I unit="1/cm">  1.6591E+00 </I><Idev unit="1/cm">  2.441E-02 </Idev><Qdev unit="1/A">  2.97E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  2.932E-02 </Q><I unit="1/cm">  1.5903E+00 </I><Idev unit="1/cm">  2.451E-02 </Idev><Qdev unit="1/A">  3.07E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  3.035E-02 </Q><I unit="1/cm">  1.4810E+00 </I><Idev unit="1/cm">  2.289E-02 </Idev><Qdev unit="1/A">  3.17E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  3.140E-02 </Q><I unit="1/cm">  1.4093E+00 </I><Idev unit="1/cm">  2.279E-02 </Idev><Qdev unit="1/A">  3.27E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  3.242E-02 </Q><I unit="1/cm">  1.3394E+00 </I><Idev unit="1/cm">  2.281E-02 </Idev><Qdev unit="1/A">  3.37E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  3.349E-02 </Q><I unit="1/cm">  1.2679E+00 </I><Idev unit="1/cm">  2.555E-02 </Idev><Qdev unit="1/A">  3.47E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  3.454E-02 </Q><I unit="1/cm">  1.2336E+00 </I><Idev unit="1/cm">  2.911E-02 </Idev><Qdev unit="1/A">  3.57E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  3.560E-02 </Q><I unit="1/cm">  1.1766E+00 </I><Idev unit="1/cm">  2.880E-02 </Idev><Qdev unit="1/A">  3.67E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  3.666E-02 </Q><I unit="1/cm">  1.0849E+00 </I><Idev unit="1/cm">  3.269E-02 </Idev><Qdev unit="1/A">  3.78E-03 </Qdev></Idata>
+			<Idata><Q unit="1/A">  3.750E-02 </Q><I unit="1/cm">  1.0130E+00 </I><Idev unit="1/cm">  5.246E-02 </Idev><Qdev unit="1/A">  3.86E-03 </Qdev></Idata>
+		</SASdata>
+		<SASsample>
+		    <ID>This is a test file</ID>
+			<thickness unit="mm">0.0000</thickness>
+			<transmission>0.0000</transmission>
+			<temperature unit="C">32.0000</temperature>
+			<position>
+				<x unit="mm">10.00</x>
+				<y unit="mm">0.00</y>
+			</position>
+			<orientation>
+				<roll unit="degree">0.020<!-- was: sample_offset_angle_deg --></roll>
+			</orientation>
+		</SASsample>
+		<SASinstrument>
+			<name>D11</name>
+			<SASsource>
+				<radiation>neutron</radiation>
+				<beam_size>
+					<x unit="mm">30.00</x>
+					<y unit="mm">0.00</y>
+				</beam_size>
+				<wavelength unit="A">6.00</wavelength>
+				<wavelength_spread unit="A">0.00</wavelength_spread>
+			</SASsource>
+			<SAScollimation>
+				<length unit="m">10.000</length>
+			</SAScollimation>
+			<SASdetector>
+				<name />
+				<SDD unit="m">10.000</SDD>
+				<orientation>
+					<roll unit="degree">0.00<!-- was: offset_angle_deg --></roll>
+				</orientation>
+				<beam_center>
+					<x unit="mm">311.00</x>
+					<y unit="mm">315.00</y>
+				</beam_center>
+				<pixel_size>
+					<x unit="mm">10.00</x>
+					<y unit="mm">10.00</y>
+				</pixel_size>
+			</SASdetector>
+		</SASinstrument>
+		<SASprocess name="spol" >
+			<name>spol</name>
+			<date>04-Sep-2007 18:12:27</date>
+			<term name="radialstep" unit="mm">10.000</term>
+			<term name="sector_width" unit="deg">180.0</term>
+			<term name="sector_orient" unit="deg">0.0</term>
+			<term name="Flux_monitor">1.00</term>
+			<term name="Count_time" unit="s">900.000</term>
+			<term name="Q_resolution">estimated</term>
+			<SASprocessnote name="01">  AvA1 0.0000E+00 AsA2 1.0000E+00 XvA3 1.1111E+01 XsA4 5.2200E-02 XfA5 0.0000E+00 </SASprocessnote>
+			<SASprocessnote name="02"> S... 13586  0  5.63E+01 2A 5mM 0%D2O    Sbak 13567  0  1.88E+01 H2O buffer       </SASprocessnote>
+			<SASprocessnote name="03"> Sbak 13533  0  7.49E+00 H2O buffer      V... 13552  1  1.00E+00 Normal 10m from  </SASprocessnote>
+			<SASprocessnote name="04" />
+		</SASprocess>
+		<SASnote />
+	</SASentry>
+</SASroot>
Index: test/sansdataloader/test/test_3_columns.txt
===================================================================
--- test/sansdataloader/test/test_3_columns.txt	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ test/sansdataloader/test/test_3_columns.txt	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -2,5 +2,5 @@
 #A=2.5
 #B=4
-0  2.83954  0.6
+0.000000  2.83954  0.6
 0.204082  3.44938  0.676531
 0.408163  5.82026  0.753061
Index: test/sansdataloader/test/test_log.txt
===================================================================
--- test/sansdataloader/test/test_log.txt	(revision eda89725afadff916f49a3a51d5823023263ff33)
+++ test/sansdataloader/test/test_log.txt	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -0,0 +1,5 @@
+2013-12-13 14:02:18,947 DEBUG Inside testLoad module
+2013-12-13 14:02:19,323 INFO Danse_reader Reading MP_New.sans 
+
+2013-12-13 14:02:19,381 INFO Danse_reader Reading P_New.sans 
+
Index: test/sansdataloader/test/utest_abs_reader.py
===================================================================
--- test/sansdataloader/test/utest_abs_reader.py	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ test/sansdataloader/test/utest_abs_reader.py	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -160,6 +160,9 @@
     def setUp(self):
         self.data = Loader().load("cansas1d.xml")
+        if isinstance(self.data, list):
+            self.data = self.data[0]
  
     def test_cansas_checkdata(self):
+        print "\rtest_cansas_checkdata"
         self.assertEqual(self.data.filename, "cansas1d.xml")
         self._checkdata()
@@ -247,4 +250,8 @@
             self.assertEqual(item.size_unit,'mm')
             self.assertEqual(item.distance_unit,'mm')
+            print "size.x = {0}".format(item.size.x)
+            print "distance = {0}".format(item.distance)
+            print "name = {0}".format(item.name)
+            print "type = {0}".format(item.type)
             
             if item.size.x==50 \
@@ -311,4 +318,5 @@
         
     def test_writer(self):
+        print "\rtest_writer"
         from sans.dataloader.readers.cansas_reader import Reader
         r = Reader()
@@ -319,5 +327,5 @@
         filename = "write_test.xml"
         r.write(filename, self.data)
-        self.data = Loader().load(filename)
+        self.data = Loader().load(filename)[0]
         self.assertEqual(self.data.filename, filename)
         self._checkdata()
@@ -328,6 +336,9 @@
             Note that not all units are available.
         """
+        print "\rtest_units"
         filename = "cansas1d_units.xml"
         self.data = Loader().load(filename)
+        if isinstance(self.data, list):
+            self.data = self.data[0]
         self.assertEqual(self.data.filename, filename)
         self._checkdata()
@@ -338,6 +349,9 @@
             Note that not all units are available.
         """
+        print "\rtest_badunits"
         filename = "cansas1d_badunits.xml"
         self.data = Loader().load(filename)
+        if isinstance(self.data, list):
+            self.data = self.data[0]
         self.assertEqual(self.data.filename, filename)
         # The followed should not have been loaded
@@ -354,6 +368,9 @@
             Check slit data
         """
+        print "\rtest_slits"
         filename = "cansas1d_slit.xml"
         self.data = Loader().load(filename)
+        if isinstance(self.data, list):
+            self.data = self.data[0]
         self.assertEqual(self.data.filename, filename)
         self.assertEqual(self.data.run[0], "1234")
@@ -361,4 +378,5 @@
         # Data
         self.assertEqual(len(self.data.x), 2)
+        print self.data.x
         self.assertEqual(self.data.x_unit, '1/A')
         self.assertEqual(self.data.y_unit, '1/cm')
@@ -370,9 +388,9 @@
         self.assertEqual(self.data.x[1], 0.03)
         self.assertAlmostEquals(self.data.y[1], 1001.0)
-        self.assertEqual(self.data.dx[1], 0.0)
+        self.assertEqual(self.data.dx, None)
         self.assertEqual(self.data.dxl[1], 0.005)
         self.assertEqual(self.data.dxw[1], 0.001)
         self.assertEqual(self.data.dy[1], 4)
-        self.assertEqual(self.data.run_name['1234'], 'run name')
+        # self.assertEqual(self.data.run_name['1234'], 'run name')
         self.assertEqual(self.data.title, "Test title")
 
Index: test/sansdataloader/test/utest_cansas.py
===================================================================
--- test/sansdataloader/test/utest_cansas.py	(revision ffbe487235261db53473e1fe28d7b1953c7e31dd)
+++ test/sansdataloader/test/utest_cansas.py	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -6,9 +6,16 @@
 
 import unittest
-from sans.dataloader.loader import  Loader
-from sans.dataloader.readers.cansas_reader_new import Reader
+import numpy
+import sans.dataloader.readers.cansas_reader as cansas
+from sans.dataloader.loader import Loader
+from sans.dataloader.data_info import Data1D
+from sans.dataloader.readers.xml_reader import XMLreader
+from sans.dataloader.readers.cansas_reader import Reader
+from sans.dataloader.readers.cansas_constants import cansasConstants
 
 import os
 import sys
+import urllib2
+import StringIO
 
 from lxml import etree
@@ -17,9 +24,10 @@
 HAS_CONVERTER = True
 try:
-    from sans.data_util.nxsunit import Converter
+    from data_util.nxsunit import Converter
 except:
     HAS_CONVERTER = False
  
-CANSAS_NS = "cansas1d/1.0"   
+CANSAS_FORMAT = cansasConstants.CANSAS_FORMAT
+CANSAS_NS = cansasConstants.CANSAS_NS
 ALLOW_ALL = True
     
@@ -28,32 +36,101 @@
     def setUp(self):
         self.loader = Loader()
-        self.reader = Reader()
+        self.xml_valid = "cansas_test_modified.xml"
+        self.xml_invalid = "cansas_test.xml"
+        self.cansas1d_badunits = "cansas1d_badunits.xml"
+        self.cansas1d = "cansas1d.xml"
+        self.cansas1d_slit = "cansas1d_slit.xml"
+        self.cansas1d_units = "cansas1d_units.xml"
+        self.write_test = "write_test.xml"
+        self.isis_1_0 = "ISIS_1_0.xml"
+        self.isis_1_1 = "ISIS_1_1.xml"
+        self.isis_1_1_notrans = "ISIS_1_1_notrans.xml"
+        self.schema_1_0 = "cansas1d_v1_0.xsd"
+        self.schema_1_1 = "cansas1d_v1_1.xsd"
+    
+    def get_number_of_entries(self, dictionary, name, i):
+        if dictionary.get(name) is not None:
+            i += 1
+            name = name.split("_")[0]
+            name += "_{0}".format(i)
+            name = self.get_number_of_entries(dictionary, name, i)
+        return name
+
+    def test_xml_validate(self):
+        string = "<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\n"
+        string += "\t<xsd:element name=\"a\" type=\"AType\"/>\n"
+        string += "\t<xsd:complexType name=\"AType\">\n"
+        string += "\t\t<xsd:sequence>\n"
+        string += "\t\t\t<xsd:element name=\"b\" type=\"xsd:string\" />\n"
+        string += "\t\t</xsd:sequence>\n"
+        string += "\t</xsd:complexType>\n"
+        string += "</xsd:schema>"
+        f = StringIO.StringIO(string)
+        xmlschema_doc = etree.parse(f)
+        xmlschema = etree.XMLSchema(xmlschema_doc)
+        valid = etree.parse(StringIO.StringIO('<a><b></b></a>'))
+        invalid = etree.parse(StringIO.StringIO('<a><c></c></a>'))
+        self.assertTrue(xmlschema.validate(valid))
+        self.assertFalse(xmlschema.validate(invalid))
         
-    def test_checkdata(self):
-        output = []
-        ns = []
-        path = "cansas_test.xml"
-        if os.path.isfile(path):
-            basename = os.path.basename(path)
-            root, extension = os.path.splitext(basename)
-            if ALLOW_ALL or extension.lower() in self.ext:
-                try:
-                    tree = tree = etree.parse(path, parser=etree.ETCompatXMLParser())
-                    # Check the format version number
-                    # Specifying the namespace will take care of the file
-                    # format version
-                    for elem in tree.iter():
-                        tag = elem.tag.replace('{cansas1d/1.0}', '')
-                        print 'element: {0}, stripped element: {1}, value: {2}'.format(
-                                                                    elem.tag, tag, elem.text)
-                    # reader_return = self.reader._parse_entry(tree)
-                        
-                except Exception as e:
-                    exc_type, exc_obj, exc_tb = sys.exc_info()
-                    fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
-                    print(exc_type, fname, exc_tb.tb_lineno)
+    def test_real_xml(self):
+        reader = XMLreader(self.xml_valid, self.schema_1_0)
+        valid = reader.validateXML()
+        if valid:
+            self.assertTrue(valid)
+        else:
+            self.assertFalse(valid)
         
-        print(output)
+    def test_cansas_xml(self):
+        xmlreader = XMLreader(self.isis_1_1, self.schema_1_1)
+        valid = xmlreader.validateXML()
+        self.assertTrue(valid)
+        reader = Reader()
+        dataloader = reader.read(self.isis_1_1)
+        for data in dataloader:
+            self.assertTrue(data.title == "TK49 c10_SANS")
+            self.assertTrue(data.x.size == 138)
+            self.assertTrue(len(data.meta_data) == 417)
+            self.assertTrue(data.detector[0].distance_unit == "mm")
+                    
+    def test_entry_name_recurse(self):
+        test_values = [1,2,3,4,5,6]
+        base_key = "key"
+        d = {}
+        for value in test_values:
+            new_key = self.get_number_of_entries(d, base_key, i = 0)
+            d[new_key] = value
+        self.assertTrue(len(d) == 6)
+    
+    def test_load_cansas_file(self):
+        valid = []
+        reader1 = XMLreader(self.xml_valid, self.schema_1_0)
+        self.assertTrue(reader1.validateXML())
+        reader2 = XMLreader(self.xml_invalid, self.schema_1_0)
+        self.assertFalse(reader2.validateXML())
+        reader3 = XMLreader(self.xml_valid, self.schema_1_1)
+        self.assertFalse(reader3.validateXML())
+        reader4 = XMLreader(self.xml_invalid, self.schema_1_1)
+        self.assertFalse(reader4.validateXML())
+        reader5 = XMLreader(self.isis_1_0, self.schema_1_0)
+        self.assertTrue(reader5.validateXML())
+        reader6 = XMLreader(self.isis_1_1, self.schema_1_1)
+        self.assertTrue(reader6.validateXML())
+        reader7 = XMLreader(self.isis_1_1, self.schema_1_0)
+        self.assertFalse(reader7.validateXML())
+    
+    def test_old_cansas_files(self):
+        reader1 = XMLreader(self.cansas1d, self.schema_1_0)
+        self.assertTrue(reader1.validateXML())
+        reader2 = XMLreader(self.cansas1d_units, self.schema_1_0)
+        self.assertTrue(reader2.validateXML())
+        reader3 = XMLreader(self.cansas1d_badunits, self.schema_1_0)
+        self.assertTrue(reader3.validateXML())
+        reader4 = XMLreader(self.cansas1d_slit, self.schema_1_0)
+        self.assertTrue(reader4.validateXML())
+        reader5 = XMLreader(self.write_test, self.schema_1_0)
+        self.assertTrue(reader5.validateXML())
         
+
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main()    
Index: test/sansdataloader/test/write_test.xml
===================================================================
--- test/sansdataloader/test/write_test.xml	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ test/sansdataloader/test/write_test.xml	(revision eda89725afadff916f49a3a51d5823023263ff33)
@@ -16,16 +16,10 @@
 					1000.0
 				</I>
+                <Idev unit="1/cm">
+                    3.0
+                </Idev>
 				<Qdev unit="1/A">
 					0.01
 				</Qdev>
-				<dQl unit="1/A">
-					0.0
-				</dQl>
-				<dQw unit="1/A">
-					0.0
-				</dQw>
-				<Idev unit="1/cm">
-					3.0
-				</Idev>
 			</Idata>
 			<Idata>
@@ -36,16 +30,10 @@
 					1001.0
 				</I>
+                <Idev unit="1/cm">
+                    4.0
+                </Idev>
 				<Qdev unit="1/A">
 					0.02
 				</Qdev>
-				<dQl unit="1/A">
-					0.0
-				</dQl>
-				<dQw unit="1/A">
-					0.0
-				</dQw>
-				<Idev unit="1/cm">
-					4.0
-				</Idev>
 			</Idata>
 		</SASdata>
@@ -63,4 +51,20 @@
 				0.0
 			</temperature>
+            <position>
+                <x unit="mm">
+                    10.0
+                </x>
+                <y unit="mm">
+                    0.0
+                </y>
+            </position>
+            <orientation>
+                <roll unit="degree">
+                    22.5
+                </roll>
+                <pitch unit="degree">
+                    0.02
+                </pitch>
+            </orientation>
 			<details>
 				http://chemtools.chem.soton.ac.uk/projects/blog/blogs.php/bit_id/2720
@@ -69,20 +73,4 @@
 				Some text here
 			</details>
-			<position>
-				<x unit="mm">
-					10.0
-				</x>
-				<y unit="mm">
-					0.0
-				</y>
-			</position>
-			<orientation>
-				<roll unit="degree">
-					22.5
-				</roll>
-				<pitch unit="degree">
-					0.02
-				</pitch>
-			</orientation>
 		</SASsample>
 		<SASinstrument>
@@ -94,15 +82,15 @@
 					neutron
 				</radiation>
+                <beam_size name="bm">
+                    <x unit="mm">
+                        12.0
+                    </x>
+                    <y unit="mm">
+                        13.0
+                    </y>
+                </beam_size>
 				<beam_shape>
 					disc
 				</beam_shape>
-				<beam_size name="bm">
-					<x unit="mm">
-						12.0
-					</x>
-					<y unit="mm">
-						13.0
-					</y>
-				</beam_size>
 				<wavelength unit="A">
 					6.0
@@ -123,7 +111,4 @@
 				</length>
 				<aperture name="source" type="radius">
-					<distance unit="mm">
-						11000
-					</distance>
 					<size>
 						<x unit="mm">
@@ -131,4 +116,7 @@
 						</x>
 					</size>
+					<distance unit="mm">
+                        11000
+                    </distance>
 				</aperture>
 				<aperture name="sample" type="radius">
@@ -155,4 +143,15 @@
 					</y>
 				</offset>
+                <orientation>
+                    <roll unit="degree">
+                        1.0
+                    </roll>
+                    <pitch unit="degree">
+                        0.0
+                    </pitch>
+                    <yaw unit="degree">
+                        0.0
+                    </yaw>
+                </orientation>
 				<beam_center>
 					<x unit="mm">
@@ -171,15 +170,4 @@
 					</y>
 				</pixel_size>
-				<orientation>
-					<roll unit="degree">
-						1.0
-					</roll>
-					<pitch unit="degree">
-						0.0
-					</pitch>
-					<yaw unit="degree">
-						0.0
-					</yaw>
-				</orientation>
 			</SASdetector>
 		</SASinstrument>
@@ -258,5 +246,7 @@
 				1
 			</term>
+			<SASProcessnote />
 		</SASprocess>
+		<SASnote />
 	</SASentry>
 </SASroot>
