from casatools import quanta, sidebandseparator
def sdsidebandsplit(imagename, outfile, overwrite, signalshift, imageshift,
getbothside, refchan, refval, useother, threshold):
separator = sidebandseparator()
separator.open(imagename)
separator.setshift(signalshift, True)
separator.setshift(imageshift, False)
separator.setlimit(threshold)
separator.setboth(getbothside)
qrefval = myqa.quantity(refval)
separator.set_imageband_frequency(refchan, qrefval)
separator.setsolveother(useother)
separator.separate(outfile, overwrite)