next up previous contents index
Next: Basic use Up: Self Calibration Previous: Self-Calibration Principle   Contents   Index

Self-Calibration Implementation

The typical procedure for self-calibration consists in an iterative process based on the following steps:

  1. magentaUV_MAP /SELF + magentaCLEAN + magentaUV_RESTORE /SELF:
    from the classically calibrated (and preliminarily flagged) data, define an initial source model through a conservative (not too deep) first deconvolution : the model consists of a reasonably modest number of CLEAN components.
  2. magentaSOLVE: determine an estimate of the antenna gains (best fit to the observed visibilities)
  3. magentaAPPLY: apply the derived gains to correct the observed data
  4. magentaSTATISTIC: compare to the initial Image, and estimate the improvement through an adequate quality assessment (e.g., improvement of the dynamic range)
  5. If necessary, re-build a new model from these corrected data, and iterate until the solution is satisfactory.

Phase-only self-calibration is less stringent on the signal-to-noise ratio (SNR) threshold than amplitude self-calibration, and it should therefore be attempted first. For phase self-calibration to work, the SNR values in the initial data should be at least of SNR>3 per antenna (in a solution interval shorter than the time for significant phase variations for all baselines to a single antenna). The SNR threshold in the initial image depends on the number of antennas and on the adopted time averaging. Depending on the complexity of the source (and the contribution from extended emission), all available baselines may not be considered in the process, and specific preliminary flagging could be necessary. Amplitude errors tend to be negligible for dynamic ranges below about 500. Amplitude self-calibration will thus be eventually attempted in a subsequent step.

Self Calibration is available in [rgb]1,0,0IMAGER through the command magentaSELFCAL, which uses an iterative scheme driven by a script violet(gag_pro:p_selfcal.ima). From the above principle, the script controls
a) the number of iterations
b) the number of selected clean components at each iteration
c) the time scale of the solution, i.e. the integration time over which the gains are assumed to be constant

The parameters of the command magentaSELFCAL are available as blueSELF_Names red SIC variables. The script uses the commands magentaUV_MAP, magentaCLEAN, and magentaSOLVE and magentaAPPLY from the blueCALIBRATE\ language. By default, a solution is searched for the phase calibration only (blueSELF_MODE=PHASE), and the number of iterations is 3 (blueSELF_LOOP). For each iteration:

  • All components found by magentaCLEAN are kept by default (blueSELF_NITER=0), but for simple source structures, 10 components only may be enough (the maximum number blueNITER of CLEAN components to subtract is automatically guessed by the program in the default process, see blueCLEAN_NITER and other usual clean convergence control variables),
  • the minimum flux density per pixel to be considered by CLEAN can be defined (blueSELF_MINFLUX=0)
  • The ''integration'' times (gain averaging) are fixed to a default value blueSELF_TIMES=45s (minimum value for NOEMA, while it is only 6s for ALMA). This can be adapted for each loop (in general, one should start with larger solution times, depending on the SNR values and try to decrease it in order to better sample the atmospheric fluctuations).
The number of iterations can be changed by resizing the blueSELF_TIMES, blueSELF_NITER, or blueSELF_MINFLUX arrays (the number of loops blueSELF_LOOP is then automatically recomputed). You should make sure that these 3 arrays have the same dimension. If any of the blueSELF_NITER and/or blueSELF_MINFLUX array are constant then their dimension is accordingly changed by magentaSELFCAL each time one of these arrays is resized. For instance, the following command allows to define 5 loops with an integration time for solution of 45sec:

let Self_times 45 45 45 45 45 /resize

blueSELF_NITER and blueSELF_MINFLUX are automatically enlarged to the same size if, and only if, they were already constant. By default, all channels are averaged to compute a ''continuum'' image, but the range of adequate channels can be specified through blueSELF_CHANNEL.

magentaSELFCAL PHASE will compute a phase calibration, but will not apply it. One needs to call magentaSELFCAL once more with the argument magentaAPPLY in order to apply the solution. The script really applies the solution if and only if the previously found solution can be considered as a good one (see blueSELF_STATUS argument value).

magentaSELFCAL APPLY automatically saves the parameters and results in the selfcal.last file. By default, data are flagged if no sufficiently good solution is found. magentaSELFCAL APPLY keep tracks of whether the solution has already been applied through blueSELF_APPLIED. magentaSELFCAL APPLY will refuse to apply ``bad'' solutions: solutions are declared ``bad'' if the improvement in dynamic range and noise level is insufficient (i.e. below a precision level controlled by blueSELF_PRECISION). In this case, the blueSELF_STATUS variable is negative. In this case, the user can still decide to apply the solution directly using command magentaAPPLY, but the blueSELF_APPLIED variable will not be updated.

The merit criteria for the quality assessment of the computed solution are the final dynamic range, and the Clean map noise at each iteration. These quantities are stored in the blueSELF_DYNAMIC and blueSELF_RMSCLEAN variables (at each iteration). The dynamic is defined as the ratio of the peak flux density value to the noise in the clean map (automatically estimated with the command magentaSTATISTIC). The minimum signal to noise ratio value (for an antenna) for a valid solution is blueSELF_SNR=6 by default.

magentaSELFCAL can be controlled through a widget, using command magentaSELFCAL /WIDGET (see Figure [*])

Figure: The Self-Calibration widget
Image selfcal-widget

It is possible to visualize the computed corrections with the command magentaSELFCAL SHOW. The solution computed with the magentaSOLVE command is written in a 'self_sname'.tab file. By default, the difference between the last two iterations is displayed. For PHASE, the phase difference should be close to zero if the solution converged, and for AMPLI the amplitude values close to 1. It is also possible to show the difference between two specified iterations. In addition, the command magentaSELFCAL SUMMARY will display the results of the process in terms of resulting noise and improved dynamic range. If the solution is satisfactory, the command magentaSELFCAL SAVE can be used to save both the results and the parameters in the selfcal.last file. (magentaSELFCAL APPLY performs an implicit magentaSELFCAL SAVE.)


next up previous contents index
Next: Basic use Up: Self Calibration Previous: Self-Calibration Principle   Contents   Index
Gildas manager 2023-06-01