Spectral analysis of the LAT and GBM data

Slides:



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

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.
Gino Tosti – INFN Perugia1DC2 Meeting - Slac, 1-3 March 2006 Likelihood analysis general tutorial (including source specifications) G. Tosti INFN - Perugia.
2005 LAT-COLLABORATION MEETING GRB WORKING GROUP Gamma-ray Large Area Space Telescope GRB science group report Jay Norris Nicola Omodei.
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.
T. Burnett: IRF status 30-Jan-061 DC2 IRF Status Meeting agenda, references at:
GLAST Science Support Center February 12, 2004 DC1 Closeout Detecting Gamma-Ray Bursts in the DC1 Data David Band (GSSC)
GLAST Science Support CenterDecember8-9, 2003 DC1 Workshop Gamma-Ray Burst Spectral Analysis with the SAE Prepared by Yasushi Ikebe – GSSC Presented by.
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.
GLAST Science Support Center June 29, 2005Data Challenge II Software Workshop GRB Analysis David Band GSFC/UMBC.
GRB Simulations in DC2 Valerie Connaughton with input from Nicola Omodei and David Band.
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.
Tests of Curvature Effects in the Temporal and Spectral Properties of GRB Pulses Ashwin Shenoy 1 In collaboration with Eda Sonbas 2, Charles Dermer 3,
Udine Nicola Omodei 1 GRB Trigger Algorithms From DC1 to DC2 Nicola Omodei Riccardo Giannitrapani Francesco Longo Monica Brigida.
A taste of statistics Normal error (Gaussian) distribution  most important in statistical analysis of data, describes the distribution of random observations.
GLAST Science Support Center May 8, 2006 GUC Meeting Demonstration of GRB Spectral Analysis with the SAE David Band (GSSC/JCA-UMBC)
A statistical test for point source searches - Aart Heijboer - AWG - Cern june 2002 A statistical test for point source searches Aart Heijboer contents:
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's GBM Burst Trigger D. Band (GSFC), M. Briggs (NSSTC), V. Connaughton (NSSTC), M. Kippen (LANL), R. Preece (NSSTC) The Mission The 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,
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.
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.
1 Getting Involved with GLAST Workshop, CFA, 06/21/ C. Shrader, NASA/GSFC GLAST Data & Software Release plans + Science Support Center Services C.
June 27-29, DC2 Software Workshop - 1 Tom Stephens GSSC Database Programmer GSSC Data Servers for DC2.
GammaLib based analysis of TeV data Proposal for a CTA High-level Science Analysis framework J. Knödlseder (CESR, Toulouse)
1 Meeting Nazionale sull'analisi dei dati dell'osservatorio Fermi-LAT Oct. 01, ASDC/Frascati Introduction to Fermi-LAT Science Analysis Software.
Fermi Gamma-ray Burst Monitor
GLAST Science Support Center November 8, 2005 GUC Action Item #15 AI#15: Pre-Launch GI Proposal Tools David Band (GSSC/JCA-UMBC)
3 nd Coding Sprint Jürgen Knödlseder (IRAP) 1.GammaLib and ctools concepts 2.Coding for GammaLib and ctools 3.Current status 4.Goals of this sprint.
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.
for Lomonosov-GRB collaboration
Gamma-ray Bursts (GRBs)
Alessandro Buzzatti Università degli Studi di Torino / SLAC
The Crab Light Curve and Spectra from GBM: An Update
C.Baltay and S. Perlmutter December 15, 2014
DC2 pulsars analysis: a population point-of-view
observations of GW events Imma Donnarumma, on behalf of the AGILE Team
4th Coding Sprint Short intro into GammaLib and ctools concepts
Nicola Omodei INFN Pisa
Transient Sources Simulation and “GRBSpectrum”
First day: Planets, Sun and Moon
Proposal for LAT Year 1 Data Release Plan
Source Detection by Count Excess
TS CONTOUR MAP GOAL Produce maps of confidence levels for any
Wavelet Analysis for Sources Detection
Source catalogue generation
° status report analysis details: overview; “where we are”; plans: before finalizing result.. I.Larin 02/13/2009.
GRB Simulations in DC2 Valerie Connaughton with input from Nicola Omodei, David Band, Jay Norris and Felix Ryde. DC2 Workshop -- GSFC
Wavelet method for source detection in GLAST photon-counting images
Point source catalog (D3)
Insight-HXMT observations on type-I &type-II X-ray bursts
GRB and GRB Two long high-energy GRBs detected by Fermi
Data analysis in HEP: a statistical toolkit
Time-Dependent Searches for Neutrino Point Sources with IceCube
Imaging Topics Imaging Assumptions Photometry Source Sizes Background
° status report analysis details: overview; “where we are”; plans: before finalizing result.. I.Larin 02/13/2009.
Presentation transcript:

