Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project.

Slides:



Advertisements
Similar presentations
Summary Statistics/Simple Graphs in SAS/EXCEL/JMP.
Advertisements

Lectures on File Management
Utilizing the GDB debugger to analyze programs Background and application.
Introduction to CASA Shigehisa Takakuwa (ASIAA). Table of Contents 1.ALMA Observation & Calibration 2.CASA 3.How to use CASA.
Atacama Large Millimeter/submillimeter Array Expanded Very Large Array Robert C. Byrd Green Bank Telescope Very Long Baseline Array Whoever North American.
Interferometric Spectral Line Imaging Martin Zwaan (Chapters of synthesis imaging book)
Image Analysis Jim Lovell ATNF Synthesis Imaging Workshop May 2003.
By Hrishikesh Gadre Session II Department of Mechanical Engineering Louisiana State University Engineering Equation Solver Tutorials.
Image Analysis Jim Lovell ATNF Synthesis Imaging Workshop September 2001.
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
1 Synthesis Imaging Workshop Error recognition R. D. Ekers Narrabri, 14 May 2003.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Calibration with CASA Masaaki Hiramatsu 平松正顕 (ASIAA/NTHU) ALMA User Workshop, Feb 8-10, 2010.
SPSS 1: An Introduction to the Statistical Package SPSS Suzie Cro MRC Clinical Trials Unit.
Creating Web Page Forms
Atacama Large Millimeter/submillimeter Array Expanded Very Large Array Robert C. Byrd Green Bank Telescope Very Long Baseline Array A Crash Course in CASA.
FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.
Introduction to Shell Script Programming
Tutorial 1 Getting Started with Adobe Dreamweaver CS3
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
WEEK 3 AND 4 USING CLIENT-SIDE SCRIPTS TO ENHANCE WEB APPLICATIONS.
1 Computing Software. Programming Style Programs that are not documented internally, while they may do what is requested, can be difficult to understand.
Chapter Four UNIX File Processing. 2 Lesson A Extracting Information from Files.
HIFI Tutorial 3: Getting some basic science out A.P.Marston ESAC 27 June 2013.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter Twelve Access Databases and LINQ.
Database-Driven Web Sites, Second Edition1 Chapter 5 WEB SERVERS.
Atacama Large Millimeter/submillimeter Array Expanded Very Large Array Robert C. Byrd Green Bank Telescope Very Long Baseline Array Using CASA to Simulate.
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
SE: CHAPTER 7 Writing The Program
Oracle Data Integrator Procedures, Advanced Workflows.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
CABB Data Reduction Review Summary of recommendations Dave McConnell June 2011.
Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt.
An Introduction to Designing and Executing Workflows with Taverna Aleksandra Pawlik materials by: Katy Wolstencroft University of Manchester.
Ganga A quick tutorial Asterios Katsifodimos Trainer, University of Cyprus Nicosia, Feb 16, 2009.
EVLA Software Bryan Butler. 2007May22EVLA SAGE Meeting2 Requirements and Goals of EVLA Software Maximize scientific throughput of the instrument At a.
Sanjay BhatnagarEVLA Advisory Committee Meeting May 8-9, EVLA Algorithm Research & Development Progress & Plans Sanjay Bhatnagar CASA/EVLA.
1 KFPA Critical Design Review – Fri., Jan. 30, 2009 KFPA Data Pipeline Bob Garwood- NRAO-CV.
Herschel Open Time Cycle 1 DP workshop ESAC, March page 1 Spurs in HIFI data Colin Borys.
Integrating QDEC with Slicer3 Click to add subtitle.
ADMIT: ALMA Data Mining Toolkit  Developed by University of Maryland, University of Illinois, and NRAO (PI: L. Mundy)  Goal: First-view science data.
Pipeline Basics Jared Crossley NRAO NRAO. What is a data pipeline?  One or more programs that perform a task with reduced user interaction.  May be.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
JWST Pipeline/Analysis Tools Perry Greenfield Science Software Branch.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Introduction to CASA and Basic Data Reduction Overview Steven T. Myers CASA Project Scientist (NRAO)
ESO, 17 April 2007ESAC meeting1 ALMA offline User Test 5 Silvia Leurini, ESO.
Flagging: When Good Data Go Bad Scott Schnee & Amy Kimball Nov 9, 2011 Interferometry Discussion Group.
CPSC 203 Introduction to Computers T97 By Jie (Jeff) Gao.
Introduction to CASA Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project Scientist)
Quick Test Professional 9.2. Testing Process Preparing to Record Recording Enhancing a Test Debugging Running the Test and Analyzing the Results Reporting.
ADMIT: ALMA Data Mining Toolkit  Developed by University of Maryland, University of Illinois, and NRAO (PI: L. Mundy)  Goal: First-view science data.
HIFI Tutorial 1: Running the HIFI Pipelines and Adaptations A.P.Marston ESAC 27 June 2013.
WIDE-FIELD IMAGING IN CLASSIC AIPS Eric W. Greisen National Radio Astronomy Observatory Socorro, NM, USA.
1 Berger Jean-Baptiste
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
13 Copyright © 2007, Oracle. All rights reserved. Using the Data Recovery Advisor.
Introduction to Multichannel Image Reconstruction, Image Analysis and Display (MIRIAD)
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
Atacama Large Millimeter/submillimeter Array Expanded Very Large Array Robert C. Byrd Green Bank Telescope Very Long Baseline Array Using CASA to Simulate.
NRAO VLA Archive Survey
Introduction to Programming the WWW I
SAGE Committee Meeting – December 19 & 20, 2008
EVLA Algorithm Research & Development
CSE 303 Concepts and Tools for Software Development
National Radio Astronomy Observatory
Presentation transcript:

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

