use real part at common.dumps()
Python 2.7 supports io.BytesIO
add test_calib.py