ism3d.xyhelper package¶
Submodules¶
ism3d.xyhelper.cube module¶
-
ism3d.xyhelper.cube.
hextract
(data, header, ss)[source]¶ similar to hextract.pro or hextract3d.pro in idl_moments However, it can also process stokes spectral cube prange can be something like:
- a list of two element tuple:
[(0,2),(218,220),(218,250),(222,230)]
- or a list of slice
np.s_[1:5,1::5]=(slice(1, 5, None), slice(1, None, 5))
or a list of slice expression string (from make_slice)
e.g. subim,subhd=hextract(im,hd,np.s_[:,:,(256-3):(256+3),(256-3):(256+3)])
- two operations are performed:
slice the original data array update the header crpix value
ism3d.xyhelper.sky module¶
-
ism3d.xyhelper.sky.
calc_ppbeam
(header)[source]¶ For Radio Cubes: ppbeam=npix/beam For optical/IR Cubes: ppbeam=1.0
-
ism3d.xyhelper.sky.
linear_offset_coords
(wcs, center)[source]¶ Returns a locally linear offset coordinate system.
Given a 2-d celestial WCS object and a central coordinate, return a WCS that describes an ‘offset’ coordinate system, assuming that the coordinates are locally linear (that is, the grid lines of this offset coordinate system are always aligned with the pixel coordinates, and distortions from spherical projections and distortion terms are not taken into account)
- Parameters
wcs (~astropy.wcs.WCS) – The original WCS, which should be a 2-d celestial WCS
center (~astropy.coordinates.SkyCoord) – The coordinates on which the offset coordinate system should be centered.