Changeset 188


Ignore:
Timestamp:
Dec 7, 2010 3:56:53 PM (11 years ago)
Author:
vondreele
Message:

add load Pawley reflections from .RFL file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r179 r188  
    164164            Peaks.append([tth,peak[1],True,False,0,0,0,dsp,0.0])
    165165    return Comments,Peaks
     166
     167def GetPawleyPeaks(filename):
     168    rt2ln2x2 = 2.35482
     169    File = open(filename,'Ur')
     170    PawleyPeaks = []
     171    S = File.readline()         #skip header
     172    S = File.readline()
     173    item = S.split()
     174    while S:
     175        h,k,l = int(item[0]),int(item[1]),int(item[2])
     176        mult = int(item[3])
     177        tth = float(item[5])
     178        sig = float(item[6])/rt2ln2x2
     179        Iobs = float(item[7])*mult
     180        PawleyPeaks.append([h,k,l,mult,tth,sig,False,Iobs,0.0,[]])
     181        S = File.readline()
     182        item = S.split()
     183        if item[3] == '-100.0000':       #find trailer
     184            break
     185    File.close()
     186    return PawleyPeaks
    166187   
    167188def GetHKLData(filename):
Note: See TracChangeset for help on using the changeset viewer.