Generates bin edges for a linspace tiling: there is one edge more than bins and each bin is in the middle between two edges

def linspace_bins(self,bins=None,units=None,conversion_function=convert_time,resolution=None,end_at_end=True,extra_bins=0):
        """Generates bin edges for a linspace tiling: there is one edge more than bins and each bin is in the middle between two edges"""
        bins = self.linspace(bins=bins,units=units,conversion_function=conversion_function,resolution=resolution,end_at_end=end_at_end,extra_bins=extra_bins)
        resolution = bins[1] - bins[0]
        bins = np.concatenate([bins,bins[-1:]+resolution]) - 0.5*resolution
        return bins