{ } Raw JSON

bundles / astropy 7.0.1 / astropy / io / fits / hdu / streaming / StreamingHDU / __init__

function

astropy.io.fits.hdu.streaming:StreamingHDU.__init__

source: /astropy/io/fits/hdu/streaming.py :35

Signature

def   __init__ ( self name header )

Summary

Construct a StreamingHDU object given a file name and a header.

Parameters

name : path-like or file-like

The file to which the header and data will be streamed. If opened, the file object must be opened in a writeable binary mode such as 'wb' or 'ab+'.

header : `Header` instance

The header object associated with the data to be written to the file.

Notes

The file will be opened and the header appended to the end of the file. If the file does not already exist, it will be created, and if the header represents a Primary header, it will be written to the beginning of the file. If the file does not exist and the provided header is not a Primary header, a default Primary HDU will be inserted at the beginning of the file and the provided header will be added as the first extension. If the file does already exist, but the provided header represents a Primary header, the header will be modified to an image extension header and appended to the end of the file.

Aliases

  • astropy.io.fits.StreamingHDU.__init__