def move_time(move, eres):
<EOL>A = abs(move['<STR_LIT:A>'])<EOL>AD = abs(move['<STR_LIT>'])<EOL>if AD == <NUM_LIT:0.0>:<EOL><INDENT>AD = A<EOL><DEDENT>V = abs(move['<STR_LIT>'])<EOL>D = abs(move['<STR_LIT:D>'])/eres<EOL>accel_times = [V/A, V/AD]<EOL>dists = [<NUM_LIT:0.5>*A*(accel_times[<NUM_LIT:0>]**<NUM_LIT:2>), <NUM_LIT:0.5>*AD*(accel_times[<NUM_LIT:1>]**<NUM_LIT:2>)]<EOL>if sum(dists) <= D:<EOL><INDENT>return (sum(accel_times) + (D-sum(dists))/V)<EOL><DEDENT>else:<EOL><INDENT>return math.sqrt(<NUM_LIT:2>*D * (<NUM_LIT:1> + (A / AD)) / A)<EOL><DEDENT>
Calculates the time it takes to do a move.

    Calculates how long it will take to complete a move of the motor. It
    is assumed that the motor will decerate to a stop for the end of the
    move as opposed to keep moving at velocity.

    Everything is in motor units which are encoder counts for distance,
    pitches/s for velocity, and pitches/s^2 for acceleration.

    Parameters
    ----------
    move : dict
        Contains the move parameters in its fields: acceleration ('A'),
        deceleration ('AD' with 0 meaning the value of the acceleration
        is used), velocity ('V'), and the distance/position ('D').
    eres : int
        Encoder resolution.

    Returns
    -------
    time : float
        Time the move will take in seconds.

    See Also
    --------
    compile_sequence
    get_sequence_time