Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context...

87
Teaching Physics with Python Teaching Physics with Python Louise Dash [email protected] @louisedash Department of Physics and Astronomy, UCL 2 June 2015 Louise Dash (UCL) 2 June 2015

Transcript of Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context...

Page 1: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python

Teaching Physics with Python

Louise [email protected]

@louisedash

Department of Physics and Astronomy, UCL

2 June 2015

Louise Dash (UCL) 2 June 2015

Page 2: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python

Outline

1 Context

2 Why Python?

3 Challenges

4 The courses

5 More challenges (and successes)

6 The future

7 Conclusions

Louise Dash (UCL) 2 June 2015

Page 3: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python

Outline

1 Context

2 Why Python?

3 Challenges

4 The courses

5 More challenges (and successes)

6 The future

7 Conclusions

Louise Dash (UCL) 2 June 2015

Page 4: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python

Outline

1 Context

2 Why Python?

3 Challenges

4 The courses

5 More challenges (and successes)

6 The future

7 Conclusions

Louise Dash (UCL) 2 June 2015

Page 5: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python

Outline

1 Context

2 Why Python?

3 Challenges

4 The courses

5 More challenges (and successes)

6 The future

7 Conclusions

Louise Dash (UCL) 2 June 2015

Page 6: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python

Outline

1 Context

2 Why Python?

3 Challenges

4 The courses

5 More challenges (and successes)

6 The future

7 Conclusions

Louise Dash (UCL) 2 June 2015

Page 7: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python

Outline

1 Context

2 Why Python?

3 Challenges

4 The courses

5 More challenges (and successes)

6 The future

7 Conclusions

Louise Dash (UCL) 2 June 2015

Page 8: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python

Outline

1 Context

2 Why Python?

3 Challenges

4 The courses

5 More challenges (and successes)

6 The future

7 Conclusions

Louise Dash (UCL) 2 June 2015

Page 9: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Context

Outline

1 Context

2 Why Python?

3 Challenges

4 The courses

5 More challenges (and successes)

6 The future

7 Conclusions

Louise Dash (UCL) 2 June 2015

Page 10: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Context

Context

Nearing the end of a total reorganization of our core computingcourses

Previous courses were an “evolved over time” mishmash of Matlab,Excel, Mathematica, IDL

2013-2014: Introduction of brand new Python course for first year“Practical physics 1A” module

2014-2015: Introduction of follow-on Python course for second year“Practical physics 2B” module

Now integrating computing into other parts of the curriculum

Louise Dash (UCL) 2 June 2015

Page 11: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Context

Context

Nearing the end of a total reorganization of our core computingcourses

Previous courses were an “evolved over time” mishmash of Matlab,Excel, Mathematica, IDL

2013-2014: Introduction of brand new Python course for first year“Practical physics 1A” module

2014-2015: Introduction of follow-on Python course for second year“Practical physics 2B” module

Now integrating computing into other parts of the curriculum

Louise Dash (UCL) 2 June 2015

Page 12: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Context

Context

Nearing the end of a total reorganization of our core computingcourses

Previous courses were an “evolved over time” mishmash of Matlab,Excel, Mathematica, IDL

2013-2014: Introduction of brand new Python course for first year“Practical physics 1A” module

2014-2015: Introduction of follow-on Python course for second year“Practical physics 2B” module

Now integrating computing into other parts of the curriculum

Louise Dash (UCL) 2 June 2015

Page 13: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Context

Context

Nearing the end of a total reorganization of our core computingcourses

Previous courses were an “evolved over time” mishmash of Matlab,Excel, Mathematica, IDL

2013-2014: Introduction of brand new Python course for first year“Practical physics 1A” module

2014-2015: Introduction of follow-on Python course for second year“Practical physics 2B” module

Now integrating computing into other parts of the curriculum

Louise Dash (UCL) 2 June 2015

Page 14: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Context

Context

Nearing the end of a total reorganization of our core computingcourses

Previous courses were an “evolved over time” mishmash of Matlab,Excel, Mathematica, IDL

