funcs.py: functions for unit computation; writelines() errors: cancel all the calling except function WriteAscii in OutAnalysis.py