Skip to content

Commit

Permalink
Merge pull request astropy#61 from astrofrog/filename
Browse files Browse the repository at this point in the history
Add support for filename in first argument
  • Loading branch information
astrofrog committed May 6, 2015
2 parents 0f367cb + e7f2ea7 commit 54dbeaa
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
19 changes: 14 additions & 5 deletions docs/celestial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,20 @@ Reprojection using interpolation can be done using the high-level
>>> from reproject import reproject_interp

This function takes two main arguments. The first argument is the image to
reproject, together with WCS information about the image. This can be either an
Astropy HDU object (specifically :class:`~astropy.io.fits.PrimaryHDU`,
:class:`~astropy.io.fits.ImageHDU`, or :class:`~astropy.io.fits.CompImageHDU`), or a tuple with two elements: a Numpy
array and either a :class:`~astropy.wcs.WCS` or a
:class:`~astropy.io.fits.Header` instance.
reproject, together with WCS information about the image. This can be either:

* The name of a FITS file
* An :class:`~astropy.io.fits.HDUList` object
* An image HDU object such as a :class:`~astropy.io.fits.PrimaryHDU`,
:class:`~astropy.io.fits.ImageHDU`, or
:class:`~astropy.io.fits.CompImageHDU` instance
* A tuple where the first element is a :class:`~numpy.ndarray` and the
second element is either a :class:`~astropy.wcs.WCS` or a
:class:`~astropy.io.fits.Header` object

In the case of a FITS file or an :class:`~astropy.io.fits.HDUList` object, if
there is more than one Header-Data Unit (HDU), the ``hdu_in`` argument is
also required and should be set to the ID or the name of the HDU to use.

The second argument is the WCS information for the output image, which should
be specified either as a :class:`~astropy.wcs.WCS` or a
Expand Down
5 changes: 3 additions & 2 deletions reproject/interpolation/high_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ def reproject_interp(input_data, output_projection, shape_out=None, hdu_in=None,
* The name of a FITS file
* An `~astropy.io.fits.HDUList` object
* An image HDU object such as a `~astropy.io.fits.PrimaryHDU` or
`~astropy.io.fits.ImageHDU`
* An image HDU object such as a `~astropy.io.fits.PrimaryHDU`,
`~astropy.io.fits.ImageHDU`, or `~astropy.io.fits.CompImageHDU`
instance
* A tuple where the first element is a `~numpy.ndarray` and the
second element is either a `~astropy.wcs.WCS` or a
`~astropy.io.fits.Header` object
Expand Down
5 changes: 3 additions & 2 deletions reproject/spherical_intersect/high_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ def reproject_exact(input_data, output_projection, shape_out=None, hdu_in=None,
* The name of a FITS file
* An `~astropy.io.fits.HDUList` object
* An image HDU object such as a `~astropy.io.fits.PrimaryHDU` or
`~astropy.io.fits.ImageHDU`
* An image HDU object such as a `~astropy.io.fits.PrimaryHDU`,
`~astropy.io.fits.ImageHDU`, or `~astropy.io.fits.CompImageHDU`
instance
* A tuple where the first element is a `~numpy.ndarray` and the
second element is either a `~astropy.wcs.WCS` or a
`~astropy.io.fits.Header` object
Expand Down

0 comments on commit 54dbeaa

Please sign in to comment.