Exemplo n.º 1
0
def guess(xs, ys):
    yofs = common.determine_offset(ys)
    ys = ys - yofs
    sigma = xs[common.find_index_of(ys, ys[0] / 2)]
    return dict(
        ofs=yofs,
        area=common.determine_peak_area(xs, ys),
        sigma=sigma,
    )
Exemplo n.º 2
0
def guess(xs, ys):
    yofs = common.determine_offset(ys)
    ys = ys - yofs
    maxidx = np.argmax(np.abs(ys))
    return dict(
        ofs=yofs,
        area=common.determine_peak_area(xs, ys),
        x0=xs[maxidx],
        w=common.determine_peak_width(xs, ys, maxidx),
    )
Exemplo n.º 3
0
def guess(xs, ys):
    yofs = common.determine_offset(ys)
    ys = ys - yofs
    maxidx = np.argmax(np.abs(ys))
    return dict(
        ofs=yofs,
        amp=ys[maxidx],
        x0=xs[maxidx],
        sigma=common.determine_peak_width(xs, ys, maxidx) / 2,
        gamma=common.determine_peak_width(xs, ys, maxidx),
    )
Exemplo n.º 4
0
def guess(xs, ys):
    yofs = common.determine_offset(ys)
    ys = ys - yofs
    maxidx = np.argmax(np.abs(ys))
    sigma = common.determine_peak_width(xs, ys, maxidx,
                                        factor=np.exp(-1)) / 2.0
    return dict(
        ofs=yofs,
        area=common.determine_peak_area(xs, ys),
        x0=xs[maxidx],
        sigma=sigma,
    )
Exemplo n.º 5
0
def guess(xs, ys, zs):
    zofs = common.determine_offset(zs)
    zs = zs - zofs
    maxidxy = np.argmax(np.abs(zs).sum(axis=1))
    maxidxx = np.argmax(np.abs(zs).sum(axis=0))

    sigmax = common.determine_peak_width(xs[maxidxy,:], zs[maxidxy,:], maxidxx, factor=np.exp(-1)) / 2.0
    sigmay = common.determine_peak_width(ys[:,maxidxx], zs[:,maxidxx], maxidxy, factor=np.exp(-1)) / 2.0

    return dict(
        x0=xs[maxidxy,maxidxx],
        y0=ys[maxidxy,maxidxx],
        ofs=zofs,
        area=common.determine_peak_area(xs[maxidxy,:], zs[maxidxy,:]) * \
                common.determine_peak_area(ys[:,maxidxx], zs[:,maxidxx]),
        sigmax=sigmax,
        sigmay=sigmay,
    )