Spectral analysis of the LAT and GBM data GRB tutorial Spectral analysis of the LAT and GBM data

All the software you need https://confluence.slac.stanford.edu/display/DC2/DC2+code+releases

The tools I used gtselect gtbin gtrspgen gtlikelihood DataServer Select the ROI containing the bursts, in time, ra and dec gtbin Bin the LAT data in time -> obtain the light curve Bin the LAT data in RA,DEC ->Obtaining a count map Bin the GBM and LAT data in energy -> obtaining a spectrum PHA1 files Bin the GBM and LAT data in time and energy->PHA2 files gtrspgen Compute the response for the LAT gtlikelihood Unbinned spectral analysis DataServer Hyppodraw, fv, ds9 visualization of LC and CMAP Python as scripting tool Xspec for performing the spectral analysis

Getting the data at http://glast.gsfc.nasa.gov/ssc/dev/databases/DC2/

The files you need: LAT livetime history (DC2_FT2.fits) ftp://heasarc.gsfc.nasa.gov/FTP/glast/DC2/misc_data/DC2_FT2.fits LAT photon data (all sky, first week): (LAT_allsky_220838401.126_V01.fits) ftp://heasarc.gsfc.nasa.gov/FTP/glast/DC2/allsky/LAT_allsky_220838401.126_V01.fits GRB080104514 GBM files: ftp://heasarc.gsfc.nasa.gov/FTP/glast/DC2/burst/GRB080104514.tar.gz

Un-packaging the GBM files dhcpvisitor216193:~/GLAST/GRB080104514 omodei$ l -rw-r--r-- 1 omodei omodei 23040 Feb 23 08:55 GLG_BCK_B0_BN080104514_V01.BAK … -rw-r--r-- 1 omodei omodei 106560 Feb 23 08:55 GLG_CSPEC_B0_BN080104514_V01.RSP -rw-r--r-- 1 omodei omodei 1900800 Feb 23 08:55 GLG_CTIME_B0_BN080104514_V01.FIT -rw-r--r-- 1 omodei omodei 20275200 Feb 23 08:42 GLG_CTIME_N0_080104514_V01.FIT -rw-r--r-- 1 omodei omodei 591 Feb 23 08:52 GLG_NOTICE_080104514.TXT -rw-r--r-- 1 omodei omodei 380160 Feb 23 08:55 GLG_TTE_B0_BN080104514_V01.FIT -rw-r--r-- 1 omodei omodei 377280 Feb 23 08:55 GLG_TTE_B1_BN080104514_V01.FIT -rw-r--r-- 1 omodei omodei 164160 Feb 23 08:52 GLG_TTE_N0_BN080104514_V01.FIT -rw-r--r-- 1 omodei omodei 161280 Feb 23 08:52 GLG_TTE_N1_BN080104514_V01.FIT -rw-r--r-- 1 omodei omodei 141120 Feb 23 08:52 GLG_TTE_N2_BN080104514_V01.FIT -rw-r--r-- 1 omodei omodei 146880 Feb 23 08:52 GLG_TTE_N3_BN080104514_V01.FIT -rw-r--r-- 1 omodei omodei 161280 Feb 23 08:52 GLG_TTE_N6_BN080104514_V01.FIT -rw-r--r-- 1 omodei omodei 129600 Feb 23 08:52 GLG_TTE_N7_BN080104514_V01.FIT -rw-r--r-- 1 omodei omodei 158400 Feb 23 08:52 GLG_TTE_N9_BN080104514_V01.FIT -rw-r--r-- 1 omodei omodei 135360 Feb 23 08:52 GLG_TTE_NB_BN080104514_V01.FIT

GCN-like notices: GLG_NOTICE_080104514.TXT In DC2 we know (approximately) the position of the burst (GLG_NOTICE) GRB can be displaced statistically and systematically… GLAST BURST MONITOR BURST NOTIFICATION ************************************** BURST Name = GRB080104514 BURST Date = 080104 BURST Time (Sec of Day) = 44414.0 BURST RA (Deg) = 59.3413 BURST DEC (Deg) = 14.3453 BURST LOC ERR (Deg 1 sigma) = 2.29264 Standard Intensity (cts/sec) = 697.885 (Standard Intensity is an angle-adjusted measure of the peak count rates in 2 NaI detectors closest t o the source) Closest detectors = N0 N6 B0

