Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Beginning Python visualization (2nd ed.)
Vaingast S., Apress, Berkeley, CA, 2014. 416 pp. Type: Book (978-1-484200-53-7)
Date Reviewed: Jan 2 2015

Any scientist or engineer confronting the task of analyzing a mountain of data from an experiment or simulation is quite aware of the truth of the statement that a picture is worth a thousand words. Reducing tables of numbers into a graphic is both a tool and a goal in conducting the investigation. Python is a full-featured object-oriented programming and scripting language with a set of software libraries that give a scientist or engineer everything needed for analyzing data visually. The simpler syntax of Python versus C++ lowers the overhead of learning the language and permits its users to become productive more quickly. Likewise, its capability of being used as a scripting language from its monitor prompt as well as in the form of full programs gives Python a versatility lacking in the other languages depending on the compile - link edit - execute cycle.

Scientists or engineers who have collected lots of data are the primary audience of this book. The first chapter presents a motivational and illustrative case study of visualizing GPS data. It shows how Python can be used, the libraries that are needed, how Python communicates with the GPS device through the computer’s ports, file processing, and the generation of the graphics. The case study is developed incrementally until a final product is completed. The power of Python and its libraries is well demonstrated.

Acquiring Python and the libraries needed for visualization are the topics of the second chapter. Both Unix-related operating systems and Windows are treated evenhandedly. Uniform resource locators (URLs) for the key libraries (NumPy, SciPy, mathplotlib) are given to minimize the needed for searching. In addition, other software tools supporting software development and version control are mentioned with URLs to the appropriate websites. There is only a little discussion of the differences between Python 2.7.X and 3.X languages, primarily on how integer versus floating point division is handled and how to write statements so that these differences can be overcome. The examples in the book were all written and tested in Python 3.3.0.

The third chapter is a quick survey of the Python programming language. Obviously, there is much more to Python than can be thoroughly covered in a single chapter, but it is a good introduction to the features of the language that will most frequently be needed for data visualization. Most of the more complicated features, especially the object-oriented capabilities of Python and the scientifically important data structures of vectors and arrays, are shown in the context of applications in later chapters. A more comprehensive (and heftier) textbook on Python is advisable to lay a good foundation for skillful programming.

Chapters 4 and 5 are related because they discuss data organization and processing text files. Binary files are discussed more thoroughly in chapter 10. The primary type of text file is the CSV file that can be read by spreadsheets and other software tools, as well as by the human reader. Syntax for opening, closing, reading, and appending files is discussed. The use of the scripting features of Python from the monitor prompt figures prominently in showing how files can be manipulated.

Chapter 6 is the first chapter after the initial case study to discuss graphical visualization. All types of graphs are demonstrated, from simple 2D histograms to 3D plots. The mathplotlib library featured in this chapter supports both 2D and 3D plots.

The emphasis of chapter 7 is the ability of Python to handle the mathematics of real and complex numbers in the math and cmath libraries. The use of fractals, in particular the development of the display of the Mandelbrot set and Newton’s fractal (based on the Newton-Raphson method), animates this discussion in the first part of the chapter. Although the pictures in the book are grayscale, the code examples have RGB color assignments. The chapter concludes with less dramatic examples of probability calculations, mortgages, and Fourier expansions of waves.

The primary scientific topic in chapter 8 is signal processing, but discussion of that topic is not begun until numerical integration, polynomial fitting, and numerical solution of equations are first treated. Codes for feature extraction, windowing, filtering, and the fast Fourier transform are all discussed as part of the signal processing segment.

Processing images is the subject of chapter 9. The use of Python for image processing includes annotating images, converting file formats, and creating and editing images. These important tasks are only the introductory topics in this chapter. The chapter concludes with an extended example of counting objects in an image. The example is based on a simulation of a field of stars and the goal of the program is to count the number of stars generated in the image.

The last chapter is on advanced file processing. The types of files studied are binary and random access files, converting NumPy arrays to files and vice versa, command-line parameters as files, and manipulating files and directories.

The last chapter is followed by an appendix with additional code segments supporting tasks earlier in the book.

This is a very practical book. It has superb applications, good writing, a complete downloadable zip file of programs and data from the publisher for practice and study, and excellent references for further reading and study at the end of each chapter. Python belongs in the scientific or engineering laboratory. This book shows how to use it in that setting.

More reviews about this item: Amazon

Reviewer:  Anthony J. Duben Review #: CR143048 (1504-0255)
Bookmark and Share
  Reviewer Selected
Featured Reviewer
 
 
General (D.1.0 )
 
 
Python (D.3.2 ... )
 
Would you recommend this review?
yes
no
Other reviews under "General": Date
Problems in programming
Vitek A., Tvrdy I., Reinhardt R., Mohar B. (ed), Martinec M., Dolenc T., Batagelj V. (ed), John Wiley & Sons, Inc., New York, NY, 1991. Type: Book (9780471930174)
Aug 1 1992
KNOs: KNowledge acquisition, dissemination, and manipulation Objects
Tsichritzis D., Fiume E., Gibbs S., Nierstrasz O. ACM Transactions on Information Systems 5(1): 96-112, 1987. Type: Article
Nov 1 1987
Programmer perceptions of productivity and programming tools
Hanson S. (ed), Rosinski R. Communications of the ACM 28(2): 180-189, 1985. Type: Article
Jul 1 1985
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy