MODULE TITLE

Scientific Programming in Python

 

CREDIT VALUE

15

MODULE CODE

PHY2035

MODULE CONVENER

Dr J. Hatchell

 

 

DURATION

TERM

1

2

3

Number Students Taking Module (anticipated)

120

WEEKS

T1:01-11

 

DESCRIPTION – summary of the module content (100 words)

A knowledge of a computing language and how to write programs to solve physics related problems is a valuable transferable skill. It is taught though a series of practical sessions in which the student will initially learn to understand the logic of the source code and are required to modify the code for a number of prepared projects. This module teaches the Python programming language, but the principles involved are applicable to almost every procedural programming language.

MODULE AIMS – intentions of the module

This module aims to build on the introduction to programming in Python given in the IT Skills training in Stage 1 (e.g. PHY1027) in order to develop students' ability to write clear, structured, debuggable and maintainable computer programs in Python and to understand such programs written by others.

INTENDED LEARNING OUTCOMES (ILOs) (see assessment section below for how ILOs will be assessed)

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

Module Specific Skills and Knowledge:

  1. explain and use standard features of the Python programming language including assignments, statements, iterators and objects;
  2. write and modify simple programs in Python;
  3. find errors and debug code;
  4. write structured code based on short routines with a clear purpose and interfaces that are simple and unambiguous;
  5. write self-documenting code using docstrings and comments;
  6. select and apply existing tools for scientific programming from modules including NumPy, SciPy, Matplotlib and Astropy, based on the documentation;

Discipline Specific Skills and Knowledge:

  1. apply logic to the solution of problems;
  2. keep proper records of work;
  3. apply the Python programming language to simple physical problems including calculations, modelling and data analysis;
  4. produce publication-quality plots;
  5. present a portfolio of work;

Personal and Key Transferable / Employment Skills and Knowledge:

  1. deal with the practicalities of writing a computer program;
  2. think and plan in a logical manner;
  3. apply a structured approach to problem solving.

SYLLABUS PLAN – summary of the structure and academic content of the module

  1. Introduction to Python 3 and Revision
    1. Running Python and Jupyter notebook
    2. Loading modules and packages
    3. Using Python as a graphical calculator; simple calculations, maths, functions and plotting
  2. Core Python.
    1. Objects, assignments and variables, dynamic typing
    2. Numbers, comparisons and logic
    3. Strings and print statements
    4. Lists and tuples
    5. Sets and dictionaries
    6. Control flow: loops and if-statements
    7. File I/O
    8. Functions
  3. Program Design and Practice
    1. Python scripts
    2. Self-documenting code with comments, docstrings and markdown cells
    3. Testing and debugging
    4. Handling errors and exceptions
  4. Modules/Packages and Applications
    1. NumPy
    2. Matplotlib
    3. SciPy
    4. Astropy
  5. Advanced Python
    1. Creating a Python module
    2. Introduction to classes and Object Oriented Programming
  6. Projects
    A number of projects based upon the Stage 2 physics course. The background physics required for each project is provided for the student in the project description.

 

LEARNING AND TEACHING

 

LEARNING ACTIVITIES AND TEACHING METHODS (given in hours of study time)

Scheduled Learning & Teaching activities  

33 hours

Guided independent study  

117 hours

Placement/study abroad

0 hours

 

DETAILS OF LEARNING ACTIVITIES AND TEACHING METHODS

 Category 

 Hours of study time 

 Description 

Scheduled Learning & Teaching activities

11 hours

11×1-hour lectures

Scheduled Learning & Teaching activities

22 hours

11×2-hour supervised computer labs

Guided independent study

56 hours

Directed self-study and project work

Guided independent study

61 hours

Reading to support own learning requirements

 

ASSESSMENT

 

 FORMATIVE ASSESSMENT - for feedback and development purposes; does not count towards module grade

Form of Assessment

Size of the assessment e.g. duration/length

ILOs assessed

Feedback method

SUMMATIVE ASSESSMENT (% of credit)

Coursework

70%

Written exams

0%

Practical exams

30%

 

DETAILS OF SUMMATIVE ASSESSMENT

Form of Assessment

 

% of credit

Size of the assessment e.g. duration/length

 ILOs assessed 

Feedback method

Homework assignment

13%

8 hours

1-16

Written and verbal

Homework assignment

13%

8 hours

1-16

Written and verbal

Programming Knowledge and Skills Test

30%

1 hour 30

1-9, 11, 13-16

Written and verbal

Homework assignment

13%

8 hours

1-16

Written and verbal

Programming Project

31%

32 hours

1-16

Written and verbal

 DETAILS OF RE-ASSESSMENT (where required by referral or deferral)

Original form of assessment

 Form of re-assessment 

ILOs re-assessed

Time scale for re-assessment

Programming Knowledge and Skills Test

Test (1hr 30min) 30% wt

1-9, 11, 13-16

August/September assessment period

Programming Project and Homework Assignments

Programming Project (32 hours) 70% wt

1-16

August/September assessment period

RE-ASSESSMENT NOTES  

 

RESOURCES

 

 INDICATIVE LEARNING RESOURCES -  The following list is offered as an indication of the type & level of information that you are expected to consult. Further guidance will be provided by the Module Convener.

Core text:

Supplementary texts:

  • Not applicable

ELE:

CREDIT VALUE

15

ECTS VALUE

7.5

PRE-REQUISITE MODULES

Mathematics Skills (PHY1025) and Electromagnetism I (PHY2021)

CO-REQUISITE MODULES

none

NQF LEVEL (FHEQ)

5

AVAILABLE AS DISTANCE LEARNING

NO

ORIGIN DATE

01-Sep-18

LAST REVISION DATE

01-May-21

KEY WORDS SEARCH

Physics; Program; Structures; Function; Codes; Project; Data; Computing; Arrays; Designing.

Module Descriptor Template Revised October 2011