def update_params(params, param_dict, lineshape='PV', xy_bounds=None):
    """ Update lmfit parameters with values from Peak

        :param params: lmfit parameters 
        :type params: lmfit.Parameters object
        :param param_dict: parameters corresponding to each peak in fit
        :type param_dict: dict
        :param lineshape: lineshape (PV, G, L, PV_PV etc.)
        :type lineshape: str
        :param xy_bounds: bounds on xy peak positions
        :type xy_bounds: tuple

        :returns: None
        :rtype: None

        ToDo
          -- deal with boundaries
          -- currently positions in points

    """
    for k, v in param_dict.items():
        params[k].value = v
        if 'center' in k:
            if xy_bounds == None:
                pass
            else:
                if 'center_x' in k:
                    x_bound = xy_bounds[0]
                    params[k].min = v - x_bound
                    params[k].max = v + x_bound
                elif 'center_y' in k:
                    y_bound = xy_bounds[1]
                    params[k].min = v - y_bound
                    params[k].max = v + y_bound
                print('setting limit of %s, min = %.3e, max = %.3e' % (k,
                    params[k].min, params[k].max))
        elif 'sigma' in k:
            params[k].min = 0.0
            params[k].max = 10000.0
        elif 'gamma' in k:
            params[k].min = 0.0
            params[k].max = 10000.0
        elif 'fraction' in k:
            params[k].min = 0.0
            params[k].max = 1.0
            if lineshape == 'G':
                params[k].vary = False
            elif lineshape == 'L':
                params[k].vary = False
