Changeset a618972 in sasview
- Timestamp:
- Apr 5, 2010 4:36:54 PM (15 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 4e74e13
- Parents:
- 90d04eb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/data_loader.py
r509af3d ra618972 1 1 import os, sys,numpy 2 2 import wx 3 import re 3 4 from dataFitting import Data1D 4 5 from dataFitting import Data2D 5 6 from DataLoader.loader import Loader 6 7 8 def parse_name(name, expression): 9 """ 10 remove "_" in front of a name 11 """ 12 if re.match(expression, name) is not None: 13 word = re.split(expression, name, 1) 14 for item in word: 15 if item.lstrip().rstrip() != '': 16 return item 17 else: 18 return name 19 7 20 def choose_data_file(parent, location=None): 8 21 path = None … … 145 158 output.filename = str(filename) 146 159 ## name of the data allow to differentiate data when plotted 147 name = output.filename160 name = parse_name(name=output.filename, expression="_") 148 161 if not name in parent.indice_load_data.keys(): 149 162 parent.indice_load_data[name] = 0 … … 200 213 new_plot.dxw = dxw 201 214 202 name = str(item.run[0])215 name = parse_name(name=str(item.run[0]), expression="_") 203 216 if not name in parent.indice_load_data.keys(): 204 217 parent.indice_load_data[name] = 0
Note: See TracChangeset
for help on using the changeset viewer.