File access
CFITSIO.fits_create_file
— Functionfits_create_file(filename::AbstractString)
Create and open a new empty output FITSFile
. This methods uses the extended file name syntax to create the file.
See also fits_create_diskfile
which does not use the extended filename parser.
CFITSIO.fits_create_diskfile
— Functionfits_create_diskfile(filename::AbstractString)
Create and open a new empty output FITSFile
. Unlike fits_create_file
, this function does not use an extended filename parser and treats the string as is as the filename.
CFITSIO.fits_clobber_file
— Functionfits_clobber_file(filename::AbstractString)
Like fits_create_file
, but overwrites filename
if it exists.
CFITSIO.fits_open_file
— Functionfits_open_file(filename::String, [mode = 0])
Open an existing data file.
Modes:
- 0 : Read only (equivalently denoted by
CFITSIO.READONLY
orCFITSIO.R
) - 1 : Read-write (equivalently denoted by
CFITSIO.READWRITE
orCFITSIO.RW
)
This function uses the extended filename syntax to open the file. See also fits_open_diskfile
that does not use the extended filename parser and uses filename
as is as the name of the file.
CFITSIO.fits_open_diskfile
— Functionfits_open_diskfile(filename::String, [mode = 0])
Open an existing data file.
Modes:
- 0 : Read only (equivalently denoted by
CFITSIO.READONLY
orCFITSIO.R
) - 1 : Read-write (equivalently denoted by
CFITSIO.READWRITE
orCFITSIO.RW
)
This function does not use the extended filename parser, and uses filename
as is as the name of the file that is to be opened. See also fits_open_file
which uses the extended filename syntax.
CFITSIO.fits_open_table
— Functionfits_open_table(filename::String, [mode = 0])
Open an existing data file (like fits_open_file
) and move to the first HDU containing either an ASCII or a binary table.
Modes:
- 0 : Read only (equivalently denoted by
CFITSIO.READONLY
orCFITSIO.R
) - 1 : Read-write (equivalently denoted by
CFITSIO.READWRITE
orCFITSIO.RW
)
CFITSIO.fits_open_image
— Functionfits_open_image(filename::String, [mode = 0])
Open an existing data file (like fits_open_file
) and move to the first HDU containing an image.
Modes:
- 0 : Read only (equivalently denoted by
CFITSIO.READONLY
orCFITSIO.R
) - 1 : Read-write (equivalently denoted by
CFITSIO.READWRITE
orCFITSIO.RW
)
CFITSIO.fits_open_data
— Functionfits_open_data(filename::String, [mode = 0])
Open an existing data file (like fits_open_file
) and move to the first HDU containing either an image or a table.
Modes:
- 0 : Read only (equivalently denoted by
CFITSIO.R
) - 1 : Read-write (equivalently denoted by
CFITSIO.RW
)
CFITSIO.fits_close_file
— Functionfits_close_file(f::FITSFile)
Close a previously opened FITS file.
CFITSIO.fits_delete_file
— Functionfits_delete_file(f::FITSFile)
Close an opened FITS file (like fits_close_file
) and removes it from the disk.
CFITSIO.fits_file_name
— Functionfits_file_name(f::FITSFile)
Return the name of the file associated with object f
.
CFITSIO.fits_file_mode
— Functionfits_file_mode(f::FITSFile)
Return the I/O mode of the FITS file, where 0 indicates a read-only mode and 1 indicates a read-write mode.
CFITSIO.fits_flush_buffer
— Functionfits_flush_buffer(f::FITSFile)
Flush the buffer to disk without updating and closing the current HDU. This is faster than fits_flush_file
, and may be used to write the state of the file to disk after each row of a table is written.
CFITSIO.fits_flush_file
— Functionfits_flush_file(f::FITSFile)
Flush the file to disk. This is equivalent to closing the file and reopening it.