added pedestal subtraction to bgo matrix