     if not upperHemisphere
       z *= -1
 
-    c = if degrees then 180/Math.PI else 1
-    d = [x,y,z]
-    r = norm(d)
-    return [
-      c*Math.atan2(y,x),
-      c*Math.asin z/r]
+    return [x,y,z]
 
   return ell
     .map stepFunc
+    .map cart2sph(opts)
 
 combinedErrors = (sv, ax, opts={})->
   func = (type)->

  ([Math.cos(a),Math.sin(a)] for a in angles)

cart2sph = (opts)->
  opts.degrees ?= true
  c = if opts.degrees then 180/Math.PI else 1
  (d)->
    r = norm(d)
    [x,y,z] = d
    # Converts xyz to lat lon
    [c*Math.atan2(y,x),c*Math.asin z/r]

planeErrors = (axesCovariance, axes, opts={})->
  # Get a single level of planar errors (or the

  opts.n ?= 100
  upperHemisphere = opts.upperHemisphere or true
  sheet = opts.sheet or 'nominal'
  axes = identity unless axes?
  opts.traditionalLayout ?= true

