Effective Computation in Physics - Anthony Scopatz, Kathryn D. Huff

Effective Computation in Physics

Field Guide to Research with Python
Buch | Softcover
528 Seiten
2015
O'Reilly Media (Verlag)
978-1-4919-0153-3 (ISBN)
49,35 inkl. MwSt
More physicists today are taking on the role of software developer as part of their research, but software development isn’t always easy or obvious, even for physicists. This practical book teaches essential software development skills to help you automate and accomplish nearly any aspect of research in a physics-based field.

Written by two PhDs in nuclear engineering, this book includes practical examples drawn from a working knowledge of physics concepts. You’ll learn how to use the Python programming language to perform everything from collecting and analyzing data to building software and publishing your results.

In four parts, this book includes:
  • Getting Started: Jump into Python, the command line, data containers, functions, flow control and logic, and classes and objects
  • Getting It Done: Learn about regular expressions, analysis and visualization, NumPy, storing data in files and HDF5, important data structures in physics, computing in parallel, and deploying software
  • Getting It Right: Build pipelines and software, learn to use local and remote version control, and debug and test your code
  • Getting It Out There: Document your code, process and publish your findings, and collaborate efficiently; dive into software licenses, ownership, and copyright procedures

Anthony Scopatz is a computational physicist and long time Python developer, Anthony holds his BS in Physics from UC, Santa Barbara and a Ph.D. in Mechanical / Nuclear Engineering from UT Austin. A former Enthought employee, he spent his post-doctoral studies at the FLASH Center at the University of Chicago in the Astrophysics Department. He is currently a Staff Scientist at the University of Wisconsin-Maidson in Engineering Physics. Anthony's research interests revolve around essential physics modeling of the nuclear fuel cycle, and information theory & entropy. Anthony is proudly a fellow of the Python Software Foundation and has published and spoken at numerous conferences on a variety of science & software development topics.

Kathryn Huff is a Nuclear Science and Security Consortium postdoctoral scholar at the University of California Berkeley. In 2013, she received her Ph.D. in Nuclear Engineering from the University of Wisconsin Madison. She also holds a bachelor's degree in Physics from the University of Chicago. She has participated in varied research including experimental cosmological astrophysics, experimental non-equilibrium granular material phase dynamics, computational nuclear fuel cycle analysis, and computational reactor accident neutronics. At Wisconsin, she was a founder of The Hacker Within scientific computing group and has been an instructor for Software Carpentry since 2011. Among other professional service, she is currently an executive officer in two professional divisions of the American Nuclear Society and in 2014 she will serve a second consecutive year as the Technical Program Co-Chair of the Scientic Computing with Python (SciPy) conference.

