# Presentation: 401843

## Progress on Pulsar Tools Development 

**Masaharu Hirayama **
**(GLAST SSC—GSFC/UMBC)**** **

**http://glast.gsfc.nasa.gov/ssc/dev/psr_tools/**

## Pulsar Tools

- Pulsar
- ephem. (D4)

- Level 1 (D1)

- LAT Point source
- catalog (D5)

- Interstellar em.
- model (U5)

- Pointing/livetime
- history (D2)

- Astron.
- catalogs (D6)

- Level 0.5

- IRFs (D3)

- Alternative source for testing high-level analysis

- Alternative for making additional cuts on already-retrieved event data

- Pt.ing/livetime
- simulator (O1)

- Observation
- simulator (O2)

- Pt.ing/livetime
- extractor (U3)

-  Data sub-
- selection (U2)

- Data extract
- (U1)

- Exposure
- calc. (U4)

- Likelihood (A1)

- Map gen(U6)

- Src. ID (A2)

- Event
- display (UI1)

- Pulsar
- profiles (A3)1

- Catalog
- Access (U9)

- Pt.ing/livetime
- extractor (U3)

- Pulsar phase
- assign (U12)

- Pulsar period
- search (A4)

- GRB spectral-temporal
- modeling (A10)

- Source model
- def. tool (U7)

- Arrival time
- correction (U10)

- GRB temporal
- analysis (A7)2

- GRB LAT DRM
- gen. (U14)

- GRB spectral
- analysis (A8)2

- GRB event
- binning (A5)

- GRB unbinned
- spectral analysis (A9)

- GRB visual-
- ization (U13)

- IRF visual-
- ization (U8)

- Ephemeris
- extract (U11)

- GRB rebinning
- (A6)2

**Data in**

## Pulsars for GLAST LAT

**Pulsars are point sources**
**GLAST expected to detect pulsations from 50-100 pulsars**
**10-50% are predicted to be radio quiet like Geminga**
**Most need 1 year exposure for detection**
**Sparse data**
**One photon per 500 pulses (Crab 30 MeV – 300 GeV)**
**Scanning with large FOV**
**All sources get some exposure every day throughout a year**
**Large number of short observations**
****** ****Both good and bad news for pulsar timing**

## Typical Pulsar Analysis

**Download data and screen events**
**For maximum pulse-detection sensitivity, select only events within a small region, typically size of a couple of PSFs**
**Correct event times – barycentric correction**
**To cancel Doppler effect resulting from the orbital motions of the Earth and the spacecraft**
**Find pulsar ephemeris at the time of observation **
**Case 1: Use a radio ephemeris as is**
**Case 2: Scan pulse frequencies around extrapolation of radio ephemeris**
**Case 3: Search for pulsations if no radio ephemeris is available**
**Calculate pulse phase for each photon**
**Use pulse phases in your analysis**
**Pulse shape (or pulse profile) **
**Phase-resolved spectrum **
**Phase-resolved image **

## What Pulsar Tools Are Needed?

**Barycentric corrector**
**Photon arrival time converter (U10)**
**Pulsar ephemeris “finder”**
**Case 1: use a radio ephemeris as is**
**	****Pulsar ephemerides database (D4)**
**	****Pulsar ephemeris extractor (U11)**
**Case 2: scan around a radio ephemeris**
**	****Pulsar profile & periodicity tests (A3)**
**Case 3: search for pulsations**
**	****Pulsar period search (A4)**
**Pulse phase calculator**
**Pulsar phase assignment (U12)**

## Algorithms

**Periodicity tests**
**Chi-squared test (Leahy et al. 1983, ApJ 266, 160; Vaughan et al. 1994, ApJ 435, 362) **
**Zn****2**** test (Buccheri et al. 1983, A&A 128, 245) **
**Rayleigh test (equivalent to Zn****2**** test for n = 1) **
**H test (De Jager et al. 1989, A&A 221, 180) **
**Bayesian approach (Gregory and Loredo 1992, ApJ 398, 146; Gregory and Loredo 1996, ApJ 473, 1059) **
**Period search**
**Discrete Fourier transforms (Ransom 2002, AJ 124, 1788) **
**Lomb-Scargle periodogram (Lomb 1976, Ap&SS 39, 447; Scargle 1982, ApJ 263, 835; Press & Rybicki 1989, ApJ 338, 277) **

## Pulsar Tools Components

