Changeset 48c7477 in sasview


Ignore:
Timestamp:
Oct 20, 2008 10:39:28 AM (16 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:
a8b073d
Parents:
693ab78
Message:

remove metadata classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/data_loader.py

    r49815a2 r48c7477  
    33from danse.common.plottools.plottables import Data1D, Theory1D, Data2D 
    44from DataLoader.loader import Loader 
    5 class MetaData1D(Data1D): 
    6     def __init__(self, output): 
    7         self.datainfo = output 
    8         Data1D.__init__(self,x=output.x, y=output.y, dy=output.dy) 
    9          
    10 class MetaTheory1D(Theory1D): 
    11     def __init__(self, output): 
    12         self.datainfo = output 
    13         Theory1D.__init__(self, x=output.x, y=output.y) 
    14          
    15  
    16 class MetaData2D(Data2D): 
    17     def __init__(self, output): 
    18         self.datainfo = output 
    19         Data2D.__init__(self,image= output.data,err_image=output.err_data, 
    20                        xmin=output.xmin,xmax=output.xmax,ymin=output.ymin,ymax=output.ymax) 
    21 class MetaTheory2D(Data2D): 
    22     def __init__(self, output): 
    23         self.datainfo = output 
    24         Data2D.__init__(self,image= output.data,err_image=output.err_data, 
    25                        xmin=output.xmin,xmax=output.xmax,ymin=output.ymin,ymax=output.ymax) 
    26          
    27          
    28      
     5class Theory2D(Data2D): 
     6    def __init__(self,image=None,err_image=None,xmin=None, 
     7                 xmax=None,ymin=None,ymax=None,zmin=None,zmax=None): 
     8        Data2D.__init__(self,image,err_image,xmin, 
     9                        xmax,ymin,ymax,zmin,zmax) 
    2910def choose_data_file(parent, location=None): 
    3011    path = None 
     
    9980        return 
    10081    if hasattr(output,'data'): 
    101         new_plot = MetaData2D(output) 
     82        new_plot = Data2D(image=output.data,err_image=output.err_data, 
     83                          xmin=output.xmin,xmax=output.xmax, 
     84                          ymin=output.ymin,ymax=output.ymax) 
    10285        new_plot.x_bins=output.x_bins 
    10386        new_plot.y_bins=output.y_bins 
    10487    else: 
    10588        if output.dy==None: 
    106             new_plot = MetaTheory1D(output) 
     89            new_plot = Theory1D(output.x,output.y) 
    10790        else: 
    108             new_plot = MetaData1D(output) 
     91            new_plot = Data1D(x=output.x,y=output.y,dy=output.dy) 
    10992         
    11093    filename = os.path.basename(path) 
    111          
     94    new_plot.source=output    
    11295    new_plot.name = name 
    11396    new_plot.interactive = True 
Note: See TracChangeset for help on using the changeset viewer.