GithubHelp home page GithubHelp logo

ericmandel / drvrem Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 11.24 MB

Emscripten-based cfitsio driver to access remote FITS files without first copying them into memory

License: Other

Makefile 0.27% Shell 0.59% CMake 0.15% C 80.48% Fortran 1.87% TeX 13.72% Lex 0.23% Yacc 2.55% C++ 0.01% Batchfile 0.03% Smarty 0.05% HTML 0.03% JavaScript 0.01%

drvrem's Introduction

drvrem: cfitsio library with emscripten driver to access FITS files directly


Status: works as advertised. But browsers don't allow async xhttp calls on the main thread, so the code must be run in a worker. Since this requires major changes to JS9, we will defer using this driver for now.

(In any case, its likely that this driver will be most useful for reading small sections of huge calibration files, rather than FITS data files, and JS9 does not currently need that capability.)


The experimental cfitsio library in this repository contains drivers to allow direct access to FITS files without downloading the entire file first.

To access a FITS file directly, prepend "@" to the URL:

@https://js9.si.edu/js9/data/fits/m13.fits

NB: CORS must be respected, meaning that, in general, you can only access FITS files from the same domain as the web page.


The v4.0.0 cfitsio library has been compiled to byte-code using emscripten, and can be used only within the emscripten environment. The byte-code files have .a extensions and are stored in the lib subdirectory. Include files have been copied to the include subdirectory.

current emcc compiler: 3.1.1

An emscripten-enabled project such as JS9 can copy the contents of the lib and include sub-directories into their own work space and then link against the byte-code libraries. For general emscripten build instructions, see the documentation at:

https://emscripten.org/docs/compiling/Building-Projects.html

For an example of the use of these particular libraries, see the Makefile in the astroem sub-directory of https://github.com/ericmandel/js9.

The libraries are compiled using the -O3 level of optimization (see the EMFLAGS variable in the top-level Makefile). Emscripten wants you to use the same optimization flags throughout the project, so if you use a different level of optimization, you probably want to change the EMFLAGS variable and rebuild the libraries by executing make all.

drvrem is distributed under the terms of The MIT License.

Eric Mandel, Center for Astrophysics | Harvard & Smithsonian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.