# National Aeronautics and Space Administration

## Student Hera: HERA Timing Tools - Plot Light Curve

Tools covered in this section

### Plot Light Curve

The first thing you might want to do is to make an illuminating plot of a large part of the data (large enough to see patterns that may exist, for example). The idea here is to somehow enable you to see a large amount of the data (not necessarily the raw data) in such a way that the extraneous noise that occurs in the raw data is not as distracting as when you plot a portion of the raw data. Plot Light Curve creates lightcurves, or plots of rate vs. time. Unlike File Plot, however, it does not just plot the raw data points. Instead, the data are binned into time bins whose size (newbin time) you specify in the parameter list. It has a few particularly important characteristics that can be specified, in order to make the lightcurve plotted more useful. These characteristics are newbin time, interval and frame.

• Newbin Time represent a rebinning of the original data. For example, the original data might be binned to 90 s, and we would rebin it to half a day. Instead of counting all of the photons gathered in a 90 second period, we would count the photons gathered in half a day. For the ASM data things are a little peculiar, since the original data are not collected in uniform bins.
• An interval is a span of data covered by n newbins. It's a subset, or a segment, of the entire data set. So if the entire data set covers 3 years, we might choose an interval to be half a year (and the data set would be covered by 6 consecutive intervals). The Xronos tools plot and analyze data based on the intervals. So, staying with our example, the xronos Plot Light Curve tool would plot 6 light curves (one for each interval), and Search with Fold (a tool you will find soon!) would perform the epoch folding 6 times, once on each interval.
• The frame represents the averaging of the analyzed results of the intervals. So, sticking with our 3 year data set example, the 'frame' from the epoch folding would be the average of the different epoch folds over the 6 intervals. The average could be a simple average or a weighted average (which one is controlled by one of the other parameters).

### Exercise T2

If you want to use a maximum amount of data when doing a Plot Light Curve, should you use a larger or smaller value for Newbins/Interval (which defines the size of your interval as a number of newbin times)?

Click on the data file gx301-2.lc in the Student Hera data directory to select it. Then click on Plot Light Curve in the tools directory and "run" to execute the program. The default units for the "Newbin Time" parameter is seconds. Use a default value of 5000 for the number of "Newbins/Interval" (the number of data points in each Newbin Time plotted in each successive output window), try varying the "Newbin Time" parameter. You may find it helpful when you are changing this parameter to print out the plots to compare them, labelling each with the varying parameter. The default value for the PGPLOT device parameter in the parameter box should be set to "/POW". This specifies how hera displays the plot on your local computer.

### Exercise T3

• What happens when you use a value approximately equal to the time it takes the instrument to make a complete sweep of the sky (approx. 8100 seconds, or 90 minutes) for the Newbin Time?
Compare this output to that of the File Plot tool in the File Utilities folder. Note that the two are not precisely the same. This is because the time for the ASM to cover the whole sky is only approximately 90 minutes. If you look at the raw data you will see that it is binned in variable time bins that are each around 90 minutes. Thus, when Plot Light Curve bins the data in exact time bins, it is not an exact match.
• What happens if you use a large value (a year, for example, or 31,557,600 seconds) for Newbin Time?
• You know, from exercise 4 above, what the period is, roughly. What happens if you use a value of Newbin Time so that you will get about 100 points per period (Newbins equal to 1/100 of a period)?
Note that if you use a value of Newbin Time that is too small, you will get erratic results. This happens when you try to rebin the data into bins that are smaller than those of the orginal data. It's like trying to divide a pile of rice up into piles, each of which is smaller than one grain of rice!

### Exercise T4

Now try playing with the value for "Newbins/Interval," keeping the value for Newbin Time at 43200 seconds (how many days is this?).
• What happens when you use a small value for "Newbins/Interval," 20, for example?
• What happens when you use a larger value, like 500, or 10,000?
• Can you deduce what parameters for "Newbin Time," and "Newbins/Interval" will give you a plot most similar to your best File Plot plot from above? Try running Plot Light Curve with these parameters. Now print out the output and compare to the output for File Plot.

• Using your "best" values for Newbin Time and Newbins/Interval, plot a lightcurve for this source. What is your best estimate for a period for this source (the time between peaks)? You may find it helpful to look at the page on Plotting Basics to modify your output plot.

Once you get the knack of choosing your Newbin Time and Newbins/Interval, you can plot the data in ways that are easier to look at. For a periodic source, if you choose wisely you may be able to see a period with your eye. This then allows you to have a better starting point for some of the other tools, which find a more quantitative measurement of the period, often using an iterative approach.

Although a careful choice of the "Newbin Time" and "Newbins/Interval" parameters can enable you to see periodic behavior that you might not have otherwise seen, it is still a qualitative tool. The problem with real data, of course, is that it contains all sorts of funny glitches, bumps and wiggles, or noise. There are many reasons why real data from a binary source does not look like a perfectly clean sinusoid. Space is not really empty, so random fluctuations from other sources are picked up by the telescope, for example. You can imagine that the real data are composed of the signal from the binary star, plus a certain amount of random noise. You want to eliminate or at least minimize, the noise and keep the signal. Unfortunately, since astronomical sources are very far away, the signal can often be weak, while the noise, which might come from nearby sources, can be quite large. However, there is one thing you can use to our advantage. The repeating pattern from the source is constant (more or less), repeating again and again for years and years, while the noise is random.

 A service of the High Energy Astrophysics Science Archive Research Center (HEASARC), Dr. Alan Smale (Director), within the Astrophysics Science Division (ASD) at NASA/GSFC