National Radio Astronomy Observatory

Slides:



Advertisements
Similar presentations
National Alliance for Medical Image Computing Anatomy of a plugin Common architecture for interactive and batch processing.
Advertisements

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 A Crash Course in CASA.
Python quick start guide
Arc: Programming Options Dr Andy Evans. Programming ArcGIS ArcGIS: Most popular commercial GIS. Out of the box functionality good, but occasionally: You.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
ROOT An object oriented HEP analysis framework.. Computing in Physics Physics = experimental science =>Experiments (e.g. at CERN) Planning phase Physics.
Sikuli Ivailo Dinkov QA Engineer PhoneX Team Telerik QA Academy.
Eclipse Overview Introduction to Web Programming Kirkwood Continuing Education Fred McClurg © Copyright 2015, Fred McClurg, All Rights Reserved.
SKA/KAT SPIN Presentation Software Engineering (!?) Robert Crida.
IE 411/511: Visual Programming for Industrial Applications
1 ANASAC Meeting – May 20, 2015 ALMA Pipeline Brian Glendenning (for Jeff Kern)
NA-MIC National Alliance for Medical Image Computing Slicer4 CLI Slicer Execution Model.
Scons Writing Solid Code Overview What is scons? scons Basics Other cools scons stuff Resources.
Atacama Large Millimeter/submillimeter Array Karl G. Jansky Very Large Array Robert C. Byrd Green Bank Telescope Very Long Baseline Array CASA Progress.
Atacama Large Millimeter/submillimeter Array Expanded Very Large Array Robert C. Byrd Green Bank Telescope Very Long Baseline Array Using CASA to Simulate.
Developing software and hardware in parallel Vladimir Rubanov ISP RAS.
Where will PyRAF lead us?: The future of data analysis software at STScI Perry Greenfield Science Analysis Tools Project Space Telescope Science Institute.
Introduction to CASA and Basic Data Reduction Overview Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project.
VAPOR 3.0 Architecture Overview. Purpose of this document Provide understandable overview of 3.0 architecture Enable the development team to maintain.
NCBI Genome Workbench Chuong Huynh NIH/NLM/NCBI Sao Paulo, Brasil July 15, 2004 Slides from Michael Dicuccio’s Genome Workbench.
1 KFPA Critical Design Review – Fri., Jan. 30, 2009 KFPA Data Pipeline Bob Garwood- NRAO-CV.
Atacama Large Millimeter/submillimeter Array Expanded Very Large Array Robert C. Byrd Green Bank Telescope Very Long Baseline Array Data Processing Progress.
ADMIT: ALMA Data Mining Toolkit  Developed by University of Maryland, University of Illinois, and NRAO (PI: L. Mundy)  Goal: First-view science data.
JWST Pipeline/Analysis Tools Perry Greenfield Science Software Branch.
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.
National Aeronautics and Space Administration TablePress Evaluation & Section 508 Accessible Tables with Visual Editor WP Workshop, 3/19/2014.
Chapter 12© copyright Janson Industries Java Server Faces ▮ Explain the JSF framework ▮ SDO (service data objects) ▮ Facelets ▮ Pagecode classes.
Introduction to CASA Crystal Brogan ALMA CASA Subsystem Scientist (NRAO/NAASC) With lots of help from Steve Myers (Project Scientist)
Drill-Through Features Cognos 8 BI. Objectives  In this module we will examine:  Cognos 8 Drill Through Overview  Model / Package Drill Through  Cross.
Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott.
12. MODULES Rocky K. C. Chang November 6, 2015 (Based on from Charles Dierbach. Introduction to Computer Science Using Python and William F. Punch and.
Background & Related Work Approaches to teaching media computation have so far primarily been reliant on textual programming languages [1]. For students.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
ARTview A Community Weather Radar Data GUI Contributors Anderson Gama Nick Guy Paul Hein Jonathan Helmus Timothy Lang.
Atacama Large Millimeter/submillimeter Array Expanded Very Large Array Robert C. Byrd Green Bank Telescope Very Long Baseline Array Using CASA to Simulate.
AstroGrid and Virtual Observatories for Radio Interferometry arrays/ proposals Anita Richards Paul Harrison Noel Winstanley (Jodrell Bank Centre for Astrophysics,
Introducing the Microsoft® .NET Framework
Dive Into® Visual Basic 2010 Express
VisIt Project Overview
MET4750 Techniques for Earth System Modeling
Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott.
Introduction to Computer CC111
z/Ware 2.0 Technical Overview
In-situ Visualization using VisIt
JavaScript Functions.
WORKSHOP 3 GSE IMPORT.
Course Name: QTP Trainer: Laxmi Duration: 25 Hrs Session: Daily 1 Hr.
Smithsonian Astrophysical Observatory
SharePoint-Hosted Apps and JavaScript
Prepared by Kimberly Sayre and Jinbo Bi
Faraday rotation measure synthesis in AIPS The new task FARS
VISUAL BASIC.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Faraday rotation measure synthesis in AIPS The new task FARS
Welcome to E-Prime E-Prime refers to the Experimenter’s Prime (best) development studio for the creation of computerized behavioral research. E-Prime is.
Genome Workbench Chuong Huynh NIH/NLM/NCBI New Delhi, India
Electronics II Physics 3620 / 6620
MySQL Migration Toolkit
Rocky K. C. Chang 15 November 2018 (Based on Dierbach)
SSDT and Database Project Basics
Predictive Models with SQL Server Machine Learning Services
Python Modules.
Games Development 2 Tools Programming
Blender API: Part 1: Overview
 A function is a named sequence of statement(s) that performs a computation. It contains  line of code(s) that are executed sequentially from top.
SPL – PS1 Introduction to C++.
Running & Testing :: IDEs
Python Modules.
Presentation transcript:

National Radio Astronomy Observatory Developing for CASA (or in, alongside, in spite of) or, Becoming a CASA Taskmaster or, How to get your Python code in and working. Steven T. Myers National Radio Astronomy Observatory Socorro, NM S. T. Myers

CASA Environment casapy toolkit tasks IPython for interactive environment Python accessible for scripting (e.g. execfile) can import Python libraries (standard or custom) toolkit functional interface to C++ code (libraries, d.o.) contains atomic data access and processing commands user contributions require full build access tasks Python wrapper around toolkit and pythoncode a (minimal) parameter setting interface accessible to user-supplied functionality S. T. Myers

The ALMA Development Aspect CASA = Python + Toolkit + Applications You can develop in CASA at C++ level “hard” but clearly possible (become a CASA developer) If it’s a Python (2.7x) module/script CASA can use it If you can run it in casapy you can use the toolkit write a CASA task or function (or simple script) If you have an app with command interface you can call it from CASA if it works on standard data formats MS, casa images, FITS images, some flavors of uvfits, text, … We should strive to conform to minimal common interface e.g. Numpy arrays, matplotlib, use of other standard facilities Tweaking CASA possible to define other interfaces in CASA (functional? GUIs) S. T. Myers

Target Rich Environment Possible targets for CASA-related development operations on image (cube) data extract pixels, manipulate, report results, possibly return to cube examples: source/line fitting/extraction, filtering, statistics, transforms also physical modelling (e.g. from spectral cube) image visualization interactive exploration, hardcopy, cross-matching, identification possibly with built-in image operations data-space operations uv modelfitting, imaging, intereference mitigation, data visualization modelling simulation-to-image, simulation-to-data threshold for study/proposal: significant scope and FTEs S. T. Myers

Write a function in Python What do I do? Write a function in Python learn Python (e.g. python.org) write <function>.py bring into casapy execfile(‘<function>.py’) OR import <function> call function in casapy <function>.<method>(<args>) good for simple functionality bypasses task parameter interface see any Python reference on how to do this S. T. Myers

What else can I do? Write a casapy Task learn Python (e.g. python.org) read (parts of) CASA User Reference & Cookbook e.g. Appendix G, includes example get existing task as template currently need code/xmlcasa directory tree put Python code into task_<task>.py put params and help text into <task>.xml use “buildmytasks task” from unix (outside casa) compiles to .pyc and puts into mytasks.py go into casapy and execfile(‘mytasks.py’) to update task, need to restart casapy future: an importmytask inside casapy S. T. Myers

standard tasking interface Task Interface standard tasking interface use parameters set as global Python variables set <param> = <value> (e.g. vis = ‘ngc5921.demo.ms’ ) parameter manipulation commands using inp , default , saveinputs , tget execute <taskname> or go ( e.g. clean() ) return values some tasks return Python dictionaries, e.g. myval=imval() S. T. Myers

Task Parameter Interface example task parameters with inp : S. T. Myers

Expandable Parameters boldface parameters are expandable one level deep: parameter->sub-parameter S. T. Myers

Task Parameter Checking sanity checks of parameters in inp : parameter types defined in <task>.xml erroneous values in red S. T. Myers

CASA Toolkit underneath tasks tools are functions Tools in CASA CASA Toolkit underneath tasks core AIPS++ code (mostly in C++) tools are functions call from casapy as <tool>.<method>() methods either set state or do something can return objects or records (dictionaries) default tool objects are pre-constructed e.g. imager (im) , calibrater (cb), ms (ms) , etc. (see toolhelp) Historical Context aips++ had only toolkit, in transition to CASA we were told by UGs to concentrate on Tasks… S. T. Myers

CASA Tool List list of default tools from toolhelp : tools = set (state) + apply (process) methods tools described in the CASA Toolkit Reference Manual: http://casa.nrao.edu/docs/CasaRef/CasaRef.html S. T. Myers

How does this work in practice? There have been contributed tasks, e.g. importevla (wrapping asdm2ms) flagcmd (wrapping table and flagger) boxit (autoboxing, wrapping images) autoclean (using autoboxing and imager) Cool. How do I distribute/get stuff like this? “insiders” : get CASA team to check into code base “outsiders” : post somewhere (CASA Science Forum) https://science.nrao.edu/forums/ “associates” : get put onto casaguides http://casaguides.nrao.edu future: better mechanism? S. T. Myers

Discussion Points Future developments User Support Better support for Python programming (import) Better support for C++ programming (plugins?) Application (e.g. viewer) control (Qt, Dbus, blahblahblah) Integrating interfaces (GUIs plus param setting) Refactoring interfaces (meta-tasks? functional lang.?) User Support RTFM. I spent time writing documentation. Why? OK, how can we do this better? Or reduce the need? Enabling transferral of knowledge/scripts Forums? Wiki? Other? Import of general Astro toolkit (e.g. astropy) Import of CASA into other astro (e.g. LSST) Other? Programmatics? Consortia? Management? S. T. Myers