示例#1
0
def fit():
    cell = Mod.makeCell(crystalCell, xtalsys(spaceGroup))
    cell.a.pm(0.5)
#    cell.b.pm(0.5)
    cell.c.pm(0.5)
    m = Mod.Model(tt, observed, backg,   1.814691,  -1.482098,   0.447632 , wavelength, spaceGroup, cell,
                (atomList, magAtomList), exclusions, magnetic=True,
                symmetry=symmetry, newSymmetry=basisSymmetry, base=base_line, scale=94.508, eta=0.0, zero=0.04101, error=error, muR=1.280)
    m.u.range(0,10)
    m.v.range(-10,0)
    m.w.range(0,10)
    m.scale.range(0,200)
    m.eta.range(0,1)
    m.base.pm(1000)
    m.zero.pm(0.25)
    for atomModel in m.atomListModel.atomModels:
        if atomModel.magnetic:
            for coeff in atomModel.coeffs:
                #coeff.range(-10, 10)
                coeff.range(-20,20)
                #pass
            #atomModel.phase.range(-np.pi*2, np.pi*2)
    #m.atomListModel["Mn1"].phase.range(0, np.pi*2)
    #m.atomListModel["Mn2"].phase.range(-2*np.pi, 0)
    M = bumps.FitProblem(m)
    M.model_update()
    return M
示例#2
0
def fit():
    # makeBasis(basisSymmetry, basisIndex)
    cell = Mod.makeCell(crystalCell, xtalsys(spaceGroup))
    cell.a.pm(0.5)
    cell.b.pm(0.5)
    cell.c.pm(0.5)
    # print len(H.satelliteGen(cell.cell, symmetry, float(H.getS(ttMax, wavelength))))
    m = Mod.Model(
        tt,
        observed,
        backg,
        0,
        0,
        1,
        wavelength,
        spaceGroup,
        cell,
        (atomList, magAtomList),
        exclusions,
        magnetic=True,
        symmetry=symmetry,
        newSymmetry=basisSymmetry,
        base=6512,
        scale=59.143,
    )
    m.u.range(0, 10)
    m.v.range(-10, 0)
    m.w.range(0, 10)
    m.scale.range(59, 60)
    m.base.range(6510, 6514)
    for atomModel in m.atomListModel.atomModels:
        #        atomModel.B.range(0, 10)
        #        if (atomModel.atom.multip == atomModel.sgmultip):
        #            # atom lies on a general position
        #            atomModel.x.pm(0.1)
        #            atomModel.y.pm(0.1)
        #            atomModel.z.pm(0.1)
        if atomModel.magnetic:
            for coeff in atomModel.coeffs:
                # coeff.range(-10, 10)
                coeff.range(-20, 20)
    #            atomModel.phase.range(0,1)
    # vary Fe/Mn atom positions but keep them on the special site x,0,z
    #    m.atomListModel["Fe1"].x.pm(0.1)
    #    m.atomListModel["Fe1"].z.pm(0.1)
    #    m.atomListModel["Mn1"].x = m.atomListModel["Fe1"].x
    #    m.atomListModel["Mn1"].z = m.atomListModel["Fe1"].z
    # for i in xrange(len(m.atomListModel["Fe1"].coeffs)):
    # m.atomListModel["Mn1"].coeffs[i] = m.atomListModel["Fe1"].coeffs[i]
    #    m.atomListModel["Mn1"].phase = m.atomListModel["Fe1"].phase
    # Occupancy:
    #    m.atomListModel["Fe1"].occ.range(0, 1)
    #    m.atomListModel["Mn1"].occ.range(0, 1)
    #    m.atomListModel["Mn1"].occ = 1 - m.atomListModel["Fe1"].occ

    M = bumps.FitProblem(m)
    M.model_update()
    return M
