Changeset 4886


Ignore:
Timestamp:
Apr 19, 2021 3:07:02 PM (3 years ago)
Author:
vondreele
Message:

fix reference to masked arrays x,yobs....

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/exports/G2export_CIF.py

    r4884 r4886  
    14411441                return out.rstrip('.')  # and decimal place when not needed
    14421442            except TypeError:
     1443                print(val)
    14431444                return '.'
     1445           
    14441446        def WriteReflStat(refcount,hklmin,hklmax,dmin,dmax,nRefSets=1):
    14451447            'Write reflection statistics'
     
    17191721                print('DEBUG: skipping profile list')
    17201722            else:
    1721                 for x,yobs,yw,ycalc,ybkg in zip(histblk['Data'][0],
    1722                                                 histblk['Data'][1],
    1723                                                 histblk['Data'][2],
    1724                                                 histblk['Data'][3],
    1725                                                 histblk['Data'][4]):
     1723                for x,yobs,yw,ycalc,ybkg in zip(histblk['Data'][0].data,        #get the data from these masked arrays
     1724                                                histblk['Data'][1].data,
     1725                                                histblk['Data'][2].data,
     1726                                                histblk['Data'][3].data,
     1727                                                histblk['Data'][4].data):
    17261728                    if lowlim <= x <= highlim:
    17271729                        pass
     
    17321734                        s = ""
    17331735                    elif zero:
    1734                         s = PutInCol(G2mth.ValEsd(x-zero,-0.00009),10)
     1736                        s = PutInCol(G2mth.ValEsd(x.data-zero,-0.00009),10)
    17351737                    else:
    1736                         s = PutInCol(G2mth.ValEsd(x,-0.00009),10)
     1738                        s = PutInCol(G2mth.ValEsd(x.data,-0.00009),10)
    17371739                    s += PutInCol(Yfmt(ndec,yobs),12)
    17381740                    s += PutInCol(Yfmt(ndec,ycalc),12)
Note: See TracChangeset for help on using the changeset viewer.