astroquery/hips2fits/core.py
def query(self, hips, width, height, projection, ra, dec, fov, coordsys="icrs", rotation_angle=Angle(0 * u.deg), format="fits", min_cut=0.5, max_cut=99.5, stretch="linear", cmap="Greys_r", get_query_payload=False, verbose=False):
        """
        Query the `CDS hips2fits service <http://alasky.u-strasbg.fr/hips-image-services/hips2fits>`_.

        If you have not any WCS, you can call this method by passing:
        * The width/height size of the output pixel image
        * The center of projection in world coordinates (ra, dec)
        * The fov angle in world coordinates
        * The rotation angle of the projection
        * The name of the projection. All `astropy projections <https://docs.astropy.org/en/stable/wcs/#supported-projections>`_ are supported:

        Parameters
        ----------
        hips : str
            ID or keyword identifying the HiPS to use.
            If multiple HiPS surveys match, one is chosen randomly.
            See the list of valid HiPS ids hosted by the CDS `here <http://aladin.unistra.fr/hips/list>`_.
        width : int
            Width in pixels of the output image.
        height : int
            Height in pixels of the output image.
        projection : str
            Name of the requested projection, eg: SIN, TAN, MOL, AIT, CAR, CEA, STG	Compulsory if wcs is not provided.
            See `this page <https://docs.astropy.org/en/stable/wcs/#supported-projections>`_ for an exhaustive list.
        fov : `~astropy.coordinates.Angle`
            Size (FoV) of the cutout on the sky.
            This is the size of the largest dimension of the image.
        ra : `~astropy.coordinates.Longitude`
            Right ascension of the center of the output image.
        dec : `~astropy.coordinates.Latitude`
            Declination of the center of the output image.
        coordsys : str, optional
            Coordinate frame system to be used for the projection
            Possible values are icrs or galactic.
            Default value is icrs.
        rotation_angle : `~astropy.coordinates.Angle`, optional
            Angle value to be applied to the projection
            Default value is ``Angle(0 * u.deg)``
        format : str, optional
            Format of the output image.
            Allowed values are fits (default), jpg and png
            In case of jpg or png format, scaling of the pixels value can be controlled with parameters ``min_cut``, ``max_cut`` and ``stretch``
        min_cut : float, optional
            Minimal value considered for contrast adjustment normalization.
            Only applicable to jpg/png output formats.
            Can be given as a percentile value, for example min_cut=1.5%. Default value is 0.5%.
        max_cut : float, optional
            Maximal value considered for contrast adjustment normalization.
            Only applicable to jpg/png output formats.
            Can be given as a percentile value, for example max_cut=97%. Default value is 99.5%.
        stretch : str, optional
            Stretch function used for contrast adjustment.
            Only applicable to jpg/png output formats.
            Possible values are: power, linear, sqrt, log, asinh. Default value is linear.
        cmap : `~matplotlib.colors.Colormap` or str, optional
            Name of the color map.
            Only applicable to jpg/png output formats.
            Any `colormap supported by Matplotlib <https://matplotlib.org/3.1.1/gallery/color/colormap_reference.html>`_ can be specified.
            Default value is Greys_r (grayscale)
        get_query_payload : bool, optional
            If True, returns a dictionary of the query payload instead of the parsed response.
        verbose : bool, optional

        Returns
        -------
        response : `~astropy.io.fits.HDUList` or `~numpy.ndarray`
            Returns an astropy HDUList for fits output format or a 3-dimensional numpy array
            for jpg/png output formats.

        Examples
        --------
        >>> from astroquery.hips2fits import hips2fits
        >>> import matplotlib.pyplot as plt
        >>> from matplotlib.colors import Colormap
        >>> import astropy.units as u
        >>> from astropy.coordinates import Longitude, Latitude, Angle
        >>> hips = 'CDS/P/DSS2/red'
        >>> result = hips2fits.query(
        ...    hips=hips,
        ...    width=1000,
        ...    height=500,
        ...    ra=Longitude(0 * u.deg),
        ...    dec=Latitude(20 * u.deg),
        ...    fov=Angle(80 * u.deg),
        ...    projection="TAN",
        ...    get_query_payload=False,
        ...    format='jpg',
        ...    min_cut=0.5,
        ...    max_cut=99.5,
        ...    cmap=Colormap('viridis'),
        ... )
        >>> im = plt.imshow(result)
        >>> plt.show(im)
        """

        response = self.query_async(get_query_payload, hips=hips, width=width, height=height, projection=projection, ra=ra, dec=dec, fov=fov, coordsys=coordsys, rotation_angle=rotation_angle, format=format, min_cut=min_cut, max_cut=max_cut, stretch=stretch, cmap=cmap)

        if get_query_payload:
            return response

        result = self._parse_result(response, verbose=verbose, format=format)
        return result

        Query the `CDS hips2fits service <http://alasky.u-strasbg.fr/hips-image-services/hips2fits>`_.

        If you have not any WCS, you can call this method by passing:
        * The width/height size of the output pixel image
        * The center of projection in world coordinates (ra, dec)
        * The fov angle in world coordinates
        * The rotation angle of the projection
        * The name of the projection. All `astropy projections <https://docs.astropy.org/en/stable/wcs/#supported-projections>`_ are supported:

        Parameters
        ----------
        hips : str
            ID or keyword identifying the HiPS to use.
            If multiple HiPS surveys match, one is chosen randomly.
            See the list of valid HiPS ids hosted by the CDS `here <http://aladin.unistra.fr/hips/list>`_.
        width : int
            Width in pixels of the output image.
        height : int
            Height in pixels of the output image.
        projection : str
            Name of the requested projection, eg: SIN, TAN, MOL, AIT, CAR, CEA, STG	Compulsory if wcs is not provided.
            See `this page <https://docs.astropy.org/en/stable/wcs/#supported-projections>`_ for an exhaustive list.
        fov : `~astropy.coordinates.Angle`
            Size (FoV) of the cutout on the sky.
            This is the size of the largest dimension of the image.
        ra : `~astropy.coordinates.Longitude`
            Right ascension of the center of the output image.
        dec : `~astropy.coordinates.Latitude`
            Declination of the center of the output image.
        coordsys : str, optional
            Coordinate frame system to be used for the projection
            Possible values are icrs or galactic.
            Default value is icrs.
        rotation_angle : `~astropy.coordinates.Angle`, optional
            Angle value to be applied to the projection
            Default value is ``Angle(0 * u.deg)``
        format : str, optional
            Format of the output image.
            Allowed values are fits (default), jpg and png
            In case of jpg or png format, scaling of the pixels value can be controlled with parameters ``min_cut``, ``max_cut`` and ``stretch``
        min_cut : float, optional
            Minimal value considered for contrast adjustment normalization.
            Only applicable to jpg/png output formats.
            Can be given as a percentile value, for example min_cut=1.5%. Default value is 0.5%.
        max_cut : float, optional
            Maximal value considered for contrast adjustment normalization.
            Only applicable to jpg/png output formats.
            Can be given as a percentile value, for example max_cut=97%. Default value is 99.5%.
        stretch : str, optional
            Stretch function used for contrast adjustment.
            Only applicable to jpg/png output formats.
            Possible values are: power, linear, sqrt, log, asinh. Default value is linear.
        cmap : `~matplotlib.colors.Colormap` or str, optional
            Name of the color map.
            Only applicable to jpg/png output formats.
            Any `colormap supported by Matplotlib <https://matplotlib.org/3.1.1/gallery/color/colormap_reference.html>`_ can be specified.
            Default value is Greys_r (grayscale)
        get_query_payload : bool, optional
            If True, returns a dictionary of the query payload instead of the parsed response.
        verbose : bool, optional

        Returns
        -------
        response : `~astropy.io.fits.HDUList` or `~numpy.ndarray`
            Returns an astropy HDUList for fits output format or a 3-dimensional numpy array
            for jpg/png output formats.

        Examples
        --------
        >>> from astroquery.hips2fits import hips2fits
        >>> import matplotlib.pyplot as plt
        >>> from matplotlib.colors import Colormap
        >>> import astropy.units as u
        >>> from astropy.coordinates import Longitude, Latitude, Angle
        >>> hips = 'CDS/P/DSS2/red'
        >>> result = hips2fits.query(
        ...    hips=hips,
        ...    width=1000,
        ...    height=500,
        ...    ra=Longitude(0 * u.deg),
        ...    dec=Latitude(20 * u.deg),
        ...    fov=Angle(80 * u.deg),
        ...    projection="TAN",
        ...    get_query_payload=False,
        ...    format='jpg',
        ...    min_cut=0.5,
        ...    max_cut=99.5,
        ...    cmap=Colormap('viridis'),
        ... )
        >>> im = plt.imshow(result)
        >>> plt.show(im)
        