示例#3
0
def fit():
    makeBasis(basisSymmetry, basisIndex)

    cell = Mod.makeCell(crystalCell, xtalsys(spaceGroup))
    cell.a.pm(0.2)
    cell.c.pm(0.2)

    m = Mod.Model(tt,
                  observed,
                  backg,
                  0.2979,
                  -0.1684,
                  0.03975,
                  wavelength,
                  spaceGroup,
                  cell, (atomList, magAtomList),
                  exclusions,
                  magnetic=True,
                  symmetry=symmetry,
                  newSymmetry=basisSymmetry)

    m.u.pm(0.2)
    m.v.range(-1, 0)
    m.w.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):
        #            # atom lies on a general position
        #            atomModel.x.pm(0.1)
        #            atomModel.y.pm(0.1)
        #            atomModel.z.pm(0.1)
        if atomModel.magnetic:
            for coeff in atomModel.coeffs:
                coeff.range(0, 10)
#            atomModel.phase.range(0,1)
# vary Fe/Mn atom positions but keep them on the special site x,0,z
#    m.atomListModel["Fe1"].x.pm(0.1)
#    m.atomListModel["Fe1"].z.pm(0.1)
#    m.atomListModel["Mn1"].x = m.atomListModel["Fe1"].x
#    m.atomListModel["Mn1"].z = m.atomListModel["Fe1"].z
    for i in xrange(len(m.atomListModel["Fe1"].coeffs)):
        m.atomListModel["Mn1"].coeffs[i] = m.atomListModel["Fe1"].coeffs[i]
    #m.atomListModel["Mn1"].phase = m.atomListModel["Fe1"].phase
    # Occupancy:
# m.atomListModel["Fe1"].occ.range(0, 1)


#    m.atomListModel["Mn1"].occ.range(0, 1)
# m.atomListModel["Mn1"].occ = 1 - m.atomListModel["Fe1"].occ

    M = bumps.FitProblem(m)
    M.model_update()
    return M
示例#4
0
def fit():
    #makeBasis(basisSymmetry, basisIndex)
    cell = Mod.makeCell(crystalCell, xtalsys(spaceGroup))
    cell.a.pm(0.5)
    cell.b.pm(0.5)
    cell.c.pm(0.5)
    #print len(H.satelliteGen(cell.cell, symmetry, float(H.getS(ttMax, wavelength))))
    m = Mod.Model(tt, observed, backg, 0, 0, 1, wavelength, spaceGroup, cell,
                (atomList, magAtomList), exclusions, magnetic=True,
                symmetry=symmetry, newSymmetry=basisSymmetry, base=6512, scale=59.143)
    m.u.range(0,10)
    m.v.range(-10,0)
    m.w.range(0,10)
    m.scale.range(59,60)
    m.base.range(6510,6514)
    for atomModel in m.atomListModel.atomModels:
#        atomModel.B.range(0, 10)
#        if (atomModel.atom.multip == atomModel.sgmultip):
#            # atom lies on a general position
#            atomModel.x.pm(0.1)
#            atomModel.y.pm(0.1)
#            atomModel.z.pm(0.1)
        if atomModel.magnetic:
            for coeff in atomModel.coeffs:
                #coeff.range(-10, 10)
                coeff.range(-20,20)
#            atomModel.phase.range(0,1)
    # vary Fe/Mn atom positions but keep them on the special site x,0,z
#    m.atomListModel["Fe1"].x.pm(0.1)
#    m.atomListModel["Fe1"].z.pm(0.1)
#    m.atomListModel["Mn1"].x = m.atomListModel["Fe1"].x
#    m.atomListModel["Mn1"].z = m.atomListModel["Fe1"].z
    #for i in xrange(len(m.atomListModel["Fe1"].coeffs)):
        #m.atomListModel["Mn1"].coeffs[i] = m.atomListModel["Fe1"].coeffs[i]
#    m.atomListModel["Mn1"].phase = m.atomListModel["Fe1"].phase
    # Occupancy:
