Changeset 8bd8ea4 in sasview for DataLoader


Ignore:
Timestamp:
Jul 28, 2008 2:27:31 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:
9855699
Parents:
ea5551f
Message:

Added IGOR 1D reader and unified ascii readers

Location:
DataLoader
Files:
2 added
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/docs/todo.txt

    rf8de7de r8bd8ea4  
    2424 - All data loaded from a file should be stored in a common class object.   
    2525  
     26 - Avoid use of __setitem__ from outside a class. 
     27 - Bug: Loading blah.my.txt won't work. Is fixed in reflectivity registry.py 
     28 - Bug: The extension recognition is case sensitive and shouldn't be. 
     29 - BUG: if a reader raises an exception other than ValueError, the loader doesn't catch it. 
     30  
    2631 * Error conditions 
    2732 - Trying to load a file with an unknown extension should raise a RuntimeException. 
  • DataLoader/readers/abs_reader.py

    rd8a5f12 r8bd8ea4  
    1818    """ 
    1919    ## List of allowed extensions 
    20     ext=['.abs' 
     20    ext=['.abs', '.ABS' 
    2121     
    2222    def read(self, path): 
     
    131131                if not len(y) == len(dy): 
    132132                    raise ValueError, "abs_reader: y and dy have different length" 
     133 
     134                # If the data length is zero, consider this as 
     135                # though we were not able to read the file. 
     136                if len(x)==0: 
     137                    raise ValueError, "ascii_reader: could not load file" 
    133138                
    134139                output.x = x 
     
    136141                output.dy = dy 
    137142                output.xaxis("\\rm{Q}", 'A^{-1}') 
    138                 output.yaxis("\\rm{I(Q)} ","cm^{-1}") 
     143                output.yaxis("\\rm{I(Q)}","cm^{-1}") 
    139144                 
    140145                return output 
  • DataLoader/readers/tiff_reader.py

    r68f6ae2 r8bd8ea4  
    11 
    2 import Image 
    32import math,logging 
    43 
     
    1413         
    1514    def read(self, filename=None): 
     15        import Image 
    1616        print "in tiff" 
    1717        """ 
  • DataLoader/test/testLoad.py

    r5f0f3d2 r8bd8ea4  
    1616import DataLoader 
    1717from DataLoader.loader import  Loader 
    18 from DataLoader.readers import TXT3_Reader,TXT2_Reader 
    19 from DataLoader.readers import IgorReader,danse_reader,tiff_reader 
    2018  
    2119import os.path 
Note: See TracChangeset for help on using the changeset viewer.