2013-2014: Introduction of brand new Python course for first year“Practical physics 1A” module

2014-2015: Introduction of follow-on Python course for second year“Practical physics 2B” module

Now integrating computing into other parts of the curriculum

Louise Dash (UCL) 2 June 2015

Page 15: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Context

Motivation

Historically, computation has been a “poor relation” in the physicscurriculum

Not seen as particularly accessible to undergraduate students

Hence of limited usefulness to students!

Louise Dash (UCL) 2 June 2015

Page 16: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Context

Motivation

Historically, computation has been a “poor relation” in the physicscurriculum

Not seen as particularly accessible to undergraduate students

Hence of limited usefulness to students!

Louise Dash (UCL) 2 June 2015

Page 17: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Context

Motivation

Historically, computation has been a “poor relation” in the physicscurriculum

Not seen as particularly accessible to undergraduate students

Hence of limited usefulness to students!

Louise Dash (UCL) 2 June 2015

Page 18: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Context

Motivation

Historically, computation has been a “poor relation” in the physicscurriculum

Not seen as particularly accessible to undergraduate students

Hence of limited usefulness to students!

However...

Modern languages like Python make computation much more accessible tothe non-specialist.

Louise Dash (UCL) 2 June 2015

Page 19: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Why Python?

Outline

1 Context

2 Why Python?

3 Challenges

4 The courses

5 More challenges (and successes)

6 The future

7 Conclusions

Louise Dash (UCL) 2 June 2015

Page 20: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Why Python?

Why Python?

It’s free, and open source

“Easy” to learn, user-friendly, gateway language

Easy to install

Marketable, transferable skill beyond physics

See http://lorenabarba.com/blog/why-i-push-for-python/

Easy to create 3d animations and models with “visual” Vpythonmodule

Louise Dash (UCL) 2 June 2015

Page 21: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Why Python?

Why Python?

It’s free, and open source

“Easy” to learn, user-friendly, gateway language

Easy to install

Marketable, transferable skill beyond physics

See http://lorenabarba.com/blog/why-i-push-for-python/

Easy to create 3d animations and models with “visual” Vpythonmodule

Louise Dash (UCL) 2 June 2015

Page 22: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Why Python?

Why Python?

It’s free, and open source

“Easy” to learn, user-friendly, gateway language

Easy to install

Marketable, transferable skill beyond physics

See http://lorenabarba.com/blog/why-i-push-for-python/

Easy to create 3d animations and models with “visual” Vpythonmodule

Louise Dash (UCL) 2 June 2015

Page 23: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Why Python?

Why Python?

It’s free, and open source

“Easy” to learn, user-friendly, gateway language

Easy to install

Marketable, transferable skill beyond physics

See http://lorenabarba.com/blog/why-i-push-for-python/

Easy to create 3d animations and models with “visual” Vpythonmodule

Louise Dash (UCL) 2 June 2015

Page 24: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Why Python?

Why Python?

It’s free, and open source

“Easy” to learn, user-friendly, gateway language

Easy to install

Marketable, transferable skill beyond physics

See http://lorenabarba.com/blog/why-i-push-for-python/

Easy to create 3d animations and models with “visual” Vpythonmodule

Louise Dash (UCL) 2 June 2015

Page 25: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Why Python?

Why Python?

It’s free, and open source

“Easy” to learn, user-friendly, gateway language

Easy to install

Marketable, transferable skill beyond physics

See http://lorenabarba.com/blog/why-i-push-for-python/

Easy to create 3d animations and models with “visual” Vpythonmodule

Louise Dash (UCL) 2 June 2015

Page 26: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Why Python?

Vpython

Louise Dash (UCL) 2 June 2015

Page 27: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Why Python?

Vpython

Louise Dash (UCL) 2 June 2015

Page 28: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Why Python?

Vpython

Louise Dash (UCL) 2 June 2015

Page 29: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Why Python?

Why Python?

It’s free, and open source

“Easy” to learn, user-friendly, gateway language

Easy to install

Marketable, transferable skill beyond physics

See http://lorenabarba.com/blog/why-i-push-for-python/

