Subject: Re: Energy calibrations Dear Paul, you seem to have grasped the idea pretty well. Yes, the corrected energy bin assigned to each event (PI value) can be read as a direct KeV value by looking at the relevant bin in the FBDS-MOD table. Of course, each bin is a range of energies, not an absolute value. Also the PI value of each event could conceivably change if we get some new understanding of the instrument calibration. There are several PI-to-KeV tables available, used for each of the different data formats. FBDS contains 256 channels for FULL and SPTI data. RBDS contains 8 channels for REST data. SBDS contains 8 channels for SPEC data. In theory, each of the lower formats is just a subset of the better resolved formats, but we've given them each their own separate table so that they can be defined independently, if this is deemed necessary. The gain calibration itself has one major weakness, namely how to deal with glitches and discontinuities (switch on/off) in the gain history. I produce a history table of the ADC channel positions of the calibration peaks for the 4 anode segments on each instrument (6 Cd-109 peaks at 22KeV, 2 Fe-55 peaks at 6 KeV). I treat this on a per-revolution basis to find gain values for event times between the values we have for each 256s calibration integration period. This involves fitting a smoothly time-varying model (currently a brief decay at switch on followed by a slope with a couple of harmonics) which can smooth over the sudden local glitches that occur. Taking the average gain thus obtained from all 4 anode segments (3 for JEM-X2 for which anode segment 1 has in the past had very dubious behaviour), gives a value that follows very well with the overall gain variation seen on the instruments. We suspect that the energy resolution however, is compromised somewhat (a couple of percent) by the localised glitches that come and go randomly all over the plates. Apart from the glitch problem itself, the gain history smoothing can fail to provide and accurate gain correction for a couple of reasons: 1) The switch-on gain decay which was so pronounced at the beginning of the mission seems to fade away as the microstrip plates age. This is the switch on after perigee and the radiation belt passage. 2) Emergency switch-offs and switch-on for which the instrument is out of action for only a minutes/hour, produce a big gain decay, which is simply not covered by the current smoothing model. Though these are relatively rare, the automatic program should be able to deal with them. For problem 1) the damage is usually limited to a poor gain determination for scws close to the switch on, but for 2) the poor model fit can ruin the gain determination for the entire revolution. In both of these cases, I suggest that people use the linear interpolation between gain history points to make the gain correction. This week I will be delivering a new version of j_cor_gain with a superior gain fitting model which should deal with both these problems. The upshot is, that you are still best off using the -COR PI values for each event that come out of OSA (your program will after all be part of OSA eventually). These may not always be perfect, but they will reflect our current best understanding of the instrument gain calibration, and are therefore the best KeV values for the events that we have in the pipeline. Best wishes, Carol Anne .DANISH.SPACE.RESEARCH.INSTITUTE.DANISH.SPACE.RESEARCH.INSTITUTE.DANISH. Dr. Carol Anne Oxborrow Email: oxborrow@dsri.dk Homepage: http://www.dsri.dk/~oxborrow Telephone (direct): +45 35 32 57 33 Telephone (secretary): +45 35 32 57 01 Fax: +45 35 36 24 75