Python Scripting for Computational Science CPS 5401 Fall 2014 Shirley Moore, Instructor October 6,

Slides:



Advertisements
Similar presentations
The Complete Technical Analysis and Development Environment An attractive alternative to MATLAB and GAUSS - Physics World.
Advertisements

Guy Griffiths. General purpose interpreted programming language Widely used by scientists and programmers of all stripes Supported by many 3 rd -party.
MatLab API in C++ Christopher Dabney. Purpose MatLab … MatLab … is an interpreted scripting language is an interpreted scripting language conversion to.
Python for Science Shane Grigsby. What is python? Why python? Interpreted, object oriented language Free and open source Focus is on readability Fast.
MATLAB MATLAB is a high-level technical computing language and
Hardware and Software Erik Brisson SCV Visualization Workshop – Fall 2008.
RCAC Research Computing Presents: DiaGird Overview Tuesday, September 24, 2013.
Mx? A programming language for scientific computation. Related Languages: Matlab IDL Maple, Mathcad, Mathematica.
Script Languages in Science CCOM Student Seminar Series Kurt Schwehr 12-Nov-2008.
IS&T Scientific Visualization Tutorial – Spring 2010 Robert Putnam Plotting packages overview.
Justin Sun Boston DataCon September 14, Overview Why Use Orange? Classification Tree Example Project History Architecture Widgets Demo Resources.
By. What advantages has it? The Reasons for Choosing Python  Python is free  It is object-oriented  It is interpreted  It is operating-system independent.
Introduction of Some Useful Free Software Cheng-Han Du.
Universal Linear Algebra API based on M4 Michael Fiero Isaac Asiamah.
Dr. Chris Musselle – Consultant R Meets Julia Dr Chris Musselle.
Joshua Alexander University of Oklahoma – IT/OSCER ACI-REF Virtual Residency Workshop Monday June 1, 2015 Deploying Community Codes.
Introduction to MATLAB adapted from Dr. Rolf Lakaemper.
Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas.
Computer Science 121 Scientific Computing Winter 2014.
A L I MAM M OHAMMAD B IN S AUD I SLAMIC U NIVERSITY C OLLEGE OF S CIENCES D EPARTMENT OF M ATHEMATICS MATLAB 251 : MATH SOFTWARE Introduction to MATLAB.
Introduction to Julia: Why are we doing this to you? (Fall 2015) Steven G. Johnson, MIT Applied Math MIT classes , 18.06, ,
Programming Languages: Scratch Intro to Scratch. Lower level versus high level Clearly, lower level languages can be tedious Higher level languages quickly.
418512: Computer Programming Languages Lecture 7 Pramook Khungurn TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA.
Programming History. Who was the first programmer?
Scientific Computing with NumPy & SciPy NumPy Installation and Documentation  Not much on the home page—don’t buy the guide, it’s.
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
Introduction to MATLAB adapted from Dr. Rolf Lakaemper.
Development of a Distributed MATLAB Environment with Real-Time Data Visualization Authors: Joseph Diamond, Richard McEver Affiliation: Dr. Jian Huang,
Chapter 1: Brief Overview of MATLAB MATLAB for Scientist and Engineers Using Symbolic Toolbox.
Python Mini-Course University of Oklahoma Department of Psychology Lesson 21 NumPy 6/11/09 Python Mini-Course: Lesson 21 1.
BOĞAZİÇİ UNIVERSITY DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS MATLAB AS A DATA MINING ENVIRONMENT.
Python for: Data Science. Python  Python is an open source scripting language.  Developed by Guido Van Rossum in late 1980s  Named after Monty Python.
1 ECE 1304 Introduction to Electrical and Computer Engineering Section 1.7 Linear Algebra with MATLAB.
CIS 601 Fall 2003 Introduction to MATLAB Longin Jan Latecki Based on the lectures of Rolf Lakaemper and David Young.
COMP 4332 Tutorial 1 Feb 16 WANG YUE Tutorial Overview & Learning Python.
Python & NetworkX Youn-Hee Han
-Edward Moore -Kyle Brown -Alexander Smith -Elliott Krome.
CIS 595 MATLAB First Impressions. MATLAB This introduction will give Some basic ideas Main advantages and drawbacks compared to other languages.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 330 Programming Language Structures Operational Semantics (Slides mainly.
Chapter 1: Introduction to Computers and Programming.
1 Programming and problem solving in C, Maxima, and Excel.
Python – It's great By J J M Kilner. Introduction to Python.
Chapter 1. Introduction.
Programming vs. Packaged
Java Programming: From the Ground Up
PH2150 Scientific Computing Skills
The language focusses on ease of use
CSC 222: Object-Oriented Programming
CST 1101 Problem Solving Using Computers
Matlab.
Pixy Python API Charlotte Weaver.
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
Basic 1964 PC general purpose Imperative Small Easy to use.
Computer Application in Engineering Design
Software for scientific calculations
MatLab Programming By Kishan Kathiriya.
Data Analysis using Python-I
PH2150 Scientific Computing Skills
Programming vs. Packaged
Introduction to MATLAB
Python for Scientific Computing
Brief Intro to Python for Statistics
Use of Python Scripts to Compare and Contrast Photo Images
Communication and Coding Theory Lab(CS491)
Python-NumPy Tutorial
Problem Solving Using C: Orientation & Lecture 1
Scipy 'Ecosystem' containing a variety of scientific packages including iPython, numpy, matplotlib, and pandas. numpy is both a system for constructing.
Simulation And Modeling
Python for Data Analysis
An Introduction to Data Science using Python
Presentation transcript:

Python Scripting for Computational Science CPS 5401 Fall 2014 Shirley Moore, Instructor October 6,

Scripting vs. Traditional Programming Traditional programming builds large applications using Fortran, C, C++, Java, etc. Scripting means programming at a higher abstraction level in more flexible languages such as Python, Perl, Ruby, Tcl. Scripting often serves to integrate programs written in traditional languages – for example, to integration simulation and visualization Scripting can allow you to build your own Matlab-like scientific computing environment. Scripting can help build demos for teaching or project presentations. Can use scripting to run and collect results from experiments. 2

Python vs. Matlab Python is more powerful. Python environment is completely open and designed for integration with external tools. Nested, heterogeneous data structures are easy to construct and use in Python. Interfacing to C, C++, and Fortran is better supported in Python. Matlab is a self-contained well-supported environment. pymat interface allows Python programs to use Matlab as a computational and graphics engine. 3

NumPy Package for scientific computing with Python Powerful N-dimensional array objects Allows definition of arbitrary data types Tools for integrating C/C++ and Fortran code Linear algebra, Fourier transform, and random number capabilities 4

NumPy Example 5

Creating Arrays Create from Python list using the array function: 6

Creating Arrays (2) Can create with placeholder content: 7

Creating Arrays (3) NumPy arange function analogous to Python range function but returns array instead of list linspace better for floating point numbers: 8

Arithmetic Operations Arithmetic operations on arrays are applied elementwise. New array is created to hold the result. 9

Arithmetic Operations (2) 10

Arithmetic Operations (3) In-place operators modify existing array rather than creating new one. 11

Unary Operations 12

Apply Operation along an Axis 13

Array Slicing 14

Shape Manipulation 15

Stacking Arrays 16

Splitting Arrays 17

Linear Algebra 18

Linear Algebra (2) 19

Matrix Class 20

Histograms 21

SciPy Library for scientific computing in Python Depends on NumPy for 2d arrays and some operations Some overlap with NumPy Better to use scipy.linalg than numpy.linalg SciPy tutorial – /index.html /index.html 22