- Timestamp:
- Jun 8, 2009 10:22:18 AM (16 years ago)
- 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:
- ff3f900b
- Parents:
- e5c6fff
- Location:
- guiframe/local_perspectives/plotting
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/plotting/AnnulusSlicer.py
r70cf5d3 r4ac8556 12 12 from sans.guicomm.events import NewPlotEvent, StatusEvent,SlicerParameterEvent,EVT_SLICER_PARS 13 13 from BaseInteractor import _BaseInteractor 14 14 from sans.guiframe.dataFitting import Data1D 15 15 16 16 class AnnulusInteractor(_BaseInteractor): … … 134 134 sector = sect(self.base.data2D) 135 135 136 from sans.guiframe.dataFitting import Data1D136 137 137 if hasattr(sector,"dxl"): 138 138 dxl= sector.dxl … … 144 144 dxw= None 145 145 146 new_plot = Data1D(x=sector.x,y=sector.y,dy=sector.dy,dxl=dxl,dxw=dxw) 146 new_plot = Data1D(x=sector.x,y=sector.y,dy=sector.dy) 147 new_plot.dxl = dxl 148 new_plot.dxw = dxw 147 149 new_plot.name = "SectorPhi" +"("+ self.base.data2D.name+")" 148 150 -
guiframe/local_perspectives/plotting/Plotter1D.py
ra7bd562 r4ac8556 11 11 12 12 import wx 13 import sys, os 14 import pylab, time,numpy 13 import sys 14 import os 15 import pylab 16 import math 17 import numpy 18 import time 15 19 16 20 import danse.common.plottools … … 22 26 from sans.guicomm.events import RemoveDataEvent 23 27 from sans.guiframe.utils import PanelMenu 28 from sans.guiframe.dataFitting import Data1D 24 29 25 30 from binder import BindArtist … … 296 301 if hasattr(selected_plot, "dxw"): 297 302 dxw = selected_plot.dxw 298 new_plot = dataFitting.Data1D( x=selected_plot.x,303 new_plot = Data1D( x=selected_plot.x, 299 304 y= selected_plot.y, 300 305 dx=selected_plot.dx, 301 dy=dy ,302 dxl=dxl,303 dxw=dxw)304 306 dy=dy) 307 new_plot.dxl = dxl 308 new_plot.dxw = dxw 309 305 310 else: 306 311 new_plot = Theory1D(x=selected_plot.x,y=selected_plot.y,dy=dy) … … 344 349 @param evt: Menu event 345 350 """ 346 import math 347 import numpy 348 import time 351 349 352 350 353 if not self.graph.selected_plottable == None \ … … 378 381 if hasattr(selected_plot, "dxw"): 379 382 dxw = selected_plot.dxw 380 new_plot = dataFitting.Data1D( x=selected_plot.x,383 new_plot = Data1D( x=selected_plot.x, 381 384 y= selected_plot.y, 382 385 dx=selected_plot.dx, 383 dy=dy, 384 dxl=dxl, 385 dxw=dxw) 386 dy=dy) 387 new_plot.dxl = dxl 388 new_plot.dxw = dxw 389 386 390 else: 387 391 ## Create a new plottable Theory1D … … 428 432 from DataLoader.readers import cansas_reader 429 433 reader = cansas_reader.Reader() 430 datainfo= self.plots[self.graph.selected_plottable].info 431 reader.write( path, datainfo) 434 data= self.plots[self.graph.selected_plottable] 435 if hasattr(data, "info"): 436 datainfo= data.info 437 else: 438 datainfo= data 439 try: 440 reader.write( path, datainfo) 441 except: 442 msg= "couldn't save point %s"%sys.exc_value 443 raise 432 444 433 445 try: -
guiframe/local_perspectives/plotting/Plotter2D.py
r9c0fe9a5 r4ac8556 16 16 import danse.common.plottools 17 17 from danse.common.plottools.PlotPanel import PlotPanel 18 from danse.common.plottools.plottables import Graph ,Data1D18 from danse.common.plottools.plottables import Graph 19 19 from sans.guicomm.events import EVT_NEW_PLOT 20 20 from sans.guicomm.events import EVT_SLICER_PARS … … 23 23 from binder import BindArtist 24 24 from Plotter1D import ModelPanel1D 25 26 from sans.guiframe.dataFitting import Data1D 25 27 (InternalEvent, EVT_INTERNAL) = wx.lib.newevent.NewEvent() 26 28 … … 397 399 dxw= None 398 400 399 new_plot = Data1D(x=circ.x,y=circ.y,dy=circ.dy,dxl=dxl,dxw=dxw) 401 new_plot = Data1D(x=circ.x,y=circ.y,dy=circ.dy) 402 new_plot.dxl=dxl 403 new_plot.dxw=dxw 400 404 new_plot.name = "Circ avg "+ self.data2D.name 401 405 new_plot.source=self.data2D.source -
guiframe/local_perspectives/plotting/SectorSlicer.py
r70cf5d3 r4ac8556 16 16 from sans.guicomm.events import SlicerParameterEvent,EVT_SLICER_PARS 17 17 18 from sans.guiframe.dataFitting import Data1D 18 19 19 20 class SectorInteractor(_BaseInteractor): … … 163 164 sector = sect(self.base.data2D) 164 165 ##Create 1D data resulting from average 165 from sans.guiframe.dataFitting import Data1D166 166 167 if hasattr(sector,"dxl"): 167 168 dxl= sector.dxl … … 173 174 dxw= None 174 175 175 new_plot = Data1D(x=sector.x,y=sector.y,dy=sector.dy,dxl=dxl,dxw=dxw) 176 new_plot = Data1D(x=sector.x,y=sector.y,dy=sector.dy) 177 new_plot.dxl = dxl 178 new_plot.dxw = dxw 176 179 new_plot.name = "SectorQ" +"("+ self.base.data2D.name+")" 177 180 -
guiframe/local_perspectives/plotting/boxSlicer.py
r70cf5d3 r4ac8556 9 9 # Debug printout 10 10 #from config import printEVT 11 import wx 12 import copy 13 from copy import deepcopy 14 import math 15 import numpy 16 17 from sans.guicomm.events import NewPlotEvent, StatusEvent,SlicerParameterEvent,EVT_SLICER_PARS 11 18 from BaseInteractor import _BaseInteractor 12 from copy import deepcopy 13 import math, numpy 14 15 from sans.guicomm.events import NewPlotEvent, StatusEvent,SlicerParameterEvent,EVT_SLICER_PARS 19 from sans.guiframe.dataFitting import Data1D 20 16 21 import SlicerParameters 17 import wx18 22 19 23 … … 156 160 boxavg = box(self.base.data2D) 157 161 #3 Create Data1D to plot 158 from sans.guiframe.dataFitting import Data1D162 159 163 if hasattr(boxavg,"dxl"): 160 164 dxl= boxavg.dxl … … 166 170 dxw= None 167 171 168 new_plot = Data1D(x=boxavg.x,y=boxavg.y,dy=boxavg.dy,dxl=dxl,dxw=dxw) 172 new_plot = Data1D(x=boxavg.x,y=boxavg.y,dy=boxavg.dy) 173 new_plot.dxl = dxl 174 new_plot.dxw = dxw 169 175 new_plot.name = str(self.averager.__name__) +"("+ self.base.data2D.name+")" 170 176
Note: See TracChangeset
for help on using the changeset viewer.