def pack_table(pbest, abest, iers, rec, param_columns, amp_column,
               ier_column=None):
    # pack the amplitudes
    rec[amp_column] = abest

    # pack the parameters
    for dbest, dcolumns in zip(zip(*pbest), param_columns):
        for p, c in zip(zip(*dbest), dcolumns):
            rec[c] = p

    # pack the iers
    if ier_column is not None:
        rec[ier_column] = iers
Pack fitting parameters into table
dataset/ETHPy150Open jjhelmus/nmrglue/nmrglue/analysis/linesh.py/pack_table