Energy calibration of a cosmic ray ionization spectrometer