Пример #1
0
 def view(self, off_axis_angle = 10., show=True):
     """Plot the effective area.
     """
     from ximpol.utils.matplotlib_ import pyplot as plt
     plt.figure('Effective area')
     xInterpolatedUnivariateSplineLinear.plot(self, show=False,
                                              label='On axis')
     plt.plot(self.x, self.eval_(self.x, off_axis_angle),
              label='%s arcmin off-axis' % off_axis_angle)
     plt.legend(bbox_to_anchor=(0.85, 0.75))
     plt.figure('Vignetting')
     self.vignetting.plot(show=False)
     if show:
         plt.show()
Пример #2
0
 def plot(self, off_axis_angle=10., show=True):
     """Plot the effective area.
     """
     from ximpol.utils.matplotlib_ import pyplot as plt
     plt.figure('Effective area')
     xInterpolatedUnivariateSplineLinear.plot(self,
                                              show=False,
                                              label='On axis')
     plt.plot(self.x,
              self.eval_(self.x, off_axis_angle),
              label='%s arcmin off-axis' % off_axis_angle)
     plt.legend(bbox_to_anchor=(0.85, 0.75))
     plt.figure('Vignetting')
     self.vignetting.plot(show=False)
     if show:
         plt.show()
Пример #3
0
import os

from ximpol import XIMPOL_DOC_FIGURES
from ximpol.irf import load_irfs
from ximpol.utils.matplotlib_ import save_current_figure
from ximpol.utils.matplotlib_ import pyplot as plt
from ximpol.core.spline import xInterpolatedUnivariateSplineLinear


IRF_NAME = 'xipe_baseline'
OUTPUT_FOLDER = XIMPOL_DOC_FIGURES

aeff, psf, modf, edisp = load_irfs(IRF_NAME)

plt.figure('On axis effective area')
xInterpolatedUnivariateSplineLinear.plot(aeff, show=False)
save_current_figure('aeff_on_axis.png', OUTPUT_FOLDER, clear=False)

plt.figure('Vignetting')
aeff.vignetting.plot(show=False)
save_current_figure('aeff_vignetting.png', OUTPUT_FOLDER, clear=False)

plt.figure('Edisp matrix')
edisp.matrix.plot(show=False)
save_current_figure('edisp_matrix.png', OUTPUT_FOLDER, clear=False)

plt.figure('Edisp slice')
_e = 6.
edisp.matrix.vslice(_e).plot(show=False, label='E = %.2f keV' % _e)
plt.axis([0, 256, None, None])
plt.legend(bbox_to_anchor=(0.45, 0.75))