def __add__(self,other_roipack):
        comb = copy.deepcopy(self)
        if hasattr(comb,'layers'):
            lay1 = self.layer_names
        else:    
            # Convert single-layer to multi-layer ROI
            comb.layers = {self.layer:self}
            comb.layer = 'multi_layer'
            lay1 = [self.layer]
        svg_fin = copy.copy(comb.svg)
        if hasattr(other_roipack,'layers'):
            lay2 = other_roipack.layer_names
            for k,L in other_roipack.layers.items():
                comb.layers[k] = L
                comb.rois.update(L.rois)
                to_add = _find_layer(L.svg, k)
                svg_fin.getroot().insert(0, to_add)
        else:
            comb.layers[other_roipack.layer] = other_roipack
            to_add = _find_layer(other_roipack.svg, other_roipack.layer)
            svg_fin.getroot().insert(0, to_add)
            lay2 = [other_roipack.layer]
        # Maintain order of layers according to order of addition
        comb.layer_names = lay1+lay2 
        comb.svg = svg_fin
        comb.kdt = cKDTree(self.kdt.data) # necessary?
        for L in comb.layer_names:
            comb.layers[L].kdt = comb.kdt # Why the hell do I have to do this?
        #for r in comb.rois:
        #    r.parent = comb # necessary?
        return comb
Get a field or callable from the actor.
dataset/ETHPy150Open gallantlab/pycortex/cortex/svgroi.py/ROIpack.__add__--crossover with--dataset/ETHPy150Open jodal/pykka/pykka/proxy.py/ActorProxy.__getattr__