CASA Tutorial – Santiago Jan. 26, Beta Release Status CASA Status: in Beta Release since October 2007 Roughly biannual “patches” register at my.nrao.edu, no password for download Current Release: Beta Release Patch Next ‘09

CASA Tutorial – Santiago Jan. 26, Getting User Support First stop: Read the Manual! CASA Home: 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

CASA Tutorial – Santiago Jan. 26, 2009 Other Information 4 Some ALMA User software demos: almasimmos OT, and splatalogue: The Eleventh Synthesis Imaging Workshop: Calibration, Imaging, Mosaicing, Millimeter Interferometry etc.: ctures08.html

CASA Tutorial – Santiago Jan. 26, CASA Documentation CASA Analysis cookbook (draft): CASA User Reference Manual: Python: (e.g., see Tutorial for novices) IPython: matplotlib:

CASA Tutorial – Santiago Jan. 26, Tutorial Contents I - Interface II - Tasks & Tools III - Data in CASA IV - Data Processing Workflow V - Example Use Cases

CASA Tutorial – Santiago Jan. 26, I - Interface Documentation IPython & Python Crashes & Recovery CASA help CASA task interface Functionality

CASA Tutorial – Santiago Jan. 26, I - CASA Interface IPython shell access autoparenthesis (autocall) command history session logging (ipython.log, casapy.log) numbered input/output history/searching Python see standard manuals, Cookbook Appendix D

CASA Tutorial – Santiago Jan. 26, 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)

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial -- 7 October 2008 Key Tasks Task list: may be different in test and release versions asap_init to load single-dish tasks and tools

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, 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()

CASA Tutorial – Santiago Jan. 26, Task Interface examine task parameters with inp :

CASA Tutorial – Santiago Jan. 26, Expandable Parameters boldface parameter are expandable

CASA Tutorial – Santiago Jan. 26, Parameter Checking sanity checks of parameters in inp : erroneous values in red

CASA Tutorial – Santiago Jan. 26, Help on Tasks In-line help command:

CASA Tutorial – Santiago Jan. 26, 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)

CASA Tutorial – Santiago Jan. 26, CASA Tool List list of default tools from toolhelp : tools described in the CASA User Reference Manual:

CASA Tutorial – Santiago Jan. 26, Asynchronous Tasks run 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

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, Example MS Example: ls ngc5921.usecase.ms ls ngc5921.usecase.ms/FIELD

CASA Tutorial – Santiago Jan. 26, MAIN Table Contents Example using task browsetable:

CASA Tutorial – Santiago Jan. 26, More MS Details often 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

CASA Tutorial – Santiago Jan. 26, Data Selection standard MS selection syntax see Chapter 2.5 of CASA Cookbook syntax detailed in CASA Memo

CASA Tutorial – Santiago Jan. 26, Selection Example standard selection parameters e.g. for task gaincal: field and spw common standard selections expandable selectdata with other selections as sub-parameters

CASA Tutorial – Santiago Jan. 26, 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 = ‘ ’ ; 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’

CASA Tutorial – Santiago Jan. 26, 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’

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, CASA Workflow Chart workflow: import examine / flag calibrate image analyze

CASA Tutorial – Santiago Jan. 26, 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)

CASA Tutorial – Santiago Jan. 26, 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)

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, Task plotxy use plotxy for simple data plots & flagging before (left) and after (right) editing and calibration

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, Example inputs set up to plot amp vs. time

CASA Tutorial – Santiago Jan. 26, Editing Jupiter isolate blocks of bad data and remove single bad scan on Jupiter both spw, all antennas

CASA Tutorial – Santiago Jan. 26, MS viewing the casaviewer can handle MS (e.g. TVFLG)

CASA Tutorial – Santiago Jan. 26, Calibration see Chapter 4 of Cookbook prior calibration solving calibration table manipulation calibration table examination application to data

CASA Tutorial – Santiago Jan. 26, Calibration workflow: input dataset solving => tables incremental accumulation application

CASA Tutorial – Santiago Jan. 26, Calibration Tables calibration tables are exchanged between the calibration tasks:

CASA Tutorial – Santiago Jan. 26, Calibration Tasks prior calibration: setjy solvers: gaincal, bandpass, polcal, blcal, fringecal manipulation: plotcal, accum, smoothcal application: applycal, split other: uvcontsub, uvmodelfit

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, Interactive CLEAN clean has interactive mode interactive=True uses the viewer can change cycles during cleaning draw boxes and polygon regions for masking

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, 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)

CASA Tutorial – Santiago Jan. 26, Image Display The viewer Cookbook Chapter 7

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, Task immoments use viewer to look at NGC5921 moment images Overlay contours of moment 1 (velocity) on moment 0 (intensity)

CASA Tutorial – Santiago Jan. 26, V - Scripts & Data Tutorial Home Page CASA Scripts & Data Page

CASA Tutorial – Santiago Jan. 26, 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

CASA Tutorial – Santiago Jan. 26, 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

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…

CASA Tutorial – Santiago Jan. 26, 2009 New ‘Beta’ SMA Data Reduction Script Available 62 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

CASA Tutorial – Santiago Jan. 26,