Course Overview
Pocket Observatory
Your observatory has readings to make sense of: a grid of sky brightness, a set of sound levels, and counts collected over time. You'll use NumPy to organise those values and work on many of them at once.
You don't need astronomy knowledge. The examples use small datasets you can inspect by eye. Some demonstrations visit an arcade or a sound board; the following exercise uses different data so you can practise the idea rather than copy an answer.
Before you start
You should be comfortable with Python variables, lists, loops, functions, and indexing. We'll explain NumPy's array layouts and operations as we meet them. Nothing needs to be installed to use the course editor.
How you'll practise
Most topics begin with a working main.py and one small change to make. The next exercise asks you to write a related operation yourself.
- Run shows your program's output. Compare it with the checkpoint in the lesson.
- Submit checks the numbered tasks. You can submit partly finished work to see which steps are working.
- A section quiz checks the ideas you've just practised.
The opening runnable examples are for reading and comparison. After those, you'll spend most of your time editing code. Projects bring several earlier skills together without requiring a new dataset or external service.
The course path
- Launchpad: turn lists into arrays, build grids and stacks, and read their shapes.
- Array Factory: generate sequences and starter grids, then choose suitable number types.
- Find the Signal: select readings and see when a slice shares its original data.
- Tune the Signal: apply arithmetic and corrections across arrays of compatible shapes.
- Read the Patterns: reduce rows or columns to totals and describe a set of readings.
- Point the Array: transpose grids and combine measurements with matrix operations.
- Observation Lab: rearrange shapes, read a small CSV, and put the tools together in a final project.
Random examples use a seed so you can repeat an experiment. Other examples use fixed inputs. You won't need to guess which readings a task started with.
Begin with What is NumPy? You'll compare a familiar Python loop with an array calculation that produces the same result.
Syllabus
- Mark ticks and intervals
- Exercise: Schedule sensor samples
- Reserve blank and active grids
- Exercise: Prime observation panels
- Build patterns without loops
- Exercise: Wire a sensor pattern
- Replay seeded samples
- Exercise: Simulate three station feeds
- Choose and convert element types
- Exercise: Label observation types
- ✦Module Quiz
- Scale every reading
- Exercise: calibrate a pressure series
- Combine matching readings
- Exercise: find sensor agreement
- Find a usable band
- Exercise: flag an observation window
- Apply functions to a full array
- Exercise: transform a light curve
- Reuse column offsets across rows
- Exercise: correct a horizon map
- Give each grid row its own baseline
- Exercise: calibrate rows and reject bad shapes
- ✦Module Quiz