The gain history table JMXi-GAIN-CAL-IDX and the calibration spectral fitting table JMXi-GAIN-CAL, are both created in the Revolution File Pipeline (RFP) which runs automatically at ISDC before/after/parallel with the Data Preparation step. The spectral fitting file is created every 256 seconds by j_calib_gain_fitting, and the RFP then indexes the results into a single gain history table for each revolution. It is this gain history table that gets used automatically in j_cor_gain, unless a delivered IC gain history table exists for the revolution being processed.