Migrating to Wenuray 1.0#
Wenuray 1.0 replaces the self-calibration and imaging classes (#22, #23). A procedure is now one
Selfcal with a list of steps, instead of chained Phasecal/Ampcal/AmpPhasecal objects that
each ran their own loop. Code written for snow < 1.0 raises a TypeError that shows the new call.
The new name#
snow is now Wenuray. Install wenuray instead of snow-selfcal, import wenuray instead of
snow, and run the wenuray command instead of snow. Imagers of your own register under the
wenuray.imagers entry point group instead of snow.imagers, and the container images are
ghcr.io/miguelcarcamov/wenuray. Flag versions saved during a run are named wenuray_selfcal_....
Before and after#
# snow < 1.0
imager = Tclean(inputvis="target.ms", output="target_sc", M=1024, N=1024, cell="0.005arcsec",
robust=0.5, niter=100, use_mask="auto-multithresh", sidelobe_threshold=3.0)
phscal = Phasecal(visfile="target.ms", imager=imager, solint=["inf", "600s"], refant="DA51",
combine="spw", want_plot=True)
phscal.run()
apcal = AmpPhasecal(previous_selfcal=phscal, imager=imager, solint=["inf"], refant="DA51")
apcal.run()
apcal.selfcal_output(overwrite=True)
# Wenuray 1.0
from casatasks import split
from wenuray.config import ImageGeometry, SolveOptions, Weighting
from wenuray.imaging import Tclean
from wenuray.selfcalibration import AmpPhasecal, GainPlotObserver, LoggingObserver, Phasecal, Selfcal
imager = Tclean(ImageGeometry(imsize=1024, cell="0.005arcsec"), Weighting("briggs", robust=0.5),
niter=100, usemask="auto-multithresh", sidelobethreshold=3.0)
result = Selfcal(
"target.ms",
imager,
[Phasecal("inf", solve={"combine": "spw"}), Phasecal("600s", solve={"combine": "spw"}),
AmpPhasecal("inf")],
solve=SolveOptions(refant="DA51"),
output="target_sc",
).run(observers=[LoggingObserver(), GainPlotObserver()])
split(vis=result.ms, outputvis="target_sc/selfcal.ms", datacolumn="corrected")
Instead of translating a script, wenuray suggest target.ms -o recipe.toml writes a recipe with
the reference antenna, the grid and the steps derived from the data, each explained
(A recipe from the data).
Self-calibration#
snow < 1.0 |
Wenuray 1.0 |
|---|---|
|
|
|
one schedule with all the steps, or |
|
|
|
|
|
|
|
|
|
derived for each table from |
|
a step’s |
|
a step’s |
|
the default: a round is kept only if the acceptance policy accepts it, and a rejected round is rolled back. PSNR alone never decides |
|
|
|
|
|
|
|
|
|
a step’s |
|
removed; it did nothing |
The measurement set is no longer copied for every round: a rejected round restores the flags and
recalibrates CORRECTED_DATA with the accepted tables. Everything a run writes goes to output.
Imaging#
snow < 1.0 |
Wenuray 1.0 |
|---|---|
|
the MS and the output come from |
|
|
|
|
|
tclean’s own names: |
|
always |
|
|
a subclass of |
a subclass implementing |
|
removed; it was never implemented |