Quick look at the data: hippodraw Open the LAT_allsky_220838401.126_V01.fits Select EVENT extension Do a color plot RA vs DEC Set the axis bin width as you prefer (1 deg in the fig.)

Add a cut on TIME, reset the bin width (axis)…

Ra ~57 Dec ~14 Tmin : 221142007 Tmax: 221142060

GBM and LAT light curve Lightcurves curves at LAT energy and GBM energy are different, as predicted from the model This imply a spectral evolution!

Trick 2: open the header file of the TTE data!

Resolved in dataSubselector version v4r1p5 Alternatively… 1. Selecting the data dhcpvisitor216193:~/GLAST/GRB080104514 omodei$ gtselect Input FT1 file [] : ../DC2/LAT_allsky_220838401.126_V01.fits Output FT1 file [] : GRB080104514_select.fits RA for new search center (degrees) <0 - 360> [] : 59.34 Dec for new search center (degrees) <-90 - 90> [] : 14.35 radius of new search region (degrees) <0 - 180> [] : 20 start time (MET in s) [] : 221142007 end time (MET in s) [] : 221142060 lower energy limit (MeV) [30] : upper energy limit (MeV) [300000] : Event classes (-1=all, 0=FrontA, 1=BackA, 2=FrontB, 3=BackB, 4=class A) <-1 - 4> [-1] : There was a bug (in ST v6r4p1) related to insufficient precision of MET. (Resulting in empty files) Resolved in dataSubselector version v4r1p5 Alternatively…

It is useful to rename the file! (GRB080104514_select.fits)

2. Binning the LAT data in spatial coordinates CMAP dhcpvisitor216193:~/GLAST/GRB080104514 omodei$ gtbin This is gtbin version v0r16p3 Type of output file <CMAP|LC|PHA1|PHA2> [] : CMAP Event data file name [] : GRB080104514_select.fits Output file name [] : GRB080104514_lat.cmap Spacecraft data file name[] : ../DC2/DC2_FT2.fits Size of the X axis in pixels [] : 360 Size of the Y axis in pixels [] : 180 Image scale (in degrees/pixel) [1] : Coordinate system (CEL - celestial, GAL -galactic) <CEL|GAL> [GAL] : First coordinate of image center in degrees (RA or galactic l) [0] : Second coordinate of image center in degrees (DEC or galactic b) [0] : Rotation angle of image axis, in degrees [0] : ds9 -bin factor 0.5 0.5 -cmap b -scale sqrt "GRB080104514_select.fits[bin=RA,DEC]"

3. Binning the LAT data in time Obtaining the LAT light curve dhcpvisitor216193:~/GLAST/GRB080104514 omodei$ gtbin This is gtbin version v0r16p3 Type of output file <CMAP|LC|PHA1|PHA2> [PHA1] : LC Event data file name [] : GRB080104514_select.fits Output file name [] : GRB080104514_lat.lc Spacecraft data file name[] : ../DC2/DC2_FT2.fits Algorithm for defining time bins <FILE|LIN|SNR> [LIN] : Start value for first time bin [] : 221142007 Stop value for last time bin [] : 221142060 Width of linearly uniform time bins [] : 0.1

3. Binning the LAT data in energy Obtaining a spectrum (PHA1) file dhcpvisitor216193:~/GLAST/GRB080104514 omodei$ gtbin This is gtbin version v0r16p3 Type of output file <CMAP|LC|PHA1|PHA2> [PHA1] : Event data file name [GRB080104514_select.fits] : Output file name [] : GRB080104514_lat.pha Spacecraft data file name [../DC2/DC2_FT2.fits] : Algorithm for defining energy bins <FILE|LIN|LOG> [LIN] : LOG Start value for first energy bin [30] : Stop value for last energy bin [300000] : Number of logarithmically uniform energy bins [15] : gtbin evfile=GRB080104514_select.fits scfile=../DC2/DC2_FT2.fits outfile=GRB080104514_lat.pha algorithm=PHA1 energybinalg=LOG emin=30 emax=300000 enumbins=15 This is gtbin version v0r16p3 Done!

