Introduction
FITSFiles.jl is a Julia implementation of the Flexible Image Transport System (FITS) file IO standard.
FITSFiles.fits — Method
fits(io::IO; <keywords>)
fits(filename::AbstractString; <keywords>)Open and read a FITS file, returning a vector of header-data units (HDUs).
The default data stucture for Random and Bintable HDUs is a named tuple of arrays.
Keywords
record::Bool=false: structure the data as a list of recordsscale::Bool=true: apply the scale and zero keywords to the data
FITSFiles.info — Method
FITSFiles.write — Method
write(io::IO, hdus::Vector{HDU}) write(filename::AbstractString, hdus::Vector{HDU})
Write a vector of header-data units (HDUs) to a file.
sourceFITSFiles.Bintable — Type
Bintable header-data unit (HDU)A Bintable HDU consists of a vector of cards and optionally a 2-dimensional array of binary data structured as a vector of records.
sourceFITSFiles.DataFormat — Type
FITSFiles.HDU — Type
HDU{T}(cards, data)
HDU([data, [cards]]; <keywords>)
HDU(cards; <keywords>)
HDU(type, nothing, [cards]; <keywords>)
HDU(type, data, [cards]; <keywords>)Create an header-data unit described by data and cards of type AbstractHDU.
The HDU function tries to determine the HDU type based on the data and cards. If only data is provided, then an array is interpreted as a Primary HDU and a Tuple or NamedTuple as a BinaryTable. If mandatory cards are provided, then they are used to determine the HDU type. Otherwise, the HDU type must be specified.
HDU types are: Primary, Random, Image, Table, Bintable, and Conform.
arguments
data::U=nothing: the binary or ASCII data, where U<:Union{AbstractArray, Tuple, NamedTuple, Nothing}cards::U=nothing: the list of cards, where U<:Union{Card, Vector{Card}, Nothing}
Keywords
record::Bool=false: structure the data as a list of recordsscale::Bool=true: apply the scale and zero keywords to the dataappend::Bool=false: append CONTINUE cards for long strings (>68 characters)fixed::Bool=true: create fixed format cardsslash::Integer=32: character index of the comment separator (/)lpad::Integer=1: number of spaces before the comment separatorrpad::Integer=1: number of spaces after the comment separatortruncate::Bool=true: truncate the comment string at the end of the card
FITSFiles.Image — Type
Image header-data unit (HDU)An Image HDU consists of a vector cards and optionally a multidimensional array (<=999 dimensions).
sourceFITSFiles.Primary — Type
Primary header-data unit (HDU)A Primary HDU consists of a vector of cards and optionally a multidimensional array (<=999 dimensions). The Primary HDU is the first HDU in a vector of HDUs.
sourceFITSFiles.Random — Type
Random header-data unit (HDU)A Random HDU consists of a vector of cards and optionally a vector of records containing a list of parameters followed by a multidimensional array. The Random HDU is the first HDU in a vector of HDUs.
sourceFITSFiles.Table — Type
Table header-data unit (HDU)A Table HDU consists of a vector of cards and optionally a 2-dimensional array of ASCII data structured as vector of records.
sourceFITSFiles.info — Method
FITSFiles.read — Method
FITSFiles.typeofhdu — Method
typeofhdu(data)
typeofhdu(dict)
typeofhdu(data, dict)Determine the HDU type based on the data structure, the mandatory keywords, or both.
sourceFITSFiles.write — Method
FITSFiles.Card — Type
Card(type, key, value, comment, format)
Card([key, [value, [comment]]]; <keywords>)
Card("HIERARCH", key, [key, [value, [comment]]]; <keywords>)Create a card type, where type is Comment, End, Hierarch, History, Invalid, or Value{T}.
Argments
key::AbstractString="": keyword stringvalue::U=missing: keyword value, where U is Bool, Number, or Stringcomment::AbstractString="": comment string
Keywords
append::Bool=false: append CONTINUE cards for long strings (>68 characters)fixed::Bool=true: use fixed formatslash::Integer=32: index of comment separator (/)lpad::Integer=1: number of spaces before comment separatorrpad::Integer=1: number of spaces after comment separatortruncate::Bool=true: truncate comment at end of card
FITSFiles.CardFormat — Type
FITSFiles.join_cards — Method
join_cards(cards)Join CONTINUE cards to initial long string card to create a long value and comment card
sourceFITSFiles.parse — Method
FITSFiles.split_card — Method
split_card(key, value, comment, format)Split card having long value and comment fields into multiple cards
If length of comment field is 0 because comment separator index is too large, then comment is deleted. Decreasing comment separator index will allow inclusion of comment.
source