https://github.com/halleysfifthinc/vaxdata.jl
VAX data format library
https://github.com/halleysfifthinc/vaxdata.jl
dec julia libvaxdata vax
Last synced: 3 months ago
JSON representation
VAX data format library
- Host: GitHub
- URL: https://github.com/halleysfifthinc/vaxdata.jl
- Owner: halleysfifthinc
- License: mit
- Created: 2018-06-05T18:04:41.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-09-05T01:10:33.000Z (over 2 years ago)
- Last Synced: 2025-01-20T22:58:59.894Z (4 months ago)
- Topics: dec, julia, libvaxdata, vax
- Language: Julia
- Size: 57.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VaxData
[](https://juliahub.com/ui/Packages/VaxData/T8cvD)
[](https://juliahub.com/ui/Packages/VaxData/T8cvD)
[](https://github.com/halleysfifthinc/VaxData.jl/actions/workflows/CI.yml)
[](http://codecov.io/github/halleysfifthinc/VaxData.jl?branch=master)
[](https://www.repostatus.org/#active)VaxData.jl is a direct port to Julia from [libvaxdata](https://pubs.usgs.gov/of/2005/1424/) [^1]. See [this report](https://pubs.usgs.gov/of/2005/1424/of2005-1424_v1.2.pdf) for an in-depth review of the underlying structure and differences between VAX data types and IEEE types.
There are 5 Vax datatypes implemented by this package: `VaxInt16`, `VaxInt32`, `VaxFloatF`,
`VaxFloatG`, and `VaxFloatD`.# Examples
```julia
julia> one(VaxFloatF)
vaxf"1.0"julia> -one(VaxFloatF)
vaxf"-1.0"julia> vaxg"3.14159265358979323846264338327950"
vaxg"3.1415926535897931"julia> vaxd"3.14159265358979323846264338327950"
vaxd"3.14159265358979323"```
Conversion to and from each type is defined; Vax types are promoted to the next appropriately sized type supporting math operations:
```julia
promote_type(VaxFloatF, Float32)
Float32promote_type(VaxFloatF, VaxFloatF)
Float32promote_type(VaxFloatF, Float64)
Float64
```[^1]: Baker, L.M., 2005, libvaxdata: VAX Data Format Conversion Routines: U.S. Geological Survey Open-File Report 2005-1424 (http://pubs.usgs.gov/of/2005/1424/).