How To Use A CASAGuide: Difference between revisions

From CASA Guides
Jump to navigationJump to search
Jbraatz (talk | contribs)
Created page with "==How to Use a CASA Tutorial== CASAguides includes tutorials for reducing and analyzing ALMA and VLA data. The tutorials provide CASA commands that can be cut and pasted int..."
 
mNo edit summary
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
==How to Use a CASA Tutorial==


CASAguides includes tutorials for reducing and analyzing ALMA and VLA data.  The tutorials provide CASA commands that can be cut and pasted into a CASA session.  Or, you can extract the full set of commands from a tutorial into an executable Python script.  For instructions on extracting the CASA commands into a script, see [[Extracting_scripts_from_these_tutorials]].
CASAguides includes tutorials for reducing and analyzing ALMA and VLA data.  The tutorials provide CASA commands that can be cut and pasted into a CASA session.  Or, you can extract the full set of commands from a tutorial into an executable Python script.  For instructions on extracting the CASA commands into a script, see [[Extracting_scripts_from_these_tutorials]].
Line 22: Line 21:
==== A note on CASA for beginners ====
==== A note on CASA for beginners ====


You should review Getting_Started_in_CASA if you are new to CASA.  
[[Getting Started in CASA]] is a good resource if you are new to CASA.  


CASA includes a set of tasks that perform specific operations, and you can run these tasks in two ways: setting task parameters interactively, or with function calls.  You can examine a task's parameters interactively with the command "inp taskname" (example: inp clean).  You then set the parameters one by one (example: selectdata=T) as you desire, and then to run the task, simply type "go". After setting parameters one by one in a task and then looking at the inputs again, you will notice that the parameters that have been set to something other than their defaults are blue. Invalid parameters are shown in red and must be fixed for the task to run correctly. You can get more detailed help on any task by typing "help taskname" (example: help clean). After a task is run you retrieve the same parameters with "tget taskname" (example: tget clean).  To store the parameters without actually running the task, use "tput taskname".
CASA includes a set of tasks that perform specific operations, and you can run these tasks in two ways: setting task parameters interactively, or with function calls.  You can examine a task's parameters interactively with the command "inp taskname" (example: inp clean).  You then set the parameters one by one (example: selectdata=T) as you desire, and then to run the task, simply type "go". After setting parameters one by one in a task and then looking at the inputs again, you will notice that the parameters that have been set to something other than their defaults are blue. Invalid parameters are shown in red and must be fixed for the task to run correctly. You can get more detailed help on any task by typing "help taskname" (example: help clean). After a task is run you retrieve the same parameters with "tget taskname" (example: tget clean).  To store the parameters without actually running the task, use "tput taskname".

Latest revision as of 21:04, 14 November 2024

CASAguides includes tutorials for reducing and analyzing ALMA and VLA data. The tutorials provide CASA commands that can be cut and pasted into a CASA session. Or, you can extract the full set of commands from a tutorial into an executable Python script. For instructions on extracting the CASA commands into a script, see Extracting_scripts_from_these_tutorials.

In the guides:

# In CASA
Regions of this color are CASA commands (or definitions) that can be cut and 
pasted in sequence. Wait until one command is finished before pasting another. 
Tabs matter in python, so make sure that commands that span more than one line (such as "for" loops) keep their spacing.  Sometimes after pasting the commands you may need to explicitly hit enter twice to get the command going, especially with "for" loops.
Information in this color shows excerpts from the CASA Logger output
This color shows you background information about the data or other types of reference material

A note on CASA for beginners

Getting Started in CASA is a good resource if you are new to CASA.

CASA includes a set of tasks that perform specific operations, and you can run these tasks in two ways: setting task parameters interactively, or with function calls. You can examine a task's parameters interactively with the command "inp taskname" (example: inp clean). You then set the parameters one by one (example: selectdata=T) as you desire, and then to run the task, simply type "go". After setting parameters one by one in a task and then looking at the inputs again, you will notice that the parameters that have been set to something other than their defaults are blue. Invalid parameters are shown in red and must be fixed for the task to run correctly. You can get more detailed help on any task by typing "help taskname" (example: help clean). After a task is run you retrieve the same parameters with "tget taskname" (example: tget clean). To store the parameters without actually running the task, use "tput taskname".

The second way to run CASA is to provide task function calls. Many of the tutorials here use such calls. For task function calls, you need to specify only the parameters that you want different from the defaults. A series of task function calls can be combined together into a script, and run with "execfile('scriptname.py')". This is how you run scripts extracted using the method described at the Extracting_scripts_from_these_tutorials page.

If you are new to CASA it is strongly recommended that you begin with the "Imaging Tutorials for CASA Beginners", cutting and pasting the task function calls after you have read all the associated explanations. Work at your own pace, look at the inputs to the tasks to see what other options exist, and read the help files. Later, when you are more comfortable, you might try to extract and modify the script.