Skip to content

Commit

Permalink
Merge d21e9bc into bbe6f77
Browse files Browse the repository at this point in the history
  • Loading branch information
mileslucas committed Jul 8, 2020
2 parents bbe6f77 + d21e9bc commit b2c9314
Show file tree
Hide file tree
Showing 15 changed files with 158 additions and 1,505 deletions.
2 changes: 1 addition & 1 deletion .drone.jsonnet
Expand Up @@ -18,6 +18,6 @@ local Pipeline(os, arch, version) = {

[
Pipeline("linux", "arm", "1.4"),
Pipeline("linux", "arm64", "1.0"),
Pipeline("linux", "arm64", "1.3"),
Pipeline("linux", "arm64", "1.4")
]
4 changes: 2 additions & 2 deletions .drone.yml
Expand Up @@ -14,15 +14,15 @@ steps:

---
kind: pipeline
name: linux - arm64 - Julia 1.0
name: linux - arm64 - Julia 1.3

platform:
os: linux
arch: arm64

steps:
- name: build
image: julia:1.0
image: julia:1.3
commands:
- "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true); using Pkg; Pkg.build(); Pkg.test(coverage=true)'"

Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -6,8 +6,8 @@ os:
- freebsd

julia:
- 1.0
- 1.4
- 1.3
- 1
- nightly

notifications:
Expand Down
11 changes: 6 additions & 5 deletions Project.toml
@@ -1,15 +1,16 @@
name = "FITSIO"
uuid = "525bcba6-941b-5504-bd06-fd0dc1a4d2eb"
version = "0.15.0"
version = "0.16.0"

[deps]
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
CFITSIO = "3b1b4be9-1499-4b22-8d78-7db3344d1961"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"

[compat]
BinaryProvider = "0.4, 0.5"
julia = "1"
CFITSIO = "1"
julia = "1.3"
Reexport = "0.2"

[extras]
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down
76 changes: 69 additions & 7 deletions README.md
Expand Up @@ -3,16 +3,78 @@ FITSIO.jl

Flexible Image Transport System (FITS) support for Julia

[docs-latest-img]: https://img.shields.io/badge/docs-latest-blue.svg
[docs-latest-url]: http://juliaastro.github.io/FITSIO.jl/latest/

[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-stable-url]: http://juliaastro.github.io/FITSIO.jl/stable/

[![Build Status](https://img.shields.io/travis/JuliaAstro/FITSIO.jl.svg?style=flat-square&label=linux)](https://travis-ci.org/JuliaAstro/FITSIO.jl)
[![Build status](https://img.shields.io/appveyor/ci/kbarbary/fitsio-jl.svg?style=flat-square&label=windows)](https://ci.appveyor.com/project/kbarbary/fitsio-jl/branch/master)
[![Coverage Status](http://img.shields.io/coveralls/JuliaAstro/FITSIO.jl.svg?style=flat-square)](https://coveralls.io/r/JuliaAstro/FITSIO.jl?branch=master)

**Documentation:** http://juliaastro.github.io/FITSIO.jl/latest/

**License:** MIT
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](http://juliaastro.github.io/FITSIO.jl/stable/)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliahci.github.io/FITSIO.jl/dev)
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**Note:** The `Libcfitsio` submodule has been moved to [CFITSIO.jl](https://github.com/JuliaAstro/CFITSIO.jl) and will be deprecated in a futre release.


## Usage

For more in-depth usage and examples, see [the documentation](http://juliaastro.github.io/FITSIO.jl/stable/)

```julia

julia> using FITSIO

julia> f = FITS("file.fits")
File: file.fits
Mode: "w" (read-write)
HDUs: Num Name Type
1 Image
2 Table

julia> f[1]
File: file.fits
HDU: 1
Type: Image
Datatype: Float64
Datasize: (800, 800)

# read an image from disk
julia> data = read(f[1]);

# read just a subset of image
julia> data = read(f[1], :, 790:end);

# Get info about binary table
julia> f[2]
File: file.fits
HDU: 2
Type: Table
Rows: 20
Columns: Name Size Type TFORM
col2 String 5A
col1 Int64 1K

# Read a column from the table:
julia> data = read(f[2], "col1")

# Read the entire header into memory
julia> header = read_header(f[1]);

julia> header["NAXIS1"] # get value by keyword
800

julia> header[4] # get value by position
800

# Read single keys into memory
julia> read_key(f[1], 4) # by position
("NAXIS1",800,"length of data axis 1")

julia> read_key(f[1], "NAXIS1") # by keyword
(800,"length of data axis 1")

# write data to file
julia> FITS("new_file.fits", "w") do f
write(f, data)
end
```
4 changes: 2 additions & 2 deletions appveyor.yml
@@ -1,7 +1,7 @@
environment:
matrix:
- julia_version: 1.0
- julia_version: 1.4
- julia_version: 1.3
- julia_version: 1
- julia_version: nightly

platform:
Expand Down
3 changes: 1 addition & 2 deletions docs/make.jl
Expand Up @@ -6,8 +6,7 @@ makedocs(
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"),
pages = [
"Introduction" => "index.md",
"API Reference" => "api.md",
"Libcfitsio Submodule" => "libcfitsio.md"
"API Reference" => "api.md"
]
)

Expand Down
6 changes: 0 additions & 6 deletions docs/src/api.md
Expand Up @@ -43,9 +43,3 @@ write(::FITS, ::Dict{String})
write(::FITS, ::Vector{String}, ::Vector)
read(::TableHDU, ::String)
```

## Miscellaneous

```@docs
FITSIO.libcfitsio_version
```
14 changes: 9 additions & 5 deletions docs/src/index.md
@@ -1,19 +1,23 @@
# FITSIO.jl

[![GitHub](https://img.shields.io/badge/Code-GitHub-black.svg)](https://github.com/JuliaAstro/FITSIO.jl)
[![Build Status](https://img.shields.io/travis/JuliaAstro/FITSIO.jl.svg?style=flat-square&label=linux)](https://travis-ci.org/JuliaAstro/FITSIO.jl)
[![Build status](https://img.shields.io/appveyor/ci/kbarbary/fitsio-jl.svg?style=flat-square&label=windows)](https://ci.appveyor.com/project/kbarbary/fitsio-jl/branch/master)
[![Coverage Status](http://img.shields.io/coveralls/JuliaAstro/FITSIO.jl.svg?style=flat-square)](https://coveralls.io/r/JuliaAstro/FITSIO.jl?branch=master)

A [Julia](http://julialang.org) package for reading and writing
Flexible Image Transport System (FITS) files, based on the
[cfitsio](http://heasarc.gsfc.nasa.gov/fitsio/) library.

The interface is inspired by Erin Sheldon's
[fitsio](https://github.com/esheldon/fitsio) Python package.

!!! warning
The `Libcfitsio` submodule has been moved to [CFITSIO.jl](https://github.com/JuliaAstro/CFITSIO.jl) and will be deprecated in a future release.

## Installation

The latest version of `FITSIO.jl` is available for Julia 1.0 and later
versions, and can be installed with
[Julia](https://github.com/julialang/julia.jl)'s built-in package
manager. After entering the package manager by pressing `]`, run the
command
`FITSIO.jl` can be installed using the built-in package manager

```julia
pkg> add FITSIO
Expand Down
126 changes: 0 additions & 126 deletions docs/src/libcfitsio.md

This file was deleted.

0 comments on commit b2c9314

Please sign in to comment.