Changeset 2c0f2a5 in sasview


Ignore:
Timestamp:
Mar 27, 2009 1:23:17 PM (15 years ago)
Author:
Jae Cho <jhjcho@…>
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:
15550f4
Parents:
bdd71f4
Message:

working on tiff reader and plotter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/data_info.py

    rca10d8e r2c0f2a5  
    102102        self._zaxis = label 
    103103        self._zunit = unit 
     104         
     105class plottable_image: 
     106    """ 
     107        Data2D is a place holder for 2D plottables. 
     108    """ 
     109    xmin = None 
     110    xmax = None 
     111    ymin = None 
     112    ymax = None 
     113    image = None 
     114     
     115    # Units 
     116    _xaxis = '' 
     117    _xunit = 'pixels' 
     118    _yaxis = '' 
     119    _yunit = 'pixels' 
     120    _zaxis = '' 
     121    _zunit = '' 
     122     
     123    def __init__(self, image=None): 
     124        self.image = image#numpy.asarray(data) 
     125         
     126    def xaxis(self, label, unit): 
     127        self._xaxis = label 
     128        self._xunit = unit 
     129         
     130    def yaxis(self, label, unit): 
     131        self._yaxis = label 
     132        self._yunit = unit 
     133             
     134    def zaxis(self, label, unit): 
     135        self._zaxis = label 
     136        self._zunit = unit 
     137             
    104138             
    105139class Vector: 
     
    548582        DataInfo.__init__(self) 
    549583        plottable_1D.__init__(self, x, y, dx, dy) 
    550         if len(self.detector)>0: 
    551             raise RuntimeError, "Data1D: Detector bank already filled at init" 
    552584         
    553585         
     
    789821        return result 
    790822     
     823#Need more work to make it work     
     824class Image2D(plottable_image, DataInfo): 
     825    """ 
     826        2D image class 
     827    """ 
     828     
     829     
     830    def __init__(self, image=None,xmin=None, xmax=None, ymin=None, ymax=None): 
     831         
     832        DataInfo.__init__(self) 
     833        plottable_image.__init__(self, image) 
     834        self.pictype = 'image' 
     835    def __str__(self): 
     836        _str =  "%s\n" % DataInfo.__str__(self) 
     837         
     838        _str += "Image:\n" 
     839       # _str += "   Type:         %s\n" % self.__class__.__name__ 
     840         
     841        return _str 
     842   
     843   
     844  
Note: See TracChangeset for help on using the changeset viewer.