def start(self, current, selections):
        current.progress.begin('Creating spike density estimation')

        # Prepare quantities
        start = float(self.start_time) * self.unit
        stop = None
        if self.stop_enabled:
            stop = float(self.stop) * self.unit
        kernel_size = float(self.kernel_size) * self.unit
        optimize_steps = 0
        if self.optimize_enabled:
            optimize_steps = self.optimize_steps
        minimum_kernel = self.minimum_kernel * self.unit
        maximum_kernel = self.maximum_kernel * self.unit

        # Load data
        events = None
        if self.data_source == 0:
            trains = current.spike_trains_by_unit()
            if self.align_enabled:
                events = current.labeled_events(self.align) 
        else:
            # Prepare dictionaries for psth():
            # One entry of spike trains for each selection,
            # an event for each segment occuring in any selection
            trains = {}
            if self.align_enabled:
                events = {}
            for s in selections:
                trains[neo.Unit(s.name)] = s.spike_trains()
                if self.align_enabled:
                    events.update(s.labeled_events(self.align))
                    
        if events:
            for s in events:  # Align on first event in each segment
                events[s] = events[s][0]

        plot.sde(
            trains, events, start, stop, kernel_size, optimize_steps,
            minimum_kernel, maximum_kernel, None, self.unit, current.progress)
dataset/ETHPy150Open rproepp/spykeviewer/spykeviewer/plugins/Spike Trains/sde.py/SDEPlugin.start/original