Changeset ccb560a in sasview
- Timestamp:
- Aug 4, 2008 1:32:50 PM (16 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:
- 4d2a0d1
- Parents:
- b39c817
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/data_loader.py
racb1ad1 rccb560a 1 import os 1 import os, sys 2 2 import wx 3 3 … … 56 56 57 57 def plot_data(parent, path, name="Loaded Data"): 58 from sans.guicomm.events import NewPlotEvent 58 from sans.guicomm.events import NewPlotEvent, StatusEvent 59 59 from sans.guitools.plottables import Data1D, Theory1D 60 60 from DataLoader.loader import Loader 61 import numpy 61 62 #Instantiate a loader 62 63 L=Loader() 63 64 64 65 #Recieves data 65 output=L.load(path) 66 67 import numpy 68 66 try: 67 output=L.load(path) 68 except: 69 wx.PostEvent(parent, StatusEvent(status="Problem loading file: %s" % sys.exc_value)) 70 return 71 69 72 if output.dy==None: 70 73 new_plot = Theory1D(output.x, output.y)
Note: See TracChangeset
for help on using the changeset viewer.