cwitools.coordinates.get_rgrid¶
-
cwitools.coordinates.
get_rgrid
(fits_in, pos, unit='px', redshift=None, pos_type='image', cosmo=FlatLambdaCDM(name="WMAP9", H0=69.3 km / (Mpc s), Om0=0.286, Tcmb0=2.725 K, Neff=3.04, m_nu=[0. 0. 0.] eV, Ob0=0.0463))¶ Get a 2D grid of radius from x,y in specified units.
Parameters: - fits_in (HDU or HDUList) – HDU or HDUList containing 2D or 3D data.
- pos (float tuple) – The position to center on, in image coordinates.
- unit (str) – The desired units for the output grid. ‘px’ - pixels ‘arcsec’ - arcseconds ‘pkpc’ - proper kiloparsecs ‘ckpc’ - comoving kiloparsecs
- redshift (float) – The redshift of the source, required to calculate the grid in units of pkpc or ckpc.
- pos_type (str) – The type of coordinate given for the ‘pos’ argument. ‘radec’ - a tuple of (RA, DEC) coordinates, in decimal degrees ‘image’ - a tuple of image coordinates, in pixels
- cosmo (FlatLambdaCDM) – The cosmology to use, as one of Astropy’s cosmologies (astropy.cosmology.FlatLambdaCDM). Default is WMAP9.
Returns: 2D array of distance from pos in the requested units.
Return type: numpy.ndarray