Skip to content

Commit

Permalink
Data are now stiched according to the way they have been reduced. Thi…
Browse files Browse the repository at this point in the history
…s works for REF_L. This refs #5558
  • Loading branch information
JeanBilheux committed Jul 2, 2012
1 parent 9c51249 commit 72d6db9
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
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 @@ -449,37 +448,38 @@ def set_state(self, state):
"""
Update the catalog according to the new data path
"""
# Remove current entries
#Remove current entries
for item in self._workspace_list:
item.delete()

self._workspace_list = []

# Refresh combo boxes
if self._settings.instrument_name == "REFL":
_tmp_workspace_list = []
_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)
if _tmp_workspace_list != []:
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
_name_ts = zip(_list_ts, _list_name)
_name_ts.sort()
_ts_sorted, _name_sorted = zip(*_name_ts)

for item in _name_sorted:
self._add_entry(item)

else: #REF_M
for item in mtd.keys():
if item.startswith("reflectivity") and not item.endswith("scaled")\
and item.find('On_Off')<0 and item.find('Off_On')<0\
and item.find('On_On')<0:
if item.startswith("reflectivity") and not item.endswith("scaled") and item.find('On_Off')<0 and item.find('Off_On')<0 and item.find('On_On')<0:
self._add_entry(item)

if len(self._workspace_list)>0:
Expand Down

0 comments on commit 72d6db9

Please sign in to comment.