bundles / astropy latest / astropy / io / fits / hdu / hdulist / HDUList / pop
function
astropy.io.fits.hdu.hdulist:HDUList.pop
source: /astropy/io/fits/hdu/hdulist.py :632
Signature
def pop ( self , index = -1 ) Summary
Remove an item from the list and return it.
Parameters
index: int, str, tuple of (string, int), optionalAn integer value of
indexindicates the position from whichpop()removes and returns an HDU. A string value or a tuple of(string, int)functions as a key for identifying the HDU to be removed and returned. Ifkeyis a tuple, it is of the form(key, ver)whereveris anEXTVERvalue that must match the HDU being searched for.If the key is ambiguous (e.g. there are multiple 'SCI' extensions) the first match is returned. For a more precise match use the
(name, ver)pair.If even the
(name, ver)pair is ambiguous the numeric index must be used to index the duplicate HDU.
Returns
hdu: BaseHDUThe HDU object at position indicated by
indexor having name and version specified byindex.
Aliases
-
astropy.io.fits.HDUList.pop