PulsarSpectrum Tutorial

Create a new pulsar from scratch, then simulate the pulsar using the PulsarSpectrum package's default emission model.

While some pulsars are contained in the default PulsarSpectrum XML library, this tutorial enables you to simulate pulsars different from those defaults.

Prerequisites

  • PulsarSpectrum v1r1p0, or above.

Data Resources

 

Datalist, XML source file, and Time Profiles of all EGRET pulsars.

Note: This dataset was derived from the thesis of J.M. Fierro.

     
  Note: The ephemerides does not span multiple time ranges. (See README file included in the .gz file.)

Also see: Pulsar Spectrum: Simulating Pulsars for GLAST

Steps:

  1. Create a Datalist.txt file and Link it to PulsarDataList.txt
  1. Set Model-dependent Parameters
  1. Edit the TimeProfile.txt file
  1. Simulate Using gtobsim or GlastRelease

1. Create a DataList.txt file and Link it to PulsarDataList.txt

Pulsar parameters are grouped in two main categories:

  • General

Related primarily to the timing properties of the pulsar and its ephemerides.

  • Model-dependent
Related to the gamma-ray light curve and spectral properties.

General Parameters. General parameters to be declared for a user-defined pulsar are:

Name: Pulsar name chosen for the simulation. It's a string, for example "PSRCRAB".
F>100 MeV: Flux of the pulsar above 100 MeV, expressed in .
FREQ/PER: Type of ephemerides, i.e., specify ephemerides as period and its derivatives (P) or frequency and its derivatives (F).
P/F0: Period/Frequency expressed in .
Pdot/F1, P2dot/F2: First and second derivatives of period (pdot,p2dot) or of frequency (F1,F2).
EpochValidInit(MJD) Start of ephemerides validity range, expressed in MJD.
Epoch(MJD) Reference epoch for ephemerides,expressed in MJD.
EpochValidEnd(MJD) End of ephemerides validity range, expressed in MJD.
txbary A time in MJD between EpochValidInit and EpochValidEnd at which the phase of the pulsar is equal to zero.
 

Notes:

  • These general parameters must be stored in an ASCII file named Datalist.txt, and located in the /data subdirectory of the celestialSources/Pulsar package.
  • The default data list is the BasicDataList.txt file.

Screenshot of the BasicDataList.txt file:

Screenshot of the PulsarDataList.txt file

Procedure
  1. Using a text editor, create an ASCII data list file (e.g., myDatalist.txt) with the desired parameters for the pulsar.
  1. Save it to the /celestialSources/Pulsar/vXrYpZ/data subdirectory.
  1. To link your Datalist.txt file to PulsarSpectrum, simply edit the PulsarDataList.txt file, also located in /data directory, and add a line with the name of your data list file (e.g, myDatalist.txt).

PulsarSpectrum can now access the pulsars your personal data list.

 

2. Set Model-dependent Parameters

  1. Create a source tag in the Pulsar_user_library.xml file (which contains the brightest EGRET pulsars in Polar Cap or Outer Gap scenario), or in a new XML file.

Notes:

  • Parameters entered in this XML file depend on the model used.
  • Currently only the phenomenological Nel-De Jager model (referred to as model 1, below) is available; however other models will be added in the future.
  1. Add a source tag to the XML file. For example:
<source name=" PSRVelaPolarPhen " >
<spectrum escale="MeV"> <SpectrumClass name="PulsarSpectrum"
params="PSRVELA, 128.83, -45.18, 1.0e5, 3.0e8, 1, 61243, 3, 1e6, 8e6, -1.62, 1.7"/>
<use_spectrum frame="galaxy"/>
</spectrum>
</source>

Variables entered in the "params" field are:

  • Name of the Pulsar
    (here "PSRVELA")
Must be the same name used to indentify the pulsar in the Data list.
  • Position (RA,Dec)
    (here 128.83, -45.18)
Position of pulsar in the sky, expressed in RA, Dec in degrees.
  • Minimum energy
    of the extracted photons
    in keV (here 1.0e5 )
 
  • Maximum energy
    of the extracted photons
    in keV (here 3.0e8)
 
  • Model number
    (here 1)
For now there is only this default model, so you must enter 1.
  • Seed of the random engine (here 61243):
Seed used for the random calculations.

Model-dependent parameters:

In the default model, model-dependent parameters include the following:

  • TimeProfile option
    (here 3)

1 or 2 means Lorentz-shaped with 1 or 2 peaks;

3 means using a specific TimeProfile, i.e. a template lightcurve

Spectral parameters:

  • Energy scale
    (here 1e6)
Always set to 1 GeV
  • Cutoff energy (E0)
    (here 8e6)
 
  • Spectral index (a)
    (here -1.62)
 
  • Different cutoff exponential (b)
    (here 1.7)
 

Note: For additional information on spectral parameters according to the Nel & De Jager spectral profile, refer to the Doxygen documentation for PulsarSpectrum.

 

3. Edit the TimeProfile.txt File

Note: You can simulate a light curve in the default phenomenological model as 1 or 2 Lorentzian peaks, or by using a specific user-defined TimeProfile.txt file.

For the purposes of this tutorial:

  1. Create a .txt file named PSRNAMETimeProfile.txt (where PSRNAME is the same as the name you assigned to the pulsar above).

Example of a TimeProfile for a generic pulsar
(only the first 16 rows are displayed in order to show how to build such a file):

Note: The TimeProfile file consists of 2 columns:

Column 1 = the bin number, starting from 1

Column 2 = bin content

The values in the second column will be normalized to be consistent with the total flux of the pulsar so only the relative sizes matter.

Save PSRNAMETimeProfile.txt in the /data directory of the Pulsar package.

 

4. Simulate Using gtobssim or GlastRelease

You are now ready to simulate the pulsar with gtobssim or GlastRelease.

Note: Include the name of your pulsar in the source_names.dat file.

For example:

Referring to the XML in Step 2.2 above; if you want to simulate a Vela-like pulsar with parameters for Polar Cap Scenario, you have to add  PSRVelaPolarPhen.

Tip: Don't forget to include the xml library file in the xmlFiles.dat file that specifies the set of XML files to be used for the simulation.


 

Owned by: M.Razzano

 

Last updated by: Chuck Patterson 04/29/2009