4. Binning the GBM data in energy dhcpvisitor216193:~/GLAST/GRB080104514 omodei$ gtbin This is gtbin version v0r16p3 Type of output file <CMAP|LC|PHA1|PHA2> [PHA1] : Event data file name [] : GLG_TTE_N0_BN080104514_V01.FIT Output file name [] : GRB080104514_N0.pha Spacecraft data file name [NONE] : This has to be done for each bright detectors in the GBM: <12 NaI, <2 BGO. Notice: in DC2 one can use all the GBM detectors due to the fact that the background used to build the data is the same of the .bak files. In reality things are different!

Compute the response function for the LAT dhcpvisitor216193:~/GLAST/GRB080104514 omodei$ gtrspgen This is gtrspgen version v1r2 Response calculation method (GRB, PS) <GRB|PS> [GRB] : Spectrum file name [] : GRB080104514_lat.pha Spacecraft data file name [] : ../DC2/DC2_FT2.fits Output file name [] : GRB080104514_lat.rsp Time of GRB (s) [] : 221142007 Response function to use, e.g. DC1F/DC1B, G25F/G25B, TestF/TestB [DC2] : Algorithm for defining true energy bins <FILE|LIN|LOG> [] : LOG Start value for first energy bin [30] : Stop value for last energy bin [300000] : Number of logarithmically uniform energy bins [100] : ! I renamed GBM files to match my “convention” GRBYYMMDDFFF_det.* GLG_CSPEC_B0_BN080104514_V01.RSP =>GRB080104514_B0.rsp GLG_CSPEC_B1_BN080104514_V01.RSP => GRB080104514_B1.rsp GLG_CSPEC_N0_BN080104514_V01.RSP => GRB080104514_N0.rsp GLG_CSPEC_N1_BN080104514_V01.RSP => GRB080104514_N1.rsp GLG_CSPEC_N2_BN080104514_V01.RSP => GRB080104514_N2.rsp GLG_CSPEC_N3_BN080104514_V01.RSP => GRB080104514_N3.rsp GLG_CSPEC_N6_BN080104514_V01.RSP => GRB080104514_N6.rsp GLG_CSPEC_N7_BN080104514_V01.RSP => GRB080104514_N7.rsp GLG_CSPEC_N9_BN080104514_V01.RSP => GRB080104514_N9.rsp GLG_CSPEC_NB_BN080104514_V01.RSP => GRB080104514_NB.rsp

Everything is here: Notice: no background for the LAT ~/GLAST/GRB080104514 omodei$ l *pha GRB080104514_B0.pha GRB080104514_B1.pha GRB080104514_N0.pha GRB080104514_N1.pha GRB080104514_N2.pha GRB080104514_N3.pha GRB080104514_N6.pha GRB080104514_N7.pha GRB080104514_N9.pha GRB080104514_NB.pha GRB080104514_lat.pha ~/GLAST/GRB080104514 omodei$ l *rsp GRB080104514_B0.rsp GRB080104514_B1.rsp GRB080104514_N0.rsp GRB080104514_N1.rsp GRB080104514_N2.rsp GRB080104514_N3.rsp GRB080104514_N6.rsp GRB080104514_N7.rsp GRB080104514_N9.rsp GRB080104514_NB.rsp GRB080104514_lat.rsp ~/GLAST/GRB080104514 omodei$ l *bak GRB080104514_B0.bak GRB080104514_B1.bak GRB080104514_N0.bak GRB080104514_N1.bak GRB080104514_N2.bak GRB080104514_N3.bak GRB080104514_N6.bak GRB080104514_N7.bak GRB080104514_N9.bak GRB080104514_NB.bak Notice: no background for the LAT

