Ignore:
Timestamp:
Dec 7, 2018 4:03:37 PM (4 years ago)
Author:
toby
Message:

fix reading of FullProf? & WinPLOTR-2006 files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/imports/G2pwd_xye.py

    r3670 r3757  
    7878                else:
    7979                    if2theta = True
     80                    if  i == 0 and 'xydata' in S.lower():
     81                        continue   # fullprof header
    8082                    if gotCcomment and S.find('*/') > -1:
    8183                        begin = False
     
    8486                        gotCcomment = True
    8587                        continue   
    86                     if S[0] in ["'",'#']:
     88                    if S[0] in ["'",'#','!']:
    8789                        continue       #ignore comments, if any
     90                    elif S.startswith('TITLE'):
     91                        continue
    8892                    else:
    8993                        begin = False
     
    122126            # or a block of comments delimited by /* and */
    123127            # or (GSAS style) each line can begin with '#'
     128            # or WinPLOTR style, a '!'
    124129            if begin:
    125130                if self.Chi or self.Wave:
     
    137142                        gotCcomment = True
    138143                        continue   
    139                     if S[0] in ["'",'#']:
     144                    if S[0] in ["'",'#','!']:
    140145                        self.comments.append(S[:-1])
    141146                        continue       #ignore comments, if any
     147                    elif  i == 0 and 'xydata' in S.lower():
     148                        continue   # fullprof header
     149                    elif S.startswith('TITLE'):
     150                        self.comments = [S]
     151                        continue
    142152                    else:
    143153                        begin = False
Note: See TracChangeset for help on using the changeset viewer.