Difference between revisions of "Python Old Version"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Least Square Fit)
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
IIT Bombay is leading the effort to popularise Python for Scientific Computing in India.  This is part of the Free and Open source Software for Science and Engineering Education (http://fossee.in) project, supported by the National Mission on Education through ICT of MHRD (http://spoken-tutorial.org/NMEICT-Intro).
+
IIT Bombay is leading the effort to popularise Python for Scientific Computing in India.  This is part of the Free and Open source Software for Science and Engineering Education (http://fossee.in) project, supported by the National Mission on Education through ICT of MHRD.
  
 
IIT Bombay is using Spoken Tutorials (http://spoken-tutorial.org) to create learning material for FOSS.  This is the main page for the organisation of the scripts required for Standard two day workshop we conduct on "Python for Scientific Computing" spoken tutorials.   
 
IIT Bombay is using Spoken Tutorials (http://spoken-tutorial.org) to create learning material for FOSS.  This is the main page for the organisation of the scripts required for Standard two day workshop we conduct on "Python for Scientific Computing" spoken tutorials.   
Line 9: Line 9:
 
=General Information=
 
=General Information=
 
This topic will include getting ready with Installation and getting comfortable with the interface which would be used through out the workshop
 
This topic will include getting ready with Installation and getting comfortable with the interface which would be used through out the workshop
== [[ Installation procedure of Required Packages]] ==
+
== Installation procedure of Required Packages ==
 
For this study plan following packages will be used:
 
For this study plan following packages will be used:
 
# IPython
 
# IPython
Line 21: Line 21:
 
* Mac
 
* Mac
  
== [[ Basic usage of IPython interpreter ]] ==
+
== Basic usage of IPython interpreter ==
 
* Starting (and exiting) the interpreter.
 
* Starting (and exiting) the interpreter.
 
* Getting out of loops.
 
* Getting out of loops.
Line 28: Line 28:
 
* Running scripts inside the interpreter.
 
* Running scripts inside the interpreter.
  
= [[ Interactive Plotting ]] =
+
= Interactive Plotting =
 
* IPython
 
* IPython
 
** Autocompletion
 
** Autocompletion
Line 38: Line 38:
 
** Changing the looks: size, linewidth, colors.
 
** Changing the looks: size, linewidth, colors.
  
= [[ Plotting experimental data ]] =
+
= Plotting experimental data =
 
* Lists
 
* Lists
 
** Creation of a list.
 
** Creation of a list.
Line 48: Line 48:
 
** Plotting the points
 
** Plotting the points
  
= [[ Plotting experimental data continued ]] =
+
= Plotting experimental data continued =
 
* loadtxt
 
* loadtxt
 
* Arrays
 
* Arrays
Line 55: Line 55:
 
* Statistical functions
 
* Statistical functions
  
= [[ Handling large files ]] =
+
= Handling large files =
 
* Reading files
 
* Reading files
 
* String operations.
 
* String operations.
 
* Plotting pie charts.
 
* Plotting pie charts.
  
= [[ Arrays/ Matrices ]] =
+
= Arrays/ Matrices =
 
* Creating matrices.
 
* Creating matrices.
 
* Accessing and changing elements.
 
* Accessing and changing elements.
Line 67: Line 67:
 
* Matrices operations.
 
* Matrices operations.
  
= [[ Least Square Fit]] =
+
= Least Square Fit =
 
Least Square Fit
 
Least Square Fit
  
= [[Solving Equations ]] =
+
= Solving Equations =
 
* Solving linear equations
 
* Solving linear equations
 
* Finding roots pf polynomials
 
* Finding roots pf polynomials
Line 76: Line 76:
 
* Basics of Functions
 
* Basics of Functions
  
= [[ Ordinary Differential Equations ]] =
+
= Ordinary Differential Equations =
 +
Ordinary Differential Equations
  
= [[ Data Types: Numbers ]] =
+
= Data Types: Numbers =
 
* Data types for numbers
 
* Data types for numbers
 
* operators
 
* operators
 
* type conversion
 
* type conversion
  
= [[ Strings ]] =
+
= Strings =
 
* Creating string variables
 
* Creating string variables
 
* Manipulating strings
 
* Manipulating strings
Line 90: Line 91:
 
* Dynamically typed nature
 
* Dynamically typed nature
  
= [[ Data Structures: Lists and Tuples ]] =
+
= Data Structures: Lists and Tuples =
 
* Lists
 
* Lists
 
** Initialization
 
** Initialization
Line 98: Line 99:
 
* Tuples
 
* Tuples
  
= [[Data Structures: Dictionaries & Sets ]] =
+
= Data Structures: Dictionaries & Sets =
 
* Dictionaries
 
* Dictionaries
 
** Initializing
 
** Initializing
Line 107: Line 108:
 
** Operations
 
** Operations
  
= [[ Conditional statements and Loops ]] =
+
= Conditional statements and Loops =
 
* Writing conditional statements
 
* Writing conditional statements
 
* While loops
 
* While loops
Line 113: Line 114:
 
* for and range
 
* for and range
  
= [[ Functions ]] =
+
= Functions =
 
* Function definition
 
* Function definition
 
* Docstrings
 
* Docstrings

Latest revision as of 17:34, 14 May 2018

IIT Bombay is leading the effort to popularise Python for Scientific Computing in India. This is part of the Free and Open source Software for Science and Engineering Education (http://fossee.in) project, supported by the National Mission on Education through ICT of MHRD.

IIT Bombay is using Spoken Tutorials (http://spoken-tutorial.org) to create learning material for FOSS. This is the main page for the organisation of the scripts required for Standard two day workshop we conduct on "Python for Scientific Computing" spoken tutorials.

Note: Each numbered topic corresponds to a single spoken tutorial. Each bulleted point corresponds to a command or topic that must be covered in the given spoken tutorial.

General Information

This topic will include getting ready with Installation and getting comfortable with the interface which would be used through out the workshop

Installation procedure of Required Packages

For this study plan following packages will be used:

  1. IPython
  2. Matplotlib
  3. NumPy
  4. SciPy
  5. Mayavi2
  6. Scite
  • Windows installation (using Enthought Python Distribution(EPD http://www.enthought.com/products/epd.php ))
  • Linux installation (using package manager- show only Debian/Ubuntu as example (sudo apt-get install ipython python-numpy python-scipy python-matplotlib mayavi2 scite))
  • Mac

Basic usage of IPython interpreter

  • Starting (and exiting) the interpreter.
  • Getting out of loops.
  • Viewing history.
  • Saving history to scripts.
  • Running scripts inside the interpreter.

Interactive Plotting

  • IPython
    • Autocompletion
    • Help
  • Plotting
    • Creating simple plots.
    • Adding labels and legends.
    • Annotating plots.
    • Changing the looks: size, linewidth, colors.

Plotting experimental data

  • Lists
    • Creation of a list.
    • Appending to a list.
    • Iterating through list.
  • Data Processing
    • Handling files.
    • For loops.
    • Plotting the points

Plotting experimental data continued

  • loadtxt
  • Arrays
    • Usage
    • Operations
  • Statistical functions

Handling large files

  • Reading files
  • String operations.
  • Plotting pie charts.

Arrays/ Matrices

  • Creating matrices.
  • Accessing and changing elements.
  • Concepts of Striding and Slicing.
  • Elementary Image processing.
  • Matrices operations.

Least Square Fit

Least Square Fit

Solving Equations

  • Solving linear equations
  • Finding roots pf polynomials
  • Roots of non linear equations
  • Basics of Functions

Ordinary Differential Equations

Ordinary Differential Equations

Data Types: Numbers

  • Data types for numbers
  • operators
  • type conversion

Strings

  • Creating string variables
  • Manipulating strings
  • I/O operations
  • Comments
  • Dynamically typed nature

Data Structures: Lists and Tuples

  • Lists
    • Initialization
    • Operations
    • Slicing
    • Striding
  • Tuples

Data Structures: Dictionaries & Sets

  • Dictionaries
    • Initializing
    • Accessing elements
    • dict.keys and dict.values
  • Sets
    • Initializing
    • Operations

Conditional statements and Loops

  • Writing conditional statements
  • While loops
  • range function
  • for and range

Functions

  • Function definition
  • Docstrings
  • Function arguments
    • Default arguments
    • Keyword arguments
  • Return values

Contributors and Content Editors

Gaurav, Minal, Nancyvarkey, PoojaMoolya