Query the `CDS hips2fits service `_.
If you have not any WCS, you can call this method by passing:
The width/height size of the output pixel image
The center of projection in world coordinates (ra, dec)
The fov angle in world coordinates
The rotation angle of the projection
The name of the projection. All `astropy projections `_ are supported.

Parameters

hips : str
ID or keyword identifying the HiPS to use.
If multiple HiPS surveys match, one is chosen randomly.
See the list of valid HiPS ids hosted by the CDS `here `_.
width : int
Width in pixels of the output image.
height : int
Height in pixels of the output image.

Returns

response : `~astropy.io.fits.HDUList` or `~numpy.ndarray`
Returns an astropy HDUList for fits output format or a 3-dimensional numpy array
for jpg/png output formats.

Examples


Query the ` CDS hips2fits service ` _ . If you have not any WCS you can call this method by passing : The width / height size of the output pixel image The center of projection in world coordinates ( ra dec ) The fov angle in world coordinates The rotation angle of the projection The name of the projection . All ` astropy projections ` _ are supported . Parameters hips : str ID or keyword identifying the HiPS to use . If multiple HiPS surveys match one is chosen randomly . See the list of valid HiPS ids hosted by the CDS ` here ` _ . width : int Width in pixels of the output image . height : int Height in pixels of the output image . Returns response : ` ~astropy . io . fits . HDUList ` or ` ~numpy . ndarray ` Returns an astropy HDUList for fits output format or a 3 - dimensional numpy array for jpg / png output formats . Examples
def query(self, hips, width, height, projection, ra, dec, fov, coordsys="icrs", rotation_angle=Angle(0 * u.deg), format="fits", min_cut=0.5, max_cut=99.5, stretch="linear", cmap="Greys_r", get_query_payload=False, verbose=False):
        response = self.query_async(get_query_payload, hips=hips, width=width, height=height, projection=projection, ra=ra, dec=dec, fov=fov, coordsys=coordsys, rotation_angle=rotation_angle, format=format, min_cut=min_cut, max_cut=max_cut, stretch=stretch, cmap=cmap)
        if get_query_payload:
            return response
        result = self._parse_result(response, verbose=verbose, format=format)
        return result
