def reconstruct(ri, li, rs, v, x, y, phix, phiy):
    '\n    Takes x, y gradients to the solution to screen mapping potential problem and\n    reconstructs the perpendicular deflection fields wBx and wBy.\n\n    Args:\n        ri (float): Distance from source to plasma (cm).\n        li (float): Distance across plasma (cm).\n        rs (float): Distance from plasma to screen (cm).\n        v (float): Velocity of protons (cm/s).\n        x (array): Plasma x-coordinates (cm). \n        y (array): Plasma x-coordinates (cm).\n        phix (array): Gradient of screen mapping potential in x-direction.\n        phiy (array): Gradient of screen mapping potential in y-direction.\n\n    Returns:\n        wBx (array)\n        \n    '
    magnify = (((rs + ri) + (0.5 * li)) / (ri + (0.5 * li)))
    map_pot_x = np.copy(phix)
    map_pot_y = np.copy(phiy)
    plasma_x = np.copy(x)
    plasma_y = np.copy(y)
    wBx = ((magnify * (v / rs)) * (map_pot_x - plasma_x))
    wBy = ((magnify * (v / rs)) * (map_pot_y - plasma_y))
    return (wBx, wBy)
Takes x, y gradients to the solution to screen mapping potential problem and
reconstructs the perpendicular deflection fields wBx and wBy.

Args:
    ri (float): Distance from source to plasma (cm).
    li (float): Distance across plasma (cm).
    rs (float): Distance from plasma to screen (cm).
    v (float): Velocity of protons (cm/s).
    x (array): Plasma x-coordinates (cm). 
    y (array): Plasma x-coordinates (cm).
    phix (array): Gradient of screen mapping potential in x-direction.
    phiy (array): Gradient of screen mapping potential in y-direction.

Returns:
    wBx (array)
def reconstruct(ri, li, rs, v, x, y, phix, phiy):
    '\n    Takes x, y gradients to the solution to screen mapping potential problem and\n    reconstructs the perpendicular deflection fields wBx and wBy.\n\n    Args:\n        ri (float): Distance from source to plasma (cm).\n        li (float): Distance across plasma (cm).\n        rs (float): Distance from plasma to screen (cm).\n        v (float): Velocity of protons (cm/s).\n        x (array): Plasma x-coordinates (cm). \n        y (array): Plasma x-coordinates (cm).\n        phix (array): Gradient of screen mapping potential in x-direction.\n        phiy (array): Gradient of screen mapping potential in y-direction.\n\n    Returns:\n        wBx (array)\n        \n    '
    magnify = (((rs + ri) + (0.5 * li)) / (ri + (0.5 * li)))
    map_pot_x = np.copy(phix)
    map_pot_y = np.copy(phiy)
    plasma_x = np.copy(x)
    plasma_y = np.copy(y)
    wBx = ((magnify * (v / rs)) * (map_pot_x - plasma_x))
    wBy = ((magnify * (v / rs)) * (map_pot_y - plasma_y))
    return (wBx, wBy)