completely new script for catalogue / PCA.  This is not its final resting place - i just don't want to risk losing it