def query ( self , hips , width , height , projection , ra , dec , fov , coordsys = "icrs" , rotation_angle = Angle ( 0 * u . deg ) , format = "fits" , min_cut = 0.5 , max_cut = 99.5 , stretch = "linear" , cmap = "Greys_r" , get_query_payload = False , verbose = False ) : response = self . query_async ( get_query_payload , hips = hips , width = width , height = height , projection = projection , ra = ra , dec = dec , fov = fov , coordsys = coordsys , rotation_angle = rotation_angle , format = format , min_cut = min_cut , max_cut = max_cut , stretch = stretch , cmap = cmap ) if get_query_payload : return response result = self . _parse_result ( response , verbose = verbose , format = format ) return result
Query the `CDS hips2fits service <http://alasky.u-strasbg.fr/hips-image-services/hips2fits>`_.
Query the ` CDS hips2fits service <http : // alasky . u - strasbg . fr / hips - image - services / hips2fits > ` _ .
"""
        Query the `CDS hips2fits service <http://alasky.u-strasbg.fr/hips-image-services/hips2fits>`_.

        If you have not any WCS, you can call this method by passing:
        * The width/height size of the output pixel image
        * The center of projection in world coordinates (ra, dec)
        * The fov angle in world coordinates
        * The rotation angle of the projection
        * The name of the projection. All `astropy projections <https://docs.astropy.org/en/stable/wcs/#supported-projections>`_ are supported:

        Parameters
        ----------
        hips : str
            ID or keyword identifying the HiPS to use.
            If multiple HiPS surveys match, one is chosen randomly.
            See the list of valid HiPS ids hosted by the CDS `here <http://aladin.unistra.fr/hips/list>`_.
        width : int
            Width in pixels of the output image.
        height : int
            Height in pixels of the output image.
        projection : str
            Name of the requested projection, eg: SIN, TAN, MOL, AIT, CAR, CEA, STG	Compulsory if wcs is not provided.
            See `this page <https://docs.astropy.org/en/stable/wcs/#supported-projections>`_ for an exhaustive list.
        fov : `~astropy.coordinates.Angle`
            Size (FoV) of the cutout on the sky.
            This is the size of the largest dimension of the image.
        ra : `~astropy.coordinates.Longitude`
            Right ascension of the center of the output image.
        dec : `~astropy.coordinates.Latitude`
            Declination of the center of the output image.
        coordsys : str, optional
            Coordinate frame system to be used for the projection
            Possible values are icrs or galactic.
            Default value is icrs.
        rotation_angle : `~astropy.coordinates.Angle`, optional
            Angle value to be applied to the projection
            Default value is ``Angle(0 * u.deg)``
        format : str, optional
            Format of the output image.
            Allowed values are fits (default), jpg and png
            In case of jpg or png format, scaling of the pixels value can be controlled with parameters ``min_cut``, ``max_cut`` and ``stretch``
        min_cut : float, optional
            Minimal value considered for contrast adjustment normalization.
            Only applicable to jpg/png output formats.
            Can be given as a percentile value, for example min_cut=1.5%. Default value is 0.5%.
        max_cut : float, optional
            Maximal value considered for contrast adjustment normalization.
            Only applicable to jpg/png output formats.
            Can be given as a percentile value, for example max_cut=97%. Default value is 99.5%.
        stretch : str, optional
            Stretch function used for contrast adjustment.
            Only applicable to jpg/png output formats.
            Possible values are: power, linear, sqrt, log, asinh. Default value is linear.
        cmap : `~matplotlib.colors.Colormap` or str, optional
            Name of the color map.
            Only applicable to jpg/png output formats.
            Any `colormap supported by Matplotlib <https://matplotlib.org/3.1.1/gallery/color/colormap_reference.html>`_ can be specified.
            Default value is Greys_r (grayscale)
        get_query_payload : bool, optional
            If True, returns a dictionary of the query payload instead of the parsed response.
        verbose : bool, optional

        Returns
        -------
        response : `~astropy.io.fits.HDUList` or `~numpy.ndarray`
            Returns an astropy HDUList for fits output format or a 3-dimensional numpy array
            for jpg/png output formats.

        Examples
        --------
        >>> from astroquery.hips2fits import hips2fits
        >>> import matplotlib.pyplot as plt
        >>> from matplotlib.colors import Colormap
        >>> import astropy.units as u
        >>> from astropy.coordinates import Longitude, Latitude, Angle
        >>> hips = 'CDS/P/DSS2/red'
        >>> result = hips2fits.query(
        ...    hips=hips,
        ...    width=1000,
        ...    height=500,
        ...    ra=Longitude(0 * u.deg),
        ...    dec=Latitude(20 * u.deg),
        ...    fov=Angle(80 * u.deg),
        ...    projection="TAN",
        ...    get_query_payload=False,
        ...    format='jpg',
        ...    min_cut=0.5,
        ...    max_cut=99.5,
        ...    cmap=Colormap('viridis'),
        ... )
        >>> im = plt.imshow(result)
        >>> plt.show(im)
        """
self
hips
width
height
projection
ra
dec
fov
coordsys
rotation_angle
format
min_cut
max_cut
stretch
cmap
get_query_payload
verbose