introduction to casa and basic data reduction overview crystal brogan alma casa subsystem scientist...
TRANSCRIPT
![Page 1: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/1.jpg)
Introduction to CASA and Basic Data
Reduction Overview
Crystal BroganALMA CASA Subsystem Scientist
(NRAO/NAASC)
With lots of help from Steve Myers (Project Scientist)
http://www.cv.nrao.edu/~cbrogan/CASATutorial_Santiago.pdf
![Page 2: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/2.jpg)
CASA Tutorial – Santiago Jan. 26, 20092
Beta Release StatusCASA Status:
in Beta Release since October 2007
Roughly biannual “patches”
register at my.nrao.edu , no password for download
Current Release: Beta Release Patch 2.3.1
Next Release @June ‘09
![Page 3: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/3.jpg)
CASA Tutorial – Santiago Jan. 26, 20093
Getting User SupportFirst stop: Read the Manual!
CASA Home: http://casa.nrao.edu
Cookbook, and “help” within CASA
CASA Helpdesk & Support Cadres
“Helpdesk” under my.nrao.edu (will migrate to more user friendly helpdesk in future)
submit Issues
![Page 4: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/4.jpg)
CASA Tutorial – Santiago Jan. 26, 2009
Other Information
4
Some ALMA User software demos: almasimmos OT, and splatalogue:http://www.cv.nrao.edu/~jstoke/Demo_Videos/
The Eleventh Synthesis Imaging Workshop:Calibration, Imaging, Mosaicing, Millimeter Interferometry etc.:http://www.aoc.nrao.edu/events/synthesis/2008/lectures08.html
![Page 5: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/5.jpg)
CASA Tutorial – Santiago Jan. 26, 20095
CASA DocumentationCASA Analysis cookbook (draft):
http://casa.nrao.edu/Doc/Draft/Cookbook/casa_cookbook.pdf
CASA User Reference Manual: http://casa.nrao.edu/docs/casaref/CasaRef.html
Python: http://python.org/doc (e.g., see Tutorial for novices)
IPython: http://ipython.scipy.org/moin/Documentation
matplotlib: http://matplotlib.sourceforge.net/
![Page 6: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/6.jpg)
CASA Tutorial – Santiago Jan. 26, 20096
Tutorial Contents
I - Interface
II - Tasks & Tools
III - Data in CASA
IV - Data Processing Workflow
V - Example Use Cases
![Page 7: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/7.jpg)
CASA Tutorial – Santiago Jan. 26, 20097
I - InterfaceDocumentation
IPython & Python
Crashes & Recovery
CASA help
CASA task interface
Functionality
![Page 8: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/8.jpg)
CASA Tutorial – Santiago Jan. 26, 20098
I - CASA InterfaceIPython
shell accessautoparenthesis (autocall)command historysession logging (ipython.log, casapy.log)numbered input/outputhistory/searching
Pythonsee standard manuals, Cookbook Appendix D
![Page 9: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/9.jpg)
CASA Tutorial – Santiago Jan. 26, 20099
Python Pointersto run a .py script:execfile(‘<scriptname>’)
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)
![Page 10: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/10.jpg)
CASA Tutorial – Santiago Jan. 26, 200910
Part II - Tasks & Tools
overview of tasks and tools in CASA
introduction to the task interface
how to get help on tasks and tools
how tools underly the tasks
how to run tasks asynchronously
![Page 11: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/11.jpg)
CASA Tutorial – Santiago Jan. 26, 200911
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
![Page 12: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/12.jpg)
CASA Tutorial -- 7 October 2008
Key TasksTask list:
may be different in test and release versions
asap_init to load single-dish tasks and tools
![Page 13: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/13.jpg)
CASA Tutorial – Santiago Jan. 26, 200913
Task Executiontwo 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
![Page 14: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/14.jpg)
CASA Tutorial – Santiago Jan. 26, 200914
Task Interfacestandard tasking interface
use parameters set as global Python variables
set <param> = <value> (e.g. vis = ‘ngc5921.demo.ms’ )
parameter manipulation commandsusing inp , default , saveinputs , tget
execute<taskname> or go ( e.g. clean() )
return valuessome tasks return Python dictionaries, e.g. myval=imval()
![Page 15: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/15.jpg)
CASA Tutorial – Santiago Jan. 26, 200915
Task Interfaceexamine task parameters with inp :
![Page 16: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/16.jpg)
CASA Tutorial – Santiago Jan. 26, 200916
Expandable Parameters
boldface parameter are expandable
![Page 17: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/17.jpg)
CASA Tutorial – Santiago Jan. 26, 200917
Parameter Checkingsanity checks of parameters in inp :
erroneousvalues in red
![Page 18: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/18.jpg)
CASA Tutorial – Santiago Jan. 26, 200918
Help on TasksIn-line help <taskname> command:
![Page 19: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/19.jpg)
CASA Tutorial – Santiago Jan. 26, 200919
Tools in CASACASA Toolkit underneath tasks
core AIPS++ code (mostly in C++)
tools are functions
call from casapy as <tool>.<method>()
default tool objects are pre-constructed
e.g. imager (im) , calibrater (cb), ms (ms) , etc. (see toolhelp)
![Page 20: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/20.jpg)
CASA Tutorial – Santiago Jan. 26, 200920
CASA Tool Listlist of default tools from toolhelp :
tools described in the CASA User Reference Manual:
http://casa.nrao.edu/docs/casaref/CasaRef.html
![Page 21: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/21.jpg)
CASA Tutorial – Santiago Jan. 26, 200921
Asynchronous Tasksrun tasks in background
set parameter async=True
runs as separate process
use taskmanager tool (tm) to monitor (Cookbook Chapter 1.3.2)
messages will appear in logger in the asynchronous order
useful to avoid known problems (e.g. exportfits / importfits)
cannot retrieve return values from async tasks
![Page 22: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/22.jpg)
CASA Tutorial – Santiago Jan. 26, 200922
III - Data in CASA
data in CASA are stored in tables
interferometry data in Measurement Sets (MS)
also tables for images and calibration tables
formats and structures defined in CASA memos
accessed through table and ms tools
row and column structure is logical not physical
![Page 23: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/23.jpg)
CASA Tutorial – Santiago Jan. 26, 200923
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
WARNING: moving a MS can break cal-table dependencies
![Page 24: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/24.jpg)
CASA Tutorial – Santiago Jan. 26, 200924
Example MSExample: ls ngc5921.usecase.ms
ls ngc5921.usecase.ms/FIELD
![Page 25: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/25.jpg)
CASA Tutorial – Santiago Jan. 26, 200925
MAIN Table ContentsExample using task browsetable:
![Page 26: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/26.jpg)
CASA Tutorial – Santiago Jan. 26, 200926
More MS Detailsoften will refer to “rows” & “columns”
rows = integrations in spectral windows
columns = time, u, v, w, DATA, weights, etc.
• there are “scratch columns”• created when needed - can bloat the MS
• but (usually) less space than scratch copy of MS!
• CORRECTED_DATA , MODEL_DATA, IMAGING_WEIGHTS
![Page 27: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/27.jpg)
CASA Tutorial – Santiago Jan. 26, 200927
Data Selection• standard MS selection syntax
• see Chapter 2.5 of CASA Cookbook
• syntax detailed in CASA Memo
• http://casa.nrao.edu/Memos/msselection/index.html
![Page 28: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/28.jpg)
CASA Tutorial – Santiago Jan. 26, 200928
Selection Example• standard selection parameters
• e.g. for task gaincal:
• field and spw common standard selections
• expandable selectdata with other selections as sub-parameters
![Page 29: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/29.jpg)
CASA Tutorial – Santiago Jan. 26, 200929
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’
![Page 30: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/30.jpg)
CASA Tutorial – Santiago Jan. 26, 200930
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’
![Page 31: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/31.jpg)
CASA Tutorial – Santiago Jan. 26, 200931
IV - Reduction Philosophy
• data is imported into MS• keep original DATA inviolate
• calibration is carried in cal-tables• will discuss cal-table philosophy later
• imaging creates images from MS• feed back model images for self-calibration
![Page 32: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/32.jpg)
CASA Tutorial – Santiago Jan. 26, 200932
Data Philosophy• Original data kept intact by default
• DATA (and WEIGHT) columns
• do not change in original MS
• user can use toolkit to mess with these also
• MS “scratch columns” are used• used for adjusted data and model visibilities
• BETA: user must keep track ; Post-Beta: hide table and MS state
![Page 33: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/33.jpg)
CASA Tutorial – Santiago Jan. 26, 200933
CASA Workflow Chart
• workflow:• import
• examine / flag
• calibrate
• image
• analyze
![Page 34: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/34.jpg)
CASA Tutorial – Santiago Jan. 26, 200934
Workflow Steps• follow rough workflow path:
• import data (from UVFITS or archive formats)
• examine data and edit out bad visibilities
• calibrate data (through cal-tables)
• image data (various deconvolution methods)
• image and uv analysis (e.g. moments)
• data and image visualization (whenever needed)
![Page 35: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/35.jpg)
CASA Tutorial – Santiago Jan. 26, 200935
Import Data
• see Chapter 2 of Cookbook• task importuvfits
• UVFITS data (e.g. from AIPS)
• task importvla
• VLA “export” format (e.g. from archive)
• task importasdm
• ALMA data format (also EVLA eventually)
![Page 36: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/36.jpg)
CASA Tutorial – Santiago Jan. 26, 200936
Data Examination• see Chapter 3 of Cookbook
• task listobs
• list summary of MS
• task plotxy
• x-y line plots
• task browsetable (casabrowser outside casapy)
• Qt browser for tables (e.g. MS and images)
• casaviewer - view raster images of MS
![Page 37: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/37.jpg)
CASA Tutorial – Santiago Jan. 26, 200937
Flagging• see Chapter 3 of Cookbook
• task plotxy
• draw boxes around points and flag
• casaviewer ( task viewer )
• draw boxes on raster and flag (modes similar to AIPS TVFLG)
• task flagdata - manual flagging, clipping, etc.
• task flagmanager - backup & restore flags
![Page 38: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/38.jpg)
CASA Tutorial – Santiago Jan. 26, 200938
Task plotxy• use plotxy for simple data plots &
flagging
before (left) and after (right) editing and calibration
![Page 39: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/39.jpg)
CASA Tutorial – Santiago Jan. 26, 200939
Task plotxy• interactive plotting and flagging
• averaging• timebin, width (time & channel averaging)
• iteration • iteration = ‘antenna’ , ‘field’ , ‘time’ , ‘spw’ (or combinations)
• GUI controls• buttons for MarkRegion , Flag , Unflag , Locate , Next , Quit
• plot options• use subplot = yxn to set multi-panels (e.g. subplot=311)
• controls for fontsize , markersize , other options
![Page 40: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/40.jpg)
CASA Tutorial – Santiago Jan. 26, 200940
Example inputs• set up to plot amp vs. time
![Page 41: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/41.jpg)
CASA Tutorial – Santiago Jan. 26, 200941
Editing Jupiter• isolate blocks of bad data and remove
single bad scan on Jupiter both spw , all antennas
![Page 42: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/42.jpg)
CASA Tutorial – Santiago Jan. 26, 200942
MS viewing• the casaviewer can handle MS (e.g.
TVFLG)
![Page 43: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/43.jpg)
CASA Tutorial – Santiago Jan. 26, 200943
Calibration
• see Chapter 4 of Cookbook• prior calibration
• solving
• calibration table manipulation
• calibration table examination
• application to data
![Page 44: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/44.jpg)
CASA Tutorial – Santiago Jan. 26, 200944
Calibration• workflow:
• input dataset
• solving => tables
• incremental
• accumulation
• application
![Page 45: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/45.jpg)
CASA Tutorial – Santiago Jan. 26, 200945
Calibration Tables• calibration tables are exchanged between the calibration
tasks:
![Page 46: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/46.jpg)
CASA Tutorial – Santiago Jan. 26, 200946
Calibration Tasks
• prior calibration: setjy
• solvers: gaincal, bandpass, polcal, blcal, fringecal
• manipulation: plotcal, accum, smoothcal
• application: applycal, split
• other: uvcontsub, uvmodelfit
![Page 47: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/47.jpg)
CASA Tutorial – Santiago Jan. 26, 200947
Parameterizations• prior calibration:
• gaincurve: VLA-only for now
• opacity: single tau value (for now)
• gaincal: • gaintype=’G’ (solution per solint time slot)
• gaintype=’GSPLINE’
• bandpass: • bandtype=’B’ (solution per channel)
• bandtype=’BPOLY’
• No time-dependence yet
![Page 48: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/48.jpg)
CASA Tutorial – Santiago Jan. 26, 200948
Calibration Processing• setjy (or ft)
• specify a model image (for selfcal or resolved cals)
• Except for uv-range does not yet handle planets, VLA calibrator models are available
• smoothcal
• Mean, median smoothing of cal tables
• accum
• calibration re-sampling
• Incremental/cumulative calibration
![Page 49: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/49.jpg)
CASA Tutorial – Santiago Jan. 26, 200949
Imaging• see Chapter 5 of Cookbook
• task clean
• single-field cleaning, variety of algorithms
• mosaicing using uv-gridder (uv-plane mosaicing on single image)
• interactive and non-interactive operation
• task widefield - widefield imaging prototype
• w-projection and faceting
• task feather - combine single-dish and uvMS
![Page 50: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/50.jpg)
CASA Tutorial – Santiago Jan. 26, 200950
Interactive CLEAN• clean has interactive
mode
• interactive=True
• uses the viewer
• can change cycles during cleaning
• draw boxes and polygon regions for masking
![Page 51: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/51.jpg)
CASA Tutorial – Santiago Jan. 26, 200951
Cube Channelization• When using mode=‘channel’
• select spectral windows of the data, e.g. spw=‘0,1’
• the width is then set in units of first data spw channel width
![Page 52: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/52.jpg)
CASA Tutorial – Santiago Jan. 26, 200952
Imaging spectral cubes
• Other cube considerations... • Averaging of data channel in imaging is
always ‘mfs’ style…i.e gridded with different (u,v)
• If a mode=’velocity’ cube is chosen, then data will be gridded into LSRK bins
• If simple data averaging is needed split is recommended
![Page 53: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/53.jpg)
CASA Tutorial – Santiago Jan. 26, 200953
Mosaicing in clean• use imagermode=’mosaic’
• deconvolution on “Sault” (constant noise) image• User can set make PB corrected image at end
• Heterogeneous now available if multiple antenna diameters are present
• primary beam coverage x Sky in image plane• Convolution with aperture cross-correlation function in uv-domain
• Advantages of doing mosaicing in uv• Faster and apply correct beam transform for each baseline (e.g.
different dish size, change of pb with frequency, beam errors etc.)
• Parameter “ftmachine” sets this• Possibilities are 'ft' or 'mosaic’
• For poorly sampled mosaics, ‘ft’ is better
![Page 54: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/54.jpg)
CASA Tutorial – Santiago Jan. 26, 200954
More clean• Mosaicing parameters continued:
• mosweight: important/different for uniform and Brigg's weighting scheme. Use per field weighting if mosweight=True
• Cotton-Scwab major cycles• imagermode=’csclean’ or ‘mosaic’• returns to residual visibilities at major
cycles• cyclefactor : controls major cycle depth
• larger => more major cycles (clean will take longer)
• to a lesser extent cyclespeedup (for a non-converging clean)
![Page 55: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/55.jpg)
CASA Tutorial – Santiago Jan. 26, 200955
Image Display• The viewer
• Cookbook Chapter 7
![Page 56: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/56.jpg)
CASA Tutorial – Santiago Jan. 26, 200956
Image Analysis• see Chapter 6 of Cookbook
• task imhead - get and change image header information
• task immoments - computes moment images of spectral cube
• task immath - combine images and do image math
• using Lattice Expression Language (LEL)
• also: Spectral Index, Linear Polarized Intensity and Angle
• task imstat - return statistics on regions of image
• task imval - return values for pixel or region of image
• task imfit - fit a 2D Gaussian to the image
![Page 57: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/57.jpg)
CASA Tutorial – Santiago Jan. 26, 200957
Task immoments• use viewer to look at NGC5921 moment
images
Overlay contours of moment 1 (velocity) on moment 0(intensity)
![Page 58: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/58.jpg)
CASA Tutorial – Santiago Jan. 26, 200958
V - Scripts & Data• Tutorial Home Page
• http://www.cv.nrao.edu/~cbrogan/2009126.htm
• CASA Scripts & Data Page• http://casa.nrao.edu/casatraining.shtml
![Page 59: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/59.jpg)
CASA Tutorial – Santiago Jan. 26, 200959
Crashes & Recovery• Beta Release still has crash modes
• plotting in particular (plotxy and plotcal) can get a segmentation fault
• If in doubt, exit and restart casapy• get rid of orphaned loggers
• you may have to use ps to find rogue casapy processes and kill them
![Page 60: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/60.jpg)
CASA Tutorial – Santiago Jan. 26, 200960
Beta Disclaimer
• This really is a Beta Release!• still missing functionality
• there are known failure modes
• Improvements in upcoming patches
• move towards handling ALMA/EVLA “use cases”
• better handling of calibration
![Page 61: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/61.jpg)
CASA Tutorial – Santiago Jan. 26, 2009
Next Steps
61
• Everyone run the fast VLA script ngc5921_demo.py to ensure things are working properly
• Then you can run through the extensively annotated script for reduction of BIMA SONG data: ngc4926_tutorial.py
• Or for the VERY brave and patient…
![Page 62: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/62.jpg)
CASA Tutorial – Santiago Jan. 26, 2009
New ‘Beta’ SMA Data Reduction Script
Available
62
• http:www.cv.nrao.edu/~cbrogan/sma_reduction
• Many of the slow aspects of running this script: plotting, flagging, scratch column creation are actively being worked on this cycle – patience is required
• CARMA reduction is similarly possible via miriad: uvfits (be sure to do linelength correction first) to casapy: importuvfits.
• The NAASC has formed a collaboration with the U. of Maryland to write a “CARMA filler” – hopefully finished by end of summer
![Page 63: Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project](https://reader030.vdocuments.mx/reader030/viewer/2022020117/56649f275503460f94c3e8fd/html5/thumbnails/63.jpg)
CASA Tutorial – Santiago Jan. 26, 200963