CARTA stands for Cube Analysis and Rendering Tool for Astronomy, a new visualization tool designed for the ALMA, the JVLA and the SKA.
C++ JavaScript Python Objective-C Shell QMake Other
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.circleci Converted to CircleCI 2.0 syntax in preparation for the sunsetting of… Mar 4, 2018
carta Merge pull request #242 from CARTAvis/mark/colormap-graduation Mar 8, 2018
cartaview Update Dec 8, 2015
.gitignore Add node_modues to .gitignore. Apr 25, 2017
.travis.yml Trying the older Xcode 7.3.1 with OSX10.11 to see if it will fix the … Dec 16, 2017
Dockerfile Fix Dockerfile again to tell it to use the latest CARTA base docker i… Jun 6, 2017
Externals.readme Remove the symbolic link of Feb 13, 2017
LICENSE Update to GPL v3 license and fill the name field. Mar 27, 2017 update readme. Jan 8, 2018
circle.yml update circle.yml and for the new built casa l… Jun 5, 2017

CARTA Viewer

Branching model

mainstream branch, no development.

development branch, usually will merge feature branch to it and include hot fix for those feature. After each phase release, merge develop to master.

each feature branch:
people develop each feature in its branch whose name can be peter/drawImage or issue-131 if we use tickets. When it is finished, use pull request to proceed code review and then merge to develop. After merging, evaluate those added features on develop.

Fix Bug: Except some special cases, such as modifying documents, changing build scripts, low/no-risk fixes, otherwise you need to commit your bug fixes in Hotfix branch or the original feature branch, then make a pull request to do code review.

Introduction to build, run and deploy Desktop ver. of CARTA Viewer on Mac and Linux

Development platform:

  1. CentOS 7 (7.3.1611 tested)
  2. Ubuntu 14.04, Ubuntu 16.04 and Ubuntu 17.04
  3. Mac 10.11, 10.12, 10.13

Supported deployment platform:

  1. CentOS 6, 7
  2. Ubuntu
  3. Mac: OS X El Capitan (10.11), macOS Sierra (10.12), macos high sierra (10.13)

Tested c++ compiler: gcc 4.8.5, 5.4 (used by Ubuntu 16.04) & clang on macOS.

CARTA can be built by Qt 5.3, 5.4, 5.5, 5.6~5.8. Start from 5.6, we need to install QtWebKit & QtWebKit additionally.




Need to prepare some things needed for running CARTA and also appended parameters.

requirement 1: create needed folders

cd your-carta-work,, execute ./CARTAvis/carta/scripts/

It is optional. You do not need to setup this and can use CARTA smoothly. But not sure if snaptshot function of CARTA will work OK without setup this.

There are two things you need to know first.

  1. The folder structure and why you need to choose a your-carta-work, take a look here,

  2. Due to the history issue, so you should rename this git project folder from carta to CARTAvis. Therefore you can executee git clone CARTAvis.

requirement 2: install data of geodetic, ephemerides for some kinds of fits file.

Paste the following content to your terminal to install.

mkdir data ; \
mkdir data/ephemerides ;\
mkdir data/geodetic ; \
svn co data/ephemerides ;\
svn co data/geodetic ; \
mv data ~/

The default location is under home directory ~/, and will be improved to better place.

requirement 3: prepare fits, casa image format, or miriad files.

The default loading path is ~/CARTA/Images and you can put there or other places (you need to switch the folder in the file browser of CARTA).

You can also chooose fits file in this git project folder, your-carta-work/CARTAvis/carta/scriptedClient/tests/data when using file browser of CARTA. The other ways to get testing fits files,

  1. (zip file)
  2. (some files here)
  3. Contact ASIAA members to get some.

requirement 4: check if the foldler using by dbPath exist.

The default location is $(HOME)/CARTA/cache/pcache.sqlite so create $(HOME)/CARTA/cache if it does not exist.

(optional) modify config.json to overwrite the default embedded setting