**Pulsar ephemerides database (D4)**
**List of pulsar timing solution maintained during the mission for potential LAT sources.**
**Downloadable as a FITS file.**
**Pulsar ephemeris extractor (U11)**
**Basic front end to the pulsar ephemerides database **
**Photon arrival time converter (U10)**
**Converts photon arrival times in a photon list to those at the solar system barycenter.**
**Pulsar phase assignment (U12)**
**Assigns pulse phase to each photon in a photon list**
**Pulsar profile & periodicity tests (A3)**
**Epoch-folds photon arrival times at trial pulse frequencies and estimate significance of pulsation at each frequency**
**Pulsar period search (A4)**
**Searches for periodic emission from a point source**

## Pulsar Tools In Action

## Current Status of Development

|  | Design | Existing counterparts | Implementation | Testing |
| --- | --- | --- | --- | --- |
| Ephemrides database | Defined in detail | Identified
 | Examples available | To be used in DC2 |
| Ephemeris extractor | Rough design | None
 | Later | Not yet |
| Arrival time converter | Algorithms identified | Identified
 | Complete | In progress |
| Phase assignment | Algorithms identified | Identified
 | Limited features | Partially done |
| Pulse profile & period scan | Algorithms identified | Identified
 | Start soon | Not yet |
| Period search | Algorithms identified | Identified
 | Later | Not yet |

## Data Challenge 2

**Almost ready for Data Challenge 2**
**Pulsar ephemerides database (D4)**
**Photon arrival time converter (U10)**
**Pulsar phase assignment (U12) – limited features**
**To be ready by Data Challenge 2**
**Pulsar profile & periodicity tests (A3) – limited features**
**Pulsar period search (A4) – re-use of FTOOLS counterparts**
**Major tasks beyond Data Challenge 2**
**Pulsar ephemerides database**
**Database ingest (D4)**
**Extractor tool (U11)**
**Pulsar phase assignment (U12) – full features**
**Pulsar profile & periodicity tests (A3) – full features**
**Pulsar period search (A4) – polish user interface?**

## Backup Slides

## Pulsar Ephemerides Database (D4, U11)

**Full definition of D4 FITS file complete.**
**Similar to the CGRO catalog, with some improvements**
**Examples of D4 FITS file available.**
**Contents based on the CGRO catalog.**
**To be used in Data Challenge 2.**
**Action items:**
**Discuss on ephemerides data ingest with the pulsar IDS.**
**Implement extractor tools (U11).**
**Resolve minor issues/concerns on FITS definition.**

## Photon Arrival Time Converter (U10)

**Existing counterparts identified.**
**FAXBARY seems to be “re-usable” for GLAST.**
**FAXBARY: FTOOLS originally developed for XTE, now available for other missions such as Swift.**
**FAXBARY modified to adopt to GLAST data.**
**Currently under test.**
**To be used in Data Challenge 2.**
**Action items:**
**Complete initial test.**
**Deliver to the LAT team as a part of the HEADAS package.**

## Pulsar Phase Assignment (U12)

**Basic functionality implemented and tested.**
**Single set of frequency ephemeris can be given.**
**Probably already good enough for Data Challenge 2.**
**Multiple ephemerides from database (D4) under development.**
**To be used in Data Challenge 2.**
**Action items:**
**Implement application of multiple ephemerides to a single GLAST data file.**

## Pulsar Profile & Periodicity Tests (A3)

**Suggested algorithms for periodicity test.**
**Chi-squared test (Leahy et al. 1983, ApJ 266, 160; Vaughan et al. 1994, ApJ 435, 362) **
**Zn****2**** test (Buccheri et al. 1983, A&A 128, 245) **
**Rayleigh test (equivalent to Zn****2**** test for n = 1) **
**H test (De Jager et al. 1989, A&A 221, 180) **
**Bayesian approach (Gregory and Loredo 1992, ApJ 398, 146; Gregory and Loredo 1996, ApJ 473, 1059) **
**Existing counterparts identified.**
**Some FTOOLS are usable for GLAST w/o modification.**
**To be used in Data Challenge 2.**
**Action items:**
**Test existing tools with GLAST data format.**
**Identify periodicity tests to be implemented.**
**Implement identified tests in C++ or w/ Python wrapper.**

## Pulsar Period Search (A4)

**Suggested algorithms for period search.**
**Discrete Fourier transforms (Ransom 2002, AJ 124, 1788) **
**Lomb-Scargle periodogram (Lomb 1976, Ap&SS 39, 447; Scargle 1982, ApJ 263, 835; Press & Rybicki 1989, ApJ 338, 277) **
**Existing counterparts identified.**
**“****powspec” (XRONOS) calculates power spectrum density**
**“****perdgrm” (FTOOLS) computes Lomb-Scargle periodogram**
**Action items:**
**Test existing tools with GLAST data format.**
**Implement Python wrapper if needed.**