How to easily plot CTA IRF requirements and performances

CTA performances are up-to-date and public and can be found on the cta-observatory website

[1]:
import ctaplot
from ctaplot.io.dataset import get
import numpy as np
import matplotlib.pyplot as plt

%matplotlib inline

ctaplot.set_style('notebook')

Angular resolution

[2]:
fig, ax = plt.subplots(figsize=(12,8))
ax = ctaplot.plot_angular_resolution_cta_requirement('north', ax=ax, linewidth=3)
ax = ctaplot.plot_angular_resolution_cta_performance('north', ax=ax, marker='o')
ax = ctaplot.plot_angular_resolution_cta_requirement('south', ax=ax,  linewidth=3)
ax = ctaplot.plot_angular_resolution_cta_performance('south', ax=ax, marker='o')
plt.show()
../_images/notebooks_plot_cta_irf_4_0.png

Energy resolution

[3]:
fig, ax = plt.subplots(figsize=(12,8))
ax = ctaplot.plot_energy_resolution_cta_requirement('north', ax=ax, linewidth=3)
ax = ctaplot.plot_energy_resolution_cta_performance('north', ax=ax, marker='o')
ax = ctaplot.plot_energy_resolution_cta_requirement('south', ax=ax,  linewidth=3)
ax = ctaplot.plot_energy_resolution_cta_performance('south', ax=ax, marker='o')
plt.show()
../_images/notebooks_plot_cta_irf_6_0.png

Effective Area

[4]:
fig, ax = plt.subplots(figsize=(12,8))
ax = ctaplot.plot_effective_area_cta_requirement('north', ax=ax, linewidth=3)
ax = ctaplot.plot_effective_area_cta_performance('north', ax=ax, marker='o')
ax = ctaplot.plot_effective_area_cta_requirement('south', ax=ax,  linewidth=3)
ax = ctaplot.plot_effective_area_cta_performance('south', ax=ax, marker='o')
plt.show()
../_images/notebooks_plot_cta_irf_8_0.png

Sensitivity

[5]:
fig, ax = plt.subplots(figsize=(12,8))
ax = ctaplot.plot_sensitivity_cta_requirement('north', ax=ax, linewidth=3)
ax = ctaplot.plot_sensitivity_cta_performance('north', ax=ax, marker='o')
ax = ctaplot.plot_sensitivity_cta_requirement('south', ax=ax,  linewidth=3)
ax = ctaplot.plot_sensitivity_cta_performance('south', ax=ax, marker='o')
ax.set_ylabel(r'Flux Sensitivity $[erg.cm^{-2}.s^{-1}]$')
plt.show()
../_images/notebooks_plot_cta_irf_10_0.png
[ ]:

Sub-arrays

[6]:
lst_north_angres_requirements = np.loadtxt(get('cta_requirements_North-50h-LST-AngRes.dat'))
[7]:
fig, ax = plt.subplots(figsize=(12,8))
ax = ctaplot.plot_angular_resolution_cta_requirement('north', ax=ax, linewidth=3)
ax = ctaplot.plot_angular_resolution_cta_performance('north', ax=ax, marker='o')
ax.scatter(lst_north_angres_requirements[:,0], lst_north_angres_requirements[:,1],
           label="LST North requirements",
           color='red')
plt.show()
../_images/notebooks_plot_cta_irf_14_0.png
[ ]: