In-Class Assignment 17#

In-Class Only, Not Submitted for Credit, Credit: Michael Zingale.

Application: X-ray Burst Timing#

The Rossi X-ray Timing Explorer (RXTE) has very high time resolution and has been used to observe a large number of X-ray sources. We’ll look at the data from the low-mass X-ray binary 4U 1728-34—this is an X-ray burst system.

In Strohmayer et al. 1996 it was shown that the neutron star spin rate can be seen in the Fourier transform of the lightcurve of the burst. Here we repeat the analysis.

We thank Tod Strohmayer for sharing the data from that paper.

Learning Objectives#

  • Methods to reduce and visualize XRB lightcurve data

  • Application of FFT to astronomical data

  • Deriving NS spin rates from XRB data

Download the following data locally: 4u1728_burstdata.txt.

a. - Flatten the data, prepare for analysis#

  1. Load the data using numpy loadtxt

  2. Flatten the data (.flatten())

  3. Obtain the total length of the 1-d array and define it as N for later

  4. Plot the data using matplotlib.

What are the x-axis and y-axis?

## a results here

b. - Bin the data, replot#

Similar to the paper, lets bin the data using the .reshape() operator on the original flattened data and floor division (//) for a choice of bin size = 256 to create a new array binned_data.

Note

Reshape syntax is numpy.reshape(rows,columns)

Steps will be

  1. Create a new array that is equal to the original data reshaped to be (N // 256, 256) and the bins summed (.sum) along the 1 axis (rows).

  2. Plot the new binned lightcurve data

Does this plot match Figure 1 in the paper?

## b results here

c. -Fast-Fourier Transform of the Data#

Using the raw flattened data (non-binned),

  1. compute a one-dimensional discrete Fourier Transform using numpy to obtain the Fourier coefficients \(C_{k}\).

  2. Next, compute the physical frequencies using numpy.fft.rfftfreq. You will need to pass the total number of samples from earlier N then multiply by \(N/T\) where \(T=32\) s and is the total duration of the signal.

  3. Using \(C_{k}\) and kreq plot the power spectrum as a function of frequency: (kfreq,np.abs(c_k)**2 * 2 / N) using log-log.

Can we identify any excess power in the spectrum?

## c results here

d. - Bin the FFT data to improve Signal to noise#

The original paper binned the FFT by 8, lets do the same here.

  1. Bin the data using the provided lines.

  2. Replot the data similar as in c. Using a log-log plot.

Now, can we identify any excess power in the spectrum?

## d results here

# use these lines to bin the FFT data
#c_k_binned = np.abs(c_k[1:]).reshape(int(len(c_k)//8), 8).mean(axis=1)
#kfreq_binned = kfreq[1:].reshape(int(len(kfreq)//8), 8).mean(axis=1)

e. - Plot the final frequency#

  1. On a linear-linear plot, zoom into the suspected frequency identified.

Does this match the result from the paper? What does this frequency correspond to?

## e results here