Skip to content

Commit

Permalink
Provide isprimary
Browse files Browse the repository at this point in the history
  • Loading branch information
emmt committed Dec 9, 2019
1 parent d5f6ee7 commit 7651610
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/EasyFITS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,18 @@ Base.lastindex(obj::FitsImageHDU) = lastindex(get(HDU, obj))

"""
```julia
iprimary(hdu)
```
yields whetehr `hdu` is a primary FIT header data units (HDU).
"""
isprimary(obj::FitsHDU) = isprimary(get(HDU, obj))
isprimary(obj::HDU) = (getfield(obj, :ext) == 1)

"""
An object of type `FitsHeader` stores the header part of a FITS *Header Data
Unit* (HDU). There are several ways to build an instance of `FitsHeader`.
Expand Down

0 comments on commit 7651610

Please sign in to comment.