Skip to content

This is a repository for lab materials for the Spring, 2017 AST200 course at Amherst College. Solutions, readings, discussions and the gradebook can all be found on the course Moodle site.

License

Notifications You must be signed in to change notification settings

kfollette/ASTR200-Spring2017

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASTR200-Spring2017

This repo contains labs, homework assignments and a couple of notebook-based lectures for the Spring 2017 ASTR 200 ("Practical Astronomy") course at Amherst College. Please contact Kate Follette at [email protected] with any questions.

These materials may be reproduced for educational purposes only. Many of the contents were adapted from publicly-available Python course materials developed by other instructors, in which case there are links at the top of the lab notebooks pointing to the original materials.

Contents of the Labs are as follows (also in labcontents.txt in Lab folder):

Lab 1 - First Steps in Python

  1. Jupyter
    • Jupyter Intro
    • Jupyter cautions
  2. Using Jupyter as a calculator
  3. Variables
  4. Arrays
    • Defining arrays
    • Array manipulation
    • Multidimensional arrays
    • Array attributes

Lab 2: Functions and Control Flow

  1. Python Functions
  • Basic functions
  • Modules and importing
  • Optional and default arguments
  1. Conditional Statements and Control Flow
  • The if statement and comparison operators
  • Iteration
  • Exception handling

Lab 3 - Working with Units, Quantities and Equations

  1. The Astropy Units Package
  • Basic Units
  • Composite Units
  • Quantity Objects
  • Pysical Constants
  • Sidebar - Attributes
  • Quantity Attributes
  • Combining Quantities
  • Converting Units
  • Decomposing Units
  • Integration with Numpy ufuncs
  • Known issues
  • Defining new units
  1. Typesetting with LaTeX
  • Equations
  • Special Symbols
  • Superscripts and Subscripts
  • Fractions
  • Other Math Symbols

Lab 4 - More Practice with Functions

  1. User-specified Input
  2. More about manipulating strings
  • Special Characters
  • Concatenating Strings
  • Multiple Concatenations
  • Comparing Strings
  1. More about conditionals
  • One-line Conditionals
  • While and Iteration
  • Break Statements
  1. Writing and Reading Files with Magic Commands

Lab 5 - Return Statements and Plotting Basics

  1. Python Return Statements
  • Functions Without Returns
  • Return Statements as Code Breaks
  • Return Statements for Assigned Output
  1. Basic Python Plotting

Lab 6 - Advanced Data Structures

  1. Tuples
  • Defining Tuples
  • Indexing Tuples
  • Tuple Modification
  1. Lists
  • Defining Lists
  • Indexing Lists
  • Extending and Appending Lists
  • Searching, Sorting and Counting Lists
  • Exploring List Methods
  • Iterating over lists
  • The range function
  • Creating lists on the fly
  1. Sets
  2. Dictionaries
  • Defining Disctionaries
  • Dictionary Keys

Lab 7 - Python Tables

  1. Astropy Tables
  • Constructing Tables
  • Displaying Tables in Notebook
  • Indexing Tables
  • Modifying Tables
  • Converting Tables to Numpy
  • Masking Tables
  • High-level Table Operations
  • Reading and Writing Tabular Data
  1. Pandas

Lab 8 - Plotting in 2D

  1. Plotting 2D Data
  • Generating 2D data
  • Contour plots
  • Raster, or "heatmap", plots
  1. Multipanel Plots

Lab 9 - Data Investigation 1 (Week 1) - Educational Research Data

  1. Background Information
  • Intro to the Second Half of the Class
  • Intro to Dataset 1: The Quantitative Reasoning for College Science Assessment
  1. Investigating Tabular Data with Pandas
  • Reading in and Cleaning Data
  • The describe() Method
  • Computing Descriptive Statistics
  • Creating Statistical Graphics
  • Selecting a Subset of Data
  1. Testing Differences Between Datasets
  • Computing Confidence Intervals
  • Visualizing Differences with Overlapping Plots
  1. Data Investigation 1 - Week 2 Instructions

Lab 11 - Data Investigation 2 (Week 1) - Exoplanet Database

  1. Introduction to the Exoplanet Database
  2. Adding a Third Dimension to Scatterplots
  3. Computing Correlation Coefficients
  4. Data Investigation 2 - Week 2 Instructions

Lab 13 Data Investigation 3 (Week 1) - Variable Star Database

  1. Introduction to the Variable Star Database
  2. Exercises
  3. Data Investigation 3 - Week 2 Instructions

About

This is a repository for lab materials for the Spring, 2017 AST200 course at Amherst College. Solutions, readings, discussions and the gradebook can all be found on the course Moodle site.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published