Easy to create 3d animations and models with “visual” Vpythonmodule

IPython Notebook

Louise Dash (UCL) 2 June 2015

Page 30: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Why Python?

Why Python?

It’s free, and open source

“Easy” to learn, user-friendly, gateway language

Easy to install

Marketable, transferable skill beyond physics

See http://lorenabarba.com/blog/why-i-push-for-python/

Easy to create 3d animations and models with “visual” Vpythonmodule

IPython Notebook

Louise Dash (UCL) 2 June 2015

Page 31: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Why Python?

The IPython Notebook

Louise Dash (UCL) 2 June 2015

Page 32: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Why Python?

The IPython Notebook

Louise Dash (UCL) 2 June 2015

Text commentary encouragesstudents to think clearly aboutwhat they are doing and why...

...from a coding and from aphysics point of view.

Also ideal for use as aninteractive session script.

Page 33: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Why Python?

The IPython Notebook

Louise Dash (UCL) 2 June 2015

Text commentary encouragesstudents to think clearly aboutwhat they are doing and why...

...from a coding and from aphysics point of view.

Also ideal for use as aninteractive session script.

Page 34: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Why Python?

The IPython Notebook

Louise Dash (UCL) 2 June 2015

Text commentary encouragesstudents to think clearly aboutwhat they are doing and why...

...from a coding and from aphysics point of view.

Also ideal for use as aninteractive session script.

Page 35: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Challenges

Outline

1 Context

2 Why Python?

3 Challenges

4 The courses

5 More challenges (and successes)

6 The future

7 Conclusions

Louise Dash (UCL) 2 June 2015

Page 36: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Challenges

Challenges

No prerequisite for computing!

Wide range of abilities, backgrounds and experiences

70% have no prior programming experience

Similarly, wide range of confidence with computers

65% say they are confident or very confident with computing

No obvious correlation between achievement and confidence

Large gender effect in confidence (no gap in outcomes)

At the beginning they don’t know much physics or maths either...

