source: trunk/imports/G2img_EDF.py @ 2015

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

redo image read to avoid reloads; prevent open of Edit image parms on reread; fix multilevel TIF read error; cleanup self in GSASIIimage

  • 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_EDF: .edf image file*
11--------------------------------------
12
13Routine to read a Read European detector data edf file
14
15'''
16
17import sys
18import os
19import GSASIIIO as G2IO
20import GSASIIpath
21GSASIIpath.SetVersionNumber("$Revision: $")
22class EDF_ReaderClass(G2IO.ImportImage):
23    def __init__(self):
24        super(self.__class__,self).__init__( # fancy way to self-reference
25            extensionlist=('.edf',),
26            strictExtension=True,
27            formatName = 'EDF image',
28            longFormatName = 'European Data Format image file'
29            )
30
31    def ContentsValidator(self, filepointer):
32       
33        '''no test at this time
34        '''
35        return True
36       
37    def Reader(self,filename,filepointer, ParentFrame=None, **unused):
38        '''Read using Bob's routine
39        '''
40        self.Comments,self.Data,self.Npix,self.Image = G2IO.GetEdfData(filename)
41        if self.Npix == 0 or not self.Comments:
42            return False
43        self.LoadImage(ParentFrame,filename)
44        return True
Note: See TracBrowser for help on using the repository browser.