{ } Raw JSON

bundles / astropy latest / astropy / io / fits / header / Header / rename_keyword

function

astropy.io.fits.header:Header.rename_keyword

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

Signature

def   rename_keyword ( self oldkeyword newkeyword force = False )

Summary

Rename a card's keyword in the header.

Parameters

oldkeyword : str or int

Old keyword or card index

newkeyword : str

New keyword

force : bool, optional

When True, if the new keyword already exists in the header, force the creation of a duplicate keyword. Otherwise a ValueError is raised.

Aliases

  • astropy.io.fits.Header.rename_keyword