other:python:jyp_steps
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
other:python:jyp_steps [2016/01/21 17:43] – More stuff jypeter | other:python:jyp_steps [2016/01/22 14:59] – Started adding JYP's tutorial jypeter | ||
---|---|---|---|
Line 4: | Line 4: | ||
This page tries to list some //python for the scientist// related resources, in a suggested reading order. **Do not print anything** (or at least not everything), | This page tries to list some //python for the scientist// related resources, in a suggested reading order. **Do not print anything** (or at least not everything), | ||
+ | |||
+ | ===== JYP's introduction to python ===== | ||
+ | |||
+ | You can start using python by reading the {{: | ||
+ | * This tutorial is in French (my apologies | ||
===== The official python documentation ===== | ===== The official python documentation ===== | ||
Line 11: | Line 16: | ||
==== Python 2.7 ==== | ==== Python 2.7 ==== | ||
- | [[https:// | + | [[https:// |
==== Python 3 ==== | ==== Python 3 ==== | ||
- | [[https:// | + | [[https:// |
+ | |||
+ | |||
+ | ===== Numpy and Scipy ===== | ||
+ | |||
+ | Summary: Python provides //ordered// objects (e.g. lists, strings, basic arrays, ...) and some math operators, but you can't do real heavy computation with these. **Numpy** makes it possible to work with multi-dimensional data arrays, and using array syntax and masks (instead of explicit nested loops and tests) and the apropriate numpy functions will allow you to get performance similar to what you would get with a compiled program! **Scipy** adds more scientific functions | ||
+ | |||
+ | How to get started? | ||
+ | - always remember that indices start at '' | ||
+ | - read the [[https:// | ||
+ | - have a quick look at the full documentation to know where things are | ||
+ | - Numpy User Guide: | ||
+ | - Numpy Reference Guide | ||
+ | - Scipy Reference Guide | ||
+ | |||
+ | ===== cdms2 and netcdf4 ===== | ||
+ | |||
+ | There is a good chance that your input array data will come from a file in the [[http:// | ||
+ | |||
+ | Note: the NetCDF file format is self-documented, | ||
+ | |||
+ | ==== cdms2 ==== | ||
+ | |||
+ | Summary: cdms2 can read/write netCDF files (and read //grads// dat+ctl files) and provides a higher level interface than netCDF4. Unfortunately, | ||
+ | |||
+ | How to get started: | ||
+ | - read [[http:// | ||
+ | - the tutorial is in French (soooorry!) | ||
+ | - you have to replace //cdms// with **cdms2**, and //MV// with **MV2** (sooorry about that, the tutorial was written when CDAT was based on Numeric instead of numpy to handle array data) | ||
+ | - read the [[http:// | ||
+ | - ask questions and get answers on the [[http:// | ||
+ | |||
+ | |||
+ | ==== netCDF4 ==== | ||
+ | |||
+ | Summary: netCDF4 can read/write netCDF files and is available in most python distributions | ||
+ | |||
+ | Where: [[http:// | ||
===== Matplotlib ===== | ===== Matplotlib ===== | ||
Line 56: | Line 99: | ||
===== Quick Reference ===== | ===== Quick Reference ===== | ||
- | * The nice Python 2.7 Quick Reference: [[http:// | + | * The nice and convenient |
===== Some good coding tips ===== | ===== Some good coding tips ===== |
other/python/jyp_steps.txt · Last modified: 2025/02/26 11:40 by jypeter