Skip to content

I/O interface for astrophysical simulation codes

License

Notifications You must be signed in to change notification settings

elehcim/AstroIO.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AstroIO.jl

I/O interface for astrophysical simulation codes

codecov

Installation

]add AstroIO

or

]add https://github.com/JuliaAstroSim/AstroIO.jl

Usage

using AstroIO

Gadget2

Suffixes gadget2, Gadget2, GADGET2 are supported

header, data = read_gadget2("snapshot.gadget2")

write_gadget2("output.Gadget2", header, data)

# If only data provided, a default header would be generated
write_gadget2("output.GADGET2", data)

Use FileIO interfaces

header, data = load("snapshot.gadget2")
save("FileIO.gadget2", header, data)

Output CSV

write_csv("output", csv) # No suffix

Save and load with JLD2

write_gadget2_jld("output.jld2", header, data)
write_jld("NoHeader.jld2", data)

header, data = read_gadget2_jld("output.jld2")
data = read("NoHeader.jld2")

# Or simply use JLD2 interfaces
@load "NoHeader.jld2"

Package ecosystem

Contribution

Welcome issues and PRs. Need help for other snapshot formats.

About

I/O interface for astrophysical simulation codes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Julia 99.8%
  • Shell 0.2%