Changeset 4347 for trunk


Ignore:
Timestamp:
Mar 7, 2020 5:43:13 AM (4 years ago)
Author:
vondreele
Message:

restrict G(R) plots to Rmax - sphere enclosed by big box model in RMCProfile

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r4337 r4347  
    54145414                        ifNeut = True
    54155415                    Names = files[label][0][:-1].split(',')
     5416                    Xmax = 100.
     5417                    if 'XFQ' in label:
     5418                        Xmax = RMCPdict.get('Rmax',100.)
    54165419                    for line in files[label][1:]:
    54175420                        items = line.split(',')
     5421                        if 'XFQ' in label and float(items[0]) > Xmax:
     5422                            break
    54185423                        X.append(float(items[0]))
    54195424                        Yobs.append(float(items[1]))
     
    54225427                    Ycalc = np.array([X,Ycalc])
    54235428                    if 'G(R)' in Labels[label][1]:
     5429                           
    54245430                        Ysave.append(Yobs)
    54255431                        Ymin = Ysave[0][1][0]
     
    54605466                        XY = [[X.T,Y.T] for iy,Y in enumerate(Partials) if 'Va' not in Names[iy+1]]
    54615467                    else:
    5462                         XY = [[X.T,(DX*Y.T)] for iy,Y in enumerate(Partials) if 'Va' not in Names[iy+1]]
     5468                        if ifNeut:
     5469                            XY = [[X.T,(DX*Y.T)] for iy,Y in enumerate(Partials) if 'Va' not in Names[iy+1]]
     5470                        else:
     5471                            XY = [[X.T,(DX*Y.T)*X.T] for iy,Y in enumerate(Partials) if 'Va' not in Names[iy+1]]                           
    54635472                    Names = [name for name in Names if 'Va' not in name]
    54645473                    if 'G(R)' in Labels[label][1]:
     
    54705479                        BLtables = G2elem.GetBLtable(generalData)
    54715480                        AtNum = generalData['NoAtoms']
    5472                         for atm in AtNum: sumAtm += AtNum[atm]
     5481                        if ifNeut:
     5482                            for atm in AtNum: sumAtm += AtNum[atm]
     5483                        else:
     5484                            for atm in AtNum:
     5485                                sumAtm += AtNum[atm]*G2elem.GetFFtable([atm,])[atm]['Z']
    54735486                        bfac = {}
    54745487                        bcorr = []
     
    54805493                                    bfac[atm] = AtNum[atm]/sumAtm
    54815494                            else:
    5482                                 bfac[atm] = G2elem.GetFFtable([atm,])[atm]['Z']*AtNum[atm]/sumAtm
     5495                                bfac[atm] = 10.*G2elem.GetFFtable([atm,])[atm]['Z']*AtNum[atm]/sumAtm
    54835496                        for name in Names:
    54845497                            if '-' in name:
  • trunk/GSASIIplot.py

    r4337 r4347  
    83228322                    G2frame.tau -= 0.05
    83238323                G2frame.tau %= 1.   #force 0-1 range; makes loop
    8324                 G2frame.G2plotNB.status.SetStatusText('Modulation tau = %.2f'%(G2frame.tau),1)
     8324                G2frame.G2plotNB.status.SetStatusText('Modulation tau = %.4f'%(G2frame.tau),1)
    83258325                data['Drawing']['Atoms'],Fade = G2mth.ApplyModulation(data,G2frame.tau)     #modifies drawing atom array!         
    83268326                SetDrawAtomsText(data['Drawing']['Atoms'])
  • trunk/GSASIIpwd.py

    r4342 r4347  
    22112211    newPhase['General']['SGData'] = G2spc.SpcGroup('P 1')[1]
    22122212    newPhase['General']['Cell'][1:] = G2lat.TransformCell(Cell,Trans)
     2213    GB = G2lat.cell2Gmat( newPhase['General']['Cell'][1:7])[0]
     2214    RMCPdict['Rmax'] = np.min(np.sqrt(np.array([1./G2lat.calc_rDsq2(H,GB) for H in [[1,0,0],[0,1,0],[0,0,1]]])))/2.
    22132215    newPhase,Atcodes = G2lat.TransformPhase(Phase,newPhase,Trans,np.zeros(3),np.zeros(3),ifMag=False)
    22142216    Natm = np.core.defchararray.count(np.array(Atcodes),'+')    #no. atoms in original unit cell
Note: See TracChangeset for help on using the changeset viewer.