implement filling of discriminator template + adjust code to read calibration factors in the format I saved them