Ticket #6237: sansadd2.py.patch

File sansadd2.py.patch, 1011 bytes (added by Gesner Passos, 8 years ago)

This patch makes the output to be the same

  • Code/Mantid/scripts/SANS/SANSadd2.py

    diff --git a/Code/Mantid/scripts/SANS/SANSadd2.py b/Code/Mantid/scripts/SANS/SANSadd2.py
    index 0cc7c69..5e355b6 100644
    a b def _loadWS(entry, ext, inst, wsName, rawTypes, period=_NO_INDIVIDUAL_PERIODS) : 
    192192 
    193193  if period != _NO_INDIVIDUAL_PERIODS: 
    194194      #load just a single period 
    195       props = Load(Filename=filename,OutputWorkspace=wsName, EntryNumber=period) 
     195      if ext == ".nxs" or ext == ".NXS": 
     196        props = LoadNexus( Filename=filename,OutputWorkspace=wsName, EntryNumber=period) 
     197      else:    
     198        props = Load(Filename=filename,OutputWorkspace=wsName, EntryNumber=period) 
    196199  else: 
    197       props = Load(Filename=filename,OutputWorkspace=wsName) 
     200      if ext == ".nxs" or ext == ".NXS": 
     201        props = LoadNexus(Filename=filename,OutputWorkspace=wsName) 
     202      else: 
     203        props = Load(Filename=filename,OutputWorkspace=wsName) 
    198204 
    199205  isDataSetEvent = False 
    200206  wsDataSet = mtd[wsName]