Guide to the Worked-Example Code#
Each chapter has a corresponding Python file, located at code/chapter_XX.py. These scripts generate the PDF figures in the main text and also provide a starting point for reproducing the order-of-magnitude estimates of each experiment. Formula definitions follow their first appearance in the main text; the code turns those formulas into checkable curves, scalings, simulated data, and error budgets.
Contents and Run Order#
First read
code/README.mdto confirm the Python version, the required packages, and the output directory.Look at
code/plot_style.pyandcode/plot_recipes.pyto understand the unified fonts, colors, line widths, and save functions.Run a single-chapter script, for example
python code/chapter_20.py. A single-chapter script should generate only that chapter’s figures and should not modify other chapters.Check that the PDFs are written to
figures/generated/chapter_XX/.Compile
main_nature.texand confirm that the figure numbers, captions, in-text references, and PDF layout are all consistent.
Correspondence Between Scripts and Text#
Chapter |
Typical figure or computation |
Points to check |
|---|---|---|
1–2 |
Event tables, Poisson counts, ordinary light curves, and information loss |
Event-table fields in the figures match the symbols in the text. |
3–4 |
Light states, occupation numbers, \(g^{(1)}\), \(g^{(2)}\), multimode dilution |
Do not draw idealized single-mode results as if they were real instrumental observations. |
5 |
Visibility, uniform disk, binary stars, SII SNR, missing phase |
Axes carry units; use \(B_\perp\) for the baseline, not the physical array separation. |
6 |
Detector response, jitter, dead time, background dilution, data rate |
Normalize the response kernel; make the time units explicit. |
7 |
Pair count, time-shift background, covariance, and Fisher scaling |
Draw accidental coincidences and physical correlations separately. |
8 |
Rayleigh curse, SPADE mode probabilities, QFI, and SII Fisher |
In the small-separation limit, do not use a log axis to manufacture a false improvement. |
9–13 |
Radiation mechanisms, stars, compact objects, black holes, and transient toy models |
Typical parameters come from the text; do not merely plot arbitrarily normalized curves. |
14–17 |
Propagation, polarization, new physics, CMB, and quantum-network resources |
Ordinary astrophysical terms and new-physics terms must be drawn separately. |
18–22 |
Error budgets, science cases, teaching experiments, pitfalls, and roadmap |
Captions should state the feasibility, the failure modes, or the decision boundary. |
Minimum Requirements for Each Figure#
Check item |
Requirement |
|---|---|
Physical quantity |
Axes state the quantity name and units clearly; dimensionless quantities must be explicitly labeled dimensionless or have units omitted. |
Order of magnitude |
At least one curve, point, or annotation should correspond to a real order of magnitude from the text. Pedagogically amplified signals must be flagged in the caption. |
Symbols |
Symbols in the figure should match the text, for example \(B_\perp\), \(\lambda\), \(\theta\), \(R_\gamma\), \(\Delta t\), \(\tau_c\). |
Output |
All main-text figures use PDF; no screenshots or low-resolution bitmaps. |
Style |
Use the unified style; avoid overly dense grids, too many colors, and decoration with no physical meaning. |
Reproducibility |
A comment at the top of the script or on the function should state the input parameters, default values, and output files. |
Debugging Checklist#
If a figure looks inconsistent with the text, check these issues first:
Minimum Submission Package for the Course Project#
When submitting the course project in Chapter Teaching Experiments and Computational Experiments, include at least five files or objects: an event-table description, the Python script, the generated PDF figures, a short report, and the null-test output. In the short report, every figure must state its input parameters, units, physical meaning, and failure modes; pasting the figure alone is not enough.