Ignore:
Timestamp:
Nov 24, 2015 12:39:12 PM (10 years ago)
Author:
toby
Message:

cleanup image reader documetation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/imports/G2img_SumG2.py

    r2065 r2068  
    88########### SVN repository information ###################
    99'''
    10 *Module G2img_G2: Python pickled image*
    11 ---------------------------------------
    12 
    13 Routine to read an image that has been pickled in Python. Images
    14 in this format are created by the "Sum image data" command.
     10*Module G2img_SumG2: Python pickled image*
     11------------------------------------------
    1512
    1613'''
     
    2320GSASIIpath.SetVersionNumber("$Revision: $")
    2421class G2_ReaderClass(G2IO.ImportImage):
     22    '''Routine to read an image that has been pickled in Python. Images
     23    in this format are created by the "Sum image data" command. At least for
     24    now, only one image is permitted per file.
     25    '''
    2526    def __init__(self):
    2627        super(self.__class__,self).__init__( # fancy way to self-reference
     
    3233
    3334    def ContentsValidator(self, filepointer):
    34         '''no test at this time
     35        '''test by trying to unpickle (should be quick)
    3536        '''
     37        try:
     38            Fp = open(filename,'rb')
     39            cPickle.load(Fp)
     40        except:
     41            return False
    3642        return True
    3743       
    3844    def Reader(self,filename,filepointer, ParentFrame=None, **unused):
    39         '''Read using scipy PNG reader
     45        '''Read using cPickle
    4046        '''
    4147        import scipy.misc
Note: See TracChangeset for help on using the changeset viewer.