Gino Tosti – INFN Perugia1DC2 Meeting - Slac, 1-3 March 2006 Likelihood analysis general tutorial (including source specifications) G. Tosti INFN - Perugia.

Slides:



Advertisements
Similar presentations
GLAST Science Support CenterAugust 9, 2004 Overview of Analyzing GLAST Data David Band (GLAST SSC—GSFC/UMBC)
Advertisements

Gino Tosti – INFN Perugia1DC2 Closeout Meeting - GSFC May 31 –June 2, 2006 Source Detection with the Perugia Wavelet code (PGWave) Gamma-ray Large Area.
Fermi LAT Monash University Nov 23-24, 2009 R.DuboisFermi LAT Science Analysis Tutorial1 LS I Analysis In the galactic plane, but in the suburbs.
1Andrea Caliandro Search of Optimized Cuts for Pulsar Detection Andrea Caliandro - INFN Bari DC2 CloseOut May Goddard Space Flight Center.
GLAST Science Support CenterAugust 9, 2004 Likelihood Analysis of LAT Data James Chiang (GLAST SSC – SLAC)
Status report on Light Simulator Claudia Cecchi Francesca Marcucci Monica Pepe Software meeting Udine January
GLAST LAT Project Astrostatistics Workshop, HEAD meeting, 10 September 2004 James Chiang (GSSC/UMBC) 1 Gamma-ray Large Area Space Telescope Challenges.
GLAST LAT ProjectDC1 Closeout Workshop, Feb , Statistical Issues in Likelihood Analysis of LAT Data Seth Digel (HEPL/Stanford Univ.) & Guillaume.
February 2004GLAST - DC1 Closeout Meeting GRB Detection & spectral analysis in DC1 Data Nicola Omodei Francesco Longo, Monica Brigida INFN Pisa.
GLAST LAT ProjectGround Software Workshop, July 15-18, Wrap-up: Science Tools Seth Digel HEPL/Stanford Univ. 18 July 2003 EGRET >300 MeV What we.
Simulating the Gamma Ray Sky Andrew McLeod SASS August 12, 2009.
GLAST Science Support Center February 12, 2004 DC1 Closeout Detecting Gamma-Ray Bursts in the DC1 Data David Band (GSSC)
GLAST LAT ProjectDC1 Closeout Workshop, Feb , Post-DC1 Work Seth Digel (HEPL/Stanford Univ.) Post-DC1 Work.
P. NolanGLAST LAT DC1: 2003 December 81 DC1 Scientific Data Analysis: Likelihood Patrick Nolan Stanford University.
1 Tom Stephens GSSC/GSFC Database Access and the dataSubselector Tool December 8, 2003 DC1 Kickoff Workshop.
C&A 10April06 1 Point Source Detection and Localization Using the UW HealPixel database Toby Burnett University of Washington.
GLAST LAT Project SLAC Jan. 12, 2004 Hammer-Aitoff map.
A short tutorial on LAT pulsar analysis tools Gamma-ray Large Area Space Telescope Massimiliano Razzano (Istituto Nazionale di Fisica Nucleare, sec. Pisa)
GLAST Science Support Center June 29, 2005Data Challenge II Software Workshop GRB Analysis David Band GSFC/UMBC.
SLAC March 1 st 2006 GLAST LAT Software F.Longo GLAST LAT GLAST LAT SW Overview of Cookbook Examples Francesco Longo University and INFN, Trieste, Italy.
06/02/2006 M.Razzano - DC II Closeout Meeting Pulsars in DC2 preliminary results from an “optimized” analysis Gamma-ray Large Area Space Telescope Massimiliano.
Spectral analysis on faint extended sources: problems and strategies. Gamma-ray Large Area Space Telescope Omar Tibolla Padova University DC2 Closeout.
The GLAST Science Support Center’s Role in Supporting the User Community [24.10] Thomas E. Stephens (GSFC/L-3GSI) for the GLAST Science Support Center.
GLAST Science Support Center May 8, 2006 GUC Meeting Demonstration of GRB Spectral Analysis with the SAE David Band (GSSC/JCA-UMBC)
Serving Data to the GLAST Users Community Thomas E. Stephens (GSFC/RSIS) for the GLAST Science Support Center Abstract.
Serving Data to the GLAST User Community Don Horner (L3 GSI/GSFC) and the GLAST Science Support Center Team Data Properties and Impact on Data Serving.
Source catalog generation Aim: Build the LAT source catalog (1, 3, 5 years) Jean Ballet, CEA SaclayGSFC, 29 June 2005 Four main functions: Find unknown.
Mar 1-3 – DC2 Kickoff Meeting - 1 Tom Stephens GSSC Database Programmer Retrieving, Filtering and Previewing Data.
GLAST LAT Project GLAST Users Committee Meeting, 6-7 June Update on LAT Science Tools S. W. Digel Stanford Linear Accelerator Center Gamma-ray Large.
Fermi LAT Monash University Nov 21, 2009 R.DuboisFermi LAT Science Analysis Tutorial1 Issues in a Nutshell LS5039 Low stats: 4k photons in 1 yr Strong.
November 8, 2005GLAST Users’ Committee Meeting — 1 Overview of Pulsar Tools Masaharu Hirayama (GLAST SSC,
GLAST LAT Project Catalogs and Diffuse Emissions Working Groups G. Tosti et al.SLAC, May Gino Tosti, Claudia Cecchi INFN Perugia based on Francesca.
Analysis methods for Milky Way dark matter halo detection Aaron Sander 1, Larry Wai 2, Brian Winer 1, Richard Hughes 1, and Igor Moskalenko 2 1 Department.
Fermi LAT Monash University Nov 21, 2009 R.DuboisFermi LAT Science Analysis Tutorial1 Things that can bite you: DIY cuts For Science Tools analysis, getting.
GLAST Science Support Center June 21, 2007 Getting Involved with GLAST GLAST Guest Investigator Program David Band, GSSC CRESST/GSFC/UMBC.
GLAST LAT Project DC2 Closeout Workshop, GSFC, 31 May-2 June Comparisons of Searches for Sources in the DC2 Data S. W. Digel Stanford Linear Accelerator.
Fermi Cycle-2 Proposal Workshop Center for Astrophysics, Feb. 13, 2009 Dave Davis, FSSC 1 FSSC Science Tools for Cycle 2.
2005 Unbinned Point Source Analysis Update Jim Braun IceCube Fall 2006 Collaboration Meeting.
Source catalog generation for DC2 Aim (in order of priority): 1.Improve on source detection algorithm and error box. 2.Provide a list of source identifications.
GLAST LAT Project DC2 Software Workshop, GSFC, June 27-29, Analytical Objectives for Science Tools for DC2 for DC2 S. W. Digel Stanford Linear Accelerator.
1 Giuseppe Romeo Voronoi based Source Detection. 2 Voronoi cell The Voronoi tessellation is constructed as follows: for each data point  i (also called.
June 27-29, DC2 Software Workshop - 1 Tom Stephens GSSC Database Programmer GSSC Data Servers for DC2.
2011, 10th AprilIII Fermi symposium , 10th AprilIII Fermi symposium2.
1 Meeting Nazionale sull'analisi dei dati dell'osservatorio Fermi-LAT Oct. 01, ASDC/Frascati Introduction to Fermi-LAT Science Analysis Software.
All-sky source search Aim: Look for a fast method to find sources over the whole sky Selection criteria Algorithms Iteration Simulations Energy information.
GLAST Science Support Center November 8, 2005 GUC Action Item #15 AI#15: Pre-Launch GI Proposal Tools David Band (GSSC/JCA-UMBC)
Source catalog generation Aim: Build the LAT source catalog (1, 3, 5 years) Jean Ballet, CEA SaclaySLAC, 23 May 2005 Four main functions: Find unknown.
Likelihood analysis of small diffuse sources Riccardo Rando Elisa Mosconi, Omar Tibolla DC2 Kickoff Meeting – SLAC, 1-3 March 2006.
GAMMA RAY BINARIES WITH FERMI Chandreyee Maitra Crystal Nuansa Aini Harsha Raichur Partha Sarathi Pal Instructors Robin Corbet, Mariano Mendez.
Alessandro Buzzatti Università degli Studi di Torino / SLAC
Jean Ballet, CEA Saclay GSFC, 31 May 2006 All-sky source search
DC2 pulsars analysis: a population point-of-view
Application of HEALpix Pixelization to Gamma-ray Data
Fermi LAT Limits on High-Energy Gamma Lines from WIMP Annihilation
Spectral analysis of the LAT and GBM data
sourceIdentify and identification strategies for LAT sources
4th Coding Sprint Short intro into GammaLib and ctools concepts
EBL Absorption Signatures in DC2 Data
Prospects for Observations of Microquasars with GLAST LAT
Source Detection by Count Excess
Wavelet Analysis for Sources Detection
Planning contents of [DC2] LAT source catalog
Source catalogue generation
All-sky source search issues
Gamma-ray sources detection using Wavelets
Fun with DC1: GRB Triggers, Localizations, Etc.
Wavelet method for source detection in GLAST photon-counting images
Galactic Diffuse Emission for DC2
10th ASTRI GENERAL MEETING
EBL Absorption Signatures in DC2 Data
Presentation transcript:

Gino Tosti – INFN Perugia1DC2 Meeting - Slac, 1-3 March 2006 Likelihood analysis general tutorial (including source specifications) G. Tosti INFN - Perugia Gamma-ray Large Area Space Telescope

Gino Tosti – INFN Perugia2DC2 Meeting - Slac, 1-3 March 2006 REFERENCES DC2 code releases: GLAST Data Access: GLAST Science Tools Workbook: Binned Likelihood Tutorial: Unbinned Likelihood Tutorial: LAT Likelihood Algorithm description (Jim’s presentation):

Gino Tosti – INFN Perugia3DC2 Meeting - Slac, 1-3 March 2006 Likelihood Analysis: Introduction The final aim of any data analysis work is to derive the best possible estimate for the caracteristics of a source. The Maximum Likelihood Analysis (MLA) has been successfully used in the analysis of gamma-ray data and it has also a central role in the LAT Data analysis. The GLAST Science Analysis Software provides a tool to perform: Unbinned Maximum Likelihood Analysis (this talk) BinnedMaximum Likelihood Analysis

Gino Tosti – INFN Perugia4DC2 Meeting - Slac, 1-3 March 2006 Likelihood Analysis: Introduction The Maximum Likelihood is used to compare source measured counts with the predicted counts derived from a source model. In the Unbinned version of MLA the source Model considered is: Point SourcesGalactic & EG Diffuse SourcesOther Sources This model is folded with the Instrument Response Funcion (IRF) to obtain the predicted counts in the measured quantities space (E’,p’,t’): where: is the total IRF and the integral is done over the Source Region (SR), that is the region of the sky containing all the sources that can contribute to the Region of Interest (ROI). In the standard Analysis only “steady” sources are considered:

Gino Tosti – INFN Perugia5DC2 Meeting - Slac, 1-3 March 2006 Likelihood Analysis: Introduction The function that is maximized is Where the sum is performed over the ROI. The predicted counts are given by: To reduce the CPU time, a quantity, indipendent from any source model and similar to an exposure map, is precomputed: Then

Gino Tosti – INFN Perugia6DC2 Meeting - Slac, 1-3 March 2006 The Unbinned Likelihood Analysis Diagram INPUT DATA Region Selection ( gtselect ) Binning/MAP/LC ( gtbin, gtcntsmap ) Likelihood gtlikelihood Results Exposure gtlivetimecube gtexpmap Source Model definition ModelEditor (Jim’s talk) Diffuse Response gtdiffresp

Gino Tosti – INFN Perugia7DC2 Meeting - Slac, 1-3 March 2006 INPUT DATA The photon FT1 fits FT1 file: –LAT_allsky_ _V01.fits (1 week of data) –ftp://heasarc.gsfc.nasa.gov/FTP/glast/DC2/allsky/ftp://heasarc.gsfc.nasa.gov/FTP/glast/DC2/allsky/ and the pointing and livetime history FT2 files. –FT2 file:DC2_FT2.fits –ftp://heasarc.gsfc.nasa.gov/FTP/glast/DC2/misc_data/DC2_FT2.fitsftp://heasarc.gsfc.nasa.gov/FTP/glast/DC2/misc_data/DC2_FT2.fits

Gino Tosti – INFN Perugia8DC2 Meeting - Slac, 1-3 March 2006 INPUT DATA Anticenter Region - Crab

Gino Tosti – INFN Perugia9DC2 Meeting - Slac, 1-3 March 2006 Step 1-Event Selection $$$> gtselect  gtselect.pargtselect gtselect.par Input FT1 file [test_events_0000.fits] : LAT_tut.fits Output FT1 file [filtered_events_0000.fits] : LAT_tut_filtered.fits RA for new search center (degrees) [86.4] : Dec for new search center (degrees) [28.9] : radius of new search region (degrees) [20] : start time (MET in s) [0] : end time (MET in s) [0] : lower energy limit (MeV) [30] : upper energy limit (MeV) [200000] : Event classes (-1=all, 0=FrontA, 1=BackA, 2=FrontB, 3=BackB, 4=class A) <-1 – 4 [-1] : Class A: highest quality  Best PSF & Lowest background contamination. Class B: More effective area, but more background Scriptable form of the command: gtselect infile="LAT_tut.fits" outfile=“LAT_tut_filtered.fits" ra=86.57 dec=22.01 rad=20 coordSys="CEL" tmin= tmax= emin=30 emax= eventClass=-1

Gino Tosti – INFN Perugia10DC2 Meeting - Slac, 1-3 March 2006 Step 2: Counts Map $$$> gtcntsmap  gtcntsmap.pargtcntsmapgtcntsmap.par Event data file [test_events_0000.fits] : LAT_tut_filtered.fits Spacecraft data file [test_scData_0000.fits] : DC2_FT2.fits Output file name [countsMap.fits] : LAT_tut_countsMap.fits Minimum energy (MeV) [30] : Maximum energy (MeV) [200000] : Number of energy bounds [21] : 2 Right Ascension of map center (degrees) [86.4] : Declination of map center (degrees) [28.9] : Number of longitude pixels [160] : Number of latitude pixels [160] : Pixel size (degrees) [0.25] : Projection method [STG] : AIT Scriptable form of the command: gtcntsmap evfile="ac_dc2_filtered.fits" scfile="DC2_FT2.fits" outfile="ac_dc2_cmap.fits" emin=30 emax=2000 nenergies=10 ra=86.4 dec=28.9 nra=160 ndec=160 pixel_size=0.25 proj="AIT"

Gino Tosti – INFN Perugia11DC2 Meeting - Slac, 1-3 March 2006 LAT_allsky_ _V01.fits Step 2-Counts Map

Gino Tosti – INFN Perugia12DC2 Meeting - Slac, 1-3 March Step 3:The Source Model EGRET Sources in the Crab field

Gino Tosti – INFN Perugia13DC2 Meeting - Slac, 1-3 March 2006 The 3EG & Cat_v0 sources in the field Step 3:The Source Model The 3EG & Cat_v0 sources in the field DC2 - Source Catalog ftp://heasarc.gsfc.nasa.gov/FTP/glast/DC2/misc_data/LATSourceCatalog_v0.fits

Gino Tosti – INFN Perugia14DC2 Meeting - Slac, 1-3 March 2006 Step 3:The Source Model Source models should be written in an XML file: <!DOCTYPE source_library SYSTEM '$(LIKELIHOODROOT)/xml/A1_Sources.dtd'> Source Model description

Gino Tosti – INFN Perugia15DC2 Meeting - Slac, 1-3 March 2006 Step 4-Livetimes $$$> gtlivetimecube  gtlivetimecube.pargtlivetimecubegtlivetimecube.par Event data file [test_events_0000.fits] : LAT_tut_filtered.fits Spacecraft data file [test_scData_0000.fits] : DC2_FT2.fits Output file [expCube.fits] : LAT_tut_expCube.fits Step size in cos(theta) [0.025] : 0.05 Pixel size (degrees) [1] : Working on file DC2_FT2.fits....! More info on the Sky pixelization used by gtlivetimecube can be found here HEALPix ( To add two livetimeCube you can use: $$$>gtaddlivetime Livetime cube 1 [expCube_00.fits] : expCube0.fits Livetime cube 2 [expCube_01.fits] : expCube1.fits Output file [expCube.fits] : expcube_01.fits This step is not necessary for the DC2, the expcube files are already avalilabe at: Scriptable form of the command: gtlivetimecube evfile="ac_dc2_filtered.fits" scfile="DC2_FT2.fits" outfile="myexpCube.fits" cos_theta_step=0.05 pixel_size=1

Gino Tosti – INFN Perugia16DC2 Meeting - Slac, 1-3 March 2006 Step 5-Exposure Map $$$> gtexpmap  gtexpmap.pargtexpmapgtexpmap.par Event data file [test_events_0000.fits] : LAT_tut_filtered.fits Spacecraft data file [test_scData_0000.fits] : DC2_FT2.fits Exposure hypercube file [expCube.fits] : LAT_tut_expCube.fits output file name [expMap.fits] : Response functions [DC2] : Radius of the source region (in degrees) [30] : Number of longitude points [120] : Number of latitude points [120] : Number of energies [20] : Computing the ExposureMap. Scriptable form of the command: gtexpmap evfile="ac_dc2_filtered.fits" scfile="DC2_FT2.fits" exposure_cube_file="myexpCube.fits" outfile="exp_map.fits" rspfunc="DC2" source_region_radius=30 number_of_longitude_points=120 number_of_latitude_points=120 number_of_energies=20

Gino Tosti – INFN Perugia17DC2 Meeting - Slac, 1-3 March 2006 Step 6-Diffuse Source Responses $$$> gtdiffresp  gtdiffresp.pargtdiffrespgtdiffresp.par Event data file [test_events_0000.fits] : LAT_tut_filterd.fits Event data file [test_events_0000.fits] : LAT_tut_filtered.fits Spacecraft data file [test_scData_0000.fits] : DC2_FT2.fits Source model file [my_source_model.xml] : ac_source_model.xml Response functions to use [DC2] : Computing exposure at (82.74, 13.38) ! Computing exposure at (83.57, 22.01) ! Computing exposure at (98.49, 17.86) ! adding source Crab Pulsar adding source Extragalactic Diffuse adding source Galactic Diffuse adding source Geminga adding source PKS Working on... This step is not necessary for the DC2, the FT1 file already has pre-computed diffuse response columns!!! Scriptable form of the command: gtdiffresp evfile="ac_dc2_filtered.fits" scfile="DC2_FT2.fits" source_model_file="ac_source_model.xml" rspfunc="DC2"

Gino Tosti – INFN Perugia18DC2 Meeting - Slac, 1-3 March 2006 Step 7: Unbinned Likelihood $$$> gtlikelihood  gtlikelihood.pargtlikelihoodgtlikelihood.par Statistic to use [UNBINNED] : Spacecraft file [] : DC2_FT2.fits Event file [] : LAT_tut_filtered.fits Unbinned exposure map [LAT_tut_expMap.fits] : LAT_tut_expMap.fits Exposure hypercube file [LAT_tut_expCube.fits] : LAT_tut_expCube.fits Source model file [ac_source_model.xml] : ac_source_model.xml Response functions to use [DC2] : Optimizer [DRMNGB] : Scriptable form of the command: gtlikelihood statistic="UNBINNED" scfile="DC2_FT2.fits" evfile="ac_dc2_filtered.fits" exposure_map_file="none" exposure_cube_file="myexpCube.fits" source_model_file="ac_source_model.xml" rspfunc="DC2" optimizer="MINUIT" flux_style_model_file="my_flux_out.xml" The results are stored in the file: result.dat

Gino Tosti – INFN Perugia19DC2 Meeting - Slac, 1-3 March 2006 Step 7: Unbinned Likelihood Results Crab Pulsar: Prefactor: / Index: / Scale: 100 Npred: ROI distance: TS value: Extragalactic Diffuse: Prefactor: / Index: -2.1 Scale: 100 Npred: Galactic Diffuse: Prefactor: / Index: -2.1 Scale: 100 Npred: Geminga: Prefactor: / Index: / Scale: 100 Npred: ROI distance: TS value: PKS : Prefactor: / Index: / Scale: 100 Npred: ROI distance: TS value: Total number of observed counts: Total number of model events: log(Likelihood): Crab Pulsar: Prefactor: / Index: / Scale: 100 Npred: ROI distance: TS value: Extragalactic Diffuse: Prefactor: / Index: -2.1 Scale: 100 Npred: Galactic Diffuse: Prefactor: / Index: -2.1 Scale: 100 Npred: Geminga: Prefactor: / Index: / Scale: 100 Npred: 2239 ROI distance: TS value: PKS : Prefactor: / Index: / Scale: 100 Npred: ROI distance: TS value: Total number of observed counts: Total number of model events: log(Likelihood): Writing flux-style xml model file to ac_out_flux.xml MINUIT DRMNGB

Gino Tosti – INFN Perugia20DC2 Meeting - Slac, 1-3 March 2006 Results Before the fit After the fit (see Jim’s talk on the interactive use of the Likelihood)

Gino Tosti – INFN Perugia21DC2 Meeting - Slac, 1-3 March 2006 Results The flux-style xml file can be then used as an input file for gtobssim or Gleam

Gino Tosti – INFN Perugia22DC2 Meeting - Slac, 1-3 March 2006 Conclusion (1) In the analysis of the DC2 data, taking into account that: One can select the photons collected ROI from the DATA Server (FT1 file); The livetimecube files were preconputed; The Diffuse response was precomputed, and the supplementary columns included in the FT1 file you download from the server the only steps you need to perform a likelihood analysis are: Build a Source Model for your ROI Calculate the ExposureMap (gtexpmap) Run gtlikelihood

Gino Tosti – INFN Perugia23DC2 Meeting - Slac, 1-3 March 2006 Conclusion (2) To analyze the time & spectral variations of a source you have to run iteratively the likelihood tool, using procedures similar to the following Step 1 -Download data for your ROI from the DATA server over the entire time interval (T) where you want to study variability; Step 2 -Build a Source Model for your ROI Step 3 -Divede T in N time bins, and for each bin obatein a FT1 file with gtselect; Step 4 -Compute the livetimecube (gtlivetimecube) for each time Step 5 -Calculate the ExposureMap (gtexpmap) Step 6 - Run gtlikelihood and rename the output result file Repeat steps 3-6 for each time bin……write a script to do this work…… THAT’S ALL…… MORE ABOUT LIKELIHOOD IN THE NEXT TALKS…….