def setpara_bdsm(self, img, det_file): from types import ClassType, TypeType chain=[Op_readimage(), Op_collapse(), Op_preprocess, Op_rmsimage(), Op_threshold(), Op_islands()] opts = img.opts.to_dict() opts['filename'] = det_file opts['detection_image'] = '' opts['polarisation_do'] = False ops = [] for op in chain: if isinstance(op, (ClassType, TypeType)): ops.append(op()) else: ops.append(op) return ops, opts
from islands import Op_islands from gausfit import Op_gausfit from make_residimage import Op_make_residimage from output import Op_outlist from shapefit import Op_shapelets from gaul2srl import Op_gaul2srl from spectralindex import Op_spectralindex from polarisation import Op_polarisation from wavelet_atrous import Op_wavelet_atrous from psf_vary import Op_psf_vary from cleanup import Op_cleanup from _version import __version__ import gc default_chain = [Op_readimage(), Op_collapse(), Op_preprocess(), Op_rmsimage(), Op_threshold(), Op_islands(), Op_gausfit(), Op_wavelet_atrous(), Op_shapelets(), Op_gaul2srl(), Op_spectralindex(), Op_polarisation(), Op_make_residimage(), Op_psf_vary(), Op_outlist(), Op_cleanup() ]