Extracting scripts from these tutorials

From CASA Guides
Revision as of 12:00, 17 December 2009 by Jgallimo (talk | contribs) (Undo revision 857 by Jgallimo (Talk))
Jump to navigationJump to search

Hopefully the scripts contained in this documentation are (a) useful and (b) work. They were however developed with CASA still a work in progress, and so scripts may break as commands, arguments, and keywords change. We developed this script extractor to allow us to easily extract scripts from these pages and run them. Feel free to try it!

How to Get the Script Extractor

Download the script extraction code. It's linked right here: File:ExtractCASAscript.py.txt. Right-click and save the file as extractCASAscript.py. Copy the file to your data directory, and make sure you set the script to be executable.

# in bash
chmod u+x extractCASAscript.py

How to Use the Script Extractor

Make your newly acquired python script executable.

# in bash
chmod u+x extractCASAscript.py

To run it, issue the python script name and give the URL as the argument. For example:

# in bash
extractCASAscript.py http://casaguides.nrao.edu/index.php?title=Calibrating_a_VLA_5_GHz_continuum_survey


This command will automatically generate a script called "CalibratingaVLA5GHzcontinuumsurvey.py"


--Jack Gallimore 21:13, 3 November 2009 (UTC)