When running the spi_science_analysis script, event energy calculation is carried out on the fly within the spi_obs_hist program. On the other hand, event energies can be computed off-line with the program spi_gain_corr. In the two cases, the corrections are computed in the same way, deriving the energies in physical units (keV) from the instrumental channel (PHA) using a set of gain coefficients.
The correction can be evaluated with the help of up to five gain coefficients . However, currently four coefficients are used for the low energy range through the following polynomial
while for the high energy range only the following linear relation is used
By default the parameter randomize is set to yes and the executable performs a randomization of event energies over the instrumental channel width using a uniform random number generator. If randomise=no then the exact energy of the channel center is attributed to all events of a given PHA channel.
More details can be found in the spi_gain_corr User Manual, which can be downloaded from http://www.isdc.unige.ch/integral/instrument/spi/doc