Changeset 9b18735 in sasview for guiframe/data_loader.py
- Timestamp:
- Aug 11, 2010 5:35:03 PM (14 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:
- b63dc6e
- Parents:
- 3eb2811
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/data_loader.py
ref16f59 r9b18735 12 12 13 13 from sans.guicomm.events import NewPlotEvent, StatusEvent 14 SVS_FILE_EXT = ['.svs','.inv','.prv','.fitv'] 14 15 15 16 def enable_add_data(existing_panel, new_plot): … … 228 229 # plot data 229 230 wx.PostEvent(parent, NewPlotEvent(plot=new_plot, title=title)) 230 # set state and plot computation if exists 231 wx.PostEvent(parent,InvStateUpdateEvent()) 232 wx.PostEvent(parent,FitStateUpdateEvent()) 231 if format in SVS_FILE_EXT: 232 # set state and plot computation if exists 233 wx.PostEvent(parent,InvStateUpdateEvent()) 234 wx.PostEvent(parent,FitStateUpdateEvent()) 233 235 ## the output of the loader is a list , some xml files contain more than one data 234 236 else: … … 262 264 new_plot.copy_from_datainfo(item) 263 265 item.clone_without_data(clone=new_plot) 264 266 # find original data file name without timestemp 265 267 name = parse_name(name=str(item.run[0]), expression="_") 266 268 max_char = name.find("[") 269 if max_char < 0: 270 max_char = len(name) 271 original_name =name[0:max_char] 267 272 #TODO: this is a very annoying feature. We should make this 268 273 # an option. Excel doesn't do this. Why should we? … … 272 277 new_plot.name = name 273 278 new_plot.interactive = True 274 new_plot.group_id = name279 new_plot.group_id = original_name 275 280 new_plot.id = name 276 281 new_plot.is_data = True … … 293 298 # plot data 294 299 wx.PostEvent(parent, NewPlotEvent(plot=new_plot, title=str(title))) 295 296 # set state and plot computation if exists 297 wx.PostEvent(parent,InvStateUpdateEvent()) 298 wx.PostEvent(parent,FitStateUpdateEvent()) 300 301 if format in SVS_FILE_EXT: 302 # set state and plot computation if exists 303 wx.PostEvent(parent,InvStateUpdateEvent()) 304 wx.PostEvent(parent,FitStateUpdateEvent()) 299 305 except: 300 306 raise
Note: See TracChangeset
for help on using the changeset viewer.