Converting Quaternions to Euler in the Graph Editor I have imported a camera animation that came from a collada file. When I open the graph editor I see the rotations as quaternions. 

How do I convert that to euler. I need to see euler in the Graph Editor.

thanks

NOTE: OK, I select the camera and change from Quaternions to XYZ Euler in the transform panel but the graph editor continues to show the animation in quaternions. I see that this box just changes the visualization mode on the transform panel instead of changing the keyframes that already exist. Any real way to convert existing keyframes from quaternions to euler?
Select the camera object, (still in quaternion rotation mode) copy script, paste into text editor, run script.  It will create a set of rotation_euler fcurves matching the quaternion rotation.  If all goes well manually change the rotation mode and clear the quaternion keyframes.

import bpy
from math import tan, atan
context = bpy.context
scene = context.scene
order = 'XYZ' # euler rotation order desired
cam_obj = context.active_object
action = cam_obj.animation_data.action

frames = []
fcurves = []

for index in [0, 1, 2, 4]:
    # search for rotation euler kfps
    fc = action.fcurves.find("rotation_quaternion", index=index)
    # make a list of frames that have quaternion rot keyframes
    if fc:
        frames.extend([kfp.co[0] for kfp in fc.keyframe_points])
        fcurves.append(fc)
# run thru and keyframe in 

for f in set(frames):
    scene.frame_set(f)
    cam_obj.rotation_euler = cam_obj.matrix_world.to_euler(order)
    #cam_obj.rotation_euler = [atan(tan(d)) for d in cam_obj.rotation_euler]
    cam_obj.keyframe_insert("rotation_euler", frame=f)