Essential Python for the physicist /
Saved in:
Author / Creator: | Moruzzi, Giovanni. |
---|---|
Imprint: | Cham : Springer, 2020. |
Description: | 1 online resource (304 p.) |
Language: | English |
Subject: | |
Format: | E-Resource Book |
URL for this record: | http://pi.lib.uchicago.edu/1001/cat/bib/12605679 |
Table of Contents:
- Intro
- Preface
- Contents
- 1 Python Basics and the Interactive Mode
- 1.1 Using the Command Line
- 1.2 Installing Python
- 1.2.1 General
- 1.2.2 Downloading Python for Windows
- 1.2.3 Downloading Python for macOS
- 1.3 Using Python in Interactive Mode
- 1.4 Variables
- 1.4.1 Variable Types
- 1.4.2 Variable-Type Conversion
- 1.5 Arithmetic Operators
- 1.6 Assignment Operators
- 1.7 Comparison and Logical Operators
- 1.8 Python Packages and the import Statement
- 1.9 Conditional Statements
- 1.10 Lists and Tuples
- 1.11 List Methods
- 1.12 Lists and the = Assignment Operator
- 1.12.1 Copying Lists
- 1.12.2 Copying the Elements of Lists and Tuples
- 1.13 Slicing Lists and Strings
- 1.14 Dictionaries
- 1.15 The print() Function and Formatting
- 1.15.1 Old Style
- 1.15.2 New Style
- 1.15.3 Format Types and Flags
- 1.16 Loops
- 1.16.1 The for Loop
- 1.16.2 The while Loop
- 1.16.3 Breaking a Loop
- 1.16.4 The continue Statement
- 1.17 Operations with Matrices and Vectors
- 1.17.1 Lists and Arrays
- 1.17.2 Slicing out Rows and Columns from a Matrix
- 1.17.3 Arrays and Matrix Arithmetics
- 1.17.4 Further Matrix Operations
- 1.18 Exiting Interactive Mode
- 1.19 Exercises
- 2 Python Scripts
- 2.1 Scripts
- 2.1.1 Running Scripts on a Terminal
- 2.1.2 Running Scripts on Spyder3
- 2.1.3 A First Script
- 2.2 Functions
- 2.2.1 General
- 2.2.2 Local and Global Variables
- 2.3 Reading and Writing Files
- 2.4 Calling External Commands from Python Scripts
- 2.5 Exercises
- 3 Plotting with Matplotlib
- 3.1 Pyplot
- 3.2 Plotting Lists of Numbers
- 3.3 Plotting Functions
- 3.4 Multiple Figures
- 3.5 Logarithmic Axis Scales
- 3.6 Plotting Field Lines
- 3.7 Pyplot Animation
- 3.8 Exercises
- 4 Numerical Solution of Equations
- 4.1 Introduction
- 4.2 Systems of Linear Equations
- 4.3 Nonlinear Equations
- 4.3.1 Common Methods for the Numerical Solution
- 4.3.2 Bisection Method
- 4.3.3 The Secant Method
- 4.4 Root Finding with the scipy.optimize Package
- 4.5 Algebraic Equations
- 4.6 Systems of Nonlinear Equations
- 4.6.1 Equations Involving only Unknowns
- 4.6.2 Equations Involving Unknowns and Parameters
- 4.7 Integration of Functions
- 4.7.1 Introduction
- 4.7.2 Rectangular and Trapezoidal Rules
- 4.7.3 The Simpson Rule
- 4.7.4 The scipy.integrate.simps Function
- 4.8 Exercises
- Reference
- 5 Numerical Solution of Ordinary Differential Equations (ODE)
- 5.1 Introduction
- 5.2 Euler and Runge-Kutta Methods
- 5.3 The scipy.integrate.odeint Function
- 5.4 Large-Amplitude Pendulum
- 5.5 The Shooting Method
- 5.5.1 The Finite Square Well
- 5.5.2 The Shooting Method
- 5.5.3 The Harmonic Oscillator
- 5.6 Exercises
- Reference
- 6 Tkinter Graphics
- 6.1 Tkinter
- 6.2 The Root Window and Tkinter Color Management
- 6.3 Drawing Geometric Shapes on the Canvas
- 6.4 Plotting a Function with Tkinter