Note
Go to the end to download the full example code.
Effective Area Analysis#
In this example, we will explore the effective areas for different XRT filter channels. Understanding the effective areas is important for accurately interpreting and quantifying the data.
import matplotlib.pyplot as plt
import xrtpy
Let us begin by defining a filter channel using its abbreviation. For example, if we want to explore the effective area for an aluminum-on-polyimide filter channel, we need to specify the relevant abbreviation.
xrt_filter = "Al-poly"
EffectiveAreaFundamental allows us to accurately determine the effective area
based on the specified filter channel, date, and time.
date_time = "2023-09-22T22:59:59"
eaf = xrtpy.response.EffectiveAreaFundamental(xrt_filter, date_time)
To actually calculate the effective area function we can call effective_area().
effective_area = eaf.effective_area()
print("Effective Area:\n", effective_area)
Effective Area:
[2.78456378e-10 7.94910476e-10 2.06646295e-09 ... 8.48113833e-16
0.00000000e+00 0.00000000e+00] cm2
Differences overtime arise from an increase of the contamination layer on the CCD which blocks some of the X-rays thus reducing the effective area. For detailed information about the calculation of the XRT CCD contaminant layer thickness, you can refer to Montana State University.
Additional information is provided by Narukage et. al. (2011).
relative_launch_date_time = "2006-09-22T22:59:59"
eaf_launch = xrtpy.response.EffectiveAreaFundamental(
xrt_filter, relative_launch_date_time
)
launch_effective_area = eaf_launch.effective_area()
Finally, we can plot how the effective area has changed over time.
plt.figure()
plt.plot(
eaf.wavelength,
effective_area,
label=f"{date_time}",
)
plt.plot(
eaf.wavelength,
launch_effective_area,
label=f"{relative_launch_date_time}",
)
plt.title("XRT Effective Area - Al-Poly")
plt.xlabel("Wavelength (Å)")
plt.ylabel("Effective Area ($cm^{2}$)")
plt.legend()
plt.xlim(0, 60)
plt.grid(color="lightgrey")
plt.tight_layout()
plt.show()

Total running time of the script: (0 minutes 0.412 seconds)