Computing notoriously hard to teach, and to assess (see work of MarkGuzdial, https://computinged.wordpress.com/

Louise Dash (UCL) 2 June 2015

Page 37: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Challenges

Challenges

No prerequisite for computing!

Wide range of abilities, backgrounds and experiences

70% have no prior programming experience

Similarly, wide range of confidence with computers

65% say they are confident or very confident with computing

No obvious correlation between achievement and confidence

Large gender effect in confidence (no gap in outcomes)

At the beginning they don’t know much physics or maths either...

Computing notoriously hard to teach, and to assess (see work of MarkGuzdial, https://computinged.wordpress.com/

Louise Dash (UCL) 2 June 2015

Page 38: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Challenges

Challenges

No prerequisite for computing!

Wide range of abilities, backgrounds and experiences

70% have no prior programming experience

Similarly, wide range of confidence with computers

65% say they are confident or very confident with computing

No obvious correlation between achievement and confidence

Large gender effect in confidence (no gap in outcomes)

At the beginning they don’t know much physics or maths either...

Computing notoriously hard to teach, and to assess (see work of MarkGuzdial, https://computinged.wordpress.com/

Louise Dash (UCL) 2 June 2015

Page 39: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Challenges

Challenges

No prerequisite for computing!

Wide range of abilities, backgrounds and experiences

70% have no prior programming experience

Similarly, wide range of confidence with computers

65% say they are confident or very confident with computing

No obvious correlation between achievement and confidence

Large gender effect in confidence (no gap in outcomes)

At the beginning they don’t know much physics or maths either...

Computing notoriously hard to teach, and to assess (see work of MarkGuzdial, https://computinged.wordpress.com/

Louise Dash (UCL) 2 June 2015

Page 40: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Challenges

Challenges

No prerequisite for computing!

Wide range of abilities, backgrounds and experiences

70% have no prior programming experience

Similarly, wide range of confidence with computers

65% say they are confident or very confident with computing

No obvious correlation between achievement and confidence

Large gender effect in confidence (no gap in outcomes)

At the beginning they don’t know much physics or maths either...

Computing notoriously hard to teach, and to assess (see work of MarkGuzdial, https://computinged.wordpress.com/

Louise Dash (UCL) 2 June 2015

Page 41: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Challenges

Challenges

No prerequisite for computing!

Wide range of abilities, backgrounds and experiences

70% have no prior programming experience

Similarly, wide range of confidence with computers

65% say they are confident or very confident with computing

No obvious correlation between achievement and confidence

Large gender effect in confidence (no gap in outcomes)

At the beginning they don’t know much physics or maths either...

Computing notoriously hard to teach, and to assess (see work of MarkGuzdial, https://computinged.wordpress.com/

Louise Dash (UCL) 2 June 2015

Page 42: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Challenges

Challenges

No prerequisite for computing!

Wide range of abilities, backgrounds and experiences

70% have no prior programming experience

Similarly, wide range of confidence with computers

65% say they are confident or very confident with computing

No obvious correlation between achievement and confidence

Large gender effect in confidence (no gap in outcomes)

At the beginning they don’t know much physics or maths either...

Computing notoriously hard to teach, and to assess (see work of MarkGuzdial, https://computinged.wordpress.com/

Louise Dash (UCL) 2 June 2015

Page 43: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Challenges

Challenges

No prerequisite for computing!

Wide range of abilities, backgrounds and experiences

70% have no prior programming experience

Similarly, wide range of confidence with computers

65% say they are confident or very confident with computing

No obvious correlation between achievement and confidence

Large gender effect in confidence (no gap in outcomes)

At the beginning they don’t know much physics or maths either...

Computing notoriously hard to teach, and to assess (see work of MarkGuzdial, https://computinged.wordpress.com/

Louise Dash (UCL) 2 June 2015

Page 44: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Challenges

Challenges

No prerequisite for computing!

Wide range of abilities, backgrounds and experiences

70% have no prior programming experience

Similarly, wide range of confidence with computers

65% say they are confident or very confident with computing

No obvious correlation between achievement and confidence

Large gender effect in confidence (no gap in outcomes)

At the beginning they don’t know much physics or maths either...

Computing notoriously hard to teach, and to assess (see work of MarkGuzdial, https://computinged.wordpress.com/

Louise Dash (UCL) 2 June 2015

Page 45: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

Outline

1 Context

2 Why Python?

3 Challenges

4 The courses

5 More challenges (and successes)

6 The future

7 Conclusions

Louise Dash (UCL) 2 June 2015

Page 46: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: First year course

Runs in first term of the first year

Emphasis on basic skill requirements:

Present and analyse lab data:Plotting, straight line fit from first principlesComputational models using Vpython......mostly based on classical mechanics

Louise Dash (UCL) 2 June 2015

Page 47: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: First year course

Runs in first term of the first year

Emphasis on basic skill requirements:

Present and analyse lab data:Plotting, straight line fit from first principlesComputational models using Vpython......mostly based on classical mechanics

Louise Dash (UCL) 2 June 2015

Page 48: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: First year course

Runs in first term of the first year

Emphasis on basic skill requirements:

Present and analyse lab data:

Plotting, straight line fit from first principlesComputational models using Vpython......mostly based on classical mechanics

Louise Dash (UCL) 2 June 2015

Page 49: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: First year course

Runs in first term of the first year

Emphasis on basic skill requirements:

Present and analyse lab data:Plotting, straight line fit from first principles

Computational models using Vpython......mostly based on classical mechanics

Louise Dash (UCL) 2 June 2015

Page 50: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: First year course

Runs in first term of the first year

Emphasis on basic skill requirements:

Present and analyse lab data:Plotting, straight line fit from first principlesComputational models using Vpython...

...mostly based on classical mechanics

Louise Dash (UCL) 2 June 2015

Page 51: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: First year course

Runs in first term of the first year

Emphasis on basic skill requirements:

Present and analyse lab data:Plotting, straight line fit from first principlesComputational models using Vpython......mostly based on classical mechanics

Louise Dash (UCL) 2 June 2015

Page 52: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: Second year course

Runs in second term of the second year

They’ve forgotten most of what they did in the first year...

More advanced data analysis

Non-linear fitting, χ2 analysis, analysis of residuals

Computational physics

Matrix calculations (but not quantum mechanics...)Runge Kutta methodsFast Fourier transforms

Make use of both inbuilt libraries as black boxes and coding fromscratch.

Eg Fourier transforms: start with hand-coded discrete Fouriertransform...

...Compare and contrast with inbuilt (numpy) FFT libraries

Louise Dash (UCL) 2 June 2015

Page 53: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: Second year course

Runs in second term of the second year

They’ve forgotten most of what they did in the first year...

More advanced data analysis

Non-linear fitting, χ2 analysis, analysis of residuals

Computational physics

Matrix calculations (but not quantum mechanics...)Runge Kutta methodsFast Fourier transforms

Make use of both inbuilt libraries as black boxes and coding fromscratch.

Eg Fourier transforms: start with hand-coded discrete Fouriertransform...

...Compare and contrast with inbuilt (numpy) FFT libraries

Louise Dash (UCL) 2 June 2015

Page 54: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: Second year course

Runs in second term of the second year

They’ve forgotten most of what they did in the first year...

More advanced data analysis

Non-linear fitting, χ2 analysis, analysis of residuals

Computational physics

Matrix calculations (but not quantum mechanics...)Runge Kutta methodsFast Fourier transforms

Make use of both inbuilt libraries as black boxes and coding fromscratch.

Eg Fourier transforms: start with hand-coded discrete Fouriertransform...

...Compare and contrast with inbuilt (numpy) FFT libraries

Louise Dash (UCL) 2 June 2015

Page 55: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: Second year course

Runs in second term of the second year

They’ve forgotten most of what they did in the first year...

More advanced data analysis

Non-linear fitting, χ2 analysis, analysis of residuals

Computational physics

Matrix calculations (but not quantum mechanics...)Runge Kutta methodsFast Fourier transforms

Make use of both inbuilt libraries as black boxes and coding fromscratch.

Eg Fourier transforms: start with hand-coded discrete Fouriertransform...

...Compare and contrast with inbuilt (numpy) FFT libraries

Louise Dash (UCL) 2 June 2015

Page 56: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: Second year course

Runs in second term of the second year

They’ve forgotten most of what they did in the first year...

More advanced data analysis

Non-linear fitting, χ2 analysis, analysis of residuals

Computational physics

Matrix calculations (but not quantum mechanics...)Runge Kutta methodsFast Fourier transforms

Make use of both inbuilt libraries as black boxes and coding fromscratch.

Eg Fourier transforms: start with hand-coded discrete Fouriertransform...

...Compare and contrast with inbuilt (numpy) FFT libraries

Louise Dash (UCL) 2 June 2015

Page 57: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: Second year course

Runs in second term of the second year

They’ve forgotten most of what they did in the first year...

More advanced data analysis

Non-linear fitting, χ2 analysis, analysis of residuals

Computational physics

Matrix calculations (but not quantum mechanics...)

Runge Kutta methodsFast Fourier transforms

Make use of both inbuilt libraries as black boxes and coding fromscratch.

Eg Fourier transforms: start with hand-coded discrete Fouriertransform...

...Compare and contrast with inbuilt (numpy) FFT libraries

Louise Dash (UCL) 2 June 2015

Page 58: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: Second year course

Runs in second term of the second year

They’ve forgotten most of what they did in the first year...

More advanced data analysis

Non-linear fitting, χ2 analysis, analysis of residuals

Computational physics

Matrix calculations (but not quantum mechanics...)Runge Kutta methods

Fast Fourier transforms

Make use of both inbuilt libraries as black boxes and coding fromscratch.

Eg Fourier transforms: start with hand-coded discrete Fouriertransform...

...Compare and contrast with inbuilt (numpy) FFT libraries

Louise Dash (UCL) 2 June 2015

Page 59: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: Second year course

Runs in second term of the second year

They’ve forgotten most of what they did in the first year...

More advanced data analysis

Non-linear fitting, χ2 analysis, analysis of residuals

Computational physics

Matrix calculations (but not quantum mechanics...)Runge Kutta methodsFast Fourier transforms

Make use of both inbuilt libraries as black boxes and coding fromscratch.

Eg Fourier transforms: start with hand-coded discrete Fouriertransform...

...Compare and contrast with inbuilt (numpy) FFT libraries

Louise Dash (UCL) 2 June 2015

Page 60: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: Second year course

Runs in second term of the second year

They’ve forgotten most of what they did in the first year...

More advanced data analysis

Non-linear fitting, χ2 analysis, analysis of residuals

Computational physics

Matrix calculations (but not quantum mechanics...)Runge Kutta methodsFast Fourier transforms

Make use of both inbuilt libraries as black boxes and coding fromscratch.

Eg Fourier transforms: start with hand-coded discrete Fouriertransform...

...Compare and contrast with inbuilt (numpy) FFT libraries

Louise Dash (UCL) 2 June 2015

Page 61: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: Second year course

Runs in second term of the second year

They’ve forgotten most of what they did in the first year...

More advanced data analysis

Non-linear fitting, χ2 analysis, analysis of residuals

Computational physics

Matrix calculations (but not quantum mechanics...)Runge Kutta methodsFast Fourier transforms

Make use of both inbuilt libraries as black boxes and coding fromscratch.

Eg Fourier transforms: start with hand-coded discrete Fouriertransform...

...Compare and contrast with inbuilt (numpy) FFT libraries

Louise Dash (UCL) 2 June 2015

Page 62: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The courses

What we did: Second year course

Runs in second term of the second year

They’ve forgotten most of what they did in the first year...

More advanced data analysis

Non-linear fitting, χ2 analysis, analysis of residuals

Computational physics

Matrix calculations (but not quantum mechanics...)Runge Kutta methodsFast Fourier transforms

Make use of both inbuilt libraries as black boxes and coding fromscratch.

Eg Fourier transforms: start with hand-coded discrete Fouriertransform...

...Compare and contrast with inbuilt (numpy) FFT libraries

Louise Dash (UCL) 2 June 2015

Page 63: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python More challenges (and successes)

Outline

1 Context

2 Why Python?

3 Challenges

4 The courses

5 More challenges (and successes)

6 The future

7 Conclusions

Louise Dash (UCL) 2 June 2015

Page 64: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python More challenges (and successes)

More challenges!

Computing really hard to assess objectively and consistently,

especially with a team of markers...Moodle / Turnitin rubrics very useful but not perfect

First year course in particular challenging

How to stretch experienced students without freaking out the lessconfident?Wide availability of “self-teach” material a double-edged swordStudents considerably more anxious about marks than understandingthe concepts

IPython Notebooks and Vpython don’t work well together,frustratingly!

Louise Dash (UCL) 2 June 2015

Page 65: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python More challenges (and successes)

More challenges!

Computing really hard to assess objectively and consistently,

especially with a team of markers...

Moodle / Turnitin rubrics very useful but not perfect

First year course in particular challenging

How to stretch experienced students without freaking out the lessconfident?Wide availability of “self-teach” material a double-edged swordStudents considerably more anxious about marks than understandingthe concepts

IPython Notebooks and Vpython don’t work well together,frustratingly!

Louise Dash (UCL) 2 June 2015

Page 66: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python More challenges (and successes)

More challenges!

Computing really hard to assess objectively and consistently,

especially with a team of markers...Moodle / Turnitin rubrics very useful but not perfect

First year course in particular challenging

How to stretch experienced students without freaking out the lessconfident?Wide availability of “self-teach” material a double-edged swordStudents considerably more anxious about marks than understandingthe concepts

IPython Notebooks and Vpython don’t work well together,frustratingly!

Louise Dash (UCL) 2 June 2015

Page 67: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python More challenges (and successes)

More challenges!

Computing really hard to assess objectively and consistently,

especially with a team of markers...Moodle / Turnitin rubrics very useful but not perfect

First year course in particular challenging

How to stretch experienced students without freaking out the lessconfident?Wide availability of “self-teach” material a double-edged swordStudents considerably more anxious about marks than understandingthe concepts

IPython Notebooks and Vpython don’t work well together,frustratingly!

Louise Dash (UCL) 2 June 2015

Page 68: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python More challenges (and successes)

More challenges!

Computing really hard to assess objectively and consistently,

especially with a team of markers...Moodle / Turnitin rubrics very useful but not perfect

First year course in particular challenging

How to stretch experienced students without freaking out the lessconfident?

Wide availability of “self-teach” material a double-edged swordStudents considerably more anxious about marks than understandingthe concepts

IPython Notebooks and Vpython don’t work well together,frustratingly!

Louise Dash (UCL) 2 June 2015

Page 69: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python More challenges (and successes)

More challenges!

Computing really hard to assess objectively and consistently,

especially with a team of markers...Moodle / Turnitin rubrics very useful but not perfect

First year course in particular challenging

How to stretch experienced students without freaking out the lessconfident?Wide availability of “self-teach” material a double-edged sword

Students considerably more anxious about marks than understandingthe concepts

IPython Notebooks and Vpython don’t work well together,frustratingly!

Louise Dash (UCL) 2 June 2015

Page 70: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python More challenges (and successes)

More challenges!

Computing really hard to assess objectively and consistently,

especially with a team of markers...Moodle / Turnitin rubrics very useful but not perfect

First year course in particular challenging

How to stretch experienced students without freaking out the lessconfident?Wide availability of “self-teach” material a double-edged swordStudents considerably more anxious about marks than understandingthe concepts

IPython Notebooks and Vpython don’t work well together,frustratingly!

Louise Dash (UCL) 2 June 2015

Page 71: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python More challenges (and successes)

More challenges!

Computing really hard to assess objectively and consistently,

especially with a team of markers...Moodle / Turnitin rubrics very useful but not perfect

First year course in particular challenging

How to stretch experienced students without freaking out the lessconfident?Wide availability of “self-teach” material a double-edged swordStudents considerably more anxious about marks than understandingthe concepts

IPython Notebooks and Vpython don’t work well together,frustratingly!

Louise Dash (UCL) 2 June 2015

Page 72: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python More challenges (and successes)

Successes

Louise Dash (UCL) 2 June 2015

Real progress seen by end of2nd year

Students demonstrateenhanced understanding ofphysics via computing

Page 73: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python More challenges (and successes)

Successes

Louise Dash (UCL) 2 June 2015

Real progress seen by end of2nd year

Students demonstrateenhanced understanding ofphysics via computing

Page 74: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python More challenges (and successes)

Successes

Louise Dash (UCL) 2 June 2015

Real progress seen by end of2nd year

Students demonstrateenhanced understanding ofphysics via computing

Page 75: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The future

Outline

1 Context

2 Why Python?

3 Challenges

4 The courses

5 More challenges (and successes)

6 The future

7 Conclusions

Louise Dash (UCL) 2 June 2015

Page 76: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The future

Integrating computing within the curriculum

Already using IPython notebooks within lecture courses as interactivelecture notes (David Bowler)

1st year, term 2: Waves and optics (mostly plots)

3rd year: Quantum mechanics - making use of matrix mechanics

Some more challenges here:

Students on Natural Sciences program (and students from otherdepartments) haven’t done these computing coursesPartial solution: run “catch-up” conversion workshop from Matlab toPython

Louise Dash (UCL) 2 June 2015

Page 77: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The future

Integrating computing within the curriculum

Already using IPython notebooks within lecture courses as interactivelecture notes (David Bowler)

1st year, term 2: Waves and optics (mostly plots)

3rd year: Quantum mechanics - making use of matrix mechanics

Some more challenges here:

Students on Natural Sciences program (and students from otherdepartments) haven’t done these computing coursesPartial solution: run “catch-up” conversion workshop from Matlab toPython

Louise Dash (UCL) 2 June 2015

Page 78: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The future

Integrating computing within the curriculum

Already using IPython notebooks within lecture courses as interactivelecture notes (David Bowler)

1st year, term 2: Waves and optics (mostly plots)

3rd year: Quantum mechanics - making use of matrix mechanics

Some more challenges here:

Students on Natural Sciences program (and students from otherdepartments) haven’t done these computing coursesPartial solution: run “catch-up” conversion workshop from Matlab toPython

Louise Dash (UCL) 2 June 2015

Page 79: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The future

Integrating computing within the curriculum

Already using IPython notebooks within lecture courses as interactivelecture notes (David Bowler)

1st year, term 2: Waves and optics (mostly plots)

3rd year: Quantum mechanics - making use of matrix mechanics

Some more challenges here:

Students on Natural Sciences program (and students from otherdepartments) haven’t done these computing coursesPartial solution: run “catch-up” conversion workshop from Matlab toPython

Louise Dash (UCL) 2 June 2015

Page 80: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The future

Integrating computing within the curriculum

Already using IPython notebooks within lecture courses as interactivelecture notes (David Bowler)

1st year, term 2: Waves and optics (mostly plots)

3rd year: Quantum mechanics - making use of matrix mechanics

Some more challenges here:

Students on Natural Sciences program (and students from otherdepartments) haven’t done these computing courses

Partial solution: run “catch-up” conversion workshop from Matlab toPython

Louise Dash (UCL) 2 June 2015

Page 81: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The future

Integrating computing within the curriculum

Already using IPython notebooks within lecture courses as interactivelecture notes (David Bowler)

1st year, term 2: Waves and optics (mostly plots)

3rd year: Quantum mechanics - making use of matrix mechanics

Some more challenges here:

Students on Natural Sciences program (and students from otherdepartments) haven’t done these computing coursesPartial solution: run “catch-up” conversion workshop from Matlab toPython

Louise Dash (UCL) 2 June 2015

Page 82: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The future

The Future

Plan to extend the use of IPython Notebooks within lecture courses

Early stages of planning new lecture course where the physics will beentirely assessed by IPython Notebook computation rather thanwritten exam.

Louise Dash (UCL) 2 June 2015

Page 83: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python The future

The Future

Plan to extend the use of IPython Notebooks within lecture courses

Early stages of planning new lecture course where the physics will beentirely assessed by IPython Notebook computation rather thanwritten exam.

Louise Dash (UCL) 2 June 2015

Page 84: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Conclusions

Outline

1 Context

2 Why Python?

3 Challenges

4 The courses

5 More challenges (and successes)

6 The future

7 Conclusions

Louise Dash (UCL) 2 June 2015

Page 85: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Conclusions

Conclusions

Have rewritten core computing courses in years 1 and 2

Extensive use of IPython notebooks enable enhanced understandingof physics

Extending this to fully embed computational physics within thecurriculum

Acknowledgments:

Demonstrator teams on PHAS1240 and PHAS2441

Dr David Bowler (lecturing with IPython Notebooks)

Louise Dash (UCL) 2 June 2015

Page 86: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Conclusions

Conclusions

Have rewritten core computing courses in years 1 and 2

Extensive use of IPython notebooks enable enhanced understandingof physics

Extending this to fully embed computational physics within thecurriculum

Acknowledgments:

Demonstrator teams on PHAS1240 and PHAS2441

Dr David Bowler (lecturing with IPython Notebooks)

Louise Dash (UCL) 2 June 2015

Page 87: Teaching Physics with Python - For all · 2020-02-19 · Teaching Physics with Python Context Context Nearing the end of a total reorganization of our core computing courses Previous

Teaching Physics with Python Conclusions

Conclusions

Have rewritten core computing courses in years 1 and 2

Extensive use of IPython notebooks enable enhanced understandingof physics

Extending this to fully embed computational physics within thecurriculum

Acknowledgments:

Demonstrator teams on PHAS1240 and PHAS2441

Dr David Bowler (lecturing with IPython Notebooks)

Louise Dash (UCL) 2 June 2015