Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to CASA Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project Scientist)

Similar presentations


Presentation on theme: "Introduction to CASA Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project Scientist)"— Presentation transcript:

1 Introduction to CASA Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project Scientist)

2 CASA Tutorial – Hamilton June 2, 2009 2 CASA (Common Astronomy Software Applications) CASA is the offline data reduction package for ALMA and EVLA Beta Release Status: in Beta Release since October 2007 Roughly biannual “patches” register at http://my.nrao.edu Current Release: Beta Release Patch 2.4 Next Release @Nov ’09 (3.0)

3 CASA Tutorial – Hamilton June 2, 2009 3 Outline IPython & Python CASA help CASA task interface MS and data selection The Memory Sticks Documentation

4 CASA Tutorial – Hamilton June 2, 2009 4 CASA Interface IPython shell access autoparenthesis (autocall) command history session logging ipython.log – ipython command history casapy.log – casa messages numbered input/output history/searching Python Cookbook Appendix D

5 CASA Tutorial – Hamilton June 2, 2009 5 Python Pointers to run a.py script: execfile(‘ ’) example: execfile(‘ngc5921_demo.py’) indentation matters! be careful when doing cut-and-paste to Python cut a few (4-6) lines at a time variables are global when using task interface! tasknames are objects (not variables)

6 CASA Tutorial – Hamilton June 2, 2009 6 Tasks and tools in CASA Tasks - high-level functionality function call or parameter handling interface these are what you should use in tutorial Tools - complete functionality tool.method calls, used by tasks sometimes shown in tutorial scripts

7 CASA Tutorial -- 7 October 2008 Key Tasks To see list of tasks after startup organized by type: >tasklist

8 CASA Tutorial – Hamilton June 2, 2009 8 Task Execution two ways to invoke: call from Python as functions with arguments taskname( arg1=val1, arg2=val2,... ) unspecified parameters will be defaulted (globals not used) use standard tasking interface use global variables for task parameters see Chapter 1.3 in Cookbook

9 CASA Tutorial – Hamilton June 2, 2009 9 Task Interface standard tasking interface use parameters set as global Python variables set = (e.g. vis = ‘ngc5921.demo.ms’ ) parameter manipulation commands using inp, default, saveinputs, tget execute or go ( e.g. clean() ) return values some tasks return Python dictionaries, e.g. myval=imval()

10 CASA Tutorial – Hamilton June 2, 2009 10 Task Interface examine task parameters with inp :

11 CASA Tutorial – Hamilton June 2, 2009 11 Expandable Parameters boldface parameter are expandable

12 CASA Tutorial – Hamilton June 2, 2009 12 Parameter Checking sanity checks of parameters in inp : erroneous values in red

13 CASA Tutorial – Hamilton June 2, 2009 13 Help on Tasks In-line help: >help ‘clean’ OR >pdoc clean

14 CASA Tutorial – Hamilton June 2, 2009 14 Tools in CASA CASA Toolkit underneath tasks core AIPS++ code (mostly in C++) tools are functions call from casapy as. () default tool objects are pre-constructed e.g. imager (im), calibrater (cb), ms (ms), etc. (see toolhelp)

15 CASA Tutorial – Hamilton June 2, 2009 15 CASA Tool List list of default tools from toolhelp : tools described in the CASA User Reference Manual: http://casa.nrao.edu/docs/casaref/CasaRef.html

16 CASA Tutorial – Hamilton June 2, 2009 16 The Measurement Set the MS is a directory on disk the MAIN table in table.* files also contains sub-tables e.g. FIELD, SOURCE, ANTENNA, etc. sub-tables are sub-directories to copy must cp -rf to get contents Best to remove ms with rmtables(‘filename’) WARNING: moving a MS can break cal-table dependencies

17 CASA Tutorial – Hamilton June 2, 2009 17 Example MS Example: ls ngc5921.usecase.ms ls ngc5921.usecase.ms/FIELD

18 CASA Tutorial – Hamilton June 2, 2009 18 MAIN Table Contents Example using task browsetable:

19 CASA Tutorial – Hamilton June 2, 2009 19 Data Selection Example standard selection parameters e.g. for task gaincal: field and spw common standard selections expandable selectdata with other selections as sub-parameters

20 CASA Tutorial – Hamilton June 2, 2009 20 Data Selection Syntax see Chapter 2.5 of Cookbook field - string with source name or field ID can use ‘*’ as wildcard, first checks for name, then ID example: field = ‘1331+305’ ; field = ‘3C*’ ; field = ‘0,1,4~5’ spw - string with specwindow ID plus channels use ‘:’ as separator of spw from optional channelization use ‘^’ as separator of channels from step/width example: spw = ‘0~2’ ; spw = ‘1:10~30’ ; spw = ‘2~5:5~54^5’

21 CASA Tutorial – Hamilton June 2, 2009 21 Selection Syntax see Chapter 2.5 of Cookbook antenna - string with antenna name or ID first check for name, then ID (beware VLA name 1-27, ID 0-26) example: antenna = ‘1~5,11’ ; antenna = ‘VA*’ timerange - string with date/time range specify ‘T0~T1’, missing parts of T1 default to T0, can give ‘T0+dT’ example: timerange = ‘2007/10/16/01:00:00~06:30:00’

22 CASA Tutorial – Hamilton June 2, 2009 22 The Memory Sticks etc. Contents: “Install_README” - installation instructions “installation” - directory contains 32-bit linux and intel mac files. Please see me if you need 64-bit linux. Please install before Wed. “casa_scripts_and_data.tar” copy this to your hard drive before Wed. Note a copy of the casa cookbook is included in this directory. A slightly newer version is available at http://www.aoc.nrao.edu/~smyers/naug/doc/cookbook/casa_cookbo ok.pdf http://www.aoc.nrao.edu/~smyers/naug/doc/cookbook/casa_cookbo ok.pdf Additional CASA Scripts & Data Page http://casa.nrao.edu/casatraining.shtml

23 CASA Tutorial – Hamilton June 2, 2009 23 Getting User Support First stop: CASA Home: http://casa.nrao.eduhttp://casa.nrao.edu Cookbook, and “help” within CASA CASA Helpdesk & Support “Helpdesk” at http://my.nrao.edu (will migrate to more user friendly helpdesk in future) You will need to register first Submit questions, suggestions, bugs

24 CASA Tutorial – Hamilton June 2, 2009 24 CASA Documentation CASA Analysis cookbook: http://casa.nrao.edu/Doc/Cookbook/casa_cookbook.pdf CASA User Reference Manual: http://casa.nrao.edu/docs/casaref/CasaRef.html Python: http://python.orghttp://python.org/doc (e.g., see Tutorial for novices) IPython: http://ipython.scipy.org/moin/Documentation matplotlib: http://matplotlib.sourceforge.nethttp://matplotlib.sourceforge.net/


Download ppt "Introduction to CASA Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project Scientist)"

Similar presentations


Ads by Google