Module Information

Module Identifier
CS24400
Module Title
Scientific Python
Academic Year
2019/2020
Co-ordinator
Semester
Semester 1 (Taught over 2 semesters)
Mutually Exclusive
Mutually Exclusive
Pre-Requisite
Other Staff

Course Delivery

Delivery Type Delivery length / details
Lecture 40 x 1 Hour Lectures
Practical 10 x 1 Hour Practicals
Practical 5 x 2 Hour Practicals
 

Assessment

Assessment Type Assessment length / details Proportion
Semester Exam 3 Hours   Exam at the end of Sem 2  Open Book, Online coding and data analysis exam.  70%
Semester Assessment Worksheets for practicals  Assessed worksheets  30%
Supplementary Exam 3 Hours   Supplementary exam  Open Book, Online coding and data analysis exam.  100%

Learning Outcomes

On successful completion of this module students should be able to:

Plan and execute a computational scientific experiment.

Demonstrate an ability to write small programs in Python

Demonstrate an understanding of the potential biases and sources of error in science.

Analyse a data set (process data, apply appropriate tests, calculate summary statistics, plot results).

Aims

The module introduces the student to Python and uses Python as programming language to solve various data analysis-related tasks. This leads into studying data analysis as the main topic in the second semester.

Brief description

This module first introduces students to the Python programming language and to the use of Python and its library modules for processing scientific data. The module then goes on to cover the Scientific Method, the basic structure of a scientifc experiment and making and testing hypotheses, with illustrated examples of good and bad practice. Also discussed are difficulties in achieving randomness, sources of bias during sampling and choosing apprropiate statistical testing methods for various types of study.

Content

Semester 1

Introduction to teh Python Language: types, variables, flow-control statements, loops. The interactive interpreter and evaluation of simple expressions.

Python data structures: List, tuples and dictionaries.

The NumPy module: Data arrays and vectorised operations

Functions: Function definition, calling, parameter passing and value return.

Organising code: Generating documentation. Handling exceptions. Creating and using modules.

Python Objects and Classes: Defining and using classes. Working with objects.

File handling: Readinga nd writing text and csv data files. Extracting and processing data from web pages.

Plotting: Manipulating data and plotting results. Use of the matplotlib module.

Review and revision classes

Semester 2

The Scientific Method: Structure of a scientific investigation. Hypotheses. Occam's razor. Controls. Correlation vs causation. Falsification. Controlled and double blind trials.

Introduction to the scipy and pandas modules: Working with Dataframes and basic statistics

Randomness: Sources of randomness and random number generators. Random distributions. Random sampling.

Descriptive statistics: Central tendency and spread. Discrete and continuous measurements.

Hypothesis testing: T-test, Confidence interval, P-value, Chi-square test.

Correlation.

Sampling: Biases. Bootstrap. Monte Carlo methods

Application to real data and hot topics in science.

Review and revision classes.

Module Skills

Skills Type Skills details
Application of Number Inherent in subject.
Communication Documenting code.
Improving own Learning and Performance From feedback (automatic feedback from computer and in-practical feedback from demonstrators).
Information Technology Inherent in subject.
Personal Development and Career planning No, though the skills in this module are highly in demand from employers.
Problem solving Problems will need to be overcome in order to develop solutions that behave and appear as intended.
Research skills Using a Computer. Searching the language and library documentation.
Subject Specific Skills Programming skills, debugging skills, statistics skills, data analysis skills.
Team work No.

Notes

This module is at CQFW Level 5