Example #1
0
def f_strain_pv_lmfit(alt, pars, t):
    height = pars[0]
    loc = pars[1] * t
    fwhm1 = pars[2] * t
    fwhm2 = pars[3] * t
    eta1 = pars[4]
    eta2 = pars[5]
    bkg = pars[6]
    strain = zeros(len(alt))
    strain[(alt <= loc)] = f_pVoigt(alt[alt <= loc],
                                    [height, loc, fwhm1, eta1]) / 100
    strain[(alt > loc)] = (f_pVoigt(alt[alt > loc],
                                    [height-bkg, loc, fwhm2, eta2])+bkg) / 100
    return strain
Example #2
0
def f_strain_pv_lmfit(alt, pars, t):
    height = pars[0]
    loc = pars[1] * t
    fwhm1 = pars[2] * t
    fwhm2 = pars[3] * t
    eta1 = pars[4]
    eta2 = pars[5]
    bkg = pars[6]
    strain = zeros(len(alt))
    strain[(alt <=
            loc)] = f_pVoigt(alt[alt <= loc], [height, loc, fwhm1, eta1]) / 100
    strain[(alt > loc)] = (
        f_pVoigt(alt[alt > loc], [height - bkg, loc, fwhm2, eta2]) + bkg) / 100
    return strain
Example #3
0
def f_DW_pv(alt, pv_p, t):
    height = 1 - pv_p[0]
    loc = pv_p[1] * t
    fwhm1 = pv_p[2] * t
    fwhm2 = pv_p[3] * t
    eta1 = pv_p[4]
    eta2 = pv_p[5]
    bkg = 1 - pv_p[6]
    DW = zeros(len(alt))
    DW[(alt <= loc)] = (1. -
                        f_pVoigt(alt[alt <= loc], [height, loc, fwhm1, eta1]))
    DW[(alt > loc)] = (1. -
                       (f_pVoigt(alt[alt > loc],
                                 [height-bkg, loc, fwhm2, eta2]) + bkg))
    return DW
Example #4
0
def f_DW_pv(alt, pv_p, t):
    height = 1 - pv_p[0]
    loc = pv_p[1] * t
    fwhm1 = pv_p[2] * t
    fwhm2 = pv_p[3] * t
    eta1 = pv_p[4]
    eta2 = pv_p[5]
    bkg = 1 - pv_p[6]
    DW = zeros(len(alt))
    DW[(alt <= loc)] = (1. -
                        f_pVoigt(alt[alt <= loc], [height, loc, fwhm1, eta1]))
    DW[(alt > loc)] = (
        1. -
        (f_pVoigt(alt[alt > loc], [height - bkg, loc, fwhm2, eta2]) + bkg))
    return DW
Example #5
0
def f_DW_pv_lmfit(alt, pars, t):
    height = 1 - pars[7]
    loc = pars[8] * t
    fwhm1 = pars[9] * t
    fwhm2 = pars[10] * t
    eta1 = pars[11]
    eta2 = pars[12]
    bkg = 1 - pars[13]

    DW = zeros(len(alt))
    DW[(alt <= loc)] = (1. -
                        f_pVoigt(alt[alt <= loc], [height, loc, fwhm1, eta1]))
    DW[(alt > loc)] = (1. -
                       (f_pVoigt(alt[alt > loc],
                                 [height-bkg, loc, fwhm2, eta2]) + bkg))
    return DW
Example #6
0
def f_DW_pv_lmfit(alt, pars, t):
    height = 1 - pars[7]
    loc = pars[8] * t
    fwhm1 = pars[9] * t
    fwhm2 = pars[10] * t
    eta1 = pars[11]
    eta2 = pars[12]
    bkg = 1 - pars[13]

    DW = zeros(len(alt))
    DW[(alt <= loc)] = (1. -
                        f_pVoigt(alt[alt <= loc], [height, loc, fwhm1, eta1]))
    DW[(alt > loc)] = (
        1. -
        (f_pVoigt(alt[alt > loc], [height - bkg, loc, fwhm2, eta2]) + bkg))
    return DW