- Timestamp:
- Mar 16, 2021 7:21:46 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIstrIO.py
r4853 r4854 1543 1543 xId,xCoef = G2spc.GetCSxinel(at[cs]) 1544 1544 names = [pfx+'dAx:'+str(i),pfx+'dAy:'+str(i),pfx+'dAz:'+str(i)] 1545 equivs = [[],[],[]]1545 equivs = {1:[],2:[],3:[]} 1546 1546 for j in range(3): 1547 1547 if xId[j] > 0: 1548 1548 phaseVary.append(names[j]) 1549 equivs[xId[j] -1].append([names[j],xCoef[j]])1549 equivs[xId[j]].append([names[j],xCoef[j]]) 1550 1550 elif symHold is not None: #variable is held due to symmetry 1551 1551 symHold.append(names[j]) 1552 1552 for equiv in equivs: 1553 if len(equiv ) > 1:1554 name = equiv [0][0]1555 coef = equiv [0][1]1556 for eqv in equiv [1:]:1553 if len(equivs[equiv]) > 1: 1554 name = equivs[equiv][0][0] 1555 coef = equivs[equiv][0][1] 1556 for eqv in equivs[equiv][1:]: 1557 1557 eqv[1] /= coef 1558 1558 G2mv.StoreEquivalence(name,(eqv,)) … … 1585 1585 mId,mCoef = G2spc.GetCSpqinel(SpnFlp,dupDir) 1586 1586 names = [pfx+'AMx:'+str(i),pfx+'AMy:'+str(i),pfx+'AMz:'+str(i)] 1587 equivs = [[],[],[]]1587 equivs = {1:[],2:[],3:[]} 1588 1588 for j in range(3): 1589 1589 if mId[j] > 0: 1590 1590 phaseVary.append(names[j]) 1591 equivs[mId[j] -1].append([names[j],mCoef[j]])1591 equivs[mId[j]].append([names[j],mCoef[j]]) 1592 1592 for equiv in equivs: 1593 if len(equiv ) > 1:1594 name = equiv [0][0]1595 coef = equiv [0][1]1596 for eqv in equiv [1:]:1593 if len(equivs[equiv]) > 1: 1594 name = equivs[equiv][0][0] 1595 coef = equivs[equiv][0][1] 1596 for eqv in equivs[equiv][1:]: 1597 1597 eqv[1] /= coef 1598 1598 G2mv.StoreEquivalence(name,(eqv,)) … … 1619 1619 if waveType in ['ZigZag','Block',] and not iw: 1620 1620 names = [pfx+'Tmin:'+stiw,pfx+'Tmax:'+stiw,pfx+'Xmax:'+stiw,pfx+'Ymax:'+stiw,pfx+'Zmax:'+stiw] 1621 equivs = [[],[], [],[],[]]1621 equivs = {1:[],2:[], 3:[],4:[],5:[]} 1622 1622 else: 1623 1623 names = [pfx+'Xsin:'+stiw,pfx+'Ysin:'+stiw,pfx+'Zsin:'+stiw, 1624 1624 pfx+'Xcos:'+stiw,pfx+'Ycos:'+stiw,pfx+'Zcos:'+stiw] 1625 equivs = [[],[],[], [],[],[]]1625 equivs = {1:[],2:[],3:[], 4:[],5:[],6:[]} 1626 1626 elif Stype == 'Sadp': 1627 1627 names = [pfx+'U11sin:'+stiw,pfx+'U22sin:'+stiw,pfx+'U33sin:'+stiw, … … 1629 1629 pfx+'U11cos:'+stiw,pfx+'U22cos:'+stiw,pfx+'U33cos:'+stiw, 1630 1630 pfx+'U12cos:'+stiw,pfx+'U13cos:'+stiw,pfx+'U23cos:'+stiw] 1631 equivs = [[],[],[],[],[],[], [],[],[],[],[],[]]1631 equivs = {1:[],2:[],3:[],4:[],5:[],6:[], 7:[],8:[],9:[],10:[],11:[],12:[]} 1632 1632 elif Stype == 'Sfrac': 1633 equivs = [[],[]]1633 equivs = {1:[],2:[]} 1634 1634 if 'Crenel' in waveType and not iw: 1635 1635 names = [pfx+'Fzero:'+stiw,pfx+'Fwid:'+stiw] … … 1637 1637 names = [pfx+'Fsin:'+stiw,pfx+'Fcos:'+stiw] 1638 1638 elif Stype == 'Smag': 1639 equivs = [[],[],[], [],[],[]]1639 equivs = {1:[],2:[],3:[], 4:[],5:[],6:[]} 1640 1640 names = [pfx+'MXsin:'+stiw,pfx+'MYsin:'+stiw,pfx+'MZsin:'+stiw, 1641 1641 pfx+'MXcos:'+stiw,pfx+'MYcos:'+stiw,pfx+'MZcos:'+stiw] … … 1645 1645 if uId[j][0] > 0: 1646 1646 phaseVary.append(names[j]) 1647 equivs[uId[j][0] -1].append([names[j],uCoef[j][0]])1647 equivs[uId[j][0]].append([names[j],uCoef[j][0]]) 1648 1648 for equiv in equivs: 1649 if len(equiv ) > 1:1650 name = equiv [0][0]1651 coef = equiv [0][1]1652 for eqv in equiv [1:]:1649 if len(equivs[equiv]) > 1: 1650 name = equivs[equiv][0][0] 1651 coef = equivs[equiv][0][1] 1652 for eqv in equivs[equiv][1:]: 1653 1653 eqv[1] /= coef 1654 1654 G2mv.StoreEquivalence(name,(eqv,))
Note: See TracChangeset
for help on using the changeset viewer.