Joint Single Dish and Interferometer Image Reconstruction
Joint reconstruction of wideband single dish and interferometer data in CASA is experimental. Please use at own discretion.
The scope of parameters that has been tested for CASA 5.7/6.1 can be found below.
Overview
The SDINT imaging algorithm allows joint reconstruction of wideband single dish and interferometer data. This algorithm is available in the task sdintimaging and described in Rau, Naik & Braun (2019).
Algorithm
Interferometer data are gridded into an image cube (and corresponding PSF). The single dish image and PSF cubes are combined with the interferometer cubes in a feathering step. The joint image and PSF cubes then form inputs to any deconvolution algorithm (in either cube or mfs/mtmfs modes). Model images from the deconvolution algorithm are translated back to model image cubes prior to subtraction from both the single dish image cube as well as the interferometer data to form a new pair of residual image cubes to be feathered in the next iteration. In the case of mosaic imaging, primary beam corrections are performed per channel of the image cube, followed by a multiplication by a common primary beam, prior to deconvolution. Therefore, for mosaic imaging, this task always implements conjbeams=True and normtype=’flatnoise’.
The input single dish data are the single dish image and psf cubes. The input interferometer data is a MeasurementSet. In addition to imaging and deconvolution parameters from interferometric imaging (task tclean), there are controls for a feathering step to combine interferometer and single dish cubes within the imaging iterations. Note that the above diagram shows only the 'mtmfs' variant. Cube deconvolution proceeds directly with the cubes in the green box above, without the extra conversion back and forth to the multiterm basis. Primary beam handling is also not shown in this diagram, but full details (via pseudocode) are available in the reference publication.
The parameters used for controlling the joint deconvolution are described on the sdintimaging task pages.
Task Specification : sdintimaging
The task sdintimaging contains the algorithm for joint reconstruction of wideband single dish and interferometer data. The sdintimaging task shares a significant number of parameters with the tclean task, but also contains unique parameters. A detailed overview of these parameters, and how to use them, can be found in the CASA Docs task pages of sdintimaging.
Usage Modes
As seen from the diagram above and described on the sdintimaging task pages, there is considerable flexibility in usage modes. One can choose between interferometeronly, singledishonly and joint interferometersingledish imaging. Outputs are restored images and associated data products (similar to task tclean).
The following usage modes will be released in the (experimental) sdintimaging task for CASA 6.1/5.7 . Modes being tested are all 12 combinations of :
 Cube Imaging : All 6 combinations of the following options.
 specmode = 'cube'
 deconvolver = 'multiscale', 'hogbom'
 usedata = 'sdint', 'sd' , 'int'
 gridder = 'standard', 'mosaic'
 parallel = False
 Wideband MultiTerm Imaging : All 6 combinations of the following options.
 specmode = 'mfs'
 deconvolver = 'mtmfs' ( nterms=1 for a singleterm MFS image, and nterms>1 for multiterm MFS image. Tests use nterms=2 )
 usedata = 'sdint', 'sd' , 'int'
 gridder = 'standard', 'mosaic'
 parallel = False
NOTE: When the INT and/or SD cubes have flagged (and therefore empty) channels, only those channels that have nonzero images in both the INT and SD cubes are used for the joint reconstruction.
NOTE: Singleplane joint imaging may be run with deconvolver='mtmfs' and nterms=1.
NOTE: All other modes allowed by the new sdintimaging task are untested as of CASA 6.1. Tests will be added in subsequent releases. Please see the Future Work section at the bottom of this page.
Test Results
The sdintimaging task was run on a pair of simulated test datasets. Both contain a flat spectrum extended emission feature plus three point sources, two of which have spectral index=1.0 and one which is flatspectrum (rightmost point). The scale of the top half of the extended structure was chosen to lie within the central hole in the spatialfrequency plane at the middle frequency of the band so as to generate a situation where the interferometeronly imaging is difficult.
Please refer to the publication for a more detailed analysis of the imaging quality and comparisons of images without and with SD data.
Images from a run on the ALMA M100 12m+7m+TP Science Verification Data suite are also shown below.
Single Pointing Simulation :
Wideband MultiTerm Imaging ( deconvolver='mtmfs', specmode='mfs' )
SD + INT A joint reconstruction accurately reconstructs both intensity and spectral index for the extended emission as well as the compact sources. 

INTonly The intensity has negative bowls and the spectral index is overly steep, especially for the top half of the extended component. 

SDonly The spectral index of the extended emission is accurate (at 0.0) and the point sources are barely visible at this SD angular resolution. 
Cube Imaging ( deconvolver='multiscale', specmode='cube' )
SD + INT A joint reconstruction has lower artifacts and more accurate intensities in all three channels, compared to the intonly reconstructions below 

INTonly The intensity has negative bowls in the lower frequency channels and the extended emission is largely absent at the higher frequencies. 

