Changeset c3b4dcb in sasview for sansview/perspectives


Ignore:
Timestamp:
Jun 8, 2009 12:20:34 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:
e5c6fff
Parents:
a7bd562
Message:

modify data1D initialization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/fitting.py

    r05971e1 rc3b4dcb  
    22import sys, wx, logging 
    33import string, numpy, math 
    4  
    5 from danse.common.plottools.plottables import Data2D,Theory1D 
     4import time 
     5import thread 
     6from danse.common.plottools.plottables import Theory1D 
     7from danse.common.plottools.PlotPanel import PlotPanel 
     8 
     9from sans.guiframe.dataFitting import Data2D 
     10from sans.guiframe.dataFitting import Data1D 
    611from sans.guiframe import dataFitting  
    7 from danse.common.plottools.PlotPanel import PlotPanel 
     12 
    813from sans.guicomm.events import NewPlotEvent, StatusEvent   
    914from sans.guicomm.events import EVT_SLICER_PANEL,ERR_DATA,EVT_REMOVE_DATA 
    1015from sans.guicomm.events import EVT_SLICER_PARS_UPDATE 
    11 from sans.guiframe import dataFitting 
     16 
    1217from sans.fit.AbstractFitEngine import Model 
    13  
     18from sans.fit.AbstractFitEngine import FitAbort 
    1419 
    1520from fitproblem import FitProblem 
     
    1924import fitpage 
    2025 
    21  
    2226DEFAULT_BEAM = 0.005 
    2327DEFAULT_QMIN = 0.0001 
    2428DEFAULT_QMAX = 0.13 
    2529DEFAULT_NPTS = 50 
    26 import time 
    27 import thread 
    28 from sans.fit.AbstractFitEngine import FitAbort 
    2930 
    3031(PageInfoEvent, EVT_PAGE_INFO)   = wx.lib.newevent.NewEvent() 
     32 
     33 
    3134class PlotInfo: 
    3235    """ 
     
    169172        #      multiple times. 
    170173        self.graph=graph 
     174        
    171175        for item in graph.plottables: 
    172176            if item.__class__.__name__ is "Data2D": 
     177                 
    173178                if hasattr(item,"is_data"): 
    174179                    if item.is_data: 
     
    278283             
    279284         
    280         data= dataFitting.Data1D(x=item.x, y=item.y,dx=dx, dy=dy, dxl=dxl, dxw=dxw) 
     285        data= Data1D(x=item.x, y=item.y,dx=dx, dy=dy) 
     286        data.dxl = dxl 
     287        data.dxw = dxw 
    281288         
    282289        data.name = item.name 
     
    294301        data.yaxis(copy.deepcopy(item._yaxis),copy.deepcopy(item._yunit)) 
    295302        ##group_id specify on which panel to plot this data 
    296         data.group_id = copy.deepcopy(item.group_id) 
     303        data.group_id = item.group_id 
    297304        return data 
    298305 
     
    675682                    data.is_data=True 
    676683                 
     684                
    677685            ## create anew page                    
    678686            if item.name == self.panel.graph.selected_plottable or\ 
     
    10651073            
    10661074            from DataLoader import data_info 
    1067             info= data_info.Data1D(x= new_plot.x, y=new_plot.y) 
     1075            info= Data1D(x= new_plot.x, y=new_plot.y) 
    10681076            info.title= new_plot.name 
    10691077            title= my_info.title 
Note: See TracChangeset for help on using the changeset viewer.