Skip to content

Instantly share code, notes, and snippets.

@d3v-null
Last active October 5, 2026 10:52
Show Gist options
  • Select an option

  • Save d3v-null/8dda962da83aadb5e4918522bf05e7f9 to your computer and use it in GitHub Desktop.

Select an option

Save d3v-null/8dda962da83aadb5e4918522bf05e7f9 to your computer and use it in GitHub Desktop.
Fixing the Fornax A sky model for MWA EoR1 calibration: model, images, and how to reproduce them

Fixing the Fornax A sky model for MWA EoR1 calibration

The Fornax A entry in srclist_pumav3_EoR0LoBES_EoR1pietro_CenA-GP_2023-11-07 over-predicts visibility amplitude on the baselines MWA calibration uses. Fornax A carries about 46% of the di-calibrate weight at --uvw-min 30l, so that error sets the flux scale for the whole field.

Multiplying the seven Fornax A components by about 0.8 and changing nothing else:

original model rescaled
field flux-scale error 10.0% 0.7%
field residual spectral tilt -0.381 -0.036
coherent visibility residual 11.84 Jy 8.90 Jy, down 24.8%
residual image rms 0.0718 Jy/beam 0.0588 Jy/beam, down 18.1%
worst residual feature 4.02 Jy/beam 2.16 Jy/beam
modelling cost baseline identical

The spectral tilt is the important row. Fornax A is resolved, so its share of the calibration weight falls with frequency; an amplitude error on it therefore tilts the bandpass and imprints a spectral error on every source in the field. Rescaling removes 91% of it. Per-source peel gains cannot, because peel fits one gain per source for the whole 30 MHz band, and a spectral error is what puts power at non-zero k-parallel.

images solutions

How big is the correction, and does it generalise

Least-squares fit of the Fornax A model to the data after removing the rest of the sky model. The calibration scale cancels in the ratio, so this measures the model error directly.

measurement value
14 observations, mean 0.80
standard deviation 0.036 (4.5%)
range 0.7375 to 0.8485

Those 14 span two hyperdrive versions (0.8.0 CUDA locally, 0.6.1 ROCm on Setonix), six nights from September 2025 to January 2026, field hour angles -27.6° to +26.0°, Fornax A altitudes 58.7° to 79.5°, zenith and tilted pointings, and varying dead-dipole configurations. The correction does not track the beam gain, which rules out a primary-beam error and makes this a fixed catalogue error you fix once.

Independent corroboration from the models themselves: Line et al. 2020 published two Fornax A models. At a common 182.4 MHz the shapelet model (the one in this catalogue) totals 608.6 Jy and the MS-CLEAN model 503.5 Jy, a ratio of 0.827.

Files here

file what it is
make_fornaxa_fix.py regenerates the model from the public original, byte-identically
fornaxa_fix_comparison.png calibrated and residual images, with every command used
fornaxa_fix_solutions.png six-panel calibration solution comparison
SHA256SUMS checksums for the 0.773 and 0.80 models

The model is generated rather than stored, because it is 42 MB and only seven numbers differ from the public original. Verify against SHA256SUMS.

Reproducing the model

curl -LO https://github.com/JLBLine/srclists/raw/master/srclist_pumav3_EoR0LoBES_EoR1pietro_CenA-GP_2023-11-07.fits

python3 make_fornaxa_fix.py \
  srclist_pumav3_EoR0LoBES_EoR1pietro_CenA-GP_2023-11-07.fits \
  srclist_pumav3_EoR0LoBES_EoR1pietro_CenA-GP_2023-11-07_FornaxAx0.80.fits \
  --scale 0.80

sha256sum -c SHA256SUMS
hyperdrive srclist-verify srclist_pumav3_..._FornaxAx0.80.fits   # 338797 sources, 348067 components

Diffing the YAML form against the original gives exactly 7 changed lines, all Fornax A flux values. Shapelet coefficients, positions, sizes and spectral indices are untouched. For the YAML form: hyperdrive srclist-convert in.fits out.yaml.

Reproducing the figures

Needs the raw preprocessed visibilities and metafits for an MWA EoR1 observation. These used obs 1452344160. Every command is also printed on the comparison figure itself.

MF=1452344160.metafits
RAW=birli_1452344160_norfi.ssins.uvfits
BEAM=MWA_embedded_element_pattern_rev2_interp_167_197MHz.h5
VETO="-n 8000 --source-dist-cutoff=180 --veto-threshold 0.005"
FLAGS="79 83 91 93 100 102 106"
ORIG=srclist_pumav3_EoR0LoBES_EoR1pietro_CenA-GP_2023-11-07.fits
FIXED=srclist_pumav3_EoR0LoBES_EoR1pietro_CenA-GP_2023-11-07_FornaxAx0.80.fits

for M in $ORIG $FIXED; do
  TAG=$(basename $M .fits)

  # --time-average 8s reproduces the operational 2s solution to 2e-5 in mean gain, in 50 min not 4 h
  hyperdrive di-calibrate --data $MF $RAW --beam-file $BEAM --source-list $M $VETO \
    --uvw-min 30l --max-iterations 300 --stop-thresh 1e-20 \
    --freq-average 40kHz --time-average 8s --tile-flags $FLAGS --outputs soln_$TAG.fits

  hyperdrive solutions-apply --data $MF $RAW --solutions soln_$TAG.fits \
    --time-average 8s --freq-average 80kHz --tile-flags $FLAGS --outputs app_$TAG.uvfits

  hyperdrive vis-subtract --data $MF app_$TAG.uvfits --beam-file $BEAM \
    --source-list $M $VETO --outputs sub_$TAG.uvfits

  for S in app sub; do
    hyperdrive vis-convert --data $MF ${S}_$TAG.uvfits --outputs ${S}_$TAG.ms
    wsclean -name img_${S}_$TAG -size 3072 3072 -scale 1.2amin -weight briggs 0 \
      -niter 0 -pol I -no-update-model-required -j 24 -abs-mem 60 ${S}_$TAG.ms
  done
done

Caveats

  • Empirical, and tuned to the baselines MWA samples. It deliberately makes the model's total flux disagree with Fornax A's integrated flux density. It fixes the visibilities you measure.
  • The error is scale-dependent, roughly 0.75 on 30-60 lambda rising to 0.88 beyond 100 lambda, and that pattern repeats on every observation. A flat rescale is a first-order fix; refitting Fornax A would do better.
  • 0.773 is the value validated end to end on obs 1452344160 and used for the figures. 0.80 is the 14-observation mean. Both are provided; the residual is shallow between them.
  • Swapping in the Line et al. MS-CLEAN Fornax A model instead is worth 22% rather than 24.8%, and costs 1.6x more to model, so it is not recommended.
  • Fornax A keeps a single spectral index of -0.8. Both published models are single-frequency, so neither offers per-component spectral indices.
  • Verified on EoR1 only.

Versions: hyperdrive 0.8.0 (CUDA) and 0.6.1 (ROCm), wsclean 3.x, astropy 6.1.

0f5b345428c86e9026ec50967371accb7d43a42da5943c96ff8532f785b71724 srclist_pumav3_EoR0LoBES_EoR1pietro_CenA-GP_2023-11-07_FornaxAx0.773.fits
6ad54cc36dc2df07c25b4b6a5eb833ebb6e7d0cfd51086ebd0202a51f0be9576 srclist_pumav3_EoR0LoBES_EoR1pietro_CenA-GP_2023-11-07_FornaxAx0.80.fits
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment