Automation of purification for single-walled nanotubes