Contents
1. What I have done: what this memo covers and does not cover (BESSY October 1997, ssdx/ssd5, energy range, Si crystal)
2. Starting points: JMKMOD8, XSPEC version 10 with Shaun's modifications to the falling tail, values for fixed parameters, step size, the energy scale problem, how to get initial guesses for variable parameters
3. Sample fits: ssdx, general run of variable parameters
4. Parameter interrelationships: what to watch for when you change things, what are actual detector results and what will vary at other places/times
5. The SM plotting script and data file, parameter plots, my files
6. Suggestions for further work: improving ssd5 fits, fits at other energies from October 1997 BESSY data, fitting other data, future improvements to JMKmod
1. What Have I Done?
A beginning is a delicate thing: depending on whether it is done well or poorly, what follows will tend to lead to weal or woe.
Therefore let me begin with a few simple facts, and gradually work up to the more sophisticated aspects of this memo. I will try to carefully describe exactly what it is I have done with the BESSY spectra I have analyzed, and just as importantly I will try to explain as I go along what I have NOT done.
This data analysis applies exclusively to BESSY SSD spectra taken in October 1997 on the KMC beamline. The detectors involved were those dubbed the "ssd_x" and "ssd_5" at the XRCF, denoting their respective locations in the XRCF vacuum chamber. At BESSY, approximately 100 spectra were taken on the KMC with these 2 detectors, variously using 3 different crystals in the tunable monochromator. These crystals were made of silicon, beryl, and indium antimonide (denoted Si, Be, InSb). The crystals collectively covered an energy range from 0.8 to 5.9 keV. Individually, they covered the following ranges: Be = 0.8-1.7 keV, InSb = 1.7-5.1 keV, Si = 2.1-5.9 keV, although the InSb crystal was employed with ssd5 only. The data analyzed and discussed below are for selected spectra with the Si crystal, broadly covering the 2-6 keV range for both SSDs. I will try to point out those results that will differ with what follows for spectra at other energies, or for spectra taken at different times or at different facilities (such as the XRCF DCM).
The object of this analysis was to use the SSD spectra of monochromatic radiation from a well-calibrated source to derive an SSD response matrix (sort of a spectral point-response function), which would then be an input to JMKmod allowing analysis of all manner of spectra taken at the XRCF with these selfsame SSDs.
2. Starting Points
For the discussion below, I assume the Gentle Reader has a working knowledge of how to invoke XSPEC and specify models and parameters within it. The Ignorant Reader is advised to consult other memos and documents that exist to explain how to get to this stage. I pick up the story from that point.
Because we do not start with a known response matrix and are using a unit diagonal matrix within XSPEC instead (indeed, we are trying to derive the parameters that will lead to a response matrix), I needed to use a version of JMKmod which could simultaneously fit several lines in order to take account of pileup, fluorescence, and escape features. I therefore used JMKMOD8, the flavour which could deal with the eponymous number of lines. Typically 5 or 6 of these slots were actually used. To simplify things at the beginning, we decided to look only at the higher energy spectra, so that the fluorescence and escape behaviour could be clearly delineated. As it turned out, we never did get to the lower energy spectra, except for a few minor experiments at fitting, so the results below apply only to the Si data, and not the other crystals. Suggestions on what to look for if and when lower energy spectra will be fitted are made towards the end of this memo.
After a lot of effort, a version of JMKmod became available which put the falling tail just above the main line, not just above channel zero as existed in the original JMKmod. It is therefore also important to ensure that one is using a similar (or later) version of JMKmod. This modified falling tail was implemented within XSPEC v.10, and will generally not be available in earlier versions. Thanks are due to Shaun Serej for making these improvements to JMKmod.
Most of the 70-odd parameters appearing in JMKMOD8 will be fixed to sensible values and one never need worry about them subsequently. A list of such numbers appears in our SPIE paper (a PS version is available online, ask around). I will not reproduce that information here. (For cheaters, this paper also contains a now somewhat outdated set of "final" values for parameters we are trying to determine.) A word to the wise about units, however. Some parameters assume units of channel number, and others use eV, or keV. At around 5 eV/ch, not knowing which is which will lead to some horrible mistakes, and XSPEC v.9 allowed me to do this frequently at the beginning. Mercifully, v.10 now displays the units to each parameter when the model is listed. It is also important to realise that the aforementioned gain (5 eV/ch) is not the same as the JMKmod gain parameter, which has units of channel/e-h pair and a value around 0.6 for the SSDs. This needs to be divided into the i_pot parameter (3 eV/e-h pair) to get the actual gain.
With these facts under one's belt, one should be able to set up a rude model fit to a monochromatic SSD spectrum with manual insertion of rough parameter values for the gain (~0.6), offsets (~0), fano (~0.15; more on this later), broad (~11-12 ch; = resolution/gaussian sigma), and line energy. You can manually improve this model further by using the parameter values from our SPIE paper as a guide. Either way, you should now be in a position to let XSPEC rip with your starting model, and beat down that chi-squared statistic. While you are waiting for your first attempt to converge, you should know that, for each parameter, XSPEC asks for 6 numbers: 1 = a value for the parameter itself, 2 = a step parameter between 0 and 1 (the smaller this is, the more finely XSPEC chops up the parameter range in computing its numerical derivative, and the longer it takes to compute), 3&4 = parameter range minimum, 5&6 = maximum. In my experience, a step value of 0.1 or larger does a poor job of finding a chi-squared minimum, while a value of 0.01 is pretty good, but really slow at the beginning if you're a long way from a good set of values. A good initial step is 0.03, and you can lower it to 0.01 once you get pretty close ("close" includes cases where the chi-squared is large but you know only 2 or 3 parameters are off their best values, instead of all 15 &emdash; or whatever).
A fundamental problem with fitting SSD spectra in this way is that of the energy scale. In principle, with 3 fluorescence features, an escape feature, and a pileup peak, all of whose positions relative to the main line are constrained by known physics, XSPEC should easily converge on the 2 parameters that set the energy scale, namely the gain (param. 5) and offset (param. 3; I assume here that i_pot has been frozen at 0.003 for SSDs, and that we will solve for the energy offset, not the channel offset = param. 6). [The equation is E (keV) = (0.003/gain) * channel + Eoff. A positive Eoff means the zero-point is at negative channel numbers. The channel offset parameter has the opposite sign convention.] However, because all these secondary features are very weak, typically 2 orders of magnitude or more less than the main line, XSPEC has a very hard time finding a global minimum to chi-squared unless it is very close to begin with. In practice, one is also solving for the line energy, because the KMC only has a nominal energy scale, and the tuned values for the monochromator radiation will differ by up to 150 eV from the nominal values at the higher energies. So as far as the energy scale is concerned, the fitting problem then becomes practically undetermined, even though formally it is well-determined. One has to use a more subtle strategy to help XSPEC along, which I outline below.
We use the known relationships among the weaker spectral features to constrain the energy scale parameters. First, make sure that pileup is turned off in JMKmod, and that instead you are modelling the pileup peak as a line constrained to have exactly twice the energy of the main line (you type "= 43 * 2" at the prompt for param. 50, since the main line energy is param. 43 for JMKMOD8). Then as closely as possible by eye, note the channel numbers where the main line and the pileup line peak up. You can replot the spectrum over a smaller range of channels to see this better. Then the zero-point of the energy scale should be exactly as many channels below the main line position as the pileup peak is above the main line. Typically this was at ch. -25 for ssdx and ch. -5 for ssd5. Multiply these numbers by 0.005 to get keV and negate the sign to get the guess for Eoff = param. 3. This number will be correct no matter what the combination of the main line energy and the gain parameter turns out to be, since raising one of those parameters will lower the other, and Eoff should be unaffected. You will see this in the residuals for the pileup peak, which should not slope up or down across the line, but be flat to within the noise.
In order to constrain the gain, we then have to use the escape or fluorescence features. I assume pairs of values for (gain, Emain) are always chosen so that the main line peak is well-modelled. Then if the gain is too large and Emain is too small, the Ge-L escape peak in the model (which must be constrained to be 1218.5 eV below the main line; type "= 43 + -1.2185") will appear below (ie, at a smaller channel number than) the escape in the data, and the fluorescence lines in the model (at 1218.5, 1486.5, & 1739.7 eV for Ge-L, Al-K, & Si-K) will appear above the data (higher channel number). Conversely, for a gain too small and Emain too large, the escape will be modelled too high, and the fluorescence too low. This is all while Eoff is unchanging. In this way one can home in on a correct set of energy scale parameters.
As a further practical matter, I recommend freezing the value for the gain that gives the best fit, otherwise there is no guarantee that XSPEC might not wander off into some nether part of chi-squared space, and even when it works, the formal errors become unreasonably large. This is also a good thing because the nature of the detector electronics guarantees that the gain parameter is the quantity that varies least with time (ie, from spectrum to spectrum). Allyn Tennant has shown that, when the electronics are left alone, the gain is stable to typically 1 part in 500 or 1000 (see his presentation in the August 1997 XRCF Workshop). So make sure that the gain you're using is pretty d*mn close to the gain you get for all other spectra obtained within the same test sequence.
For now, leave fano at ~0.15 or so, and choose a broad which fits the topmost part of the main line well. You will then have "wings" on your main line which represent the rising and falling tails, and also a flat shelf, which values you can roughly obtain from our SPIE paper. I will discuss these parameters further below.
3. Some Sample Fits: a Case Study of ssdx
For this section I will discuss the results for the October 1997 BESSY/KMC ssdx data as finally solved to my satisfaction. Unfortunately I was not able to get the ssd5 spectra to the same level of finesse, but I will suggest where those solutions lie in an ensuing section. I will also attempt to describe what parts of this ssdx solution will be generally applicable to this detector, and what parts are merely lessons for calibrating ssdx at other times and places, or for modelling other SSDs.
You should be looking at a set of plots generated by my SuperMongo script acting on my results data file while you read this discussion (see §5 for a description of these files). The ssdx data are crosses connected by a dotted line; there is also data for ssd5 (stars connected by a solid line) which I may mention in some cases. Looking at a typical spectrum at the same time would also help.
The first page shows the Eoff, gain, and broad parameters as a function of energy, with the 4th panel giving the overall chi-squared, for the spectra analyzed. Note that the gain has been frozen to a constant value as described above, although the ssdx spectrum at 5.8 keV seems to be slightly anomalous in this regard. For ssdx, the "correct" value for the gain may well be 0.612±0.001. The ssd5 spectra were not as rigorously treated, and so the gain may be only accurate to ±0.002 or so. For the zero-point offset, the solved values are consistent to the extent that the rms variation from spectrum to spectrum is around 5-10 eV, in agreement with Allyn Tennant's results.
Now, the 3rd panel (the broad parameter) shows an interesting effect. The resolution of a germanium detector has 2 components, namely that due to the Fano effect (a superresolution effect) which is intrinsic to the detector material, and that due to the detector electronics (a gaussian effect). The former has a dependence on the square root of the energy with the coefficient being constant over time to an rms ~ 2%, while the latter is constant with energy but somewhat more variable with time at ~5% rms (the rms numbers are quoted from Allyn Tennant's work mentioned previously). The SSD spectra typically do not have enough signal-to-noise, or dynamic range in energy, to solve for both of these parameters simultaneously (although this can be done for the many lines emitted by the Cm source in the ssd5 aperture wheel). Therefore we choose a value for fano, and fit broad for a number of spectra at different energies. The test for whether we have chosen the "best" value for fano is: to what extent are the fitted broad numbers constant from spectrum to spectrum? This is because if we choose the wrong fano, we will need a different value for broad at each energy to take account of the fano effect that is not represented by our chosen fano value. A rising or falling trend for broad indicates that the chosen fano should be larger or smaller, respectively. The 3rd panel plot shows examples of a good choice for fano (0.17±0.01) for ssdx, but a poor (low) choice for ssd5. The best fano for ssd5 is estimated to be 0.14±0.01.
The 4th panel (chi-squared) shows that in the midrange of these spectra, we can obtain very good fits overall, with chi-squared ~1.15 - 1.20. At higher energies, the chi-squareds are distorted upwards because of a few channels with very low counts (0 or 1). Removing the offending channels gives low chi-squareds consistent with the visually good fits for these spectra. At 2.1 keV, however, there are persistent problems in getting all aspects of the spectra to be simultaneously well-fitted. These issues have not been resolved as of this writing; the ssdx solutions are therefore only vouchsafed over the range 2.3-5.8 keV.
On the second page of parameter plots the rising and falling tail parameters are given. Each tail has a normalization and a "slope" parameter. In all these fits, the main line is fixed to have unit normalization, so that all other features are normalized relative to the main line, and these must all be <1. The slope parameter for each tail is that of an exponential which, when convolved with the same gaussian as for the main line, gives the form of the tail itself. The slope parameter is such that values >1 give a rising tail and values <1 give a falling tail, while values close to unity give a shallower slope and values further from unity give a steeper slope.
We expect that the falling tail, being the result of inaccurate pole-zero adjustment in the detector electronics, is not energy-dependent since it is not an intrinsic property of the detector material. This is seen in the top two plots where the falling tail norm varies around 0.2-0.4 of the main line, with slope parameter ~0.91-0.92. By contrast, the rising tail (which is actually the combination of 2 or 3 different effects, one of which usually dominates) is caused by physical effects within the detector material, as is the flat shelf discussed below (plot page 3). Thus we expect an energy dependence which generally falls with energy except for sharp jumps at absorption edges in the Ge (~1.2 keV) and the Al (~1.5 keV). This is indeed what we see in the bottom two plots of page 2, where the rising tail can contain a significant fraction of the total flux at the lower energies, but drops off like some negative power of E. (1/E?)
Note, as an aside, that some of the ssd5 points are not consistent with the physics described above, because the fits had veered off into a somewhat pathological part of parameter space that gave technically better chi-squared. This would be for those ssd5 spectra that have tail norms >1; where the norms are reasonable (<1), this indicates those few ssd5 spectra that have been fit with physically reasonable parameters.
One further point about the tails: the difference between the rising tail parameters for the two detectors in the fourth panel are real, and indicates that the rising tail for ssdx is shallower in all cases than that for ssd5. This fundamentally arises from the same physical cause (crystal imperfections) as does the larger values for the fano and broad parameters for ssdx, giving that detector the poorer energy resolution of the two. Ironically, the tails for ssd5 are much harder to fit because it is a better detector and the tail effects are closer to flush with the otherwise gaussian line shape. This is reflected in the respective error bars for these plots.
Page 3 shows the flat shelf as a function of energy, and intercompares the shelf and tail norms as well as the broad parameter and pulser width. Since the shelf and rising tail depend on energy in the same way, naturally they would be expected to correlate with each other as in the 3rd panel. However, the falling tail is independent of the shelf amplitude, as shown in the 2nd panel. Now, the pulser is an electronic calibration signal injected into the data stream to appear as a peak around channel 2500, and ostensibly should have a gaussian width equal to the broad. In fact its purpose is to help calibrate the detector resolution. In the spectra it is clear, however, that the pulser profiles are distinctly non-gaussian for both detectors, with an extra feature reminiscent of a rising tail. Although the signal-to-noise in the pulser peaks is too low to reliably model this non-gaussian behaviour, it clearly shows why we do not see the points in the 4th panel fall on the line of equality between the broad parameter and the pulser width. In retrospect the technique we used in the 3rd panel of plot page 1, choosing a fano which gives an energy-independent broad, is seen to adequately calibrate the detectors' resolution parameters, without need of the pulser information.
On plot page 4 is shown the various fluorescence and escape behaviours. For Ge and Al, being detector materials, the behaviour is similar to the shelf and rising tail norms, with some numerical glitches where some of these features overlap in the spectra and therefore become occasionally difficult to separate in the model. The Si plot merely demonstrates that, not being part of the detector but arising instead in the crystal of the monochromator beamline, it is expected to be energy-independent. The other crystals are not expected to show any fluorescence features at this level, although there is an extra feature at ~770eV in the first 1/2-dozen spectra of this dataset (runids 500230-35). This may be due to a Co-L line, or it may be something else entirely. Either way it is not relevant for calibration.
Finally, plot page 5 shows some data concerning the pileup peak normalization and the total normalization, with the chi-squared data reproduced for convenience. The "corrected" main peak rate plotted in panels 2 & 3 means that the fitted flux, which includes contributions of the tails and shelf, has also had (2x) the pileup, escape, and Ge & Al fluorescence added back into it to give the total flux of the incoming photons.
4. Parameter Interrelationships
Here I will try to describe how to recognize and/or avoid some common fitting problems I have encountered. It is important also to realise that the channels "noticed" for a fit can be very important, in the sense that including channels that show features that you cannot or are not modelling can strongly distort the fitted parameters away from their "correct" values.
As mentioned above, Eoff can be determined uniquely by inspection of a given spectrum. If a subsequent fit run pushes Eoff away from its preferred value, the effect will be noticed as a sloping residual trend below the pileup peak, assuming the main line peak is well fit, as well as a decrease in the pileup peak's fitted amplitude. Also, if multiple spectra have erroneous Eoffs, this would be seen in either a trend of Eoff vs. energy or an rms from spectrum to spectrum greater than the 5-10 eV expected. The correction for a given spectrum is to try again with the preferred Eoff and adjust the other parameters so as to induce the fitting to stay with this Eoff. Note that freezing Eoff to one's estimate may not allow XSPEC to find a better number, and in fact in some circumstances, because of a zero-point convention hidden within JMKmod, may severely distort the fit in a completely unexpected way.
Because the gain is an intrinsically stable parameter, and the energy scale of monochromators is not well-known, fixing the gain and allowing all the line energies to be fit (within physical constraints) is the preferred method for obtaining the energy scale solution. In this way, as the chosen gain parameter is increased, the fitted Emain will decrease but Eoff should remain near its estimated value. At the same time, an increased gain will shift the fitted fluorescence lines up in channel number, while the escape line will shift down. The match of the model to these features will give the critical clue as to whether the chosen gain is correct. When all lines and the gain and offset are near their true values, the chi-squared should be near its feasible minimum.
For the detector resolution parameters, namely the fano and broad, trading one off against the other has little effect on any of the other parameters. This allows one to find the right values using the apparent energy-dependence of broad as a clue to the correct value of fano, as described earlier. Mathematically the resolution goes like ˆ(fano*E + broad**2). Our SSDs appear to have fano values a little larger (0.17 for ssdx, 0.14 for ssd5) than what is commonly thought to be typical (~0.07-0.15) for Ge detectors. But the larger values for ssdx of both broad and fano are consistent with the fact that this detector has been "repaired" more often than ssd5, which has the effect of increasing the impurities that cause surface effects in the material, degrading the resolution.
Holding fano fixed, however, one must be able to simultaneously get the tail and broad parameters correct in order to have the main peak be well fit. XSPEC commonly gets hung up in some parts of parameter space where it finds a local minimum in chi-squared, but where the tails and broad are unphysically modelled. This can sometimes be seen in the residuals under the main peak, where a poor set of parameters can give a "triple hump" effect, which may be easily seen or quite weak. A good set of parameters should leave the residuals very close to the appearance of pure random noise, although they may also exhibit the triple hump. The triple hump is a clue, but physical reasonableness should be the deciding factor in picking the right set of tail parameters. [Note that for ssdx, under the rising tail there is always an extra bump which is attributable to the fact that this tail arises in 2 or 3 different physical effects. Although one of them usually dominates, the other(s) introduce(s) this constant small distortion. This is not part of the triple bump.] Thus correct values for the tail norms are <1, while the slope parameters should be no more than ~0.1 or so different from unity, and the broad should be energy-independent. Examples of erroneous sets of these numbers which give otherwise reasonable fits are: (a) the tail norms are large (>1), especially at the lower energies, the falling tail slope is somewhat too steep, and broad rises steeply with energy in an attempt to compensate for the unphysical tail norms, as if the fano were too small; (b) the other parameters seem reasonable and the fit looks good but the falling tail slope parameter is extremely steep, ~0-0.2, indicating that there isn't much of a falling tail at all that is distinguishable from the main peak itself.
While the flat shelf is easy to fit, a word to the wise about the total normalization. JMKmod computes this as Totnorm = (Emainnm (=1) + Risnorm + Falnorm + Shnorm) > 1. Thus the contribution of the shelf, say, to the total normalization is Shnorm/Totnorm, but the values plotted are the individual norms, relative to the main peak. The amplitudes of the secondary peaks are fairly error-free unless, at lower energies, they overlap each other or the main peak, when of course there will be fitting uncertainties. The trend of their amplitudes, however, should be interpolated across these uncertain points. It should also be unnecessary to point out that KMC spectra with the InSb or Be crystals will not show any Si fluorescence.
Now, the next question is: which of these values will be fixed features of the detectors, usable in other calibration calculations, and which will change at other times or places with different setups? It should be clear that "intrinsic" parameters such as the fano should not change over time (unless the detectors are internally altered in some way), while parameters depending on the detector's electronics, such as the offsets, gain, or electronic broadening, will change every time the detector setup will change, such as between facilities (BESSY/XRCF) or between test stages (Phase E/G/J etc.), and even sometimes within phases if there was a break due to equipment failure or the like. For the "setup" parameters, the solutions presented here are obviously not as important as the strategy used in arriving at them, and then the numbers can be used as a starting point. Other parameters will fall into one of these two categories as follows.
Since the falling tail is a function of the pole-zero adjustment, those parameters would fall into the setup class, while the rising tail and flat shelf parameters belong to the intrinsic class. [In fact, depending on whether the pole-zero adjustment is set to give a slight overshoot or undershoot, the falling tail could actually become part of the rising tail, ie there needn't be a falling tail at all. In this case the pole-zero effect is likely to be less than the surface effects that yield the rising tail and shelf, and so can probably be ignored.] If the detectors are opened up for more internal work, the fano can be expected to increase, while the rising tail slope would become more shallow (closer to 1), but the norms should trend with energy in the same general way. Since the probability of a photon being detected in one of the tails or shelf is always less than the probability of being detected in the main peak, those norms should always be <1. The escape and fluorescence lines should also fall into the intrinsic class, except for the Si feature, which is peculiar to spectra using that crystal. The pileup norm is part of the setup, since it will increase as the count rate rises. It must occur at twice the energy of the main line, making its position an intrinsic parameter, although at lower energies the pileup will also overlap with 2nd order photons from the beamline optics, which aren't at exactly double the energy of the 1st order main line, although they are close (within maybe 5-10 eV). The 2nd order will thus be an intrinsic but confusing effect. All other parameters are listed as fixed, with their values, in the table of our SPIE paper.
5. The SuperMongo Plotting Script and Associated Files
On one of the MST web pages, these files are available for download, along with some readme files that explain a little bit about how to set up and run the script. Here I will just give a general description of the purpose and contents of the files, and the Gentle Reader is referred to the web pages for more details.
This script ("jmk.sm") allows one to plot any JMKmod parameter listed in the associated data file (see below) against any other parameter, in 4-up format. The plots described in the above sections are therefore only examples of what can be plotted. The script always takes care of various bookkeeping calculations, errorbars, and labelling, and is a convenient way to present the overall results of SSD fitting in a visually intuitive way. With a similar data file format, the script can also be used to plot the results of a similar parameter set for, say, the FPCs, or any other set of spectra for which JMKmod is used for modelling. For those people unfamiliar with the SM language, I have tried to adequately comment the script so that it is clear what the code is doing, and in any case the code is not so sophisticated that a programmer of average skill shouldn't be able to figure out the command syntax by inspection. SM is an interactive program, however, with an online help facility for the more inquisitive, so even if the code is not clear at first, you should be able to successfully modify it with a little work.
The data file ("results.dat", or other name as appearing in the data statement near the top of the script) is organized by columns and rows, ie one parameter per column, and one fit set (for a given spectrum) per row. The first row is a set of code words for the parameters in each column. With SM, comment lines can be inserted anywhere into a data file by starting the line with "#" (silent) or "!" (echoed upon file read).
I have tried to make the files available via the web pages at least somewhat coherent in the sense that they were updated when I had made a significant improvement to the fitting and the numbers. The more actively worked upon files, with all my latest attempts at improvements (both successful and not) are in my personal space ~peterb/work/xspec/bessy2/; in the case of the data file, in several versions. This same directory also contains most of the XSPEC save files (*.xcm) which contain all the information necessary to restore a given fit set and spectrum. To invoke the save file "xyz.xcm" within XSPEC, one types "@xyz". The BESSY data files, both *.pha and *.fits versions, are also in this directory. The original BESSY data will be found in something like /data/hxds1/bessy/data/971013/ through 971017/, with runids from 500230- 500331.
6. Suggestions for Further Work
The most pressing need as of this writing is to complete the revised fits for ssd5. This was delayed beyond the completion of the ssdx fits mainly because the tails for ssd5, being better-behaved from a detector performance perspective, are much harder to fit numerically with the engine in XSPEC without getting lost in the badlands of chi-squared/parameter space. I will give some suggestions here as to where I think the best numbers for ssd5 will eventually be found, based on my experience with this verkackte program and my preliminary results for a few ssd5 spectra (at 2.1, 5.1, & 5.8 keV, visible in some of the plots).
The Eoffs may tend a little lower than the ~35-40eV plotted, perhaps by 5eV on the average. Remember to look for flat residuals under the pileup peak, and a pileup norm as large as possible (an offset pileup fit will have a norm too low as well). The gain parameter is probably good at 0.596±0.002, although the spectrum at 4.1keV seems like it needs a somewhat higher gain, perhaps 0.598 or even 0.600. This occasional deviation was also seen in the 5.8keV spectrum of ssdx, and appears to be a real glitch in the electronics setting the energy scale. This should be watched for in other spectra in order to determine its frequency of occurrence. The fano for ssd5 should be close to 0.14 as previously mentioned, with broad averaging around ~10.3-10.5 channels. The rising trend of broad with energy seen in some points is due entirely to poor tail parameters as described below, and not a wrong value of fano.
The biggest problem with the ssd5 fits is with the tail parameters, specifically the falling tail slope and both tails' norms. From experiments with the 5.1 and 5.8keV spectra, it appears that the slope may be as small as ~0.8 or even less, but XSPEC wants to make the norms for both tails unphysically large in this case. At these energies the norms should be no more than ~10-15% of the main peak, and clearly further attempts need to be made to minimize the triple bump residuals within these constraints. Perhaps freezing the falling tail slope to values of 0.85, 0.80, 0.75, 0.70 in turn and seeing what happens to the norms and the triple bump will help decide what the correct values are.
Once the tail norms are determined, the shelf norm and the escape/fluorescence norms will adjust appropriately, while the broad should return to the values predicted above, with an rms ~0.5 ch or less and no clear trend with energy. The shelf and rising tail norms should remain roughly proportional to each other, while the falling tail norm should be ~constant with energy. All other parameters should remain close to their current values.
A second important improvement is to extend these fits to spectra at lower energies (<2.2keV). This is not just a simple matter of fitting more spectra, however, because at ~2.2keV and below we begin to lose some of the secondary features that allow us to get the energy scale right. Thus as one descends in energy, the fluorescence lines will gradually be swallowed up by the rising tail of the main line, while the escape peak will eventually slip below the lower-level discriminator (LLD). A further complication is that the interpeak level rises rapidly below 2 keV for the typical count rates used, such that the pileup/2nd order peak is not at all well-defined on the low-energy side. Fitting such spectra then becomes very much a judgement call as to what parameters can be extrapolated from the higher-energy data with similar values, and what other parameters will differ with the high-energy results. In addition, crossing below the Al and Ge absorption edges at ~1.5 and ~1.2keV respectively will cause a sharp drop in the shelf and tail amplitudes, as well as that of the escape and fluorescence lines. So while fitting at low energies can yield useful calibration data, certain parameters will be fraught with more uncertainties than at the higher energies. Moreover, the attempted fits at 2.1 keV show there are additional effects which throw off the models for those spectra, and are reflected in the much higher chi-squareds than for spectra at higher energies. The cause of these effects, where some fluorescence features appear to be out of place with respect to other lines, is not known.
The Observant Reader will also have noticed that the parameter plots exhibit data for only ~20 spectra, or about 1/5 of the October 1997 BESSY SSD dataset. Fitting all spectra will flesh out all of the above discussion, and also give an idea of whether the formal fitting uncertainties computed by XSPEC are comparable to the fit-to-fit variation in the parameter values. This is something that should be done if there is enough time after answering the more pressing questions listed above.
Finally I note in what areas JMKmod may be improved to better reflect the physics seen in the SSD spectra. In some cases such refinements to the model will also depend on obtaining data of even higher quality than we have available to us here. The most obvious need for improvement to XSPEC involves a model for the "interpeak" events, ie the shelf-like behaviour which elevates the data above the model between the main peak and the pileup peak. Brad Wargelin has actually derived a good model for this effect which depends on pileup of the exact pulser shape, although this has not yet been implemented within JMKmod. Without such a model channels covering the interpeak need to be ignored when running a fit, or else the derived shelf norm is severely distorted and other parameters are affected badly as well. Coincidentally JMKmod had another problem involving pileup: it put the pileup peak at twice the channel number instead of twice the energy of the main peak (these are not the same when the offsets are not both zero). Shaun Serej fixed this bug but discovered a more subtle problem where the pileup norms are incorrectly treated. This suggests that the whole JMKmod treatment of pileup needs a general overhaul.
Two more subtle improvements that might be made are: treating the multiple causes of the rising tail mentioned in §4 (seen in the residual bump in the ssdx models), although one would probably need much higher S/N spectra to get this right; and modelling the excess step above the flat shelf which can be seen in the highest energy (>4keV) spectra. This last feature runs from the fluorescence line cluster at ~1.5keV to ~500eV below the escape peak (or ~1.7keV below the main line), and has the shape of a weak step function. Its origin is a complete mystery as of this writing, and it occurs similarly for both ssdx and ssd5 spectra. It would be interesting to see if spectra using the InSb crystal show the same effect, or if it only appears in spectra with the Si crystal.
Epilogue
This concludes my advice for modelling SSD spectra with JMKmod. If issues arise for which you think I might have something useful to say, you can email me at pbarnes@nrao.edu or else call me at (505) 835-7000 after May 26th. Live long and compute!