import hkl_model as Mod np.seterr(divide="ignore", invalid="ignore") DATAPATH = os.path.dirname(os.path.abspath(__file__)) backgFile = os.path.join(DATAPATH,"Al2O3 Background.BGR") observedFile = os.path.join(DATAPATH,"Al2O3.dat") infoFile = os.path.join(DATAPATH,"Al2O3.cif") (spaceGroup, crystalCell, atoms) = H.readInfo(infoFile) wavelength = 1.5403 backg = H.LinSpline(backgFile) ttMin = 3 ttMax = 167.75 ttStep = 0.05 exclusions = None tt, observed = H.readData(observedFile, kind="y", skiplines=1, start=ttMin, stop=ttMax, step=ttStep) def fit(): # PYTHONPATH=. bumps Al2O3.py --fit=dream --store=M1 --burn=100 --steps=500 cell = Mod.makeCell(crystalCell, spaceGroup.xtalSystem()) cell.a.pm(0.5) cell.c.pm(0.5) m = Mod.Model(tt, observed, backg, 0, 0, 1, wavelength, spaceGroup, cell, atoms, exclusions) m.u.range(0,2) m.v.range(-2,0) m.w.range(0,2) m.eta.range(0,1) m.scale.range(0,10) for atomModel in m.atomListModel.atomModels: atomModel.B.range(0, 10) if (atomModel.atom.multip == atomModel.sgmultip):
backgFile = None observedFile = os.path.join(DATAPATH, r"Mn025_4K.dat") infoFile = os.path.join(DATAPATH, r"LFO.cfl") (spaceGroup, crystalCell, magAtomList, symmetry) = H.readMagInfo(infoFile) atomList = H.readInfo(infoFile)[2] wavelength = 1.540000 ttMin = 3.0 ttMax = 167.750 ttStep = 0.05 exclusions = [[0.00, 5.00], [38.25, 39.00], [44.00, 45.50], [64.75, 65.75], [77.5, 79.00], [81.75, 83.10], [97.00, 100.00], [111.50, 113.00], [116.00, 118.00], [135.50, 139.50], [161.00, 169.00]] tt, observed = H.readData(observedFile, kind="y", skiplines=3, start=ttMin, stop=ttMax, step=ttStep, exclusions=exclusions, colstep=2) base_value = min(observed) backg = H.LinSpline(backgFile) basisSymmetry = copy(symmetry) def fit(): cell = Mod.makeCell(crystalCell, spaceGroup.xtalSystem) cell.a.pm(0.5) cell.c.pm(0.5) m = Mod.Model(tt, observed, backg,
DATAPATH = os.path.dirname(os.path.abspath(__file__)) print DATAPATH backgFile = os.path.join(DATAPATH,r"background_ge.BGR") observedFile = os.path.join(DATAPATH,r"lufmo001.gsas") infoFile = os.path.join(DATAPATH,r"LuFeMnO3_BT1fit.cfl") (spaceGroup, crystalCell, magAtomList, symmetry) = H.readMagInfo(infoFile) atomList = H.readInfo(infoFile)[2] wavelength = 2.07750 ttMin = 3.0 ttMax = 166.3 ttStep = 0.05 exclusions = [[52,54],[60.5,62.5],[92.5,95],[115.0,117],[125.0,126]] tt, observed = H.readData(observedFile, kind="y", skiplines=3, start=ttMin, stop=ttMax, step=ttStep, exclusions=exclusions, colstep=2) backg = H.LinSpline(backgFile) basisSymmetry = copy(symmetry) #basisSymmetry = symmetry if (basisSymmetry.centerType() == 2): # change to acentric basisSymmetry.setCenterType(1) basisSymmetry.setNumIrreps(1) # Number of the basis from BasIreps (1-6) basisIndex = 2 index = 0 for magAtom in magAtomList: magAtom.setNumkVectors(1)