Code Monkey home page Code Monkey logo

carta-backend's Introduction

CARTA Image Viewer (Backend)

code coverage

Backend process for simple web-based interface for viewing radio astronomy images in CASA, FITS, MIRIAD, and HDF5 formats (using the IDIA custom schema for HDF5). Unlike the conventional approach of rendering an image on the backend and sending a rendered image to the frontend client, the backend sends a compressed subset of the data, and the frontend renders the image efficiently on the GPU using WebGL and GLSL shaders. While the data is compressed using the lossy ZFP algorithm, the compression artefacts are generally much less noticeable than those cropping up from full-colour JPEG compression. While data sizes depend on compression quality used, sizes are comparable with sizes of compressed JPEG images with a 95% quality setting, depending on the colour map used to generate the JPEG image. PNG compression is generally a factor of 2 larger than the ZFP compressed data.

Ubuntu packages

We provide packages for Ubuntu 20.04 (Focal Fossa) and 18.04 (Bionic Beaver) in a PPA on Launchpad. All required dependencies are included in the PPA.

To add the PPA:

sudo add-apt-repository ppa:cartavis-team/carta
sudo apt-get update

To install the development version of the backend only (suitable for use with the CARTA controller):

sudo apt-get install carta-backend-beta

To install the development version of the backend and frontend (suitable for a desktop install):

sudo apt-get install carta-beta

The development package installs a launcher which allows CARTA to be started from the desktop environment's menu.

Building from source

Submodules

The protocol buffer definitions for communication between the backend and frontend, and for communication between the scripting interface and the backend. µWebSockets, which builds on µSockets, is used to communicate with the frontend. In order to get the right version of µWebSockets and its dependency µSockets, together with the other two submodules, a git initialisation command must be applied as follows:

git submodule update --init --recursive

If you use git pull to update an existing checkout of this repository, make sure that you also use git submodule update to fetch the appropriate versions of the submodule code.

External dependencies

The backend build depends on the following libraries:

  • casacore and casa imageanalysis; follow the build instructions.
  • zfp for data compression. The same library is used on the client, after being compiled to WebAssembly. Build and install from git repo. For best performance, build with AVX extensions.
  • Zstd for data compression. Debian package libzstd-dev.
  • protobuf for client-side communication using specific message formats. Debian package libprotobuf-dev (> 3.0 required. Can use PPA for earlier versions of Ubuntu). The Debian package protobuf-compiler may also be required.
  • HDF5 C++ library for HDF5 support. Debian packages libhdf5-dev and libhdf5-cpp-100. By default, the serial version of the HDF5 library is targeted.
  • libuuid for generating auth tokens (if not using external authentication). Debian package uuid-dev.
  • cfitsio library for I/O with FITS format data files. Debian package: libcfitsio-dev.
  • wcslib library to handle world coordinate system. Debian package: wcslib-dev.

Build

Use cmake to build:

mkdir build
cd build
cmake ..
make

For more detailed example commands for installing the dependencies and performing the build on specific Linux distributions, please refer to the provided Dockerfiles.

Running the backend process

Command-line arguments are in the format --arg=value or --arg value. Run carta_backend --help for a list of options. By default, the backend will attempt to host frontend files from ../share/carta/frontend (relative to the executable path). This can be changed with the --frontend_folder argument. Hosting of the frontend can be disabled with the --no_http argument. Token-based authentication can be disabled for debugging or development purposes with the --debug_no_auth argument.

Developer documentation

Automatically generated Doxygen documentation can be found at cartavis.org/carta-backend.

DOI

carta-backend's People

Contributors

veggiesaurus avatar pford avatar markccchiang avatar confluence avatar robsimmonds avatar jolopezl avatar rwjsimmonds avatar duidae avatar yuhsuan-hwang avatar kswang1029 avatar zarda avatar crocka avatar christyreynolds avatar

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.