def get_valve_transitions(calibration_data):
    """Get the valve start and stop times. 

    Parameters
    ----------
    calibration_data : dict
        All of the digital (DIO) and analog data corresponding to the trodes
        files for the a calibration recording. For example, as returned by
        read_data(). 

    Returns
    -------
    start_times : dict  
        Times at which each of the valves transitioned from closed to open
    stop_times : dict
        Times at which each of the valves transitioned from open to closed
        
    """
    start_times = {
        'x_push': calibration_data['DIO']['x_push'][1::2],
        'x_pull': calibration_data['DIO']['x_pull'][1::2],
        'y_push': calibration_data['DIO']['y_push'][1::2],
        'y_pull': calibration_data['DIO']['y_pull'][1::2],
        'z_push': calibration_data['DIO']['z_push'][1::2],
        'z_pull': calibration_data['DIO']['z_pull'][1::2]
    }
    stop_times = {
        'x_push': calibration_data['DIO']['x_push'][2::2],
        'x_pull': calibration_data['DIO']['x_pull'][2::2],
        'y_push': calibration_data['DIO']['y_push'][2::2],
        'y_pull': calibration_data['DIO']['y_pull'][2::2],
        'z_push': calibration_data['DIO']['z_push'][2::2],
        'z_pull': calibration_data['DIO']['z_pull'][2::2]
    }
    return start_times, stop_times