|
6 | 6 | "source": [ |
7 | 7 | "# Unbinned Likelihood Tutorial\n", |
8 | 8 | "\n", |
9 | | - "The detection, flux determination, and spectral modeling of Fermi LAT sources is accomplished by a maximum likelihood optimization technique as described in the [Cicerone](https://fermi.gsfc.nasa.gov/ssc/data/analysis/documentation/Cicerone/Cicerone_Likelihood/) (see also e.g. [Abdo, A. A. et al. 2009, ApJS, 183, 46](http://arxiv.org/abs/0902.1340)). To illustrate how to use the Likelihood software, this narrative gives a step-by-step description for performing an unbinned likelihood analysis. \n", |
| 9 | + "The detection, flux determination, and spectral modeling of Fermi LAT sources is accomplished by a maximum likelihood optimization technique as described in the [Likelihood Overview](https://fermi.gsfc.nasa.gov/ssc/data/analysis/likelihood/likelihood_overview.html) (see also e.g. [Abdo, A. A. et al. 2009, ApJS, 183, 46](http://arxiv.org/abs/0902.1340)). To illustrate how to use the Likelihood software, this narrative gives a step-by-step description for performing an unbinned likelihood analysis. \n", |
10 | 10 | "\n" |
11 | 11 | ] |
12 | 12 | }, |
|
231 | 231 | "\n", |
232 | 232 | "For simplicity, we rename the spacecraft file (the file ending in `SC00`) to `spacecraft.fits`.\n", |
233 | 233 | "\n", |
234 | | - "When analyzing a point source, it is recommended that you include events with high probability of being photons. To do this, you should use gtselect to cut on the event class, keeping only the SOURCE class events (event class 128) (or as recommended in the Cicerone).\n", |
| 234 | + "When analyzing a point source, it is recommended that you include events with high probability of being photons. To do this, you should use gtselect to cut on the event class, keeping only the SOURCE class events (event class 128).\n", |
235 | 235 | "\n", |
236 | 236 | "In addition, the full set of events have been divided into event types, which allow us to select events based on the conversion type, the quality of the track reconstruction, or the quality of the energy measurement. For standard selections, including all the event types for a given class, use `evtype=3` (\"INDEF\" is the default in **gtselect**)." |
237 | 237 | ] |
|
298 | 298 | "source": [ |
299 | 299 | " In the last step we also selected the energy range and the maximum zenith angle value (90 degrees). The Earth's limb is a strong source of background gamma rays. We filter them out with a zenith-angle cut. The value of 90 degrees is the one recommended by the LAT instrument team for analysis above 100 MeV. The filtered data are provided here.\n", |
300 | 300 | "\n", |
301 | | - "After the data selection is made, we need to select the good time intervals in which the satellite was working in standard data taking mode and the data quality was good. For this task we use **gtmktime** to select GTIs by filtering on information provided in the spacecraft file. The current **gtmktime** filter expression recommended by the LAT team in the Cicerone is: " |
| 301 | + "After the data selection is made, we need to select the good time intervals in which the satellite was working in standard data taking mode and the data quality was good. For this task we use **gtmktime** to select GTIs by filtering on information provided in the spacecraft file. The current **gtmktime** filter expression recommended by the LAT team is: " |
302 | 302 | ] |
303 | 303 | }, |
304 | 304 | { |
|
543 | 543 | "source": [ |
544 | 544 | "# 3. Make an exposure map\n", |
545 | 545 | "\n", |
546 | | - " We are now ready to create an exposure map. The type of exposure map used by **Likelihood** differs significantly from the usual notion of exposure maps, which are essentially integrals of effective area over time. The exposure calculation that **Likelihood** uses consists of an integral of the total response over the entire ROI. See more information in the Cicerone.\n", |
| 546 | + " We are now ready to create an exposure map. The type of exposure map used by **Likelihood** differs significantly from the usual notion of exposure maps, which are essentially integrals of effective area over time. The exposure calculation that **Likelihood** uses consists of an integral of the total response over the entire ROI.\n", |
547 | 547 | "\n", |
548 | 548 | "Since the exposure calculation involves an integral over the ROI, separate exposure maps must be made for every distinct set of DSS cuts. This is important if, for example, one wants to subdivide an observation to look for secular flux variations from a particular source or sources. To view the DSS keywords in a given extension of a data file, use the [gtvcut](https://fermi.gsfc.nasa.gov/ssc/data/analysis/scitools/help/gtvcut.txt) tool and review the data cuts for the EVENTS extension. " |
549 | 549 | ] |
|
556 | 556 | "\n", |
557 | 557 | " There are two tools needed for generating exposure maps. The first is gtltcube. This tool creates a livetimecube, which is a HealPix table, covering the full sky, of the integrated livetime as a function of inclination with respect to the LAT z-axis.\n", |
558 | 558 | " \n", |
559 | | - " For more information about the livetime cubes, see the documentation in the [Cicerone](https://fermi.gsfc.nasa.gov/ssc/data/analysis/documentation/Cicerone/Cicerone_Data_Exploration/livetime_and_exposure.html).\n", |
| 559 | + " For more information about the livetime cubes, see the [documentation](https://fermi.gsfc.nasa.gov/ssc/data/analysis/scitools/lat_livetime_and_exposure.html).\n", |
560 | 560 | "\n", |
561 | 561 | "Here is the example of how to run [gtltcube](https://raw.githubusercontent.com/fermi-lat/fermitools-fhelp/master/fhelp_files/gtltcube.txt) (this step takes several minutes):" |
562 | 562 | ] |
|
611 | 611 | "\n", |
612 | 612 | "Since [gtltcube](https://raw.githubusercontent.com/fermi-lat/fermitools-fhelp/master/fhelp_files/gtltcube.txt) produces a FITS file covering the entire sky, the output of this tool could be used for generating exposure maps for ROIs in other parts of the sky that have the same time interval selections.\n", |
613 | 613 | "\n", |
614 | | - "But use caution! The livetime cube MUST be regenerated if you change any part of the time interval selection. This can occur by changing the start or stop time of the events, or simply by changing the energy selection or zenith angle cut (as these produce a different set of GTIs from [gtmktime](https://fermi.gsfc.nasa.gov/ssc/data/analysis/scitools/help/gtmktime.txt)).\n", |
| 614 | + "But use caution! The livetime cube MUST be regenerated if you change any part of the time interval selection. This can occur by changing the start or stop time of the events, or simply by changing the energy selection or zenith angle cut (as these produce a different set of GTIs from [gtmktime](https://raw.githubusercontent.com/fermi-lat/fermitools-fhelp/master/fhelp_files/gtmktime.txt)).\n", |
615 | 615 | "\n", |
616 | | - "See e.g. [Data Preparation](https://fermi.gsfc.nasa.gov/ssc/data/analysis/documentation/Cicerone/Cicerone_Data_Exploration/Data_preparation.html) in the [Cicerone](https://fermi.gsfc.nasa.gov/ssc/data/analysis/documentation/Cicerone/) or the [Data Preparation](https://fermi.gsfc.nasa.gov/ssc/data/analysis/scitools/data_preparation.html) analysis thread.\n", |
617 | 616 | "\n", |
618 | 617 | "Although the [gtexpmap](https://raw.githubusercontent.com/fermi-lat/fermitools-fhelp/master/fhelp_files/gtexpmap.txt) application (see below) can generate exposure maps for Likelihood without a livetime file, using one affords a substantial time savings. " |
619 | 618 | ] |
|
624 | 623 | "source": [ |
625 | 624 | "### b. Generate an exposure map.\n", |
626 | 625 | "\n", |
627 | | - "The tool [gtexpmap](https://raw.githubusercontent.com/fermi-lat/fermitools-fhelp/master/fhelp_files/gtexpmap.txt) creates an exposure map based on the event selection used on the input photon file and the livetime cube. The exposure map must be recalculated if the ROI, zenith, energy selection or the time interval selection of the events is changed. For more information about the exposure maps see the documentation in the Cicerone.\n", |
| 626 | + "The tool [gtexpmap](https://raw.githubusercontent.com/fermi-lat/fermitools-fhelp/master/fhelp_files/gtexpmap.txt) creates an exposure map based on the event selection used on the input photon file and the livetime cube. The exposure map must be recalculated if the ROI, zenith, energy selection or the time interval selection of the events is changed. \n", |
628 | 627 | "\n", |
629 | 628 | "Creating the exposure map using the [gtexpmap](https://raw.githubusercontent.com/fermi-lat/fermitools-fhelp/master/fhelp_files/gtexpmap.txt) tool, we have (this step can also take several minutes):" |
630 | 629 | ] |
|
684 | 683 | "cell_type": "markdown", |
685 | 684 | "metadata": {}, |
686 | 685 | "source": [ |
687 | | - "Note that we have chosen a 30 degree radius 'source region', while the acceptance cone radius specified for gtselect was 20 degrees. See the discussion of region selection in the [Cicerone](https://fermi.gsfc.nasa.gov/ssc/data/analysis/documentation/Cicerone/Cicerone_Likelihood/Choose_Data.html). This is necessary to ensure that events from sources outside the ROI are accounted for owing to the size of the instrument point-spread function (PSF).\n", |
| 686 | + "Note that we have chosen a 30 degree radius 'source region', while the acceptance cone radius specified for gtselect was 20 degrees. See the discussion of region selection in the [following link](https://fermi.gsfc.nasa.gov/ssc/data/analysis/likelihood/choosing_data.html). This is necessary to ensure that events from sources outside the ROI are accounted for owing to the size of the instrument point-spread function (PSF).\n", |
688 | 687 | "\n", |
689 | 688 | "Half-degree pixels are a nominal choice; smaller pixels should result in a more accurate evaluation of the diffuse source fluxes, but will also make the exposure map calculation itself lengthier.\n", |
690 | 689 | "\n", |
|
1711 | 1710 | "name": "python", |
1712 | 1711 | "nbconvert_exporter": "python", |
1713 | 1712 | "pygments_lexer": "ipython3", |
1714 | | - "version": "3.11.12" |
| 1713 | + "version": "3.11.14" |
1715 | 1714 | } |
1716 | 1715 | }, |
1717 | 1716 | "nbformat": 4, |
|
0 commit comments