def townsend_lombscargle_wrapper(task):
try:<EOL><INDENT>return townsend_lombscargle_value(*task)<EOL><DEDENT>except Exception as e:<EOL><INDENT>return npnan<EOL><DEDENT>
This wraps the function above for use with mp.Pool.

task[0] = times
task[1] = mags
task[2] = omega