Python crash course designed for chemical engineers and scientists with no previous knowledge. The real goal here isn’t to teach you everything about Python, but you will learn basic concepts via something you will need to do soon or later: analyze data. These informal lessons are divided into 1 hour/week and will be based on Software-Carpentry Lessons
- Motivation of learning Python and why Nature recommends it (live demo!). [1, 2, 3]
- Installation of Python in your computer. Please, download Anaconda Python 3.5 (64-bit) (why?)
- Introduction to the material we will follow: Software-Carpentry Lessons (+other resources)
- Open discussion
- Explain what a library is, and what libraries are used for.
- Load a Python library and use the things it contains.
- Read tabular data from a file into a program.
- Assign values to variables.
- Select individual values and subsections from data.
- Perform operations on arrays of data.
- Display simple graphs.
Materials:
- Explain what a for loop does.
- Correctly write for loops to repeat simple calculations.
- Trace changes to a loop variable as the loop runs.
- Trace changes to other variables as they are updated by a for loop.
- Explain what a list is.
- Create and index lists of simple values.
Materials:
- Read the full lessons:L2, L3
- matplotlib gallery
- NumPy - MATLAB: CheatSheet and differences.
- Python tutor (to visualize Python programs)
- Explain what a list is (recap).
- Create and index lists of simple values (recap).
- Use a library function to get a list of filenames that match a simple wildcard pattern.
- Use a for loop to process multiple files.
- Plotting graphs (recap)
Materials:
- Read the full lessons:L3, L4
- Python tutor (to visualize Python programs)
How to repeat operations on many different files?
How can my programs do different things based on data values? Creating Functions
Where to go from here?
- Rest of Software Carpentry Lessons
- Prof. Kitchin blog and free book
- CAChemE learn (Education resources for Chemical and Process Engineering written as interactive Jupyter Notebooks)
- Lorena Barba tutorials: 12 Steps to Navier Stokes, Numerical-mooc, AeroPython
- A gallery of interesting IPython Notebooks
- Introduction to Chemical Engineering Analysis