Running XSPEC NaI < 1 MeV 150 keV < BGO< 30MeV dhcpvisitor216193:~/GLAST/GRB080104514 omodei$ xspec XSPEC version: 12.2.1 Build Date/Time: Tue Nov 22 20:13:51 2005 !XSPEC12>cpd /xw; !XSPEC12>data GRB080104514_N0.pha, GRB080104514_N6.pha, GRB080104514_B0.pha, GRB080104514_LAT.pha !XSPEC12>response GRB080104514_N0.rsp, GRB080104514_N6.rsp, GRB080104514_B0.rsp, GRB080104514_LAT.rsp !XSPEC12>backgrnd GRB080104514_N0.bak, GRB080104514_N6.bak ,GRB080104514_B0.bak Net count rate (cts/s) for Spectrum:1 9.929e+01 +/- 4.590e+00 (30.7 % total ) Net count rate (cts/s) for Spectrum:2 9.090e+01 +/- 4.570e+00 (28.8 % total ) Net count rate (cts/s) for Spectrum:3 7.422e+01 +/- 7.881e+00 (9.4 % total ) !XSPEC12>setplot energy; !XSPEC12>ignore 1:1000.0-**; !XSPEC12>ignore 2:1000.0-**; !XSPEC12>ignore 3:**-150.0; !XSPEC12>ignore 3:3e4-**; !XSPEC12>setplot rebin 5 5 1 ; !XSPEC12>setplot rebin 5 5 2 ; !XSPEC12>setplot rebin 3 10 3; !XSPEC12>setplot rebin 1 1 4; !XSPEC12>model grbm Input parameter value, delta, min, bot, top, and max values for ... -1 0.01 -10 -3 2 5 grbm:alpha> -2 0.01 -10 -5 2 10 grbm:beta> 300 10 10 50 1000 10000 grbm:tem> 1 0.01 0 0 1e+24 1e+24 grbm:norm> !XSPEC12> renorm !XSPEC12>fit !XSPEC12>plot ldata NaI < 1 MeV 150 keV < BGO< 30MeV

The result (2NaI, 1BGO + LAT) ======================================================================== Model grbm<1> Source No.: 1 Active/On Model Model Component Parameter Unit Value par comp 1 1 grbm alpha -1.15569 +/- 9.78069E-02 2 1 grbm beta -1.94431 +/- 1.81158E-02 3 1 grbm tem keV 278.690 +/- 102.841 4 1 grbm norm 2.82605E-03 +/- 7.12606E-04 ________________________________________________________________________ Chi-Squared = 118.35 using 344 PHA bins. Reduced chi-squared = 0.34808 for 340 degrees of freedom Null hypothesis probability = 1.000000e+00

With all the detectors (8NaI, 1BGO + LAT) ======================================================================== Model grbm<1> Source No.: 1 Active/On Model Model Component Parameter Unit Value par comp 1 1 grbm alpha -1.18380 +/- 5.99816E-02 2 1 grbm beta -1.95094 +/- 1.71234E-02 3 1 grbm tem keV 336.394 +/- 85.1461 4 1 grbm norm 2.64184E-03 +/- 3.97155E-04 ________________________________________________________________________ Chi-Squared = 327.69 using 980 PHA bins. Reduced chi-squared = 0.33575 for 976 degrees of freedom Null hypothesis probability = 1.000000e+00

Scripting xspec set PREFIX GRB set GRBNAME 080104514 set GRBNAME $PREFIX$GRBNAME echo $GRBNAME cpd /xw dat ${GRBNAME}_N0.pha, ${GRBNAME}_N6.pha, ${GRBNAME}_B0.pha, ${GRBNAME}_LAT.pha; respon ${GRBNAME}_N0.rsp, ${GRBNAME}_N6.rsp, ${GRBNAME}_B0.rsp, ${GRBNAME}_LAT.rsp; back ${GRBNAME}_N0.bak, ${GRBNAME}_N6.bak ,${GRBNAME}_B0.bak; setplot energy; ignore 1:1000.0-** ignore 2:1000.0-** ignore 3:**-150.0 ignore 3:3e4-** #ignore 8:**-3e4 setplot rebin 5 5 1 setplot rebin 5 5 2 setplot rebin 3 10 3 setplot rebin 1 1 4 mod grbm; renorm fit plot ldata;

Time resolved temporal analysis 1 2 3 4

Creating Pha2 files… LAT All the GBM detectors I want to analyze … dhcpvisitor216193:~/GLAST/GRB080104514 omodei$ gtbin This is gtbin version v0r16p3 Type of output file <CMAP|LC|PHA1|PHA2> [] : PHA2 Event data file name [GRB080104514_select.fits] : Output file name [] : GRB080104514_lat.pha2 Spacecraft data file name [NONE] : Algorithm for defining energy bins <FILE|LIN|LOG> [LOG] : Start value for first energy bin [30] : Stop value for last energy bin [300000] : Number of logarithmically uniform energy bins [15] : Algorithm for defining time bins <FILE|LIN|SNR> [] : FILE Name of the file containing the time bin definition [] : timebins.fits Type of output file <CMAP|LC|PHA1|PHA2> [PHA2] : Event data file name [] : GLG_TTE_B1_BN080104514_V01.FIT Output file name [] : GRB080104514_B1.pha2 Algorithm for defining time bins <FILE|LIN|SNR> [FILE] : Name of the file containing the time bin definition [timebins.fits] : LAT All the GBM detectors I want to analyze …

