Repository navigation
The owner released 0.2.0 on 2026-11-14. Its finish line
(research/finish-plan.md section 1) is met in part, and the parts not met
move to 0.3.0 (research/roadmap.md).
Known limitations
- Not every stage is within its oracle tolerance.
- E2-B is the acceptance run on processed LUNO MeerKAT L-band data against
CASA 6.7.6.14, WSClean and QuartiCal (research/e2-acceptance.md7.3-7.5). - Met: run and write-back, the readers (casacore, CASA listobs and
flagmanager, WSClean, dask-ms), FITS output, gridding (exact on all
1.1e9 cells), K, KCROSS, Xf, Df, and 3C 286 polarisation parity
(|Δχ| ≤ 0.055°). - Not met, in the frozen and in the amended arm:
- Gpol: median 0.124° in the amended arm, against a 0.1° limit.
- The fcal and gcal K G B composites: median 1.1e-3.
- CASA applycal on rang's tables: 40 cells over, max 25 eps; flags exact.
- Image gate 3c.
- Polarisation angle on 1830−211: |Δχ| up to 13°.
- Transfer χ (polarisation angle carried from calibrator to target).
- Rang's leakage: 0.30 %.
- The diagnosis (
research/e2b-misses.md, from code and archived numbers;
no new runs) confirms no rang bug among the seven. Its likely causes:- CASA's oracle solved on different flags and weights (composites);
- the estimators weight data differently (Gpol);
- float32 rounding in CASA's long apply chain (applycal);
- a scorer error and unmasked cleaning (3c);
- χ at p of 0.02-0.06 % (1830−211);
- LUNO's receptor angle and ionospheric RM (transfer χ).
- Pre-registered arms A1-A5 test these in v0.3.0.
- E2-B is the acceptance run on processed LUNO MeerKAT L-band data against
- The measurements still to come are now v0.3.0 work:
- the E2-A run on ESO 137;
- E3, the comparison with CARACal's MeerKAT strategy (image quality, flux,
wall time and memory); - the E5 review.
- Native MeerKAT data is not tested. The acceptance data is processed LUNO
data plus simulation (issue #7). - No absolute χ claim. LUNO's χ offset is not explained; see
research/chi-offset.md. flagdatamodetfcropis refused, and the trained flagger is not shipped.
Changes since 0.1.0
-
Fixed (2026-11-14): a
tools/heavy_lock.py runortools/check_all.pystarted inside a heavy-lock
hold (RANG_HEAVY_LOCK_HELD, set byheavy_lock.py runfor its child) runs inside that hold
instead of queueing again. A check wrapped inheavy_lock.py runheld 4 slots idle for five hours
while its own inner ticket waited, and would deadlock on a full queue. A nested request for more
than the hold warns and still runs. -
New (2026-11-14):
tools/heavy_lock.py statusprints each hold's real CPU use (its process tree,
sampled for 2 s) next to its booked slots, marks a hold IDLE under 5 % of one core per booked slot,
and ends withbooked N slots, using ~M cores. Report only; nothing is stopped. -
Fixed (correctness audit,
research/correctness-audit-2026-11-13.md): bad input now fails clearly
instead of running wrong. A NaN visibility made every gain, bandpass, delay or Df solution NaN with
its flag clear; non-finite data, model and weight cells are now flagged, which gives exactly the
solution of the same cells flagged (gain, bandpass, delay, KCROSS, Xf, Df).core_grid.invert(gridder="wgrid")with a GPU device raises instead of
running on the CPU. gemclean's FITS reader (-predictmodels,-fits-mask) no longer panics on a
non-ASCII header byte.-threshold,-abs-thresholdand-auto-thresholdmust be finite and not
negative. The gain and bandpass solvers refuse zero rows and per-row arrays of the wrong length; delay refuses zero rows.
Write-back refuses out-of-range DATA_DESCRIPTION ids (a negative one picked the last row). Flag-version
names with\ : * ? " < > |are refused on every platform.fluxstd.manualrefuses non-positive
frequencies. No default's numbers change. -
Changed (task df-flag-rule,
research/p-flag-spread.md): withapply.parang, P now flags as CASA's
applycal(parang=True)does on linear feeds: a cell with any correlation flagged after the tables
(input flags, a bad receptor, a Df-flagged cross hand) is flagged in all four, since P rotates XX and
YY out of all four correlations. New keyapply.parang_flags(spread, the default;none, the
previous flags) andparang_flags=onrang.applycal.applycalandrang.cal_pol.apply. Values are
unchanged; withoutparangnothing changes. -
Fixed (E5 final E5-02):
gemclean -model-column DATA, or a model column equal to the column being
imaged (-data-column, or CORRECTED_DATA when the MS has it), overwrote that column after imaging;
both are refused with exit 2 before anything is read.-no-update-model-requiredstill writes nothing. -
Changed (E5 final F-05): the licence page and
THIRD-PARTY-NOTICES.txtlist CASA's C++ sources that
the calibration and flag-extension ports follow (GPL-2.0-or-later, LGPL-2.0/2.1-or-later), with
their copyright notices; each derived file names CASA. -
Changed (E5 final F-01): astropy is a required dependency. Every polarisation solve and
apply.parang
take the parallactic angle from it, and a barepip install rang-corestopped there with
ModuleNotFoundError; theimagingextra is kept and now adds nothing. -
New: a known-limits page (
docs/limits.md, linked from the README): scope, flagging, calibration,
self-calibration, imaging and platform limits with the reports behind them; the E2 and E3 results
are added when they land (E5 final,research/e5-final.md). -
Changed (finish-plan item 27, f11fdd1): an unset
calibrate.refant(it was refused) means CARACal's
autochoice, or antenna 0 when no antenna qualifies; the default selfcal reference antenna is the
same choice (it was antenna 0), andselfcal.refant: autoruns; theimage.niterdefault is
1,000,000 (it was 100,000). -
Changed: Measurement Set reads take a channel slice in the reader (
core/src/ms.rs), 2.1-2.2x
faster on the channel-chunked polarisation solves and bit-identical on 19 frozen comparisons
(research/sliced-read.md). -
Changed (E5 pre-review "Later" findings,
research/e5-prereview.mdsection 2.3):image.fits_mask
and a selfcal FITScleanmask_methodare read relative to the configuration file, asflag.strategy
andcalibrate.model.lsm; deprecated: a mask found only relative to the working directory is still
used, with a warning, and a mask found in neither place is refused before anything runs (E5-41).
Repeated YAML keys are refused with their line numbers (PyYAML kept the last one). Unknown commands and
options exit 2 on stderr (was 1);--versionworks after other global options;run --force STAGEof a
stage outsiderun.stagesis refused; the complex-term refusals and unknown term keys say what to change
(E5-40). Data whose OBSERVATIONTELESCOPE_NAMEis not MeerKAT run with a warning, andstate.json
recordstelescope(E5-39). A flag version left unlisted by a kill is listed by the next save of the same
flags; a flag version the last attempt recorded but the MS no longer has is warned about
(restore_missing) (E5-42). Every source file carries an SPDXGPL-3.0-or-laterline (E5-45). -
New:
calibrate.average_time(default false; task E2,research/e2-average-time.md). With it on,
the K, G, B, F, Gpol, KCROSS, Xf and Df solves use CASA's estimator for long intervals: data and
model averaged in time within each solution interval (weighted means over unflagged cells after the
pre-applied tables and P, weight the sum, per baseline, channel and correlation), streamed in blocks
of rows, and the memory plan counts the averaged rows. E2's whole-scan solves on 4096-channel
MeerKAT data (176 GiB per interval unaveraged) then fitdata.memory_limit_gb: 8. Off, every
solve and the stage hash are unchanged. Refused with acomplexterm. -
New:
selfcal.average_time(default false; task E2): Sp and Sa solve on data and model averaged
in time within each solution interval, ascalibrate.average_timedoes, so CARACal's solint 120 fits
8 GiB at 4,096 channels (333 GiB per interval without). Not CubiCal's estimator, which solves every
sample (owner item 33(3)). Off, the stage hash is unchanged. Refused with Sd. -
New:
calibrate.average_freq(default false; task E2, the pre-registered "E2-B amended" arm,
research/e2-average-freq.md): the G, F and Gpol solves average their data and model over the
window's channels before solving (weighted means per row and correlation after the pre-applies and
P), as CASA's G-type solves do; K, B, KCROSS, Xf and Df are unchanged. Off, every solve and the
stage hash are unchanged. -
Changed (owner decisions on the E5 pre-review,
research/e5-prereview.mdsection 3): receipts are
rang.receiptversion 5; a Measurement Set a command modified is listed by itslisting_sha256(file
sizes and mtimes), not a full content hash; the stage summaries hash the flags, gain solutions and images
written and name the tables and settings behind a written column (E5-20). This holds for every directory
a command modified, not only the MS. The defaultrun.stagesis the whole chain, flag, calibrate, apply, image, selfcal (was flag,
calibrate, image, which imaged uncalibrated DATA) (E5-28). The simms antenna tablesdata/*.itrf.txtare
recorded indocs/licence.mdas facts, not code; the sdist carries onlymeerkat.itrf.txt, which GeMClean
compiles in (E5-11).docs/licence.mdlists codex-africanus and katdal's test helpers (BSD-3), and as
behaviour reimplemented with no code copied CARACal'sget_refant, msutils, CASA's flag extension,
fluxscale and applycal semantics and casacore's table formats, plus casacore-data's observatory
positions (E5-33).rang/data/README.mdrecords the source and SHA256 ofcasacore_observatories.json
(E5-34). The sdist leaves out.claude/and the checkout tools undertools/other thantools/wheel/,
and CONTRIBUTING lists what it carries (E5-37). Therecipesextra installs stimela 2.1.4 on Python 3.13
and older only, sopip install 'rang-core[recipes]'resolves on 3.14 (E5-38). -
New (task E4,
research/e4-tutorial.md): the tutorialnotebooks/00-ms-to-image.ipynb, from a
Measurement Set to an image withrang-core runandgemcleanon A1 small, with its configuration
and strategy inexamples/ms-to-image/; the wheels workflow's jobe2eruns the same chain on all
five wheels (tools/e2e/run.py);docs/cli.mdgainsgemclean -h.examples/a1_simtruth.py
finds the checkout's antenna table when rang-core is installed from a wheel. -
Fixed (E5 pre-review,
research/e5-prereview.md): afterrang-core run ... --force flag, a stale later stage
put back the flags saved before its earlier attempt (the old flag output); later stages now start from the
flags the rerun stage left, whenever that stage restored or wrote FLAG. Before a rerun restores a stage's
earlier flags, the flags it replaces are saved as the flag versionrang_rerun_<UTC time>, so flags set
outside rang are never lost (one more version per rerun). DATA is never written:apply.column: DATAand
selfcal.model_column: DATAare configuration errors, selfcal refuses to copy apply's output into an
input_column: DATA, andrang.core_writeback.WriteBackrefuses DATA. The run directory is locked on
Windows too, so a secondrang-corecommand on the same MS is refused. Malformed configuration values give
the error report (exit 2), not a traceback. The changed-configuration refusal names--forceforms both
commands accept. The wheels and sdist carryTHIRD-PARTY-NOTICES.txt(QuartiCal's MIT, codex-africanus's
and Tricolour's BSD-3 notices). The release job publishes to PyPI only after its own checks pass. The MS
table lock holds on Linux only, as the docs now say. -
Research (task F3,
research/f3-flagger.md): a second learned RFI flagger, not wired into
rang-core flag. Newrang.f3flag(wrapper W3, features reference, injections, labels, measures),
rang.f3net(the JAX network for training), the Rust kernelrang_core::f3flagwith
rang._core.f3flag_featuresandf3flag_logits, the AOFlagger driver
tools/oracles/aoflagger/f3_aoflag.pyandexamples/f3_*.py.rang.f2flag_simgains the
held-out observationf3sim-t(seeds registered inrang.simtruth.SEEDS). -
New:
gemcleanis in the wheel (task G8,research/g8-wheel.md): the console scriptgemclean
(andpython -m rang.gemclean) runs GeMClean's command line inside the extension
(rang._core.gemclean_main); no second binary ships. The command line moved from
core/src/bin/gemclean.rsintorang_core::gemclean::cli, which the source build's binary now
wraps; files, output and exit codes are the binary's (0, 2 on an error, 101 on a panic), and
Ctrl-C ends the run at once. New-version(also--version). On 64-bit Linux the extension
uses gemclean's huge-page allocator, so-memory-reportworks from the wheel. -
Changed:
rang-core'simage.gemclean: autoruns the installed extension's gemclean
(python -m rang.gemcleanof the running interpreter) and records the sha256 ofrang._core;
the search of PATH and of the checkout'score/targetis gone. A source build is used only when
image.gemcleannames it. -
Changed:
gemcleangrids at-wgridder-accuracy 1e-4in single precision by default (task G7,
research/g7-defaults.md): on the 512-channel ESO 137 pilot 33 % less wall at-j 16, 27 % at
-j 1and 4.1 GB less memory, within the class B bounds written first. Single precision is the
default for an accuracy of 1e-5 or coarser; the new-doubleforces double precision, and
-wgridder-accuracy 1e-6alone gives the earlier form.rang-core'simage.wgridder_accuracy
defaults to 1e-4, the model column follows gemclean's precision, and the image and selfcal stage
hashes change once (--force). -
Fixed:
gemclean's restoring beam is fitted as WSClean 3.7's binary fits it (a unit-peak Gaussian
in linear space over a box of 10 theoretic beams, regrown up to five times, on the box's quadrant
that schaapcommon's unsigned offsets leave in; the start is the theoretic beam, raised to the
Gaussian taper). BMAJ and BMIN agree with WSClean's to 4.3e-7 on 19 cases; before, BMAJ was 9-30 %
narrower. Every restored image and every FITS header'sBMAJ,BMIN,BPAchange; dirty, PSF,
model and residual data do not. The report'smain_lobe_pixelsis nowfit_pixels. -
New: per-image clean masks and cut-offs in
rang-core selfcal(research/c5b-selfcal-masks.md),
CARACal'sclean_cutoff,cleanmask_methodandcleanmask_thrasselfcal.clean_cutoff,
selfcal.cleanmask_method(wsclean,noneor a FITS mask path) andselfcal.cleanmask_thr:
lists over images 1 torounds + 1, the last entry repeating, passed to gemclean as
-auto-threshold,-auto-maskand-fits-mask. Empty by default (images as before);sofia,
breizorroand local-rms masks are refused. The selfcal summary records each image's
components, major cycles and stop reason. The new keys change the selfcal stage hash once
(--force). Measured on C5's truths: CARACal's masks do not meet C5's T2 gate (held-out cases
included) and do not lift C5's model-absorption limit; archive
research/results/c5b-selfcal-masks.json. -
Research: E1, the whole chain on A1's simulated truth (
research/e1-chain.md):rang-core run
(flag, CARACal's full-Stokes calibrate, apply, selfcal, image) on A1 full's first 32 integrations
per scan exits 0; no E1 gate of A0 is met as frozen and no rang bug was located (the K failures are
CASA's own on the same flags). Scripts inresearch/results/e1-chain-scripts/, archive
research/results/e1-chain.json. No package code changed. -
New: GeMClean masks, tapers and uv limits (
research/g4-masks.md), WSClean 3.7's options:
-fits-mask(one plane, the image's size); radler's automatic mask-auto-mask,
-abs-auto-mask,-auto-mask-nmiterin the defaultdualmode (Högbom, joined channels and
multiscale with its per-scale masks; needs-mgainor-minor-to-threshold);
-taper-gaussian(arcseconds by default),-taper-tukey,-taper-inner-tukey,-taper-edge,
-taper-edge-tukey,-minuv-land-maxuv-lon the weight grid's cells, and-minuvw-m,
-maxuvw-mon rows.rang-core imagepassesauto_mask,abs_auto_mask,
auto_mask_nmiter,fits_mask,taper_gaussian,taper_tukey,taper_inner_tukey,
minuv_l,maxuv_l,minuvw_m,maxuvw_m;image.uvrangestays refused (use those keys),
andauto_maskwithoutmgainis a configuration refusal.-local-rms,-casa-mask,
-horizon-maskand-clean-borderare refused. -
Fixed:
image.gemclean: autofindscore/target/<profile>/gemclean.exeon Windows. The test
stand-in for gemclean is a Python script (a.cmdwrapper on Windows), and the selfcal refusal
test no longer needs a built binary.examples/a1_simtruth.pyuses spawned workers where fork is
missing (Windows); fork elsewhere, unchanged. Newtools/heavy_lock.py, one heavy job at a time across
Windows and WSL; CONTRIBUTING describes native Windows development. -
New:
gemclean -poland-join-polarizations(research/g9-stokes.md): Stokes I, Q, U, V and
XX, YY in any combination, parsed as WSClean 3.7 parses-pol(IQUV,iquv,xx,yy), formed
from linear-feed correlations with WSClean's arithmetic and weights (min(4 w_a, 4 w_b)for a
formed Stokes parameter); WSClean's file names (<name>[-0000]-<pol>-<kind>.fits, one PSF per
channel from the first polarisation),CRVAL4, imaging-weight sources and header weights; joined
polarisations pick peaks on the normalised linear sum, as WSClean 3.7's default loop does (its
help text says the sum of squares; recorded in the note), so with QU joined, components whose
Q and U cancel are not cleaned, in GeMClean as in WSClean 3.7 (IQUV joining, as E2-B's, is far
less exposed); both work with-channels-outand
-join-channels. XY, YX, circular correlations and-link-polarizationsare refused.
rang-core imagepassesimage.polandimage.join_polarizations(only when not the defaults),
so E2-B's image section is no longer refused. Single-polarisation I imaging is unchanged. -
New:
gemclean -multiscale(research/g5-multiscale.md): WSClean 3.7's multiscale CLEAN,
radler's algorithm with its sub-minor loop (rang_core::gemclean::multiscale), with
-multiscale-scales,-multiscale-max-scales,-multiscale-scale-bias,-multiscale-shape
(tapered quadratic or Gaussian) and-multiscale-gain; scales from WSClean's theoretic beam;
the residual made exact for the image-domain beam after every sub-minor loop. Works with one
output channel, joined channels (with-fit-spectral-pol) and unjoined ones, and with
-auto-threshold.rang-core imagepassesmultiscaleand the new keysmultiscale_scales,
multiscale_max_scales,multiscale_scale_bias,multiscale_shapeandmultiscale_gain.
Without-multiscalethe images are byte-identical to before. -
New:
rang-core selfcal(andrunwithselfcalin its stages) runs CARACal's self-calibration
rounds (research/c5-selfcal.md):selfcal.roundsrounds of a gemclean image (the input column
first, the output column after), its model images predicted intoselfcal.model_column
(rang.core_model.write_model_data), one term solved onselfcal.input_columnagainst it and
applied intoselfcal.output_column, then a final image. One term per round, the last repeating
(CARACal'sgain_matrix_type):Sp(phase, QuartiCalphase),Sa(amplitude and phase,
diag_complex) andSd(CARACal'sFslope, QuartiCaldelay_and_offset, started at zero
delay); default phase then amplitude. An integersolintis N integrations from each scan start
(CARACal's timeslots),NsCASA's seconds bins;freqintN channels for Sp and Sa. Solves are
chunked withindata.memory_limit_gb;selfcal.gain_clipflags solutions,selfcal.minuvw_m
drops short baselines, new keyselfcal.refant.CORRECTED_1GCis copied fromapply.column
after this run's apply. Solutions go to a QuartiCal gain store per round. New module
rang.cal_selfcal;rang.cal_gain's chunked solve takes channel chunks.complex
self-calibration terms are refused (refant: autoin selfcal was refused too, until item 27). -
New:
rang-core calibrateruns the K, G, B, A and F terms and the polarisation terms Gpol,
KCROSS, Xf and Df withindata.memory_limit_gb(research/w3b-chainchunks.md): each solve reads
its field in chunks of whole solution intervals (B, Xf and Df also in channels of one interval),
pre-applied on whole rows, with the result of the one-call solve bit for bit. The stop test of the
G, B and K kernels is replayed over the chunks from new counted kernels (rang._core.cal_gain_trace,
cal_delay_trace,cal_delay_offset_trace; Rustdiag::solve_counted,delay::solve_counted,
delay_offset::solve_counted), Df's gauge test is found exactly over the chunks, and the A step's
Tricolour pass flags in blocks of baselines on each group's time grid.preflightno longer refuses
these terms above the limit; it refuses only a solution interval (B, Xf, Df: one channel of one)
that does not fit, naming the GiB. The library functions take abudget(default: one chunk, as
before). P's angles come from a table per unique time and antenna (rang.cal_pol.angle_table,
table_angles), soapplycal(parang=True)and the polarisation solves hold no per-row angle array.
New modulerang.cal_chunks. Theextendflagsstep (rang.flag_extend.extend_ms) splits a 60 s chunk
larger than its batch into blocks of whole baselines, with the same flags. -
New:
refant: autoandcalibrate.polcal.extendflags: truerun inrang-core calibrate
(research/e0-refant-extend.md).autois CARACal'sget_refant(rang.cal_refant): the
first three antennas by name withincalibrate.refant_maxdist(1000 m) of the array centre
whose every baseline is at leastcalibrate.refant_minbase(150 m); flags play no part, as in
CARACal's code (its comment says fewest flags). It is chosen once before anything is written, and
the stage stops when no antenna qualifies.extendflagsis CASA'sflagdata(mode='extend')
with CARACal's settings (ntime='60s',combinescans,growtimeandgrowfreq80,
growaround,flagneartime,flagnearfreq,extendpols;rang.flag_extend, Rust kernel
core/src/flag_extend.rs), run before the polcal solves on the Gpol, KCROSS and Xf fields and then
the Df fields, withindata.scans. The two new keys change the calibrate stage hash, so a
calibrate stage finished earlier reruns once with--force. -
New (research, task F2,
research/f2-flagger.md):rang.f2flag, a 2,785-weight per-baseline
convolutional RFI flagger (features and network in NumPy/JAX, training in JAX on CPU), its Rust
inference kernelrang_core::cnnflag(rang._core.cnnflag_logits, rows in, logits out, parity with
JAX tested), andrang.f2flag_sim, simulated MeerKAT L-band scans on LUNO's window with RFI of known
mask fromrang.simtruth(F2's seeds registered insimtruth.SEEDS). Not wired intorang-core flag; weights are run outputs, not shipped. -
New:
gemcleanwrites the model column after imaging, as WSClean 3.7 does (-update-model-required,
the default;-no-update-model-requiredleaves the MS unwritten), and has WSClean's-predictmode
and-model-column(research/g6-predict.md). The model images (<name>-model.fitsor
<name>-000k-model.fits, gemclean's or WSClean's) are predicted with the gridder at the MS's own
channels into every selected row (field, data description 0, cross-correlations; flags play no part):
XX = YY = I, XY = YX = 0. An added column is TiledShapeStMan and starts at zero, as WSClean's does.
rang-core imagewithimage.write_model: truewrites MODEL_DATA through W1's write-back with the
same predictor (rang.core_model,rang._core.gemclean_predict), and always runs gemclean with
-no-update-model-required. The scripts inexamples/that image shared data now pass
-no-update-model-required. -
New:
gemclean -scans <list>and-unit-weights(rang's own options). gemclean now falls back to WEIGHT
as WSClean does: WEIGHT_SPECTRUM is read only when row 0 holds a cell of the data's shape
(research/w6-imaging-inputs.md).rang-core imagepassesdata.scansanddata.weights: uniform
to these options. It no longer refuses either of them, nor a declared WEIGHT_SPECTRUM with unwritten
cells, and it writes nothing into the MS for uniform weights. An imaged field with no rows in
data.scansis refused. -
New: the Stimela2 recipe
recipes/rang-chain.yamlrunsrang-core flag,calibrate,apply
andimagein order on one configuration and MS, with the cabsrang-flag,rang-calibrate,
rang-applyandrang-imageinrecipes/rang-cabs.yaml; each cab runs the console script
(research/w5-stimela.md). The recipesrecipes/core-*.yamlare unchanged in their steps and
now start with# rang-recipe: research: they replay frozen campaigns.tests/test_w5_recipes.py
checks the marker on every recipe and the cabs' arguments against the commands. -
New:
rang-core calibrateruns the polcal section's Gpol, KCROSS, Xf and Df (CARACal's strategy 1,
rang.cal_pol;research/c6w-polwire.md) after the primary and secondary terms, andrang-core applycorrects by the parallactic angle withapply.parang: true(after the tables, as CASA's
parang=True;rang.applycal.applycal(parang=True), angles per field independent of the
chunking). New keys:calibrate.polcal.model(nrao: CARACal'snrao_xcal.yml3C286 or 3C138
written to MODEL_DATA on the polcal fields;column),calibrate.polcal.frame(casadefault),
KCROSSestimator(casadefault,refined), Dfmin_data_fraction(off by default; CASA has
no such rule). Df's table is clipped at CARACal's 0.6 by default.feed_angle_rotationnow sets
the receptor angle used for P, in memory (CARACal sets it in FEED); FEED is not rewritten. Applying
polarisation tables withoutapply.parang,preavg, Gpolcalmode: apandextendflags: true
(not ported, no owner) are configuration errors; nothing is refused for C6a, C6b or C6c any more.
The defaults of C6's open decisions are provisional. -
New:
rang.cal_pol, the polarisation terms in CARACal's order (research/c6-polterms.md):gpol
(phase-only G with the parallactic angle),kcross(CASA's cross-hand delay FFT),xf(CASA's
cross-hand phase),df(the linearised leakage by least squares with CASA's subtractive reference),
clip_df,parallactic_angles/row_angles(CASA's frame by default, provisionally;frame='rang'
keeps the geodetic one),rotateandapply(tables, then P). Rust kernels
core/src/cal/parang.rs,crosshand.rs,leakage.rs;cal/apply.rsandformats/caltable.py
now applyKcross JonesandXf Jonestables. Wired intorang-core calibrateandapplyby
task C6w (the entry above).
rang.simtruthgains the versionspoldxandpolholdout(CASA's parallactic frame, a leaking
reference antenna); the other versions are unchanged. -
New:
rang-core calibrateruns CARACal's cross-calibration terms K, G, B, A and F in C1's order
(research/c2e-calibrate.md). The config'scalibrate.primaryandcalibrate.secondaryterms
go torang.cal_chain.run: K (delay_and_offset), G and B with their listed tables pre-applied,
written as CASA tables in the run directory; F appends a G solved on the secondary against a
unit point model to a copy of the primary's last G, thenfluxscale, and the fitted flux densities
go into the summary; A applies the section's last table of each type to its fields
(CORRECTED_DATA,calflag) and runs the Tricolour port on the corrected data, OR-ing its flags
into FLAG (CARACal runs tfcrop there).rang-core applyapplies these tables through
rang.applycalwith each target'sinterpandgainfield. calibrate now saves and restores a
flag version like the other writing stages. A K table applied without a G or F is reported:
its phase offsets are left for G. Refusals no longer name C2a to C2d; what thecomplexterm
never takes is a configuration error pointing to the K, G and B terms.refant: auto,
solnorm: trueandcalmode: aare refused as not ported. -
Changed:
rang.cal_gain.gaincal,rang.cal_delay.gaincal,rang.cal_bandpass.bandpassand
rang.applycal.applycaltakescan(a list of SCAN_NUMBERs); the solves take
weight_column=Nonefor unit weights and read a WEIGHT column per channel. Defaults are
unchanged.rang.simtruthhas a held-out versionholdout128(new seeds). -
Added: polarised calibrator models (task C7a,
research/c7a-polmodels.md).
rang.calmodels.Manualtakes CASAsetjy(standard='manual')'s full form,fluxdensity=[I, Q, U, V],polindex,polangleandrotmeas(referenced toreffreq, as CASA), following
CASA's tabular and spectral-index paths, and writes all four correlations in the sky frame
(XX = I+Q,XY = U+iV,YX = U-iV,YY = I-Q; no parallactic angle, assetjy).
With onespixterm it copies CASA's TOPO-to-LSRK conversion of channel 0
(calmodels.lsrk_over_topo, astropy; recorded in the receipt), within 1.5e-7 of CASA.
calmodels.NRAO_XCALandcaracal_xcal()hold CARACal's 3C286 and 3C138 models.
rang-core calibrateacceptscalibrate.model.flux_jywith Q, U, V and the polarisation
keys forsource: manual;polindexwithoutpolangle(or the reverse) and the polarisation
keys with another source are refused. Polarised sky-model components stay refused. -
New:
rang-core flag,calibrateandapplyrun withindata.memory_limit_gb(default 8 GiB of
resident memory) by chunking by time and row (rang.core_chunks,research/w3-chunking.md):
the flagger takes blocks of baselines of a field and scan on the group's whole time grid
(core_flag.flag_rows(time_grid=...)), thecomplexsolve takes chunks of whole solution
intervals (time bins, or frequency bins of one time bin) and replays the solver's global stop
test over them, so gains equal the one-call solve bit for bit, and apply and the models use row
chunks of the limit. Results do not depend on the limit or ondata.chunk_rows(now a cap on
the rows of every chunk), so neither enters a stage's configuration hash. A limit too small for
the process, one baseline of a scan or one solution interval is refused before anything is
written, naming the GiB needed. No visibility column is read whole by the three stages;
cal_gainandcal_delayread only the rows of the field they solve. The K, G, B, A and F
terms are not chunked yet: a field they would read beyond the limit is refused, naming the GiB
needed. -
New: A1's generator has a
w3version (64 antennas, 4096 channels) and--chunk-ints. -
Changed:
rang-core flag,calibrate,apply,imageandconfig check CONFIG MScheck the
Measurement Set per stage before anything is written and report every problem at once, each
naming its reason (research/w4-unsupported.md). Refused: several data descriptions in use
(split one spectral window out first), circular, single or reordered correlations, two
correlations forcalibrateandapply(the complex term needs four), no FLAG or FLAG_ROW,
no weights forcalibrate(unlessdata.weights: uniform) orimage, a FIELD_ID without a
FIELD row, a named field or adata.scansselection with no rows, a FIELD name of several
fields inimage.fields, andimagewhendata.scansleaves out a scan of an imaged field
(gemclean has no scan selection), on a data description other than 0 or with a
WEIGHT_SPECTRUM column whose cells were never written. Two linear correlations (XX, YY)
are now flagged and imaged. Autocorrelations are flagged and corrected but left out of the
complexsolve;calibratereads WEIGHT when row 0 of WEIGHT_SPECTRUM has no cell of the
DATA shape, andimagerefuses such an MS because gemclean would stop on it.
data.weights: uniformfor imaging is still refused, now naming W4 (an owner decision). -
New:
rang.cal_fluxscale, the flux-scale term F (research/c2d-fluxscale.md).fluxscale(caltable, reference=..., transfer=...)is CASA'sfluxscaleon a G table, with its statistics in the Rust
core (core/src/cal/fluxscale.rs): per-antenna mean amplitudes, the median ratio to the reference
(casacore's median rule),fd = ratio²and CASA's error,gainthreshold, several reference
fields,refspwmap, and the weighted spectral fit across windows (fitorder); it returns the
flux-scaled table and a record shaped as CASA's.bootstrap(ms, primary, secondary)runs
CARACal's F step: G on the secondaries against a unit point model (smodel_array), appended to a
copy of the primary's table (append), thenfluxscale. Selections by antenna, time or scan and
incremental=Trueare refused. Measured against CASA 6.7.6fluxscale: the same flux densities,
errors and F tables as CASA on CASA's own G tables (fit errors atfitorder=2within 2.6e-5), and
within 4e-4 end to end. -
Changed:
rang.cal_gain.gaincaltakesspwto solve one window of a multi-window MS (tables are
pre-applied on single-window data only). -
Changed:
examples/a1_simtruth.py generatetakes--seedsand--gcal-flux,--gcal-spix,
--gcal-reffreq(the default versions are unchanged). -
New:
gemclean -channels-out N,-join-channels,-fit-spectral-pol N,-channel-range S E,
-mf-weighting/-no-mf-weightingand rang's own-average-channels N, as WSClean 3.7 has
them: output channels grouped as WSClean groups them, MF weighting by default with joined
channels, a joined minor loop that picks on the weighted sum of the channel residuals and puts a
component in every channel (GeMClean's exact value per channel, then WSClean's ordinary polynomial
fit innu/nu_ref - 1), and per-channel<name>-0000-<kind>.fitsand weighted
<name>-MFS-<kind>.fitsimages.-fit-spectral-log-pol,-deconvolution-channelsand squared
joining are refused. One output channel is byte-identical to before.rang-core imagepasses
channels_out,join_channels,fit_spectral_polandaverage_channelsto gemclean instead
of refusing them (research/g3-spectral.md). -
New:
rang.applycal.applycal(ms, gaintable, interp, gainfield, calwt, field), CASA's
applycalon a Measurement Set: row chunks throughrang.core_writeback(a flag version first),
the Rust kernel per field and data description, CORRECTED_DATA (added asclearcaldoes when
absent), FLAG OR'd, and withcalwton a G, T or B table WEIGHT and WEIGHT_SPECTRUM reset from
SIGMA and scaled as CASA does (K, Df and general Jones terms leave weights alone). Field maps
'', a field name andnearestas CASA's. Measured against CASA 6.7.6applycal
(research/c4b-apply-ms.md). -
Changed: the apply kernel (
rang.cal_apply) writes cells under a one-sided diagonal solution flag
as CASA does (the good side still applied), tracks phases over the two slots it interpolates
between, and uses casacore's linear-interpolation formula; newcal_apply.apply_jonesapplies
a general 2×2 term on its own solution bins. -
New:
rang-core applyapplies thecomplexterms ofrang-core calibrateto the fields they were
solved on, into CORRECTED_DATA;rang-core calibratewritessetjy,manualandlsmmodels to
MODEL_DATA throughrang.calmodelsand solves against them. Applying a complex term to another
field and polarised models are refused, naming C2a and C7a. -
Changed:
rang.cal_delaysolves K as QuartiCal 0.2.7'sdelay_and_offsetby default (a delay
and a free phase per antenna and hand,core/src/cal/delay_offset.rs), with rang's offset start
(the FFT peak's phase,offset_start=True;Falseis QuartiCal's estimator exactly) and a delay
error with the offset marginalised;kind="delay"keeps C2b's term. It meets CASA's
gaincal(gaintype='K')with nothing pre-applied, as CARACal solves K. TheK Jonestable holds
the delays only; the offsets are inDelaySolution.offsetsand G absorbs them
(research/c2c-bandpass.md). -
New:
rang.cal_bandpass, the bandpass B:diag_complexper channel in Rust with CASA's rules per
channel (minblperant,minsnr, the reference antenna) and CASA'sfillgaps
(core/src/cal/bandpass.rs),bandpass(ms, ...)as CASA'sbandpass(bandtype='B')(defaults
combine='scan',fillgaps=0), writing CASAB Jonestables.rang.cal_chain.primarysolves
the primary calibrator's K, G, B in CARACal's order, each with the earlier tables applied.
rang.simtruthhas aholdout256version (new seeds, 256 channels) (research/c2c-bandpass.md). -
New:
rang.cal_delay, the delay term K in Rust (core/src/cal/delay.rs): QuartiCal 0.2.7's
delaykernel with its FFT initial estimate (FFT, then Gauss-Newton over all baselines).
solve(...)on arrays;gaincal(ms, ...)as CASA'sgaincal(gaintype='K'), with CASA's
solution intervals, pre-applied tables throughrang.cal_apply(SIGMA weights then, as
rang.cal_gain) and CASA's K referencing (to the first refant, no flex or strict, nominsnr
orminblperant, which CASA's K does not apply);to_caltablewrites a CASAK Jonestable
(float32 delays in ns, the one-channel window at the band centre), whichrang.cal_apply
applies. It matches CASA only with a G pre-applied; without one, antenna phases bias it
(research/c2b-delay.mdsection 6; the K model is an owner decision).rang.simtruthhas a
delay50version (delays of 1-50 ns, 256 channels) (research/c2b-delay.md). -
Changed:
gemcleanneeds far less memory, with byte-identical images (task G2,
research/g2-memory.md). It reads the Measurement Set at the exact size with Stokes I in single
precision, compacts in place, keeps no copy of the gridding weights, holds single-precision
visibilities as read, forms each residual in the gridder's sorted values instead of a
visibility-sized buffer, forms the 2n PSF before the plan of the image grid and frees it after
the beam is built. Peak RSS on the ESO 137-006 pilot at 512 channels went from more than 24 GB
(about 32 GB estimated) to 19.7 GB; at 256 channels from 18.4 to 12.2 GB; on 2048² simulated
skies from 3.46 to 2.99 GB. -
New:
gemclean -memory-reportprints the heap held per phase of a run (read, weights, PSF,
beam, each major cycle) and the main buffers' sizes;-report.jsoncarries the same under
memory(research/g2-memory.md). Images are unchanged. -
New:
rang.calmodels, calibrator models written toMODEL_DATAas CASA'ssetjywrites them
(C1 term T0).set_model(ms, field, spec)takes a flux-density standard ofrang.fluxstd, a
manualmodel (flux density, reference frequency, log10 spectral terms), per-channel Stokes rows
(PointStokes), or a component list such as CARACal'spks1934-638.lsm, predicted through
core.predict_components. It writes throughrang.core_writebackand leaves other fields'
rows as they are. Polarisedmanualmodels are refused until C7a (research/c3a-models.md). -
New: commands for your own Measurement Set,
rang-core flag,calibrate,apply,image,
selfcalandrun CONFIG MS, driven by one YAML configuration (schemarang-config, version
1;rang-core config defaultsprints every key with its default,rang-core config check
validates).flagruns the Tricolour port per field and scan and writes FLAG;calibrate
solves thecomplexterm and writes a QuartiCal gain store;imagerunsgemclean. The rest
of CARACal's chain (K, G, B, F, polarisation terms, apply, self-calibration, multi-channel and
polarised imaging) can be written in the configuration and is refused with the task that adds
it. A run directory (<ms>.rang-run) keeps the state, sorunskips finished stages and
resumes at a failed one. Flags are saved as the CASA flag versionrang_originalbefore the
first write, and asrang_<stage>_<time>before each stage writes (research/w2-commands.md). -
Changed: the research stages moved under
rang-core research(for examplerang-core research flags compare); the old top-level forms now say where they went. PyYAML is a dependency. -
New:
rang.cal_gain, the gain term G in Rust (core/src/cal/diag.rs,reference.rs):
diagonal complex (calmode='ap') and phase-only ('p') solves ported from QuartiCal 0.2.7's
diag_complexandphasekernels, with CASA's solution intervals (solint,combine),
uvrange(metres),minblperant,minsnrand reference antenna (flex,strict); earlier
tables are pre-applied throughrang.cal_apply, and the result is a CASAG Jonestable
(research/c2a-gain.md). -
tools/check-all.shhas a new last step,gain-hashes(tools/gain_hash_gate.py): it recomputes
the archivedcomplexgains (4ed2aa89…,7b370c13…) and core phase 2's LUNO convergence, and
fails on any change. The archived inputs are found in$RANG_ARCHIVE_OUTPUTS,outputs/or
~/Github/rang/outputs;RANG_GAIN_HASHES=optionalskips the step on a host without them. -
New:
rang.core_writeback, write-back to an existing Measurement Set.WriteBackadds
MODEL_DATA,CORRECTED_DATA(or any data column) andWEIGHT_SPECTRUMas CASA'sclearcal
adds them, writes any column,FLAGandFLAG_ROWin row chunks, saves the original flags as a
CASA flag version (rang_original) before the first write, and refuses to start after an
interrupted session until the flags are restored (restore_flags).rang.formats.flagversions
now saves in chunks, atomically, and gainsrestore. CASA, WSClean, python-casacore and dask-ms
read the written columns (research/w1-writeback.md). -
The core table writer now writes a tiled column's header through a temporary file and a rename,
so a process killed during a flush cannot leave it truncated. The bytes written are unchanged. -
New:
rang.simtruthandexamples/a1_simtruth.py, a simulated MeerKAT L-band observation in
full polarisation with known truth. It has K, B, G, KCROSS, Xf, linear Df and parallactic
rotation, a self-calibration residual, RFI with bit masks, and thermal noise of known σ, and is
written as a Measurement Set through rang's table writer. There are two versions: small (16
antennas, 64 channels, 41 MB) and full (64 antennas, 256 channels, 35.8 GB). CASA
applycalwith tables made from the truth inverts it within class C
(research/a1-simtruth.md). -
New:
rang.cal_apply.apply, a Rust kernel (rang._core.cal_apply) that corrects or corrupts
visibilities in memory by CASA K, G, T, B and Df tables, withapplycal'slinearandnearest
interpolation in time and frequency and itscalflagflags, including how Df flags and
substitutes bad leakages (research/c4a-apply.md). KCROSS, Xf and the parallactic angle are
refused until their steps. Weights are not changed and nothing is written to a Measurement Set yet. -
New:
gemclean -beam-band, off by default. Resyncs use the beam's spectrum only as far as the
longest baseline and the w-term reach. Images differ slightly from flag off. Over 12 interleaved
pairs with coarse gridding (-single -wgridder-accuracy 1e-4) it saved 11-16 % of the wall on
two simulated skies and 4-5 % on a third (research/gemclean-speed.md). -
The root crate and binary are now
rang-sim,rang.toy_outputis nowrang.sim_output,
RANG_TOY_BINandRANG_TOY_LIBare nowRANG_SIM_BINandRANG_SIM_LIB, and
examples/toy.pyis nowexamples/pointing_sim.py. No aliases are kept. Output bytes are
unchanged. Receipts arerang.receiptversion 4. -
gemcleantakes w-planes in groups of 4, within 2 GiB of grids. Results are unchanged; peak
memory rises (2.84 to 3.38 GB on one simulated job). Other callers of the exact gridder stay at
one plane, because larger groups were measured only on gemclean.RANG_WGRIDDER_PLANE_GROUP
overrides either default. -
New: the reference imager
gemcleanand its binary, and the flagged Gram operator. Their
speed figures are provisional. -
New:
gemclean -stop-rule certified, a minor-cycle stop rule with Lean-proved consequences
(research/stop-rule-theorem.md). It costs about three times the default's major cycles and a
table of about 100 gridder calls, so it is not the default, and the default's images are unchanged.