- Timestamp:
- Oct 20, 2008 10:39:28 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:
- a8b073d
- Parents:
- 693ab78
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/data_loader.py
r49815a2 r48c7477 3 3 from danse.common.plottools.plottables import Data1D, Theory1D, Data2D 4 4 from 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 5 class 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) 29 10 def choose_data_file(parent, location=None): 30 11 path = None … … 99 80 return 100 81 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) 102 85 new_plot.x_bins=output.x_bins 103 86 new_plot.y_bins=output.y_bins 104 87 else: 105 88 if output.dy==None: 106 new_plot = MetaTheory1D(output)89 new_plot = Theory1D(output.x,output.y) 107 90 else: 108 new_plot = MetaData1D(output)91 new_plot = Data1D(x=output.x,y=output.y,dy=output.dy) 109 92 110 93 filename = os.path.basename(path) 111 94 new_plot.source=output 112 95 new_plot.name = name 113 96 new_plot.interactive = True
Note: See TracChangeset
for help on using the changeset viewer.