def delval(filename, keyword, *args, **kwargs):
 if ('do_not_scale_image_data' not in kwargs):
  kwargs['do_not_scale_image_data'] = True
 closed = fileobj_closed(filename)
 (hdulist, extidx) = _getext(filename, 'update', *args, **kwargs)
 try:
  del hdulist[extidx].header[keyword]
 finally:
  hdulist._close(closed=closed)

def delval ( filename , keyword , * args , ** kwargs ) : if ( 'do_not_scale_image_data' not in kwargs ) : kwargs [ 'do_not_scale_image_data' ] = True closed = fileobj_closed ( filename ) ( hdulist , extidx ) = _getext ( filename , 'update' , * args , ** kwargs ) try : del hdulist [ extidx ] . header [ keyword ] finally : hdulist . _close ( closed = closed )
delete all instances of keyword from a header in a fits file .