ASTR 430 ยท Lecture 07

Lecture 07: Reproducible Coding and Environments

Research Methods in Astronomy

Reproducibility is engineered through explicit inputs, deterministic transformations, tests, and a discoverable environment.

Objectives and route

Terms for This Lecture

Pure function

Definition: A computation whose output depends only on explicit inputs and that produces no hidden side effects.

Why it matters here: In Reproducible Coding and Environments, Pure function is needed to reason about pure functions, pinned environments, tests, notebooks, and manifests rather than merely label the phenomenon.

Relationship: It is interpreted alongside Pinned environment and the lecture relation below; identify which quantities are observed, calibrated, or model-derived.

Limitation or common confusion: Reproducibility is testable when expected inputs and outputs are explicit.

\(f(data;code,dependencies,seed)->result+metadata\)

Why the method matters

Reproducibility is engineered through explicit inputs, deterministic transformations, tests, and a discoverable environment.

Keep observation, calibration, transformation, model, and claim separate so each can be challenged.

function-test-environment
pure functions, pinned environments, tests, notebooks, and manifests. The geometry distinguishes inputs, transformations, and inferential limits.

Formal object

\(f(data;code,dependencies,seed)->result+metadata\)

Define fields, units, defaults, version identifiers, and the boundary between measured, adopted, and inferred quantities.

Read the evidence

Identify which part is input, transformation, and claim. A caption should let a reader reproduce the path without asking the author what was omitted.

function-test-environment
pure functions, pinned environments, tests, notebooks, and manifests. The geometry distinguishes inputs, transformations, and inferential limits.

Worked audit

A deterministic function with a fixed seed and invariant test exposes hidden state.

Reproducibility is testable when expected inputs and outputs are explicit.

Estimate direction first, record units or decision criteria, then test one assumption. This check is generated from shared ASTR430 values.

Failure modes

Active reasoning

Prompt: A fixed seed and one invariant test expose hidden state that a polished notebook can conceal.

What would you record so a skeptical collaborator could rerun or challenge the conclusion?

Paired workshop

The workshop turns this method into a reproducible artifact: a query manifest, screening log, uncertainty table, figure critique, time budget, or proposal review. The deliverable includes result and provenance.

Takeaways

Exact source anchors

Astropy citation guidance; Python Packaging User Guide, reproducible environments.

Archive, software, and ethics citations with verification status are in reference-log.md.