{ } Raw JSON

bundles / astropy 7.0.1 / astropy / io / fits / header / Header / remove

function

astropy.io.fits.header:Header.remove

source: /astropy/io/fits/header.py :1451

Signature

def   remove ( self keyword ignore_missing = False remove_all = False )

Summary

Removes the first instance of the given keyword from the header similar to list.remove if the Header object is treated as a list of keywords.

Parameters

keyword : str

The keyword of which to remove the first instance in the header.

ignore_missing : bool, optional

When True, ignores missing keywords. Otherwise, if the keyword is not present in the header a KeyError is raised.

remove_all : bool, optional

When True, all instances of keyword will be removed. Otherwise only the first instance of the given keyword is removed.

Aliases

  • astropy.io.fits.Header.remove