Changeset 2563 for trunk/GSASIIElem.py


Ignore:
Timestamp:
Dec 7, 2016 11:53:18 AM (5 years ago)
Author:
vondreele
Message:

Speed up image integration on Mac by reducing ProgressBar? calls from 3*nBlk*nBlk+3 to Nblk+3
Allow PDF setup to include chemical formula from tif macrofile
fix contour bug for G(R), etc.
fix copy error for masks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIElem.py

    r2546 r2563  
    2121import numpy as np
    2222import atmdata
     23import GSASIImath as G2mth
    2324
    2425getElSym = lambda sym: sym.split('+')[0].split('-')[0].capitalize()
     
    216217    AtomInfo['Lande g'] = 2.0
    217218    return AtomInfo
     219   
     220def GetElInfo(El,inst):
     221    ElemSym = El.strip().capitalize()
     222    if 'X' in inst['Type'][0]:
     223        keV = 12.397639/G2mth.getWave(inst)               
     224        FpMu = FPcalc(GetXsectionCoeff(ElemSym), keV)
     225        ElData = GetFormFactorCoeff(ElemSym)[0]
     226        ElData['FormulaNo'] = 0.0
     227        ElData.update(GetAtomInfo(ElemSym))
     228        ElData.update(dict(zip(['fp','fpp','mu'],FpMu)))
     229        ElData.update(GetFFC5(El))
     230    else: #'N'eutron
     231        ElData = {}
     232        ElData.update(GetAtomInfo(ElemSym))
     233        ElData['FormulaNo'] = 0.0
     234        ElData.update({'mu':0.0,'fp':0.0,'fpp':0.0})
     235    return ElData
    218236       
    219237def GetXsectionCoeff(El):
Note: See TracChangeset for help on using the changeset viewer.