Changeset 3b69ca6 in sasview for guiframe/local_perspectives


Ignore:
Timestamp:
Apr 23, 2009 10:20:12 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:
2b63df0
Parents:
8b31780
Message:

hide and show error ,store dxl and dxw value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/local_perspectives/plotting/Plotter1D.py

    r0b16ee3 r3b69ca6  
    1616import danse.common.plottools 
    1717from danse.common.plottools.PlotPanel import PlotPanel 
    18 from danse.common.plottools.plottables import Graph,Data1D,Theory1D,Data1D 
     18from danse.common.plottools.plottables import Graph,Theory1D 
     19from sans.guiframe import dataFitting  
    1920from sans.guicomm.events import EVT_NEW_PLOT 
    2021from sans.guicomm.events import StatusEvent ,NewPlotEvent,SlicerEvent,ErrorDataEvent 
     
    279280             
    280281            if selected_plot.__class__.__name__=="Data1D": 
    281                 new_plot = Data1D(self.plots[self.graph.selected_plottable].x, 
    282                               self.plots[self.graph.selected_plottable].y, 
    283                               dy=dy) 
    284             else: 
    285                  new_plot = Theory1D(self.plots[self.graph.selected_plottable].x, 
    286                           self.plots[self.graph.selected_plottable].y, 
    287                           dy=dy) 
     282                
     283                new_plot = dataFitting.Data1D( x=selected_plot.x, 
     284                              y= selected_plot.y, 
     285                               dx=selected_plot.dx, 
     286                              dy=dy, 
     287                              dxl=selected_plot.dxl, 
     288                              dxw=selected_plot.dxw) 
     289                             
     290            else: 
     291                 new_plot = Theory1D(x=selected_plot.x,y=selected_plot.y,dy=dy) 
    288292            new_plot.interactive = True 
    289293            self.errors_hide = True 
     
    335339            length = len(self.plots[self.graph.selected_plottable].x) 
    336340            dy = numpy.zeros(length) 
     341             
    337342            selected_plot= self.plots[self.graph.selected_plottable] 
    338343             
     
    350355            ## Create a new plottable data1D 
    351356            if selected_plot.__class__.__name__=="Data1D": 
    352                 new_plot = Data1D(self.plots[self.graph.selected_plottable].x, 
    353                           self.plots[self.graph.selected_plottable].y, 
    354                           dy=dy) 
     357                new_plot = dataFitting.Data1D( x=selected_plot.x, 
     358                                               y= selected_plot.y, 
     359                                               dx=selected_plot.dx, 
     360                                               dy=dy, 
     361                                               dxl=selected_plot.dxl, 
     362                                               dxw=selected_plot.dxw) 
    355363            else: 
    356364                ## Create a new plottable Theory1D 
    357                 new_plot = Theory1D(self.plots[self.graph.selected_plottable].x, 
    358                           self.plots[self.graph.selected_plottable].y, 
    359                           dy=dy) 
     365                new_plot = Theory1D(x=selected_plot.x,y=selected_plot.y,dy=dy) 
     366             
    360367            new_plot.interactive = True 
    361             
    362368            new_plot.name = self.plots[self.graph.selected_plottable].name  
    363369            if hasattr(self.plots[self.graph.selected_plottable], "group_id"): 
Note: See TracChangeset for help on using the changeset viewer.