My Account Log in

1 option

Astronomical Python : an introduction to modern scientific programming / Imad Pasha.

Institute of Physics - IOP eBooks AAS-IOP Astronomy 2023 Collection Available online

View online
Format:
Book
Author/Creator:
Pasha, Imad, author.
Contributor:
Institute of Physics (Great Britain), publisher.
Series:
IOP (Series). Release 23.
AAS-IOP astronomy. 2023 collection.
[IOP release $release]
AAS-IOP astronomy. [2023 collection], 2514-3433
Language:
English
Subjects (All):
Astronomy--Data processing.
Astronomy.
Statistical astronomy.
Python (Computer program language).
Physical Description:
1 online resource (various pagings) : illustrations (some color).
Place of Publication:
Bristol [England] (Temple Circus, Temple Way, Bristol BS1 6HG, UK) : IOP Publishing, [2024]
System Details:
Mode of access: World Wide Web.
System requirements: Adobe Acrobat Reader, EPUB reader, or Kindle reader.
Biography/History:
Imad Pasha is an NSF Graduate Research Fellow and PhD candidate at Yale University. Before Yale, he earned Bachelors degrees in Physics and Astrophysics from University of California, Berkeley, as well as a minor in Creative Writing. He worked as a reporter, senior editor, and photographer at The Daily Californian, the newspaper of record in Berkeley, CA. At Yale, his research has focused broadly on the processes driving galaxy evolution. He is interested in particular in how gas is accreted onto galaxies from the cosmic web, processed into stars, and (partially) expelled back out into the intergalactic medium, to be potentially later re-accreted.
Summary:
Over the past two decades, Python has become the de facto standard language of data science both in industry and astronomy (with the exception of simulations and other extreme scale computing problems). This course text is a full introduction to programming in Python with an explicit focus on astrophysical applications. The book covers the fundamentals of Python, including the native data types and operations, and how the language, interpreter, and operating system work together. Leaning heavily on standard packages used in astronomy, the book covers the installation and basic structure of the language and libraries; script writing, conditional statements, loops, and other code structures that allow for complex outcome management; the creation and use of functions and classes within Python; the creation of packages and the methods for re-using, importing, and otherwise standardizing code; and plotting. Finally, the book contains several higher level chapters that carry students from the beginner stage of programming into the intermediate.
Contents:
1. Introduction
1.1. How to use this book?
1.2. Data availability
part I. Unix and basic Python. 2. Essential Unix skills
2.1. Operating systems
2.2. Anatomy of the terminal
2.3. Common UNIX commands
2.4. Cancelling commands
2.5. Tab complete
2.6. Intermediate shell commands
2.7. SSH and servers
2.8. Profiles
2.9. Summary
3. Installing Python and the astronomy stack
3.1. Prerequisites
3.2. Python environments
3.3. Editors
3.4. Summary
4. Introduction to Python
4.1. Variables
4.2. Importing external libraries
4.3. Comments
4.4. Data types
4.5. Indexing
4.6. Slicing
4.7. Operations
4.8. Reserved words
4.9. Filtering and masking
4.10. Conditional statements
4.11. Loops and iterators
4.12. Cancelling code execution
4.13. Shell and shell-like commands in Python
4.14. Interpreting error messages
4.15. Handling exceptions
4.16. Summary
part II. Core research libraries. 5. Visualization with Matplotlib
5.1. Introduction
5.2. A simple plot
5.3. Figures and axes
5.4. Subplots
5.5. Adjusting marker properties
5.6. Adjusting ticks
5.7. Adjusting fonts and fontsizes
5.8. Multiple subplots
5.9. Subplot mosaic
5.10. Research example : displaying a best fit
5.11. Errorbars
5.12. Plotting n-dimensional data
5.13. Colorbars
5.14. Summary
6. Numpy
6.1. Introduction
6.2. The array
6.3. Precision
6.4. Key library functions
6.5. Research example : an exoplanet transit
6.6. Summary
7. SciPy
7.1. Introduction
7.2. Numerical integration
7.3. Optimization
7.4. Statistics
7.5. Summary
8. Astropy and associated packages
8.1. Introduction
8.2. Units and constants
8.3. Cosmological calculations
8.4. Coordinates
8.5. Astroquery
8.6. Research example : automatic offsets
8.7. Research example : handling astronomical images
8.8. Summary
part III. Intermediate applications and patterns. 9. Functions and functional programming
9.1. Introduction
9.2. Defining functions
9.3. Writing documentation
9.4. Checking function inputs
9.5. Local scope and global scope
9.6. Chaining functions together
9.7. The concept of main()
9.8. Keyword (optional) arguments
9.9. Packing and unpacking function arguments
9.10. Testing function outputs : unit testing
9.11. Type-hinting
9.12. Summary
10. Classes and object oriented programming
10.1. Introduction
10.2. Defining classes
10.3. Setters and getters
10.4. Representation
10.5. Subclasses (and superclasses)
10.6. Static methods
10.7. Abstract base classes
10.8. Summary
11. Data science with astronomical catalogs
11.1. Introduction
11.2. Filetypes and reading in data
11.3. Working with tabular data in pandas
11.4. Research example : analysis with 3DHST
11.5. Summary
12. Vectorization and runtime improvements
12.1. Introduction
12.2. Identifying bottlenecks
12.3. Fast array operations with Numpy
12.4. Jax
12.5. Summary
13. Astronomical inference
13.1. Introduction
13.2. Fitting a line to data
13.3. X 2 fitting
13.4. Bayesian inference
13.5. Summary
14. Software development
14.1. Introduction
14.2. Why (and when) to make a Python package a Python package
14.3. Organizing packages : modules and submodules
14.4. Custom exceptions and warnings
14.5. Installation and development
14.6. Github and version control
14.7. Summary
15. Concluding remarks
15.1. Concluding remarks.
Notes:
"Version: 20240501"--Title page verso.
Includes bibliographical references.
Title from PDF title page (viewed on June 1, 2024).
Other Format:
Print version:
ISBN:
9780750351478
9780750351461
OCLC:
1435473313
Access Restriction:
Restricted for use by site license.

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account