Changeset 7c427a6 in sasview


Ignore:
Timestamp:
Apr 16, 2009 2:29:52 PM (15 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
3fef0a8
Parents:
a8088d7
Message:

loading 1D data as data1D for all

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/data_loader.py

    rb86c920 r7c427a6  
    8989        wx.PostEvent(parent, StatusEvent(status="Problem loading file: %s" % sys.exc_value)) 
    9090        return 
     91    if output==None: 
     92        msg="Could not open this page" 
     93        wx.PostEvent(parent, StatusEvent(status=msg)) 
     94        return 
    9195    filename = os.path.basename(path) 
    9296     
     
    115119        else: 
    116120            ##dy values checked 
    117             if output.dy ==None : 
    118                 new_plot = Theory1D(output.x,output.y, dxl, dxw) 
    119          
    120             else: 
    121                 msg="Loading 1D data: " 
    122                 wx.PostEvent(parent, StatusEvent(status= "%s %s"%(msg, output.filename))) 
    123                 new_plot = Data1D(x=output.x, y=output.y, dx=output.dx, 
    124                                   dy=output.dy, dxl=dxl, dxw=dxw) 
     121            dy= output.dy 
     122            if dy ==None: 
     123                dy= numpy.zeros(len(output.y)) 
     124             
     125            msg="Loading 1D data: " 
     126            wx.PostEvent(parent, StatusEvent(status= "%s %s"%(msg, output.filename))) 
     127            new_plot = Data1D(x=output.x, y=output.y, dx=output.dx, 
     128                              dy= dy, dxl=dxl, dxw=dxw) 
    125129                 
    126130        ## source will request in dataLoader .manipulation module 
     
    129133        name= output.filename 
    130134         
    131              
    132         #print "data_name_list",data_name_list 
    133135        new_plot.name = name 
    134136        ## allow to highlight data when plotted 
     
    161163                dxl=None 
    162164                dxw=None 
    163                  
    164             if item.dy ==None: 
    165                 new_plot = Theory1D(item.x,item.y,dxl,dxw) 
    166             else: 
    167                 new_plot = Data1D(x=item.x,y=item.y,dx=dx,dy=item.dy,dxl=dxl,dxw=dxw) 
    168             
     165            dy = item.dy   
     166            if dy ==None: 
     167                dy= numpy.zeros(len(item.y)) 
     168                
     169            new_plot = Data1D(x=item.x,y=item.y,dx=dx,dy=item.dy,dxl=dxl,dxw=dxw) 
    169170            new_plot.source=item.source 
    170171             
Note: See TracChangeset for help on using the changeset viewer.