0.1.5 • Published 3 years ago

fitswasm v0.1.5

Weekly downloads
24
License
-
Repository
-
Last release
3 years ago

FITS reader written in pure Rust using nom

Install with npm

npm i fitswasm

Example

import * as fitswasm from "fitswasm";
// Fetch the fits file
fetch('http://alasky.u-strasbg.fr/Pan-STARRS/DR1/g/Norder3/Allsky.fits')
    // Convert to blob
    .then((response) => response.blob())
    // Get an array buffer from it
    .then((blob) => blob.arrayBuffer())
    .then((buf) => {
        // Get a bytes buffer
        const data = new Uint8Array(buf);
        // Call the wasm parser
        console.log(fitswasm.read(data));
        // The result can contain as data either a
        // Uint8Array, Int16Array, Int32Array,
        // Float32Array or Float64Array
        // depending on the bitpix keyword found
    })
0.1.4

3 years ago

0.1.3

3 years ago

0.1.5

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago