Skip to content

Commit

Permalink
Added code that stitch data in the order they have been processed. Th…
Browse files Browse the repository at this point in the history
…is refs #5558. Issue with stiching tab not showing up anymore.
  • Loading branch information
JeanBilheux committed Jul 2, 2012
1 parent 61b8c14 commit 9c51249
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,12 @@ def PyExec(self):

output_ws = self.getPropertyValue("OutputWorkspace")

#add a unique time stamp to the data to sort them for the
#stitching process
import time
_time = int(time.time())
output_ws = output_ws + '_#' + str(_time) + 'ts'

if mtd.workspaceExists(output_ws):
mtd.deleteWorkspace(output_ws)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sip
import os
import sys
import zip
from reduction_gui.settings.application_settings import GeneralSettings
from reduction_gui.widgets.base_widget import BaseWidget
import reduction_gui.widgets.util as util
Expand Down Expand Up @@ -456,10 +457,23 @@ def set_state(self, state):

# Refresh combo boxes
if self._settings.instrument_name == "REFL":
print 'in set_state of stitcher.py'
print


_tmp_workspace_list = []
for item in mtd.keys():
#retrieve workspaces of interest
if item.startswith("reflectivity") and item.endswith("ts"):
_tmp_workspace_list.append(item)
#sort the items by time stamp
_list_name = []
_list_ts = []
for _item in _tmp_workspace_list:
(_name,_ts) = _item.split('_#')
_list_name.append(_name)
_list_ts.append(_ts)

_name_ts = zip(_list_ts, _list_name)
_name_ts.sort()
_ts_sorted, _name_sorted = zip(*_name_ts)
print _name_sorted

else: #REF_M
for item in mtd.keys():
Expand Down

0 comments on commit 9c51249

Please sign in to comment.