ism3d.xyhelper.cube.hextract

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