From 618bfcc9a289cfccbcfe0c404fdfd9c557f1a857 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 4 Nov 2026 16:58:09 +0000 Subject: [PATCH] refactor: merge adjacent docstring blocks in example scripts Part of the pre-release workspace hygiene sweep (https://github.com/PyAutoLabs/autolens_workspace/issues/620). Co-Authored-By: Claude Opus 5.5 --- scripts/alma/simulator.py | 2 -- scripts/alma/start_here.py | 4 ---- scripts/alma/step_by_step.py | 2 -- scripts/hst_acs/dials.py | 18 ------------------ scripts/hst_acs/start_here.py | 2 -- scripts/hst_wfc3_ir/start_here.py | 2 -- scripts/hst_wfc3_uvis/psf.py | 2 -- scripts/hst_wfc3_uvis/start_here.py | 2 -- scripts/surveys/start_here.py | 2 -- 9 files changed, 36 deletions(-) diff --git a/scripts/alma/simulator.py b/scripts/alma/simulator.py index 93f8c79..0e9924f 100644 --- a/scripts/alma/simulator.py +++ b/scripts/alma/simulator.py @@ -345,9 +345,7 @@ the weight audit (both equally applicable to simulated data — try them on this MS). - `autolens_workspace/scripts/interferometer/` — fit a lens model to the visibilities you just simulated. -""" -""" __Env__ (Developer Only) ENV: network diff --git a/scripts/alma/start_here.py b/scripts/alma/start_here.py index 823b7eb..b3e7785 100644 --- a/scripts/alma/start_here.py +++ b/scripts/alma/start_here.py @@ -371,9 +371,7 @@ of your data and whether `statwt` was run — the single most important data-quality question for uv-plane modeling, treated in depth (with a verification you can run on your own data) in `step_by_step.py`. -""" -""" __The Product Triplet__ Three FITS files, each a float64 array of shape (Nvis, 2), matching what @@ -508,9 +506,7 @@ lens fields like this one, whose modeling data has no optical counterpart. - `autolens_workspace/scripts/interferometer/` — model this dataset in the uv plane with **PyAutoLens**. -""" -""" __Env__ (Developer Only) ENV: network diff --git a/scripts/alma/step_by_step.py b/scripts/alma/step_by_step.py index f31d5de..12dbd53 100644 --- a/scripts/alma/step_by_step.py +++ b/scripts/alma/step_by_step.py @@ -517,9 +517,7 @@ **PyAutoLens** loading round-trip. - `autolens_workspace/scripts/interferometer/` — uv-plane lens modeling on these products. -""" -""" __Env__ (Developer Only) ENV: network diff --git a/scripts/hst_acs/dials.py b/scripts/hst_acs/dials.py index 7466307..146116d 100644 --- a/scripts/hst_acs/dials.py +++ b/scripts/hst_acs/dials.py @@ -51,9 +51,7 @@ Every choice is recorded in `reduction.json`, so two datasets reduced with different dials are always distinguishable after the fact. -""" -""" __Imports__ The dial mathematics below needs only the `casertano_r` helper and numpy — no network, no @@ -91,9 +89,7 @@ For galaxy-scale lens modeling on typical 2-8 exposure ACS visits, the native 0.05"/pixel default is the robust choice; reach for finer scales only with rich dither sets and a science case that needs them. -""" -""" __Final Pixfrac__ `final_pixfrac` is the fraction by which each input pixel is shrunk before being "dripped" onto @@ -108,9 +104,7 @@ instead of hiding it. The default of 0.8 follows the SLACS IX-era convention for dithered ACS data: most of the noise-decorrelation benefit of shrinking the drop, while staying robust on the 4-8 exposure visits typical of lens programs. -""" -""" __The Casertano Factor, Live__ Whatever pixfrac you choose, the drizzled mosaic's pixel-to-pixel RMS *understates* the noise a @@ -145,9 +139,7 @@ - R is a *scalar approximation* to a correlation that is really a neighbourhood covariance. It makes the noise-map faithful for a chi-squared that treats pixels as independent — the honest correction, not a perfect one. `guides/noise_maps.py` develops this point in full. -""" -""" __Weight Uniformity__ The guard-rail on shrinking pixfrac is coverage: if the shrunken drops no longer tile the output @@ -166,9 +158,7 @@ the reduction refusing to ship (the packaging stage crashes loudly on non-finite noise pixels rather than silently interpolating holes — see `hst_wfc3_ir/start_here.py` for a real example of that guard firing). -""" -""" __Final Kernel__ `final_kernel` sets the shape of the drop each input pixel is drizzled through. The default @@ -179,9 +169,7 @@ Unless you are chasing parity with a specific historical reduction, keep "square": it is the best-characterised choice, and the Casertano R treatment above is derived for it. -""" -""" __What The Literature Chose__ The reason these dials exist: three exemplary lensing reductions of HST imaging made three @@ -208,9 +196,7 @@ None of these is wrong. The defaults in this workspace (0.05", pixfrac 0.8, square, driz_cr) are the choice **PyAutoReduce** validated against SLACS parity; the dials let you reproduce any of the others. -""" -""" __Cosmic-Ray Strategy__ `cr_method` selects how cosmic rays are removed at the combine stage, and it earns its place as a @@ -245,9 +231,7 @@ `cr_method="deepcr"` today when your visit has few exposures, sub-pixel dithers, or you see the tell-tale flux depression at the lens centre in the difference between a driz_cr and a no-CR star-pass mosaic (`psf.py` shows how to make one). -""" -""" __Decision Guidance__ A short field guide, dial by dial, for a new galaxy-scale lens target on ACS: @@ -265,9 +249,7 @@ And in every case: read `reduction.json` afterwards. The dials you chose, the R they implied and the uniformity they achieved are all recorded — a reduction whose diagnostics you have not read is not finished. -""" -""" __A Second Reduction (Optional)__ Everything above ran offline. To *feel* the pixfrac trade on real data, re-reduce the diff --git a/scripts/hst_acs/start_here.py b/scripts/hst_acs/start_here.py index 3faefaf..ac2f9a2 100644 --- a/scripts/hst_acs/start_here.py +++ b/scripts/hst_acs/start_here.py @@ -54,9 +54,7 @@ reduction's exact provenance is unrecoverable, and lens-model inferences are invariant under a global flux scale). The craft reference for ACS reduction more broadly is the COSMOS pipeline (Koekemoer et al. 2007, https://arxiv.org/abs/astro-ph/0703095). -""" -""" __Imports__ **PyAutoReduce** exposes exactly two names: `TargetSpec` (the frozen declaration of what to diff --git a/scripts/hst_wfc3_ir/start_here.py b/scripts/hst_wfc3_ir/start_here.py index b3d5ade..f3842d6 100644 --- a/scripts/hst_wfc3_ir/start_here.py +++ b/scripts/hst_wfc3_ir/start_here.py @@ -83,9 +83,7 @@ units, noise closure, weight uniformity and the guard behavior you will meet below. A snapshot program also means *few dithers*, which is exactly what makes this dataset such an instructive IR case. -""" -""" __Imports__ Alongside the two **PyAutoReduce** entry points we import `instruments` — the adapter diff --git a/scripts/hst_wfc3_uvis/psf.py b/scripts/hst_wfc3_uvis/psf.py index 0d78759..8958235 100644 --- a/scripts/hst_wfc3_uvis/psf.py +++ b/scripts/hst_wfc3_uvis/psf.py @@ -66,9 +66,7 @@ starlet-regularized narrow-PSF fitting, from the COSMOGRAIL lensing community (Michalewicz et al. 2023, JOSS 8(85), 5340; Millon et al. 2024, AJ, https://arxiv.org/abs/2402.08725). -""" -""" __Imports__ `dataclasses.replace` is the idiom for spec variants: `TargetSpec` is frozen, so a second diff --git a/scripts/hst_wfc3_uvis/start_here.py b/scripts/hst_wfc3_uvis/start_here.py index 8176ab7..cea45b7 100644 --- a/scripts/hst_wfc3_uvis/start_here.py +++ b/scripts/hst_wfc3_uvis/start_here.py @@ -63,9 +63,7 @@ exactly the signal being measured. A reduction pipeline that gets the noise right, and writes down how it did so, is the difference between a substructure measurement and a systematics measurement. That standard is what **PyAutoReduce** aims to inherit for every dataset. -""" -""" __Imports__ **PyAutoReduce** exposes exactly two names: `TargetSpec` (the frozen declaration of the diff --git a/scripts/surveys/start_here.py b/scripts/surveys/start_here.py index 2e5c27c..af6f418 100644 --- a/scripts/surveys/start_here.py +++ b/scripts/surveys/start_here.py @@ -295,9 +295,7 @@ the only optical view. - `scripts/guides/output_contract.py` — what a real modeling-ready product set contains, i.e. everything a cutout deliberately is not. -""" -""" __Env__ (Developer Only) ENV: network