{ } Raw JSON

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

classmethod

astropy.io.fits.header:Header._from_blocks

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

Summary

The meat of Header.fromfile; in a separate method so that Header.fromfile itself is just responsible for wrapping file handling. Also used by _BaseHDU.fromstring.

Extended Summary

block_iter should be a callable which, given a block size n (typically 2880 bytes as used by the FITS standard) returns an iterator of byte strings of that block size.

is_binary specifies whether the returned blocks are bytes or text

Returns both the entire header string, and the Header object returned by Header.fromstring on that string.

Aliases

  • astropy.io.fits.Header._from_blocks