API reference¶
Generated from the docstrings of every public module under python/rang/,
imported with the compiled extension rang._core present. The wrappers that
reach the core:
Module |
What it wraps |
|---|---|
|
the fused residual pass and the full-Jones complex solver |
|
Measurement Set reads and in-place writes |
|
zarr ingest and the HTTP range fetch |
|
the core-native solve of the flagging workflow |
|
Tricolour’s SumThreshold strategies |
|
WSClean imaging weights and Stokes I |
|
the w-stacking gridder and the exact wgridder |
|
the imaging track replay |
|
the |
|
the configuration of the user chain: schema, defaults, refusals |
|
the user chain’s stages (flag, calibrate, apply, image, selfcal), run directory and resume |
|
in-place writes to the MS with flag versions and a journal |
|
calibrate’s K, G, B, F and polarisation solves, applycal and self-calibration |
|
calibrator models into MODEL_DATA, as CASA’s setjy writes them |
|
the Measurement Set summary of CASA’s |
|
the |
|
the file formats of the tools the core replaces: CASA calibration tables, flag versions, sky models |
|
the tutorials’ plot, table and steering functions |
What the chain refuses is listed by rang-core config check CONFIG --all
(for one MS: rang-core config check CONFIG MS --all); the data it refuses
are the cases of research/w4-unsupported.md.
The stage drivers (core_injections, core_actions, core_prospective,
core_signal, core_trend, core_campaign*) and the verbatim extracts of
frozen modules (core_policy, core_influence, core_trend_run, …)
replay archived campaigns; their docstrings name the report that defines
them.
Quoted constants¶
The tutorials quote three constants of rang.notebook; here they are as the
code holds them.
rang.notebook.survey.STATUS¶
The identifiability survey’s native status codes, per gain bin:
Code |
Label |
Meaning |
|---|---|---|
0 |
identified |
full curvature has the expected rank; the gauge-fixed step is solvable |
1 |
invalid block |
non-finite or malformed normal block |
2 |
native panic |
the Rust kernel caught a panic (a bug, never expected) |
3 |
underidentified |
full curvature has rank below 8*active-4: some gain direction is not constrained by the data (typically a tree-shaped baseline graph) |
4 |
retained rank loss |
the curvature left after removing the dropped cells has lost rank; with drop_h = full_h (the frozen LUNO crosscheck) that is every bin |
5 |
non-PSD curvature |
the normal matrix is not positive semi-definite |
6 |
U(2) gauge-null mismatch |
the null space is not the common-U(2) gauge: the model is not scalar (e.g. cross-hand MODEL_DATA terms), so the unpolarized gauge does not apply |
rang.notebook.gains.GAUGE_NOTE¶
Full-Jones gains on an unpolarized calibrator are only defined up to a common unitary matrix: G_p -> G_p U for every antenna leaves every model visibility G_p M G_q^H unchanged when M is a multiple of the identity. Raw per-entry phases (and the XY/YX split) are therefore not physical. Rang fixes the right unitary gauge on a reference antenna (polar decomposition G_ref = H U, every antenna times U^H) before computing TV; |G|_F, G_p G_q^H and TV in that gauge are what can be compared. A polarized model breaks this symmetry and needs gauge=’raw’.
rang.notebook.experiment.DECISION_RULE¶
For each pair (candidate, reference), the ratio candidate / reference of the held-out test MSE and of the point-source residual RMS of the corrected dirty image is called ‘better’ at <= 0.99, ‘worse’ at >= 1.01 and ‘null’ in between; a missing value (an unpredictable held-out cell, an unavailable arm) is ‘undecidable’. The headline pair is the TV policy against the CARACAL first-pass strategy, and a positive result also needs comparable cost (TV chain within 3x of the comparator’s time).
Modules¶
Run Rust calibration experiments from Python. |
Frozen flagging policy (rang.core_campaign)¶
Frozen setting |
Value |
|---|---|
split seed |
7 |
solution grid (integrations × channels) |
(2, 32) |
solver iterations |
50 |
thresholds τ |
(8.0, 5.0, 3.0) |
TV weights α |
(0.0, 1.0, 3.0) |
largest added fraction |
0.02 |
flag penalty in L |
2.0 |
validation weight in L |
0.25 |
validation tolerance |
0.01 |
call band (better ≤, worse ≥) |
(0.99, 1.01) |
image robustness (Briggs) |
0.5 |
B1 rules (rang.notebook.science)¶
B1-2, B1_2_DECISION_RULE:
A direction is constrainable on a data set if its profiled Fisher σ ≤ 0.3′ for pointing (half the 0.6′ that holography removes) or ≤ 0.5 % for width and ellipticity, and at least 1 % of its signature lies outside the nuisance span. B1-3 fits only constrainable directions; if none is constrainable on any set, B1 closes null at B1-2.
B1-3, B1_3_DECISION_RULE and B1_3_MATCHED_COST:
Rang wins only if it improves 2 or 3 over both baselines with 1 no worse, at matched cost (the novelty rule); otherwise the result is recorded as null. “matched” means within a factor 1.5 in wall for the same data.