#    m.atomListModel["Fe1"].occ.range(0, 1)
#    m.atomListModel["Mn1"].occ.range(0, 1)
#    m.atomListModel["Mn1"].occ = 1 - m.atomListModel["Fe1"].occ
    
    M = bumps.FitProblem(m)
    M.model_update()
    return M
示例#5
0
def fit():
    makeBasis(basisSymmetry, basisIndex)
    
    cell = Mod.makeCell(crystalCell, xtalsys(spaceGroup))
    cell.a.pm(0.2)
    cell.c.pm(0.2)

    m = Mod.Model(tt, observed, backg, 0.2979, -0.1684, 0.03975, wavelength, spaceGroup, cell,
                (atomList, magAtomList), exclusions, magnetic=True,
                symmetry=symmetry, newSymmetry=basisSymmetry)
    
    m.u.pm(0.2)
    m.v.range(-1,0)
    m.w.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):
#            # atom lies on a general position
#            atomModel.x.pm(0.1)
#            atomModel.y.pm(0.1)
#            atomModel.z.pm(0.1)
        if atomModel.magnetic:
            for coeff in atomModel.coeffs:
                coeff.range(0,10)
#            atomModel.phase.range(0,1)
    # vary Fe/Mn atom positions but keep them on the special site x,0,z
#    m.atomListModel["Fe1"].x.pm(0.1)
#    m.atomListModel["Fe1"].z.pm(0.1)
#    m.atomListModel["Mn1"].x = m.atomListModel["Fe1"].x
#    m.atomListModel["Mn1"].z = m.atomListModel["Fe1"].z
    for i in xrange(len(m.atomListModel["Fe1"].coeffs)):
        m.atomListModel["Mn1"].coeffs[i] = m.atomListModel["Fe1"].coeffs[i]
    #m.atomListModel["Mn1"].phase = m.atomListModel["Fe1"].phase
    # Occupancy:
   # m.atomListModel["Fe1"].occ.range(0, 1)
#    m.atomListModel["Mn1"].occ.range(0, 1)
   # m.atomListModel["Mn1"].occ = 1 - m.atomListModel["Fe1"].occ
    
    M = bumps.FitProblem(m)
    M.model_update()
    return M
示例#6
0
def fit():
    cell = Mod.makeCell(crystalCell, xtalsys(spaceGroup))
    cell.a.pm(0.5)
    cell.b.pm(0.5)
    cell.c.pm(0.5)
    m = Mod.Model(
        tt,
        observed,
        backg,
        0.1060,
        -0.3270,
        0.3360,
        wavelength,
        spaceGroup,
        cell,
        (atomList, magAtomList),
        exclusions,
        magnetic=True,
        symmetry=symmetry,
        newSymmetry=basisSymmetry,
        base=base_line,
        scale=27.765 / 2,
        eta=0.0,
        zero=-0.12671,
        sxtal=True,
        error=error,
    )
    m.u.range(0, 10)
    m.v.range(-10, 0)
    m.w.range(0, 10)
    m.scale.range(0, 100)
    m.eta.range(0, 1)
    m.base.pm(500)
    m.zero.pm(0.25)
    for atomModel in m.atomListModel.atomModels:
        if atomModel.magnetic:
            for coeff in atomModel.coeffs:
                # coeff.range(-10, 10)
                coeff.range(-20, 20)
    M = bumps.FitProblem(m)
    M.model_update()
    return M