Getting Started
Chapter 1Introduction to the Command Line
Navigating the Shell
Manipulating Files and Directories
Getting Help
Permissions and Sharing
The Environment
Scripting with Bash
Command Line Wrap-up
Chapter 2Programming Blastoff with Python
Running Python
Comments
Variables
Special Variables
Operators
Strings
Modules
Python Wrap-up
Chapter 3Essential Containers
Lists
Tuples
Sets
Dictionaries
Containers Wrap-up
Chapter 4Flow Control and Logic
Conditionals
Exceptions
Loops
Flow Control and Logic Wrap-up
Chapter 5Operating with Functions
Functions in Python
Keyword Arguments
Variable Number of Arguments
Multiple Return Values
Scope
Recursion
Lambdas
Generators
Decorators
Function Wrap-up
Chapter 6Classes and Objects
Object Orientation
Objects
Classes
Decorators and Metaclasses
Object Orientation Wrap-up
Getting It Done
Chapter 7Analysis and Visualization
Preparing Data
Loading Data
Cleaning and Munging Data
Analysis
Visualization
Analysis and Visualization Wrap-up
Chapter 8Regular Expressions
Messy Magnetism
Metacharacters on the Command Line
grep, sed, and awk
Finding Patterns in Files (grep)
Finding and Replacing Patterns in Files (sed)
Manipulating Columns of Data (awk)
Python Regular Expressions
Regular Expressions Wrap-up
Chapter 9NumPy: Thinking in Arrays
Arrays
dtypes
Slicing and Views
Arithmetic and Broadcasting
Fancy Indexing
Masking
Structured Arrays
Universal Functions
Other Valuable Functions
NumPy Wrap-up
Chapter 10Storing Data: Files and HDF5
Files in Python
An Aside About Computer Architecture
Big Ideas in HDF5
File Manipulations
Hierarchy Layout
Chunking
In-Core and Out-of-Core Operations
Querying
Compression
HDF5 Utilities
Storing Data Wrap-up
Chapter 11Important Data Structures in Physics
Hash Tables
Data Frames
B-Trees
K-D Trees
Data Structures Wrap-up
Chapter 12Performing in Parallel
Scale and Scalability
Problem Classification
Example: N-Body Problem
No Parallelism
Threads
Multiprocessing
MPI
Parallelism Wrap-up
Chapter 13Deploying Software
Deploying the Software Itself
Deploying to the Cloud
Deploying to Supercomputers
Deployment Wrap-up
Getting It Right
Chapter 14Building Pipelines and Software
make
Building and Installing Software
Installation
Building Software and Pipelines Wrap-up
Chapter 15Local Version Control
What Is Version Control?
Getting Started with Git
Local Version Control with Git
Version Conrol Wrap-Up
Chapter 16Remote Version Control
Repository Hosting (github.com)
Creating a Repository on GitHub
Declaring a Remote (git remote)
Sending Commits to Remote Repositories (git push)
Downloading a Repository (git clone)
Fetching the Contents of a Remote (git fetch)
Merging the Contents of a Remote (git merge)
Pull = Fetch and Merge (git pull)
Conflicts
Resolving Conflicts
Remote Version Control Wrap-up
Chapter 17Debugging
Encountering a Bug
Print Statements
Interactive Debugging
Debugging in Python (pdb)
Profiling
Linting
Debugging Wrap-up
Chapter 18Testing
Why Do We Test?
When Should We Test?
Where Should We Write Tests?
What and How to Test?
Running Tests
Edge Cases
Unit Tests
Integration Tests
Regression Tests
Test Generators
Test Coverage
Test-Driven Development
Testing Wrap-up
Getting It Out There
Chapter 19Documentation
Why Prioritize Documentation?
Types of Documentation
Automation
Documentation Wrap-up
Chapter 20Publication
Document Processing
Text Editors
Markup Languages
Publication Wrap-up
Chapter 21Collaboration
Ticketing Systems
Pull Requests and Code Reviews
Collaboration Wrap-up
Chapter 22Licenses, Ownership, and Copyright
What Is Copyrightable?
Right of First Publication
What Is the Public Domain?
Choosing a Software License
Berkeley Software Distribution (BSD) License
GNU General Public License (GPL)
Creative Commons (CC)
Other Licenses
Changing the License
Copyright Is Not Everything
Licensing Wrap-up
Chapter 23Further Musings on Computational Physics
Where to Go from Here

Erscheint lt. Verlag 4.8.2015
Verlagsort Sebastopol
Sprache englisch
Maße 178 x 230 mm
Gewicht 920 g
Einbandart Paperback
Themenwelt Informatik Programmiersprachen / -werkzeuge Python
Mathematik / Informatik Informatik Software Entwicklung
Mathematik / Informatik Informatik Theorie / Studium
Naturwissenschaften Physik / Astronomie Allgemeines / Lexika
Schlagworte Physik • Python (Programmiersprache) • Python (Programmiersprache); Spezielle Anwendungsbereiche • Softwareentwicklung
ISBN-10 1-4919-0153-5 / 1491901535
ISBN-13 978-1-4919-0153-3 / 9781491901533
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
das umfassende Handbuch

von Johannes Ernesti; Peter Kaiser

Buch | Hardcover (2023)
Rheinwerk (Verlag)
44,90
Grundlagen und Praxis der Python-Programmierung

von Paul Barry

Buch | Softcover (2024)
O'Reilly (Verlag)
49,90