File access

CFITSIO.fits_create_diskfileFunction
fits_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.

source
CFITSIO.fits_open_fileFunction
fits_open_file(filename::String, [mode = 0])

Open an existing data file.

Modes:

  • 0 : Read only (equivalently denoted by CFITSIO.READONLY or CFITSIO.R)
  • 1 : Read-write (equivalently denoted by CFITSIO.READWRITE or CFITSIO.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.

source
CFITSIO.fits_open_diskfileFunction
fits_open_diskfile(filename::String, [mode = 0])

Open an existing data file.

Modes:

  • 0 : Read only (equivalently denoted by CFITSIO.READONLY or CFITSIO.R)
  • 1 : Read-write (equivalently denoted by CFITSIO.READWRITE or CFITSIO.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.

source
CFITSIO.fits_open_tableFunction
fits_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 or CFITSIO.R)
  • 1 : Read-write (equivalently denoted by CFITSIO.READWRITE or CFITSIO.RW)
source
CFITSIO.fits_open_imageFunction
fits_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 or CFITSIO.R)
  • 1 : Read-write (equivalently denoted by CFITSIO.READWRITE or CFITSIO.RW)
source
CFITSIO.fits_open_dataFunction
fits_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)
source
CFITSIO.fits_file_modeFunction
fits_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.

source
CFITSIO.fits_flush_bufferFunction
fits_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.

Note

In most cases, this function should not be needed, as the library automatically flushes the file when it is closed.

source
CFITSIO.fits_flush_fileFunction
fits_flush_file(f::FITSFile)

Flush the file to disk. This is equivalent to closing the file and reopening it.

Note

In most cases, this function should not be needed, as the library automatically flushes the file when it is closed.

source