code: def make_perfect_cd(wcs):
      
      def_scale = (wcs.pscale) / 3600.
      def_orientat = np.deg2rad(wcs.orientat)
      perfect_cd = def_scale * np.array(
          [[-np.cos(def_orientat),np.sin(def_orientat)],
           [np.sin(def_orientat),np.cos(def_orientat)]]
      )
      return perfect_cd
docs: Create a perfect (square, orthogonal, undistorted) CD matrix from the
          input WCS.