GithubHelp home page GithubHelp logo

knut0815 / casa-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from radio-astro-tools/casa-python

0.0 1.0 0.0 269 KB

Thin wrapper to be able to easily run the CASA Python executable

Python 100.00%

casa-python's Introduction

CASA Python executable wrapper

About

casa-python is a simple script that allows users to invoke the Python executable for CASA as one would invoke a normal Python executable. This allows users to easily install third-party libraries into CASA. To do this, whenever installation instructions require you to run for example python setup.py install, instead use:

casa-python setup.py install

We also provide an interface to the pip package manager, casa-pip. One can install any* python package this way:

casa-pip install requests

Installation

The installation requires that you have CASA installed. You can check this by doing

$ which casa

at the command prompt. You should see the path to the file.

To install, download the latest version of the casa-python script from here and run it. This should be your system python, not CASA python (which should be on your path by default).

python setup_casapy_pip.py

or, alternatively:

curl -O https://raw.githubusercontent.com/radio-tools/casa-python/master/setup_casapy_pip.py
python setup_casapy_pip.py

You should then add $HOME/.casa/bin/ to your path.

Example

To install Astropy into CASA, assuming you have the appropriate compilers on your system, you can run

casa-pip install astropy

Once the installation has completed, you can start up CASA as usual, and Astropy should be available:

CASA Version 4.1.0 (r22971)
  Compiled on: Thu 2013/02/21 17:38:25 UTC
___________________________________________________________________
    For help use the following commands:
    tasklist               - Task list organized by category
    taskhelp               - One line summary of available tasks
    help taskname          - Full help for task
    toolhelp               - One line summary of available tools
    help par.parametername - Full help for parameter name
___________________________________________________________________
Activating auto-logging. Current session state plus future input saved.
Filename       : ipython-20130319-150704.log
Mode           : backup
Output logging : False
Raw input log  : False
Timestamping   : False
State          : active
*** Loading ATNF ASAP Package...
*** ... ASAP (trunk rev#22948) import complete ***

CASA <2>: import astropy

CASA <3>: 

Caveats

Packages requiring c-compiled code rely on the existence of a C-compiler on your unix path.

Alternatives

Rather than install packages into CASA, it is also possible (although a little hackier) to try and import CASA into your existing Python installation - see here for more details.

Credits

The wrapper was prepared by Thomas Robitaille (@astrofrog) based on code from CASA, with contributions from Adam Leroy and Adam Ginsburg (@keflavich).

casa-python's People

Contributors

keflavich avatar astrofrog avatar

Watchers

James Cloos 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.