[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


getphase.pro Source code in getphase.pro

getphase.pro

NAME: getphase PURPOSE: compute pulse number or pulse phase for a radio or X-ray pulsar CATEGORY: time series analysis
Calling Sequence
        phases=getphase(time,period=period,pdot=pdot,pddot=pddot, $
                     freq=nu,nudot=nudot,nuddot=nuddot,numpulse=numpulse, $
                     time0=time0,mjd=mjd)
 INPUTS:   time: array or scalar containing the times for which the
                 phases are to be computed. seconds (days if mjd
                 keyword is set)
Optional Input Parameters
           period: pulse period (seconds)
           pdot, pddot: 1st and 2nd pulse period derivative
                   (optional)
           freq: frequency (Hz)
           nudot, nuddot: 1st and 2nd frequency derivative (Hz/Hz etc.)
           time0: epoch of the observations (default: time[0], same
                 units as time)
Keyword Parameters
            numpulse: if set, the code returns the number of pulses
               since the epoch, if not set the code returns
               the pulse phase, normalized to [0,1[
             mjd: if set, then time ant time0 are in units of days
Output Parameters
             the function returns the pulse phase or the number of
             pulses since the epoch, depending on the setting of the
             numpulse keyword
Optional Output
             none
Common Blocks
             none
Side Effects
             none
Restrictions
             nopefully none.
Procedure
       straightforward formulae, following from
          nu(t) = nu0 + nudot*t + 0.5 nudot*t^2
           P(t) = P0+pdot*t+0.5*pdot*t^2
       the phase is then
          phi = int_0^t nu(t) dt
          phi = int_0^t dt/P(t)
       the formula for phi used in the code is derived from a
       3rd order Taylor series of 1/P(t), see, e.g., Padmanabhan,
       Volume 2, eq 6.93.
Example

Revision History
 $Log: getphase.pro,v $
 Revision 1.3  2005/05/14 20:59:47  wilms
 added mjd keyword
 Revision 1.2  2004/09/13 15:51:42  wilms
 cosmetic change in evaluation of phi for the pdot<>0 case
 Revision 1.1  2004/09/07 17:15:43  wilms
 initial release

Last modified by pro2html on 2005 May 15 at 03:10 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically