Changeset e5664f2 in sasview


Ignore:
Timestamp:
Sep 17, 2009 11:30:04 AM (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:
c202d03
Parents:
b2f4f83
Message:

change theory1d used from plottable to datafitting type

Location:
guiframe
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • guiframe/dataFitting.py

    rff3f900b re5664f2  
    44from danse.common.plottools.plottables import Data1D as PlotData1D 
    55from danse.common.plottools.plottables import Data2D as PlotData2D 
     6from danse.common.plottools.plottables import Theory1D as PlotTheory1D 
    67 
    78from DataLoader.data_info import Data1D as LoadData1D 
     
    3334        self.yaxis(data1d._yaxis,data1d._yunit) 
    3435     
     36class Theory1D(PlotTheory1D,LoadData1D): 
    3537     
     38    def __init__(self,x=[],y=[],dy=None): 
     39        PlotTheory1D.__init__(self, x, y, dy) 
     40        LoadData1D.__init__(self, x, y, dy) 
     41        self.id= None 
     42        self.group_id =None 
     43        self.is_data = True 
     44     
     45    def copy_from_datainfo(self, data1d): 
     46        """ 
     47            copy values of Data1D of type DataLaoder.Data_info 
     48        """ 
     49        self.x  = copy.deepcopy(data1d.x) 
     50        self.y  = copy.deepcopy(data1d.y) 
     51        self.dy = copy.deepcopy(data1d.dy) 
     52    
     53        self.xaxis(data1d._xaxis,data1d._xunit) 
     54        self.yaxis(data1d._yaxis,data1d._yunit) 
    3655       
    3756class Data2D(PlotData2D,LoadData2D): 
  • guiframe/data_loader.py

    rcb0d17c re5664f2  
    142142        ## when 2 data have the same id override the 1 st plotted 
    143143        new_plot.id = name 
    144         ## info is a reference to output of dataloader that can be used 
    145         ## to save  data 1D as cansas xml file 
    146         new_plot.info= output 
     144       
    147145        ##group_id specify on which panel to plot this data 
    148146        new_plot.group_id = name 
     
    195193            new_plot.group_id = name 
    196194            new_plot.id = name 
    197             new_plot.info= item 
     195      
    198196            new_plot.is_data =True 
    199197            if hasattr(item,"title"): 
  • guiframe/local_perspectives/plotting/Plotter1D.py

    rf0a9a3cc re5664f2  
    2020import danse.common.plottools 
    2121from danse.common.plottools.PlotPanel import PlotPanel 
    22 from danse.common.plottools.plottables import Graph,Theory1D 
     22from danse.common.plottools.plottables import Graph 
    2323from sans.guiframe import dataFitting  
    2424from sans.guicomm.events import EVT_NEW_PLOT 
     
    2727from sans.guiframe.utils import PanelMenu 
    2828from sans.guiframe.dataFitting import Data1D 
    29  
     29from sans.guiframe.dataFitting import Theory1D 
    3030from binder import BindArtist 
    3131 
Note: See TracChangeset for help on using the changeset viewer.