Factory function to open a FITS file and return an HDUList object.
Parameters : | |
---|---|
name : file path, file object or file-like object
mode : str
memmap : bool
classExtensions : dict
parms : dict
|
|
Returns : | |
hdulist : an HDUList object
|
Get the data from an extension of a FITS file (and optionally the header).
Parameters : | |
---|---|
filename : file path, file object, or file like object
classExtensions : dict, optional
ext :
lower, upper : bool, optional
view : ndarray view class, optional
|
|
Returns : | |
array : array, record array or groups data object
|
Get the header from an extension of a FITS file.
Parameters : | |
---|---|
filename : file path, file object, or file like object
classExtensions : optional
ext :
|
|
Returns : | |
header : Header object |
Get a keyword’s value from a header in a FITS file.
Parameters : | |
---|---|
filename : file path, file object, or file like object
key : str
classExtensions : (optional)
ext :
|
|
Returns : | |
keyword value : string, integer, or float |
Set a keyword’s value from a header in a FITS file.
If the keyword already exists, it’s value/comment will be updated. If it does not exist, a new card will be created and it will be placed before or after the specified location. If no before or after is specified, it will be appended at the end.
When updating more than one keyword in a file, this convenience function is a much less efficient approach compared with opening the file for update, modifying the header, and closing the file.
Parameters : | |
---|---|
filename : file path, file object, or file like object
key : str
value : str, int, float
comment : str
before : str, int
after : str, int
savecomment : bool
classExtensions : dict, optional
ext :
|
Delete all instances of keyword from a header in a FITS file.
Parameters : | |
---|---|
filename : file path, file object, or file like object
key : str, int
classExtensions : optional
ext :
|
Create a new FITS file using the supplied data/header.
Parameters : | |
---|---|
filename : file path, file object, or file like object
data : array, record array, or groups data object
header : Header object, optional
classExtensions : dict, optional
clobber : bool, optional
checksum : bool, optional
|
Append the header/data to FITS file if filename exists, create if not.
If only data is supplied, a minimal header is created.
Parameters : | |
---|---|
filename : file path, file object, or file like object
data : array, table, or group data object
header : Header object, optional
classExtensions : dictionary, optional
checksum : bool, optional
verify: bool, optional (True) :
|
Update the specified extension with the input data/header.
Parameters : | |
---|---|
filename : file path, file object, or file like object
data : array, table, or group data object
classExtensions : dict, optional
ext :
|
Print the summary information on a FITS file.
This includes the name, type, length of header, data shape and type for each extension.
Parameters : | |
---|---|
filename : file path, file object, or file like object
classExtensions : dict, optional
parms : optional keyword arguments
|