Changeset 1713


Ignore:
Timestamp:
Mar 16, 2015 11:03:41 AM (7 years ago)
Author:
vondreele
Message:

fix problems with imports of old TOF data; bank nos. now are as given in parm/data file rather than starting with 1...

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r1706 r1713  
    943943        IparmS = {}
    944944        for key in Iparm:
    945             if key[4:6] == "  ":
    946                 IparmS[key] = Iparm[key]
    947             elif int(key[4:6].strip()) == bank:
    948                 IparmS[key[:4]+' 1'+key[6:]] = Iparm[key]
     945            if 'INS' in key[:3]:    #skip around rubbish lines in some old iparm files
     946                if key[4:6] == "  ":
     947                    IparmS[key] = Iparm[key]
     948                elif int(key[4:6].strip()) == bank:
     949                    IparmS[key[:4]+' 1'+key[6:]] = Iparm[key]
    949950        rd.instbank = bank
    950951        return IparmS
  • trunk/imports/G2pwd_fxye.py

    r1652 r1713  
    332332        Bank = Banks[selblk]
    333333        try:
     334            bnkNo = int(Bank.split()[1])
     335        except ValueError:
     336            bnkNo = 1
     337        try:
    334338            if 'FXYE' in Bank:
    335339                self.errors = 'Error reading FXYE data in Bank\n  '+Banks[selblk]
     
    362366        self.powderentry[0] = filename
    363367        self.powderentry[1] = Pos # position offset (never used, I hope)
    364         self.powderentry[2] = selblk+1 # bank number
    365         self.idstring = ospath.basename(filename) + ' Bank '+str(selblk+1)
     368        self.powderentry[2] = bnkNo #selblk+1 # bank number
     369        self.idstring = ospath.basename(filename) + ' Bank '+str(bnkNo) #selblk+1)
    366370        self.numbanks=len(Banks)
    367371        # scan comments for temperature & radius
Note: See TracChangeset for help on using the changeset viewer.