示例#7
0
def fit():
    cell = Mod.makeCell(crystalCell, xtalsys(spaceGroup))
    cell.a.pm(0.5)
    cell.b.pm(0.5)
    cell.c.pm(0.5)
    m = Mod.Model(tt,
                  observed,
                  backg,
                  0.1060,
                  -0.3270,
                  0.3360,
                  wavelength,
                  spaceGroup,
                  cell, (atomList, magAtomList),
                  exclusions,
                  magnetic=True,
                  symmetry=symmetry,
                  newSymmetry=basisSymmetry,
                  base=base_line,
                  scale=27.765 / 2,
                  eta=0.0,
                  zero=-0.12671,
                  sxtal=True,
                  error=error)
    m.u.range(0, 10)
    m.v.range(-10, 0)
    m.w.range(0, 10)
    m.scale.range(0, 100)
    m.eta.range(0, 1)
    m.base.pm(500)
    m.zero.pm(0.25)
    for atomModel in m.atomListModel.atomModels:
        if atomModel.magnetic:
            for coeff in atomModel.coeffs:
                #coeff.range(-10, 10)
                coeff.range(-20, 20)
    M = bumps.FitProblem(m)
    M.model_update()
    return M
示例#8
0
def fit():
    #makeBasis(basisSymmetry, basisIndex)
    cell = Mod.makeCell(crystalCell, xtalsys(spaceGroup))
    cell.a.pm(0.5)
    cell.b.pm(0.5)
    cell.c.pm(0.5)
    m = Mod.Model(tt, observed, backg, 1.809863,  -1.476814,   0.446315, wavelength, spaceGroup, cell,
                (atomList, magAtomList), exclusions, magnetic=True,
                symmetry=symmetry, newSymmetry=basisSymmetry, base=6512, scale=94.064, sxtal=True, error=error)
    m.u.range(0,10)
    m.v.range(-10,0)
    m.w.range(0,10)
    m.scale.range(11,60)
    m.base.range(6510,6514)
    for atomModel in m.atomListModel.atomModels:
        if atomModel.magnetic:
            for coeff in atomModel.coeffs:
                #coeff.range(-10, 10)
                coeff.range(-20,20)
    M = bumps.FitProblem(m)
    M.model_update()
    return M
示例#9
0
def fit():
    cell = Mod.makeCell(crystalCell, xtalsys(spaceGroup))
    cell.a.pm(0.5)
    cell.b.pm(0.5)
    cell.c.pm(0.5)
    m = Mod.Model(tt, observed, backg, 1.161020,  -0.658240,   0.29176, wavelength, spaceGroup, cell,
                (atomList, magAtomList), exclusions, magnetic=True,
                symmetry=symmetry, newSymmetry=basisSymmetry, base=base_line, scale=9.6286/np.sqrt(2.0), eta=0.1031, zero=0.0197, sxtal=True, error=error)
    m.u.range(0,10)
    m.v.range(-10,0)
    m.w.range(0,10)
    m.scale.range(0,60)
    m.eta.range(0,1)
    m.base.pm(500)
    m.zero.pm(0.25)
    for atomModel in m.atomListModel.atomModels:
        if atomModel.magnetic:
            for coeff in atomModel.coeffs:
                #coeff.range(-10, 10)
                coeff.range(-20,20)
    M = bumps.FitProblem(m)
    M.model_update()
    return M
示例#10
0
def fit():
    #makeBasis(basisSymmetry, basisIndex)
    cell = Mod.makeCell(crystalCell, xtalsys(spaceGroup))
    cell.a.pm(0.5)
    cell.b.pm(0.5)
    cell.c.pm(0.5)
    m = Mod.Model(tt,
                  observed,
                  backg,
                  1.809863,
                  -1.476814,
                  0.446315,
                  wavelength,
                  spaceGroup,
                  cell, (atomList, magAtomList),
                  exclusions,
                  magnetic=True,
                  symmetry=symmetry,
                  newSymmetry=basisSymmetry,
                  base=6512,
                  scale=94.064,
                  sxtal=True,
                  error=error)
    m.u.range(0, 10)
    m.v.range(-10, 0)
    m.w.range(0, 10)
    m.scale.range(11, 60)
    m.base.range(6510, 6514)
    for atomModel in m.atomListModel.atomModels:
        if atomModel.magnetic:
            for coeff in atomModel.coeffs:
                #coeff.range(-10, 10)
                coeff.range(-20, 20)
    M = bumps.FitProblem(m)
    M.model_update()
    return M