SDonly A demonstration of singledish cube imaging with deconvolution of the SDPSF. In this example, iterations have not been run until full convergence, which is why the sources still contain signatures of the PSF. 
Mosaic Simulation
An observation of the same sky brightness was simulated with 25 pointings.
Wideband MultiTerm Mosaic Imaging ( deconvolver='mtmfs', specmode='mfs' , gridder='mosaic' )
SD + INT A joint reconstruction accurately reconstructs both intensity and spectral index for the extended emission as well as the compact sources. This is a demonstration of joint mosaicing along with wideband singledish and interferometer combination. 

INTonly The intensity has negative bowls and the spectral index is strongly inaccurate. Note that the errors are slightly less than the situation with the singlepointing example (where there was only one pointing's worth of uvcoverage). 
Cube Mosaic Imaging ( deconvolver='multiscale', specmode='cube' , gridder='mosaic' )
SD + INT A joint reconstruction produces better perchannel reconstructions compared to the INTonly situation shown below. This is a demonstration of cube mosaic imaging along with SD+INT joint reconstruction. 

INTonly Cube mosaic imaging with only interferometer data. This clearly shows negative bowls and artifacts arising from the missing flux. 
Other Tests : ALMA M100 Spectral Cube Imaging : 12m + 7m + TP
The sdintimaging task was run on the ALMA M100 Science Verification Datasets.
(1) The single dish (TP) cube was preprocessed by adding perplane restoringbeam information.
(2) Cube specification parameters were obtained from the SD Image as follows
from sdint_helper import *
sdintlib = SDINT_helper()
sdintlib.setup_cube_params(sdcube='M100_TmP')
Output : Shape of SD cube : [90 90 1 70]
Coordinate ordering : ['Direction', 'Direction', 'Stokes', 'Spectral']
nchan = 70
start = 114732899312.0Hz
width = 1922516.74324Hz
Found 70 perplane restoring beams#
(For specmode='mfs' in sdintimaging, please remember to set 'reffreq' to a value within the freq range of the cube.)
Returned Dict : {'nchan': 70, 'start': '114732899312.0Hz', 'width': '1922516.74324Hz'}
(3) Task sdintimaging was run with automatic SDPSF generation, nsigma stopping thresholds, a pbbased mask at the 0.3 gain level, and no other deconvolution masks (interactive=False).
sdintimaging(usedata="sdint", sdimage="../M100_TP", sdpsf="",sdgain=3.0, dishdia=12.0, vis="../M100_12m_7m", imagename="try_sdint_niter5k", imsize=1000, cell="0.5arcsec", phasecenter="J2000 12h22m54.936s +15d48m51.848s", stokes="I", specmode="cube", reffreq="", nchan=70, start="114732899312.0Hz", width="1922516.74324Hz", outframe="LSRK", veltype="radio", restfreq="115.271201800GHz", interpolation="linear", chanchunks=1, perchanweightdensity=True, gridder="mosaic", mosweight=True, pblimit=0.2, deconvolver="multiscale", scales=[0, 5, 10, 15, 20], smallscalebias=0.0, pbcor=False, weighting="briggs", robust=0.5, niter=5000, gain=0.1, threshold=0.0, nsigma=3.0, interactive=False, usemask="user", mask="", pbmask=0.3)
Results from two channels are show below.
LEFT : INT only (12m+7m) and RIGHT : SD+INT (12m + 7m + TP)
Channel 23
Channel 43
Moment 0 Maps : LEFT : INT only. MIDDLE : SD + INT with sdgain=1.0 RIGHT : SD + INT with sdgain=3.0
Moment 1 Maps : LEFT : INT only. MIDDLE : SD + INT with sdgain=1.0 RIGHT : SD + INT with sdgain=3.0
A comparison (shown for one channel) with and without masking is shown below.
Notes :
 In the reconstructed cubes, negative bowls have clearly been eliminated by using sdintimaging to combine interferometry + SD data. Residual images are close to noiselike too (not pictured above) suggesting a wellconstrained and steadily converging imaging run.
 The source structure is visibly different from the INTonly case, with high and low resolution structure appearing more well defined. However, the highresolution peak flux in the SDINT image cube is almost a factor of 3 lower than the INTonly. While this may simply be because of deconvolution uncertainty in the illconstrained INTonly reconstruction, it requires more investigation to evaluate absolute flux correctness. For example, it will be useful to evaluate if the INTonly reconstructed flux changes significantly with careful handmasking.
 Compare with a Feathered image : http://www.astroexplorer.org/details/apjaa60c2f1 : The reconstructed structure is consistent.
 The middle and right panels compare reconstructions with different values of sdgain (1.0 and 3.0). The sdgain=3.0 run has a noticeable emphasis on the SD flux in the reconstructed moment maps, while the high resolution structures have the same are the same between sdgain=1 and 3. This is consistent with expectations from the algorithm, but requires further investigation to evaluate robustness in general.
 Except for the last panel, no deconvolution masks were used (apart from a pbmask at the 0.3 gain level). The deconvolution quality even without masking is consistent with the expectation that when supplied with better data constraints in a joint reconstruction, the native algorithms are capable of converging on their own. In this example (same niter and sdgain), iterative cleaning with interactive and automasks (based mostly on interferometric peaks in the images) resulted in more artifacts compared to a run that allowed multiscale clean to proceed on its own.
 The results using sdintimaging on these ALMA data can be compared with performance results when using feather, and when using tp2vis (ALMA study by J. Koda and P. Teuben).
The following is a list of use cases that have simulationbased functional verification tests within CASA.
1  Wideband mulitterm imaging (SD+Int) 
Wideband data single field imaging by jointreconstruction from single dish and interferometric data to obtain the high resolution of the interferometer while account for the zero spacing information. Use multiterm multifrequency synthesis (MTMFS) algorithm to properly account for spectral information of the source. 
2  Wideband multiterm imaging: Int only  The same as #1 except for using interferometric data only, which is useful to make a comparison with #1 (i.e. effect of missing flux). This is equivalent to running 'mtmfs' with specmode='mfs' and gridder='standard' in tclean 
3  Wideband multiterm imaging: SD only  The same as #1 expect for using single dish data only which is useful to make a comparison with #1 (i.e. to see how much high resolution information is missing). Also, sometimes, the SD PSF has significant sidelobes (Airy disk) and even single dish images can benefit from deconvolution. This is a use case where wideband multiterm imaging is applied to SD data alone to make images at the highest possible resolution as well as to derive spectral index information. 
4  Single field cube imaging: SD+Int 
Spectral cube single field imaging by joint reconstruction of single dish and interferometric data to obtain single field spectral cube image. Use multiscale clean for deconvolution 
5  Single field cube imaging: Int only  The same as #4 except for using the interferometric data only, which is useful to make a comparison with #4 (i.e. effect of missing flux). This is equivalent to running 'multiscale' with specmode='cube' and gridder='standard' in tclean. 
6  Single field cube imaging: SD only 
The same as #4 except for using the single dish data only, which is useful to make a comparison with #4 (i.e. to see how much high resolution information is missing) Also, it addresses the use case where SD PSF sidelobes are significant and where the SD images could benefit from multiscale (or point source) deconvolution per channel. 
7  Wideband multiterm mosaic Imaging: SD+Int 
Wideband data mosaic imaging by jointreconstruction from single dish and interferometric data to obtain the high resolution of the interferometer while account for the zero spacing information. Use multiterm multifrequency synthesis (MTMFS) algorithm to properly account for spectral information of the source. Implement the concept of conjbeams (i.e. frequency dependent primary beam correction) for wideband mosaicing. 
8  Wideband multiterm mosaic imaging: Int only 
The same as #7 except for using interferometric data only, which is useful to make a comparison with #7 (i.e. effect of missing flux). Also, this is an alternate implementation of the concept of conjbeams ( frequency dependent primary beam correction) available via tclean, and which is likely to be more robust to uvcoverage variations (and sumwt) across frequency. 
9  Wideband multiterm mosaic imaging: SD only  The same as #7 expect for using single dish data only which is useful to make a comparison with #7 (i.e. to see how much high resolution information is missing). This is the same situation as (3) , but made on an image coordinate system that matches an interferometer mosaic mtmfs image. 
10  Cube mosaic imaging: SD+Int 
Spectral cube mosaic imaging by joint reconstruction of single dish and interferometric data. Use multiscale clean for deconvolution. 
11  Cube mosaic imaging: Int only  The same as #10 except for using the intererometric data only, which is useful to make a comparison with #10 (i.e. effect of missing flux). This is the same use case as gridder='mosaic' and deconvolver='multiscale' in tclean for specmode='cube'. 
12 
Cube mosaic imaging: SD only 
The same as #10 except for using the single dish data only, which is useful to make a comparison with #10 (i.e. to see how much high resolution information is missing). This is the same situation as (6), but made on an image coordinate system that matches an interferometer mosaic cube image. 
13 
Wideband MTMFS SD+INT with channel 2 flagged in INT 
The same as #1, but with partially flagged data in the cubes. This is a practical reality with real data where the INT and SD data are likely to have gaps in the data due to radio frequency interferenece or other weight variations. 
14  Cube SD+INT with channel 2 flagged 
The same as #4, but with partially flagged data in the cubes. This is a practical reality with real data where the INT and SD data are likely to have gaps in the data due to radio frequency interferenece or other weight variations. 
15  Wideband MTMFS SD+INT with sdpsf="" 
The same as #1, but with an unspecified sdpsf. This triggers the autocalculation of the SD PSF cube using restoring beam information from the regridded input sdimage. 
Future work
For future work and a summary of the Code Design, please see the "Developer" tab of the sdintimaging task.
References
Urvashi Rau, Nikhil Naik, and Timothy Braun 2019 AJ 158, 1.^{}
https://github.com/urvashirau/WidebandSDINT