Changeset 3472


Ignore:
Timestamp:
Jul 13, 2018 4:21:07 PM (3 years ago)
Author:
toby
Message:

allow .ge5 for GE files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/imports/G2img_GE.py

    r3322 r3472  
    1111---------------------------------------
    1212
     13Read data from General Electric angiography x-ray detectors,
     14primarily as used at APS 1-ID.
    1315This shows an example of an importer that will handle files with
    1416more than a single image.
     
    2527    '''Routine to read a GE image, typically from APS Sector 1.
    2628       
    27         The image files may be of form .geX (where X is ' ', 1, 2, 3 or 4),
     29        The image files may be of form .geX (where X is ' ', 1, 2, 3, 4 or 5),
    2830        which is a raw image from the detector. These files may contain more
    2931        than one image and have a rudimentary header.
     
    3436    def __init__(self):
    3537        super(self.__class__,self).__init__( # fancy way to self-reference
    36             extensionlist=('.sum','.cor','.avg','.ge','.ge1','.ge2','.ge3','.ge4'),
     38            extensionlist=('.sum','.cor','.avg','.ge','.ge1','.ge2','.ge3','.ge4','.ge5'),
    3739            strictExtension=True,
    3840            formatName = 'GE image',
     
    7375    '''Routine to read multiple GE images & sum them, typically from APS Sector 1.
    7476       
    75         The image files may be of form .geX (where X is ' ', 1, 2, 3 or 4),
     77        The image files may be of form .geX (where X is ' ', 1, 2, 3, 4 or 5),
    7678        which is a raw image from the detector. These files may contain more
    7779        than one image and have a rudimentary header.
     
    8284    def __init__(self):
    8385        super(self.__class__,self).__init__( # fancy way to self-reference
    84             extensionlist=('.ge1','.ge2','.ge3','.ge4'),
     86            extensionlist=('.ge1','.ge2','.ge3','.ge4','.ge5'),
    8587            strictExtension=True,
    8688            formatName = 'sum GE multi-image',
     
    107109        imagenum = kwarg.get('blocknum')
    108110        if imagenum is None: imagenum = 1
    109         self.Comments,self.Data,self.Npix,self.Image,more = \
    110             GetGEsumData(self,filename,imagenum=imagenum,sum=True)
     111        self.Comments,self.Data,self.Npix,self.Image,more = GetGEsumData(
     112            self,filename,imagenum=imagenum,sum=True)
    111113        if self.Npix == 0 or not self.Comments:
    112114            return False
Note: See TracChangeset for help on using the changeset viewer.