Skip to content

Commit

Permalink
Fixes some minor bug. Refs #4472.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzhou committed Mar 6, 2012
1 parent f40bf5d commit 10f1b83
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,9 @@ def initConstants(self, chopperhertz):
# ENDIFELSE

else:

# Cases are not supported
print "Instrument %s Is Not Setup For CWL, Min/Max d-spacing, and etc"
raise NotImplementedError("Chopper frequency %d Hz is not supported" % (chopperhertz))

# ENDIFELSE

Expand Down Expand Up @@ -191,7 +192,7 @@ def parseFullprofResolutionFile(self, irffilename):
terms = line.split("Bank")[1].split()
bank = int(terms[0])
mdict[bank] = {}
if terms[1] == "CWL" and len(terms) >= 4:
if len(terms) >= 4 and terms[1] == "CWL":
# center wave length
cwl = float(terms[3].split("A")[0])
mdict[bank]["CWL"] = cwl
Expand Down Expand Up @@ -534,7 +535,7 @@ def PyExec(self):
pcrfilename = inputfilename

# 3. Run
self.initConstants(60)
self.initConstants(self.frequency)
if useirf is True:
self.parseFullprofResolutionFile(irffilename)
self.convertToGSAS(banks, outputfilename)
Expand Down

0 comments on commit 10f1b83

Please sign in to comment.