Changeset 35eeea8 in sasview for guiframe


Ignore:
Timestamp:
Mar 20, 2009 5:24:05 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:
f2776f6
Parents:
bb18ef1
Message:

remove unused code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/data_loader.py

    rbc3dd65d r35eeea8  
    7979    from sans.guicomm.events import NewPlotEvent, StatusEvent 
    8080    from DataLoader.loader import  Loader 
    81      
     81    ## dictionary of loaded data 
     82    ##{data.name, number of copy} 
     83    data_name_list={} 
     84    ## number of copies of the same loaded data 
     85    data_n= 1 
    8286    #Instantiate a loader  
    8387    L = Loader() 
     
    134138        new_plot.source=output.source 
    135139        ## name of the data allow to differentiate data when plotted 
    136         new_plot.name = output.filename 
     140        name= output.filename 
     141        if output.filename in data_name_list.iterkeys(): 
     142            indice = " copy"+ str(data_n) 
     143             
     144            name += indice 
     145            data_n += 1 
     146            #print "load data",name 
     147        else: 
     148            data_name_list[output.filename]=[] 
     149        data_name_list[output.filename].append(data_n) 
     150             
     151        #print "data_name_list",data_name_list 
     152        new_plot.name = name 
    137153        ## allow to highlight data when plotted 
    138154        new_plot.interactive = True 
    139155        ## when 2 data have the same id override the 1 st plotted 
    140         new_plot.id = output.filename 
     156        new_plot.id = name 
    141157        ## info is a reference to output of dataloader that can be used 
    142158        ## to save  data 1D as cansas xml file 
     
    148164        new_plot.yaxis(output._yaxis,output._yunit) 
    149165        ##group_id specify on which panel to plot this data 
    150         new_plot.group_id = output.filename 
     166        new_plot.group_id = name 
    151167        ##post data to plot 
    152         wx.PostEvent(parent, NewPlotEvent(plot=new_plot, title=str(output.filename))) 
     168        wx.PostEvent(parent, NewPlotEvent(plot=new_plot, title=str(name))) 
    153169         
    154170    ## the output of the loader is a list , some xml files contain more than one data 
     
    171187            
    172188            new_plot.source=item.source 
    173             new_plot.name = str(item.run[0]) 
     189             
     190            name= str(item.run[0]) 
     191             
     192            new_plot.name = name 
    174193            new_plot.interactive = True 
    175194            new_plot.detector =item.detector 
     
    177196            new_plot.xaxis(item._xaxis,item._xunit) 
    178197            new_plot.yaxis(item._yaxis,item._yunit) 
    179             new_plot.group_id = str(item.run[0]) 
    180             new_plot.id = str(item.run[0]) 
     198            new_plot.group_id = name 
     199            new_plot.id = name 
    181200            new_plot.info= item 
    182201             
     
    184203                title= item.title 
    185204            else: 
    186                 title= str(item.run[0]) 
     205                title= name 
    187206            wx.PostEvent(parent, NewPlotEvent(plot=new_plot, title=str(title))) 
    188207            i+=1 
Note: See TracChangeset for help on using the changeset viewer.