Change hdu[0] to hdu for optional indexing