def predictwithViewPoint(state, viewPoint):
    moved = copy.deepcopy(state)
    for m in viewPoint[0]["mean"]:
        moved[m] = viewPoint[0]["mean"][m]
    moved = encoder.retransformforViewPoint(moved, viewPoint[0]["base"],
                                            viewPoint[0]["ref"])
    output = {}
    for s in state:
        if s in viewPoint[0]["mean"]:
            output[s] = moved[s]
        else:
            output[s] = state[s]
    return output
Esempio n. 2
0
def predictwithViewPoint(state, viewPoint):
    moved = copy.deepcopy(state)
    base = viewPoint["base"]
    ref = viewPoint["ref"]
    mean = viewPoint["mean"]
    for m in mean:
        moved[m] = viewPoint["mean"][m]
    moved = encoder.retransformforViewPoint(moved, base, ref)
    output = {}
    for s in state:
        if s in mean:
            output[s] = moved[s]
        else:
            output[s] = state[s]
    return output