1 1 grbm alpha -0.310013 +/- 3.05915 2 1 grbm beta -1.78821 +/- 0.199308 3 1 grbm tem keV 401.832 +/- 1855.11 4 1 grbm norm 9.98445E-05 +/- 3.09719E-04

1 1 grbm alpha -1.18084 +/- 8.50302E-02 2 1 grbm beta -2.04713 +/- 5.02809E-02 3 1 grbm tem keV 267.715 +/- 84.8468 4 1 grbm norm 6.20244E-03 +/- 1.11782E-03

1 1 grbm alpha -1.19528 +/- 0.118542 2 1 grbm beta -1.84633 +/- 3.91127E-02 3 1 grbm tem keV 719.387 +/- 516.844 4 1 grbm norm 2.63532E-03 +/- 6.82597E-04

1 1 grbm alpha -1.49635 +/- 1.08452 2 1 grbm beta -1.88247 +/- 6.95778E-02 3 1 grbm tem keV 115.413 +/- 579.045 4 1 grbm norm 1.77894E-03 +/- 8.21310E-03

Conclusions Have fun !!

hcpvisitor216193:~/GLAST/GRB080104514 omodei$ gtlikelihood Statistic to use <BINNED|UNBINNED> [UNBINNED] : Spacecraft file [../DC2/DC2_FT2.fits] : Event file [GRB080104514_select.fits] : Unbinned exposure map [none] : Exposure hypercube file [none] : Source model file [myGRBmod.xml] : Response functions to use [DC2] : Optimizer <LBFGS|MINUIT|DRMNGB> [DRMNGB] : Computing exposure at (57, 14).....................! myGRB: Prefactor: 4910.05 +/- 575.129 Index: -2.06767 +/- 0.0766657 Scale: 100 Npred: 107.941 ROI distance: 0 TS value: -1243.53 Total number of observed counts: 108 Total number of model events: 107.941 -log(Likelihood): 621.763403 Elapsed CPU time: 0.001338

Scripts: Python tcl

Trick 1: How to get MET out of a GLG_NOOTICE import time import datetime refdate=datetime.date(2001, 1, 1) grbdate=datetime.date(2008, 1, 4) tstart=(grbdate - refdate).days*86400+44414.0 print ‘Burst Time in MET is:’,tstart Burst Time in MET is: 221142014.0 Many other tools can do this, even excel… But, the triggertime in the notice is not the Montecarlo starting time of the burst…

Python… running the ScienceTools import os import time import datetime refdate=datetime.date(2001, 1, 1) grbnumber="080104514" grbprefix="GRB" infile="../DC2/LAT_allsky_220838401.126_V01.fits" scfile="../DC2/DC2_FT2.fits" grbdate=datetime.date(2008, 1, 4) tstart=(grbdate - refdate).days*86400+44414.0 tmin=str(tstart-5) tmax=str(tstar+60) deltatime=".1" ra="57" dec="14" rad="15" emin="30" emax="300000" enumbins="15" eventClass="-1"

Flags to decide the steps to do… …again python… select=0 lc=1 cmap=1 pha=1 pha2=1 rsp=1 gbm=1 gbm2=1 grbname=grbprefix+grbnumber; grbfile=grbname+"_select.fits" lat_lc=grbname+"_lat.lc" lat_cmap=grbname+"_lat.cmap" lat_pha=grbname+"_lat.pha" lat_pha2=grbname+"_lat.pha2" lat_rsp=grbname+"_lat.rsp" timebinfile="timebins.fits" numxpix="360" numypix="180" pixscale="1" coordsys="GAL" Flags to decide the steps to do… …my naming convention…

