vis_clean#
- xrayvision.clean.vis_clean(vis, shape, pixel_size, clean_beam_width=4.0, niter=5000, map=True, gain=0.1, **kwargs)[source]#
Clean the visibilities using Hogbom’s original method.
A wrapper around lower level
cleanwhich calculates the dirty map and psf- Parameters:
vis (Visibilities) – The visibilities to clean
shape (Quantity) – Size of map
pixel_size (Quantity) – The pixel size in arcsec
map (bool | None) – Return a
sunpy.map.Mapby default or array only ifFalseclean_beam_width (Quantity | None) – The width of the gaussian to convolve the model with. If set to 0.0 the gaussian to convolution is disabled
gain (float | None) – The gain per loop or loop gain
thres – Terminates clean when
residual.max() <= thresniter (int | None) – Maximum number of iterations to perform
- Returns:
The CLEAN image 2D
Notes
The CLEAN algorithm can be summarised in pesudo code as follows:
\[\begin{split}& \textrm{CLEAN} \left (I^{D}(l, m),\ B(l,m),\ \gamma,\ f_{Thresh},\ N \right ) \\ & I^{Res} = I^{D},\ M = \{\},\ i=0 \\ & \textbf{while} \ \operatorname{max} I^{Res} > f_{Thresh} \ \textrm{and} \ i \lt N \ \textbf{do:} \\ & \qquad l_{max}, m_{max} = \underset{l,m}{\operatorname{argmax}} I^{Res}(l,m) \\ & \qquad f_{max} = I^{Res}(l_{max}, m_{max}) \\ & \qquad I^{Res} = I^{Res} - \alpha \cdot f_{max} \cdot \operatorname{shift} \left ( B(l,m), l_{max}, m_{max} \right ) \\ & \qquad M = M + \{ l_{max}, m_{max}: \alpha \cdot f_{max} \} \\ & \qquad i = i + 1 \\ & \textbf{done} \\ & \textbf{return}\ M,\ I^{Res}\end{split}\]