gammapy/maps/hpx.py
def to_wcs_geom(self, proj="AIT", oversample=2, drop_axes=True, width_pix=None):
        """Make a WCS projection appropriate for this HPX pixelization.

        Parameters
        ----------
        drop_axes : bool
            Drop non-spatial axes from the
            HEALPIX geometry.  If False then all dimensions of the
            HEALPIX geometry will be copied to the WCS geometry.
        proj : str
            Projection type of WCS geometry.
        oversample : float
            Oversampling factor for WCS map. This will be the
            approximate ratio of the width of a HPX pixel to a WCS
            pixel. If this parameter is None then the width will be
            set from ``width_pix``.
        width_pix : int
            Width of the WCS geometry in pixels.  The pixel size will
            be set to the number of pixels satisfying ``oversample``
            or ``width_pix`` whichever is smaller.  If this parameter
            is None then the width will be set from ``oversample``.

        Returns
        -------
        wcs : `~gammapy.maps.WcsGeom`
            WCS geometry
        """
        pix_size = get_pix_size_from_nside(self.nside)
        binsz = np.min(pix_size) / oversample
        width = 2.0 * self._get_region_size() + np.max(pix_size)

        if width_pix is not None and int(width / binsz) > width_pix:
            binsz = width / width_pix

        if width > 90.0:
            width = min(360.0, width), min(180.0, width)

        if drop_axes:
            axes = None
        else:
            axes = copy.deepcopy(self.axes)

        return WcsGeom.create(
            width=width,
            binsz=binsz,
            frame=self.frame,
            axes=axes,
            skydir=self.center_skydir,
            proj=proj,
        )
Make a WCS projection appropriate for this HPX pixelization.

        Parameters
        ----------
        drop_axes : bool
            Drop non-spatial axes from the
            HEALPIX geometry.  If False then all dimensions of the
            HEALPIX geometry will be copied to the WCS geometry.
        proj : str
            Projection type of WCS geometry.
        oversample : float
            Oversampling factor for WCS map. This will be the
            approximate ratio of the width of a HPX pixel to a WCS
            pixel. If this parameter is None then the width will be
            set from ``width_pix``.
        width_pix : int
            Width of the WCS geometry in pixels.  The pixel size will
            be set to the number of pixels satisfying ``oversample``
            or ``width_pix`` whichever is smaller.  If this parameter
            is None then the width will be set from ``oversample``.

        Returns
        -------
        wcs : `~gammapy.maps.WcsGeom`
            WCS geometry
        
Make a WCS projection appropriate for this HPX pixelization.
Parameters

drop_axes : bool
Drop non-spatial axes from the
HEALPIX geometry.  If False then all dimensions of the
HEALPIX geometry will be copied to the WCS geometry.
proj : str
Projection type of WCS geometry.
oversample : float
Oversampling factor for WCS map. This will be the
approximate ratio of the width of a HPX pixel to a WCS
pixel. If this parameter is None then the width will be
set from ``width_pix``.
width_pix : int
Width of the WCS geometry in pixels.

Returns

wcs : `~gammapy.maps.WcsGeom`
WCS geometry
Make a WCS projection appropriate for this HPX pixelization . Parameters drop_axes : bool Drop non - spatial axes from the HEALPIX geometry . If False then all dimensions of the HEALPIX geometry will be copied to the WCS geometry . proj : str Projection type of WCS geometry . oversample : float Oversampling factor for WCS map . This will be the approximate ratio of the width of a HPX pixel to a WCS pixel . If this parameter is None then the width will be set from ` ` width_pix ` ` . width_pix : int Width of the WCS geometry in pixels . Returns wcs : ` ~gammapy . maps . WcsGeom ` WCS geometry
def to_wcs_geom(self, proj="AIT", oversample=2, drop_axes=True, width_pix=None):
        pix_size = get_pix_size_from_nside(self.nside)
        binsz = np.min(pix_size) / oversample
        width = 2.0 * self._get_region_size() + np.max(pix_size)
        if width_pix is not None and int(width / binsz) > width_pix:
            binsz = width / width_pix
        if width > 90.0:
            width = min(360.0, width), min(180.0, width)
        if drop_axes:
            axes = None
        else:
            axes = copy.deepcopy(self.axes)
        return WcsGeom.create(
            width=width,
            binsz=binsz,
            frame=self.frame,
            axes=axes,
            skydir=self.center_skydir,
            proj=proj,
        )
def to_wcs_geom ( self , proj = "AIT" , oversample = 2 , drop_axes = True , width_pix = None ) : pix_size = get_pix_size_from_nside ( self . nside ) binsz = np . min ( pix_size ) / oversample width = 2.0 * self . _get_region_size ( ) + np . max ( pix_size ) if width_pix is not None and int ( width / binsz ) > width_pix : binsz = width / width_pix if width > 90.0 : width = min ( 360.0 , width ) , min ( 180.0 , width ) if drop_axes : axes = None else : axes = copy . deepcopy ( self . axes ) return WcsGeom . create ( width = width , binsz = binsz , frame = self . frame , axes = axes , skydir = self . center_skydir , proj = proj , )
Make a WCS projection appropriate for this HPX pixelization.
Make a WCS projection appropriate for this HPX pixelization .
"""Make a WCS projection appropriate for this HPX pixelization.

        Parameters
        ----------
        drop_axes : bool
            Drop non-spatial axes from the
            HEALPIX geometry.  If False then all dimensions of the
            HEALPIX geometry will be copied to the WCS geometry.
        proj : str
            Projection type of WCS geometry.
        oversample : float
            Oversampling factor for WCS map. This will be the
            approximate ratio of the width of a HPX pixel to a WCS
            pixel. If this parameter is None then the width will be
            set from ``width_pix``.
        width_pix : int
            Width of the WCS geometry in pixels.  The pixel size will
            be set to the number of pixels satisfying ``oversample``
            or ``width_pix`` whichever is smaller.  If this parameter
            is None then the width will be set from ``oversample``.

        Returns
        -------
        wcs : `~gammapy.maps.WcsGeom`
            WCS geometry
        """
self
proj
oversample
drop_axes
width_pix