Various helper code to process PhD data