source: trunk/imports/G2img_MAR.py @ 2003

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

Make Transpose a config opt; new routine to read images with import routine (G2IO.ReadImageData?) -- used in Debug mode; In debug mode, import exceptions not caught.

  • Property svn:eol-style set to native
File size: 1.2 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_MAR: MAR image files*
11--------------------------------------
12
13Routine to read several MAR formats, .mar3450,.mar2300,.mar2560
14
15'''
16
17import sys
18import os
19import GSASIIIO as G2IO
20import GSASIIpath
21GSASIIpath.SetVersionNumber("$Revision: $")
22class MAR_ReaderClass(G2IO.ImportImage):
23    def __init__(self):
24        super(self.__class__,self).__init__( # fancy way to self-reference
25            extensionlist=('.mar3450','.mar2300','.mar2560'),
26            strictExtension=True,
27            formatName = 'MAR image',
28            longFormatName = 'MAR Research 345, 230 and 256 image files'
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
38        '''
39        self.Comments,self.Data,self.Npix,self.Image = G2IO.GetMAR345Data(filename)
40        if self.Npix == 0 or not self.Comments:
41            return False
42        return True
Note: See TracBrowser for help on using the repository browser.