extraction size convert function to src/misc.py