def write_ser(bufferdata, filename='ser'):
    """
    Write a ser file from FTICRData
    """
    with open(filename, 'wb') as f:
        for i in range(len(bufferdata)):
            for j in range(len(bufferdata[0])):
                f.write(bufferdata[i][j].astype('int32').tostring())
