source: trunk/imports/G2img_ADSC.py @ 2068

Last change on this file since 2068 was 2068, checked in by toby, 8 years ago

cleanup image reader documetation

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1# -*- coding: utf-8 -*-
2########### SVN repository information ###################
3# $Date: 2014-12-27 11:14:59 -0600 (Sat, 27 Dec 2014) $
4# $Author: $
5# $Revision: $
6# $URL: $
7# $Id: $
8########### SVN repository information ###################
9'''
10*Module G2img_ADSC: .img image file*
11--------------------------------------
12
13'''
14
15import sys
16import os
17import GSASIIIO as G2IO
18import GSASIIpath
19GSASIIpath.SetVersionNumber("$Revision: $")
20class ADSC_ReaderClass(G2IO.ImportImage):
21    '''Reads an ADSC .img file
22    '''
23    def __init__(self):
24        super(self.__class__,self).__init__( # fancy way to self-reference
25            extensionlist=('.img',),
26            strictExtension=True,
27            formatName = 'ADSC image',
28            longFormatName = 'ADSC image file'
29            )
30
31    def ContentsValidator(self, filepointer):
32        '''no test at this time
33        '''
34        return True
35       
36    def Reader(self,filename,filepointer, ParentFrame=None, **unused):
37        '''Read using Bob's routine :func:`GSASIIIO.GetImgData`
38        (to be moved to this file, eventually)
39        '''
40        self.Comments,self.Data,self.Npix,self.Image = G2IO.GetImgData(filename)
41        Image[0][0] = 0
42        if self.Npix == 0 or not self.Comments:
43            return False
44        self.LoadImage(ParentFrame,filename)
45        return True
Note: See TracBrowser for help on using the repository browser.