Skip to content

Commit

Permalink
renamed the function
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthlal25 committed Aug 3, 2020
1 parent 10c76c2 commit a82938b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/FITSIO.jl
Expand Up @@ -12,7 +12,7 @@ export FITS,
get_comment,
set_comment!,
copy_section,
get_default_header
default_header

import Base: getindex,
setindex!,
Expand Down
4 changes: 2 additions & 2 deletions src/header.jl
Expand Up @@ -424,11 +424,11 @@ function show(io::IO, hdr::FITSHeader)
end

"""
get_default_header(data::AbstractArray)
default_header(data::AbstractArray)
Creates a default header for the given array with the `SIMPLE`, `BITPIX`, `NAXIS`, `NAXIS*`, and `EXTEND` entries.
"""
function get_default_header(data::AbstractArray{T}) where T <: Number
function default_header(data::AbstractArray{T}) where T <: Number
# assigning keys
hdu_keys = ["SIMPLE",
"BITPIX",
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Expand Up @@ -566,9 +566,9 @@ HISTORY this is a history"""
close(f)
rm(fname, force=true)

# Test for get_default_header
# Test for default_header
data = fill(Int16(2), 5, 6, 2)
hdr = get_default_header(data)
hdr = default_header(data)
@test hdr isa FITSHeader
@test hdr["SIMPLE"] == true
@test hdr["BITPIX"] == 16
Expand Down

0 comments on commit a82938b

Please sign in to comment.