def from_sky(cls, skycoord, wcs, origin=_DEFAULT_WCS_ORIGIN, mode=_DEFAULT_WCS_MODE):
        """Create `PixCoord` from `~astropy.coordinates.SkyCoord`.

        Calls :meth:`astropy.coordinates.SkyCoord.to_pixel`.
        See parameter description there.
        """
        x, y = skycoord.to_pixel(wcs=wcs, origin=origin, mode=mode)
        return cls(x=x, y=y)