…be patient… if select: cmd="gtselect infile="+infile+" outfile="+grbfile+" ra="+ra+" dec="+dec+" rad="+rad+" tmin="+tmin+" tmax="+tmax+" emin="+emin+" emax="+emax+" eventClass="+eventClass print cmd os.system(cmd) if lc: cmd="gtbin evfile="+grbfile+" scfile="+scfile+" outfile="+lat_lc+" algorithm=LC timebinalg=LIN"+" tstart="+tmin+" tstop="+tmax+" deltatime="+deltatime+" energybinalg=LOG" if cmap: cmd="gtbin evfile="+grbfile+" scfile="+scfile+" outfile="+lat_cmap+" algorithm=CMAP numxpix=360 numypix=180 pixscale=1 coordsys="+coordsys+" xref=0 yref=0 axisrot=0" if pha: cmd="gtbin evfile="+grbfile+" scfile="+scfile+" outfile="+lat_pha+" algorithm=PHA1 energybinalg=LOG"+" emin="+emin+" emax="+emax+" enumbins="+enumbins if pha2: cmd="gtbin evfile="+grbfile+" scfile="+scfile+" outfile="+lat_pha2+" algorithm=PHA2 energybinalg=LOG"+" emin="+emin+" emax="+emax+" enumbins="+enumbins+" timebinalg=FILE timebinfile="+timebinfile if rsp: cmd="gtrspgen respalg=GRB specfile="+lat_pha+" scfile="+scfile+" outfile="+lat_rsp+" time="+tmin+" resptype=DC2"+" energybinalg=LOG"+" emin="+emin+" emax="+emax+" enumbins=100"

…done! if gbm: detectorList=["N0","N1","N2","N3","N4","N5","N6","N7","N8","N9","NA","NB","B0","B1"] for det in detectorList: gbm_file_in="GLG_TTE_"+det+"_BN"+grbnumber+"_V01.FIT" gbm_file_out=grbname+"_"+det+".pha" cmd="gtbin evfile="+gbm_file_in+" scfile=NONE outfile="+gbm_file_out+" PHA1" os.system(cmd) cmd="cp GLG_CSPEC_"+det+"_BN"+grbnumber+"_V01.RSP "+grbname+"_"+det+".rsp" cmd="cp GLG_BCK_"+det+"_BN"+grbnumber+"_V01.BAK "+grbname+"_"+det+".bak" if gbm2: gbm_file_out=grbname+"_"+det+".pha2" cmd="gtbin evfile="+gbm_file_in+" scfile=NONE outfile="+gbm_file_out+" PHA2 timebinalg=FILE timebinfile="+timebinfile print "Done!"

PlotWithHippo import sys import os import hippo import hippoplotter as plot from hippo import FitsController from hippo import Display def CM(grbnumber): my_file='GRB'+grbnumber+'_lat.cmap' plot.fitsImage(my_file, zlog=1, aspect=2) def LAT_SELECTION(grbnumber): my_file='GRB'+grbnumber+'_select.fits' ntc = FitsController.instance() hdus = ntc.getNTupleNames(my_file) events = ntc.createNTuple ( my_file, hdus[1] ) lc=plot.Histogram(events,'TIME') lc.setBinWidth('x',.1) sm = plot.XYHist(events,'RA','DEC') sm.setBinWidth ( 'x', .5 ) sm.setBinWidth ( 'y', .5 ) str = raw_input("Type return to quit. ") def LAT_LC(grbnumber): my_file='GRB'+grbnumber+'_lat.lc' plot.Scatter(events,'TIME','COUNTS',pointRep='Line')

PlotWithHippo def LAT_GBM_LC(grbnumber): lc=range(15) events=range(15) ntc = FitsController.instance() lat_file='GRB'+grbnumber+'_select.fits' hdus = ntc.getNTupleNames(lat_file) events[0]= ntc.createNTuple ( lat_file, hdus[1] ) lc[0]=plot.Histogram(events[0],'TIME') lc[0].setBinWidth('x',.1) detectorList=["N0","N1","N2","N3","N4","N5","N6","N7","N8","N9","NA","NB","B0","B1"] i=0 for det in detectorList: i=i+1 gbm_file = "GLG_TTE_"+det+"_BN"+grbnumber+"_V01.FIT" if os.path.exists(gbm_file): print "file "+gbm_file+" exists:" hdus = ntc.getNTupleNames(gbm_file) events[i] = ntc.createNTuple ( gbm_file, hdus[2] ) lc[i] = plot.Histogram(events[i],'TIME') lc[i].setBinWidth ( 'x', .1 ) lc[i].setTitle(det) tstart=lc[1].getRange('x')[0]+5 tend=lc[1].getRange('x')[1]-5 print 'Tstart=',tstart,', Tend=',tend lc[i].setRange('x',tstart,tend) str = raw_input("Type return to quit/continue. ")