Skip to main content

Study information

Scientific Programming in Python - 2024 entry

MODULE TITLEScientific Programming in Python CREDIT VALUE15
MODULE CODEPHY2035 MODULE CONVENERUnknown
DURATION: TERM 1 2 3
DURATION: WEEKS 11
Number of Students Taking Module (anticipated) 120
DESCRIPTION - summary of the module content

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.

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)
 
A student who has passed this module 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:
7. apply logic to the solution of problems;
8. keep proper records of work;
9. apply the Python programming language to simple physical problems including calculations, modelling and data analysis;
10. produce publication-quality plots;
11. present a portfolio of work;
 
Personal and Key Transferable / Employment Skills and Knowledge:
12. deal with the practicalities of writing a computer program;
13. think and plan in a logical manner;
14. apply a structured approach to problem solving.

 

SYLLABUS PLAN - summary of the structure and academic content of the module
I. 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
II. 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
III. 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
IV. Modules/Packages and Applications
  1. NumPy
  2. Matplotlib
  3. SciPy
  4. Astropy
V. Advanced Python
  1. Creating a Python module
  2. Introduction to classes and Object Oriented Programming
VI. 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 Guided Independent Study 117 Placement / Study Abroad
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
SUMMATIVE ASSESSMENT (% of credit)
Coursework 70 Written Exams 0 Practical Exams 30
DETAILS OF SUMMATIVE ASSESSMENT
Form of Assessment % of Credit Size of Assessment (e.g. duration/length) ILOs Assessed Feedback Method
Homework assignment 13% 8 hours (Deadline Monday, Week 4, Term 1) 1-16 Written and verbal
Homework assignment 13% 8 hours (Deadline Monday, Week 6, Term 1) 1-16 Written and verbal
Programming Knowledge and Skills Test 30% 1 hour 30 (Term 1, Week 6) 1-9, 11, 13-16 Written and verbal
Homework assignment 13% 8 hours (Deadline Monday, Week 9, Term 1) 1-16 Written and verbal
Programming Project 31% 32 hours (Deadline Friday, Week 12, Term 1) 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
ELE:
 
 

Reading list for this module:

Type Author Title Edition Publisher Year ISBN
Set Hill, C. Learning Scientific Programming with Python Cambridge 2020 978-1-108-74591-8
CREDIT VALUE 15 ECTS VALUE 7.5
PRE-REQUISITE MODULES PHY1025, PHY2021
CO-REQUISITE MODULES
NQF LEVEL (FHEQ) 5 AVAILABLE AS DISTANCE LEARNING No
ORIGIN DATE Wednesday 13th March 2024 LAST REVISION DATE Wednesday 13th March 2024
KEY WORDS SEARCH Physics; Program; Structures; Function; Codes; Project; Data; Computing; Arrays; Designing.

Please note that all modules are subject to change, please get in touch if you have any questions about this module.