NASA Logo, National Aeronautics and Space Administration

National Aeronautics and Space Administration

Goddard Space Flight Center



Astrophysics Science Division | Sciences and Exploration

This website is kept for archival purposes only and is no longer updated.

XRS-2 XRS-2
Pulse height analysis
Science
News How it works
Photos Glossary
XRS-2How it worksCDP → PHA

Pulse Height Analysis

The job of the CDP pulse height analysis is to get the best possible estimate of the height of each pulse. To first order, the pulseheight is proportional to the X-ray energy, and the higher-order terms can be calibrated.

Note: The rest of this page won't make sense if you don't know what the frequency domain is. I told you it was detailed!

The zeroth-order PHA is just the peak value of the pulse minus the baseline it was sitting on. This is not a good measure of the pulseheight, though, because the noise in the result is equal to the noise per sample (assuming we can average out the noise on the baseline; if not the noise is sqrt(2) times larger).

What we'd like to do is use all the samples in the pulse to calculate the pulseheight, thus reducing the noise by averaging. We do this by optimal filtering.

Optimal filter

For reference, here is another picture of the average pulse, whose height we wish to determine.

Pulse shapeA conceptually simple way to use all the data in a pulse is to make a template that has the shape of the pulses being measured. Then the data is multiplied, sample-by-sample, with the template. This is known as a matched filter.

The idea of a matched filter is that each sample is weighted according to its importance in the final result. That is, the samples near the peak of the pulse contribute the most to the calculated pulseheight, and the samples farther from the peak contribute proportionately less.

We also have to consider the effect of noise on the resulting pulseheight. A matched filter is ideal only in the case where the added noise is white. If the noise spectrum is not flat, we can adjust the shape of the template to reduce its response to the noise. In principle, this is straightforward: we transform the average pulse shape into the frequency domain, divide by the noise spectrum, and transform back into the time domain. And in practice, that is just what we do. If you understand the Discrete Fourier Transform, you can read the mathematical details.

An example

Noise power spectrumLet's consider an idealized example, in which the pulse shape is as shown above, and the noise consists of white noise, 1/f (pink) noise, and a single interfering tone, as shown here.

The tone is at 60Hz, which is common in the lab. On the satellite, of course, there is no 60Hz AC power, but there could be other sources of interference.

Noise in the time domainNoise with such a power spectrum looks something like this. In fact, this noise record has exactly the power spectrum shown above.

In reality, we measure the noise spectrum by averaging the power spectra of many individual noise records, so we don't have a perfect representation of the true noise spectrum. That is, our spectrum, rather than looking smooth like the one we're using here, has noise on it. That noise transfers to the template, reducing (slightly) the resolution of our PHA measurement. Thus we need to take care to use enough noise records to get an adequately smooth noise spectrum. This typically means on the order of a few hundred records.

Pulse power spectrumIf we transform the average pulse (shown at the top of this page) into the frequency domain, the power spectrum looks like this.

Again, in reality there will be noise in the measured average pulse, and hence noise in its power spectrum. However, the pulses we use to generate the average pulse are much larger than the noise level, so it only takes maybe 50 pulses to make an average pulse with acceptable noise levels.

Also, we need to keep the phase information of the average pulse, while we only need the power spectrum of the noise (being noise, it has no defined phase after all).

Template power spectrumDividing the pulse (in the frequency domain) by the noise power spectrum gives the spectrum of the template. As with the pulse spectrum, this is the complete spectrum, with phase information. Shown here is the magnitude squared, or power spectrum.

Notice the hole at 60Hz, where there is a large noise component. That shows that this template will reject signals at that frequency. Thus the rather large interference at 60Hz will have almost no effect on the resulting pulseheight. The narrowness and depth of this hole are determined by the pulse/noise record length (longer records give narrower holes). If the records are too short, such holes in the template will be wider (hence throwing away useful signal) and not as deep (hence keeping extra noise).

Template in time domain (finally)Finally, transforming back to the time domain gives this template.

Here you can see two effects the noise has on the shape of the template. (Recall that if the noise were white, the template would look just like the average pulse.)

First, there is a negative-going "anti-pulse" before the pulse. This is due to the low-frequency (1/f) noise.

Second, there is a 60Hz wiggle in the flat part of the template. This wiggle precisely cancels out the 60Hz component of the pulse, and makes the overall template insensitive to 60Hz signals. (It may be hard to believe, but it's true.)

When the pulses are too close

The above PHA method requires a template worth of data with only one pulse in it. When viewing a bright source, X-rays arrive much more often than that, so we need some way of handling pulses which are separated by less than a template length. In fact, the CDP uses two methods for handling such pulses.

If two pulses are closer than 2048 samples, but not "too close" (what that means will be described below), a shorter optimal template is used. This is known as a "mid-res" PHA. If they are too close even for that, the peak pulseheight ("low-res") is used.

Mid-res PHA

As can be seen from the picture of the average pulse, which shows one template worth of data, the pulse is over long before the 2048 samples required for the Hi-res PHA. The main reason for making the template 2048 samples long, as described above, is to more effectively reject interference at single frequencies (tones). So the CDP also contains a shorter "Mid-res" template, typically 512 samples long. This is created and used in the same way as the normal Hi-res template. In the absence of noise tones, it provides approximately the same resolution as the Hi-res template. If there are noise tones, then the Mid-res pulses will have lower resolution than Hi-res.

Low-res PHA

When pulses are too close even for the Mid-res PHA, they are analyzed by simply measuring the height of the peak over the baseline. The baseline is measured by taking the average of a few (typically 8) samples right before the start of the pulse. The measured height is then normalized to give the same result as the Hi-res or Mid-res PHA would give on the same pulse (if it were by itself).

Resolution

Hi-res PHAs provide a resolution that is limited by the detector and amplifier electronics. The detectors on board Astro-E2 have a resolution of 6 eV Full-Width Half-Maximum (FWHM). Mid-res PHAs provide a resolution essentially equal to Hi-res PHAs if there are no noise frequencies (which is true of Astro-E2). The Low-res pulses have a resolution of around 30-40eV FWHM.

NASA Logo, National Aeronautics and Space Administration
Goddard