## The Non-Linear Method - MOSMEM

The non-linear path to combination is conceptually quite different to the linear one, even though its success ultimately rests on the same data. The non-linear combination uses the task mosmem (and the maximum entropy principle) to perform a joint deconvolution of the mosaic and single-dish images. It finds the model which maximises the entropy, subject to two separate constraints (one each for the mosaic and single-dish images). Usage of mosmem is similar to that in Section 21.6, expect that there are now two parameter values for the map, beam, rmsfac and q keywords, with these corresponding to the mosaic and single-dish values (in that order).

Unlike immerge, the non-linear approach works with dirty images.

Note that you have to give a single-dish beam dataset. Unlike all the other deconvolution tasks, the image size of this dataset can be much smaller than the image being deconvolved (mosmem will zero pad to make it the size that it requires), and it can be asymmetric (normally beams are assumed to have even'' symmetry). If you do not have a beam dataset, then probably the best thing you can do (apart from actually going out and determining it through an observation) is to generate a gaussian image, with the appropriate resolution, with imgen. Task imgen takes a template image as its input, multiplies the template by a scale factor, and then adds an object''. A convenient approach would be to use the single-dish image as the template (or a single plane of this in spectral line experiments), multiply this by 0 and then add a gaussian. Typical inputs would be:

 IMGEN in=lmc.sd Give the single-dish image as template. factor=0 Multiply template by 0. object=gaussian Add a gaussian. spar=1,0,0,1128,1128,0 Gaussian is 18.8 by 18.8 arcmin (1128 arcsec) at image centre and with amplitude 1. out=lmc.sd_beam Output is the beam dataset.

Task mosmem needs to know the rms noise in the two input images. It determines this by multiplying the theoretical rms noise (the theoretical noise is required to be present in the dataset) with the rmsfac input parameter. While invert will have saved the required noise information in the mosaic dataset, you will most likely have to add some estimate of the theoretical noise level to the single-dish dataset. You could estimate this by using cgcurs (using options=stat) to determine the rms level in some blank part of the sky (see Section 17.3). Task puthd can then be used to set the appropriate item (named, surprisingly, rms) in the single-dish image. For example:

 PUTHD in=lmc.sd/rms Set the rms item in the single-dish dataset. value=5.0 Set the theoretical noise as 5.0 Jy/beam.
As you have probably set the rms item in the dataset to the noise level that you believe is true, the rmsfac parameter for the single-dish image that you input to mosmem can usually be left unset (it will default to 1).

As with immerge, parameter factor allows you to set the flux calibration factor (the factor by which the single-dish is scaled) as one of the inputs to mosmem. However, unlike immerge, if you do not set the parameter, mosmem assumes the flux calibration factor is 1 - that is, mosmem does not determine this parameter by default. However mosmem still has the ability to solve for the calibration factor - use options=dofactor to turn this on. In this case, the factor parameter is used as an initial estimate (it should be a reasonably good estimate). Unlike immerge, you do not need to tell mosmem what the overlap annulus is - this information is implicit in the beam datasets.

It might be instructive to compare the factor estimated by mosmem and immerge - they can differ significantly, and yet both seem to be consistent with the data.

If you use options=dofactor with a spectral cube, mosmem will work out a separate flux calibration factor for each plane. This is not what you probably want (particularly for planes that are predominantly noise!). In this case, its better to deduce the calibration factor beforehand, and not to use options=dofactor in mosmem. Some approaches to deduce the calibration factor beforehand include:

• use immerge (but recall that immerge requires a deconvolved mosaic), or
• use mosmem on an integrated intensity (zeroth-order moment) image or on a plane with substantial emission.

Note that options=doflux cannot be used when doing a joint mosaic/single-dish deconvolution - an integrated flux constraint is implicit in the single-dish data.

Typical inputs to mosmem would be

 MOSMEM map=lmc.mosaic,lmc.sd Inputs are the dirty mosaic and single-dish datasets. beam=lmc.beam,lmc.sd_beam Mosaic and single-dish beams. niters=30 Maximum number of iterations. region= Region to deconvolve. rmsfac=1,1 RMS noise fudge factors. out=lmc.model The output model. factor= Set this to the calibration factor, or it defaults to 1. options Leave unset to fix the calibration factor, or options=dofactor get MOSMEM to solve for this.

Having performed a joint deconvolved, you will want to use restor with the model produced by mosmem along with the mosaic dirty image and beam.