fixed compensation script to allow baseline voltage to be specified