Download latest PDF - Read the Docs

Transcript
PyFITS Documentation, Release 3.4.dev
close(output_verify=’exception’, verbose=False, closed=True)
Close the associated FITS file and memmap object, if any.
Parameters
output_verify : str
Output verification option. Must be one of "fix", "silentfix", "ignore",
"warn", or "exception".
May also be any combination of "fix"
or "silentfix" with "+ignore", +warn, or +exception" (e.g.
‘‘"fix+warn"). See Verification options for more info.
verbose : bool
When True, print out verbose messages.
closed : bool
When True, close the underlying file object.
fileinfo(index)
Returns a dictionary detailing information about the locations of the indexed HDU within any associated
file. The values are only valid after a read or write of the associated file with no intervening changes to the
HDUList.
Parameters
index : int
Index of HDU for which info is to be returned.
Returns
fileinfo : dict or None
The dictionary details information about the locations of the indexed HDU within an
associated file. Returns None when the HDU is not associated with a file.
Dictionary contents:
Key
Value
file
File object associated with the HDU
fileName of associated file object
name
fileMode in which the file was opened (readonly, update, append, denywrite,
mode ostream)
reFlag that when True indicates that the data has been resized since the last
sized read/write so the returned values may not be valid.
hdrStarting byte location of header in file
Loc
datStarting byte location of data block in file
Loc
datSpan Data size including padding
filename()
Return the file name associated with the HDUList object if one exists. Otherwise returns None.
Returns
filename : a string containing the file name associated with the
HDUList object if an association exists. Otherwise returns None.
flush(*args, **kwargs)
Force a write of the HDUList back to the file (for append and update modes only).
1.9. Reference/API
115