Changeset 579ba85 in sasview for DataLoader/data_info.py


Ignore:
Timestamp:
Aug 29, 2008 3:56:50 PM (16 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
442f42f
Parents:
4c00964
Message:

CanSAS format reader/writer completed/tested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/data_info.py

    r4c00964 r579ba85  
    2424 
    2525#TODO: Keep track of data manipulation in the 'process' data structure. 
    26  
    27 from sans.guitools.plottables import Data1D as plottable_1D 
     26#TODO: This module should be independent of plottables. We should write 
     27#        an adapter class for plottables when needed. 
     28 
     29#from sans.guitools.plottables import Data1D as plottable_1D 
    2830from data_util.uncertainty import Uncertainty 
    2931import numpy 
    3032import math 
    3133 
     34class plottable_1D: 
     35    """ 
     36        Data1D is a place holder for 1D plottables. 
     37    """ 
     38    x = None 
     39    y = None 
     40    dx = None 
     41    dy = None 
     42     
     43    # Units 
     44    _xaxis = '' 
     45    _xunit = '' 
     46    _yaxis = '' 
     47    _yunit = '' 
     48     
     49    def __init__(self,x,y,dx=None,dy=None): 
     50        self.x = x 
     51        self.y = y 
     52        self.dx = dx 
     53        self.dy = dy 
     54 
     55    def xaxis(self, label, unit): 
     56        self._xaxis = label 
     57        self._xunit = unit 
     58         
     59    def yaxis(self, label, unit): 
     60        self._yaxis = label 
     61        self._yunit = unit 
     62 
    3263class plottable_2D: 
    3364    """ 
    34         Data2D is a place holder for 2D plottables, which are  
    35         not yet implemented. 
     65        Data2D is a place holder for 2D plottables. 
    3666    """ 
    3767    xmin = None 
     
    148178class Aperture: 
    149179    ## Name 
    150     name = '' 
     180    name = None 
    151181    ## Type 
    152     type = '' 
     182    type = None 
     183    ## Size name 
     184    size_name = None 
    153185    ## Aperture size [Vector] 
    154186    size = None 
     
    192224    """   
    193225    ## Name 
    194     name = '' 
     226    name = None 
    195227    ## Radiation type [string] 
    196     radiation = '' 
     228    radiation = None 
     229    ## Beam size name 
     230    beam_size_name = None 
    197231    ## Beam size [Vector] [mm] 
    198232    beam_size = None 
    199233    beam_size_unit = 'mm' 
    200234    ## Beam shape [string] 
    201     beam_shape = '' 
     235    beam_shape = None 
    202236    ## Wavelength [float] [Angstrom] 
    203237    wavelength = None 
     
    246280        Class to hold the sample description 
    247281    """ 
     282    ## Short name for sample 
     283    name = '' 
    248284    ## ID 
    249285    ID = '' 
     
    327363    ## Run number 
    328364    run        = None 
     365    ## Run name 
     366    run_name   = None 
    329367    ## File name 
    330368    filename   = '' 
     
    355393        self.title      = '' 
    356394        ## Run number 
    357         self.run        = None 
     395        self.run        = [] 
     396        self.run_name   = {} 
    358397        ## File name 
    359398        self.filename   = '' 
Note: See TracChangeset for help on using the changeset viewer.