Student Hera: HERA Timing Tools  Search with Fold

Period Search via Folding
Binning the raw data can help eliminate some of the noise in the data, but the plot can still be hard to read, especially since so many periods are present in the raw data taken over such a long time. Imagine instead overlapping your observations by exactly one period and summing the data over many periods. If you lined up the data precisely, the signal from the source would add constructively again and again, while the random fluctuations would add destructively (statistically), eventually canceling out. So the signal gets amplified (because the peaks and troughs are added together) while the noise gets smaller and smaller. The catch, of course, is that you have to know the period in order to do this. Otherwise the photons from the source will interfere destructively, and nothing will be gained!
But if you can use an iterative approach, it will be possible to find
the period that generates the
Walk me through the epoch folding technique
Computers can be used to crunch through the calculations, testing incrementally different periods to find the period with the best chisquared value. By folding the data with a close period and then varying the period until you have the most constructive interference, you can pin down the period pretty accurately. And the more periods' worth of raw data you have, the more signal to noise you will have from the correctly folded lightcurve, and the more confident you can be of the period. The tool Search with Fold performs exactly this task; it searches for the period that yields the folded lightcurve with the greatest chisquared value.
Click on the data set gx3012.lc again and select and run the Search with Fold tool. A parameter box will appear with the name of the data file filled in. Fill in your best estimate for the period of GX3012 in days (make sure that the format for the period is also days by typing a "1" into this parameter box). You can use your best guess for a period from the Exercise T4. You will also need to choose values for the resolution of period search, number of periods to search, phasebins per period and number of newbins/interval.
The resolution for period search and number of periods to search parameters will determine how finely it will pin down the value for the correct period and how much greater or smaller than your guesstimate the computer will search, respectively. The default values of 0.4 d(ays) for the resolution and 20 for the number of periods to search is a good starting point. If you use these values (type them in manually if they are not already filled in), the computer will search 20 different periods around your initial guess, each 04. days different. You can refine that later. If you want to start with a finer resolution, be sure to increase the number of periods to search, since you will want to be sure that the actual period is contained in the range you specfy! (for example, if you start with a resolution of periods search of 0.1, increase the number of periods to search to 80).
It is important to choose the two parameters phasebins/period and number of newbins/interval carefully. The phasebins/period is the number of bins in each trial period. This sets the bin size (much like Newbin Time in Plot Light Curve). If it is too small, the data is binned in too few bins, and if it is too large, the data is binned in too many bins. Start with a value of 10. Then you can see the effects of varying this by trying larger and smaller values.
The value of newbins/interval is a very important parameter. It determines how much of the raw data (binned in Newbins) will be used (how many periods worth of data are folded over each other and added together) in the analysis. It is important to choose a large enough value for this parameter so that many periods of data are added together and a strong signal is seen. If this value is too small, only a small portion of the whole data set is used, and there is not much advantage over the plotting you did. You can start with several thousand for this parameter and work from there.
Once you have filled in the parameters, you should first click on "save this configuration," (so that the next time you only have to type in the parameter you will vary) then click "run" to execute this tool. The output is a histogram showing the trial period on the Xaxis and the chisquared value for that period on the Yaxis. The chisquared value is a mathematical measure of how constructively the data add (for the given period folding). If the data add constructively (the period is right on) when the data are folded, the chisquared value is high. If the data do not add constructively when folded, the chisquared value is low and the period is incorrect. The bigger the chisquared value, the more confident you can be that you have chosen the correct period.
Exercise T5

Now try running Search with Fold with this "best period" as your starting point (you will have to convert the output from Search with Fold from seconds to days). Since this is a better initial guess, you can safely use a smaller value for the resolution of period search to refine your answer, or pin the period down more accurately. You can also increase the values for phasebins/period and newbins/interval to get a more accurate result.
Exercise T6
