5 Beam Window Finctions - nmik/Xgam GitHub Wiki

The beam window functions are used to correct the observed APS for the effect of the finite angular resolution of a measured observable. In case of Fermi-LAT, we can derive the beam window functions from the provided point spread functions (PSF), with depend on the specific data selection. The window functions, Wb(E, l) are simply the Legendre transforms of the PSFs at a given angular scale and energy (see e.g. pg 10,11 of https://arxiv.org/pdf/1812.02079).

This is how you can create the Fermi-LAT beam window functions by running

bin/mkwbeamFermiLAT.py

General settings:

  • --irfs : specify the Fermi-LAT Instrument Response Function (this should match your data selection and is used to compute the LAT PSF with gtpsf).
  • --evtype : specify the event type used for the data selection (e.g. 1=FRONT, 32=PSF3, etc; this is used to compute the LAT PSF with gtpsf).
  • --ltfile : specify the lifetime cube (this of generated by gtltcube). you can either provide a single .fits file or a .txt/.dat file with the list of livetimecubes to combine (in case you want to combine different and non overlapping time bins); This is used to compute the LAT PSF with gtpsf.
  • --lmax : specify the maximum multipole to consider in the APS computation.
  • --show : True or False, If True, you'll visualize the Wb(E, l) matrix.

If you've already run gtpsf:

  • --psffile : specify the .fits file of the PSF (generated by gtpsf).
  • --lmax : specify the maximum multipole to consider in the APS computation.
  • --show : True or False, If True, you'll visualize the Wb(E, l) matrix.

Example:

To build Wbeam function matrix, Wb(E, l) for event class SOURCEVETO and eventype PSF3:

>>> python bin/mkwbeamFermiLAT.py -irfs P8R3_SOURCEVETO_V2 --evtype 32 --ltfile FT_DATA_FOLDER/output/output_gtlcube/ltcube_file.fits

This will create the file with the mask map in HEALPix format:

output/P8R3_SOURCEVETO_V2_evt32_Wbeam.txt

To see the option availabe for bin/mkdataselection.py type:

>>> python bin/mkwbeamFermiLAT.py -h