Package diffpy :: Package srrietveld :: Package convert :: Module gsasinstparser :: Class GSASInstFile
[frames] | no frames]

Class GSASInstFile

source code

Class to parse the instrument info from GSAS instrument file.

methods:
    _readInstFile
    parseInstType
    parseTOFInst
    parseCWInst

Instance Methods
 
__init__(self, instfilename, banklist=None, engine='gsas')
Initialization
source code
 
mapKey(self, key)
Find the FIRST line that includes the key in lines
source code
 
parseCWInst(self)
Read the CW instrument info
source code
 
parseInstInfo(self)
Parse Instrument Info into dict
source code
 
parseInstType(self)
Read the instrument type from file...
source code
 
parseTOFInst(self)
Read the TOF instrument info Return : self._instdict
source code
Method Details

__init__(self, instfilename, banklist=None, engine='gsas')
(Constructor)

source code 
Initialization

Arguments:
    instfilename    :   str, GSAS readable instrument file
    banklist        :   tuple, list of bank IDs for refinement

Return  :   None

mapKey(self, key)

source code 
Find the FIRST line that includes the key in lines

Argument:
- key       :   key value

Return  :   str

parseCWInst(self)

source code 

Read the CW instrument info

Return : self._instdict

parseInstType(self)

source code 
Read the instrument type from file
Return  :
    type  :    str, type of instrument