Create/Modify the following data to be the content of ~/.cartavis/config.json

    "_comment" : "List of plugin directories",
    "pluginDirs": [
    "disabledPlugins" : ["tester1", "clock1", "blurpy"],
    "plugins": {
        "PCacheSqlite3" : {
            "dbPath": "$(HOME)/CARTA/cache/pcache.sqlite"

$(APPDIR)/../plugins is for Linux. "$(APPDIR)/../../../../plugins" is for Mac.

You can browse more detailed instruction about these parameters from here,

Run by command line

  1. Current CARTA needs to execute the following command every time to find correct dynamic/shared Library before running CARTA. Will improve later by using rpath.

    1. setup LD_LIBRARY_PATH on Mac/Linux
    ## 1-1 for casa libs
    ## on Linux, use this
    export LD_LIBRARY_PATH=$CARTAWORKHOME/CARTAvis-externals/ThirdParty/casa/trunk/linux/lib:${LD_LIBRARY_PATH}
    ## on Mac, use this
    export LD_LIBRARY_PATH=$CARTAWORKHOME/CARTAvis-externals/ThirdParty/casa/trunk/darwin/lib:${LD_LIBRARY_PATH}
    ## or this path, should work but not test. It is the symbolic link of the above path,
    ## export LD_LIBRARY_PATH=$CARTAWORKHOME/CARTAvis-externals/ThirdParty/casacore/lib:${LD_LIBRARY_PATH}
    ## 1-2 for wcslib, only Mac. no need to setup the path wcslib on Linux, we already use QMAKE_RPATHDIR which seems not work on Mac.
    export LD_LIBRARY_PATH=$CARTAWORKHOME/CARTAvis-externals/ThirdParty/wcslib/lib:${LD_LIBRARY_PATH}
    ## 1-3 for /usr/local/lib/libgsl.dylib which is needed by Fitter1D plugin
    export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}
    1. On Mac, you can use Qt Creator build without setting 1-1, 1-3 thing by (LD_LIBRARY_PATH). In Qt Creator, there is a default enabled setting which will automatically add build library search path to DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH (Mac, work), add build library search path to LD_LIBRARY_PATH (Linux, not work, don't know why).

    2. On Mac, you need to setup below thing, you can copy them as a shell script. [Caution: the below script is setup when build folder is choosed in CARTAvis]

    export CARTABUILDHOME=`pwd`
    mkdir -p $CARTABUILDHOME/build/cpp/desktop/
    cp $CARTABUILDHOME/build/cpp/core/libcore.1.dylib $CARTABUILDHOME/build/cpp/desktop/
    # need to rm for qt creator 4.2, otherwise when build+run together will result in core/libcore.1.dylib not able find out qwt
    rm $CARTABUILDHOME/build/cpp/core/libcore.1.dylib
    cp $CARTABUILDHOME/build/cpp/CartaLib/libCartaLib.1.dylib $CARTABUILDHOME/build/cpp/desktop/
    install_name_tool -change qwt.framework/Versions/6/qwt $CARTABUILDHOME/ThirdParty/qwt-6.1.2/lib/qwt.framework/Versions/6/qwt $CARTABUILDHOME/build/cpp/desktop/
    install_name_tool -change qwt.framework/Versions/6/qwt $CARTABUILDHOME/ThirdParty/qwt-6.1.2/lib/qwt.framework/Versions/6/qwt $CARTABUILDHOME/build/cpp/desktop/
    # not sure the effect of the below line, try comment
    # install_name_tool -change libplugin.dylib $CARTABUILDHOME/build/cpp/plugins/CasaImageLoader/libplugin.dylib $CARTABUILDHOME/build/cpp/plugins/ImageStatistics/libplugin.dylib
    install_name_tool -change libcore.1.dylib  $CARTABUILDHOME/build/cpp/desktop/ $CARTABUILDHOME/build/cpp/plugins/ImageStatistics/libplugin.dylib
    install_name_tool -change libCartaLib.1.dylib  $CARTABUILDHOME/build/cpp/desktop/ $CARTABUILDHOME/build/cpp/plugins/ImageStatistics/libplugin.dylib
    install_name_tool -change libcore.1.dylib  $CARTABUILDHOME/build/cpp/desktop/ $CARTABUILDHOME/build/cpp/desktop/
    install_name_tool -change libCartaLib.1.dylib  $CARTABUILDHOME/build/cpp/desktop/ $CARTABUILDHOME/build/cpp/desktop/
    install_name_tool -change libCartaLib.1.dylib  $CARTABUILDHOME/build/cpp/desktop/ $CARTABUILDHOME/build/cpp/desktop/
    for f in `find . -name libplugin.dylib`; do install_name_tool -change libcore.1.dylib  $CARTABUILDHOME/build/cpp/desktop/ $f; done
    for f in `find . -name libplugin.dylib`; do install_name_tool -change libCartaLib.1.dylib  $CARTABUILDHOME/build/cpp/desktop/ $f; done
    for f in `find . -name "*.dylib"`; do install_name_tool -change libwcs.5.15.dylib  $CARTABUILDHOME/ThirdParty/wcslib/lib/libwcs.5.15.dylib $f; echo $f; done
  2. execute ulimit -n 2000 before running CARTA

  3. To run CARTA binary with parameters, at least should append html file path, example:

$CARTAWORKHOME/CARTAvis/build/cpp/desktop/CARTA --html $CARTAWORKHOME/CARTAvis/carta/html5/desktop/desktopIndex.html

Some of optional parameters:

  1. --scriptPort 9999 for python interface
  2. put /scratch/some-fits-file.fits in the end

Run and Debug by Qt Creator


Deployment: Prepare distributable and packaged installer/zip

Use this repo,

Third Party Libraries

Third-party Libraries Version license
casacore 2.3+ GPLv2
casa 5.0.0+ GPLv2
ast 8.4.0 LGPLv3
gfortran 4.8+ GPLv3
CFITSIO 3.39 link (NASA license)
GSL 2.3 GPLv3
flex 2.5.37 link (flex license)
RapidJSON 1.02 MIT
qooxdoo 3.5.1 MIT
Qt 5.3+ LGPLv3
Qwt 6.1.2 link (Qwt license)
Python (included for CentOS 6) 2.7 link (Python license)
NumPy (Included for CentOS 6) BSD
Matplotlib (Included for CentOS 6) link (Matplotlib license)
Cython (Included for CentOS 6) Apache
libstdc++ (Included for CentOS 6) 4.8.1+ GCC Runtime Exception

Dynamic/Shared Library search notes for runtime and packaging

  1. On Mac, start from Qt 5.5, the rpath of dependent Qt library will use @rpath instead of using absolute path.

  2. CARTA desktop version is built to CARTA program + dynamic libs (libCARTA, libcore, many libPlugin built from Qt) and use "a few static Third-party library + many dynamic Third-party library".

  3. It seems that Qt-built dynamic libs do not have Search Path issue, at least before moving CARTA program (for packaging).

  4. We use install_name_tool (Mac) and chrpath or PatchELF (Linux) to specify dynamic linking path of each lib. On mac, CARTA is located in after building. Linux does not have these folder, so we need to have different handles.


CirclCI (docker):

Travis CI (Mac): Mac auto build repo:

Introduction to build Server ver. of CARTA Viewer on Linux