Some analysis scripts for charge measurements