LALPulsar  6.1.0.1-fe68b98
ReadPulsarParFile.h File Reference

Functions to read TEMPO pulsar parameter files. More...

Prototypes

void * PulsarGetParam (const PulsarParameters *pars, const CHAR *name)
 Get the required parameter value from the PulsarParameters structure. More...
 
void * PulsarGetParamErr (const PulsarParameters *pars, const CHAR *name)
 Get the required parameter error value from the PulsarParameters structure. More...
 
const UINT4PulsarGetParamFitFlag (const PulsarParameters *pars, const CHAR *name)
 Get the fit flag array for a given parameter from the PulsarParameters structure. More...
 
const UINT4VectorPulsarGetParamFitFlagAsVector (const PulsarParameters *pars, const CHAR *name)
 Get the fit flag array for a given parameter from the PulsarParameters structure. More...
 
REAL8 PulsarGetREAL8ParamErr (const PulsarParameters *pars, const CHAR *name)
 Return a REAL8 parameter error value. More...
 
const REAL8VectorPulsarGetREAL8VectorParamErr (const PulsarParameters *pars, const CHAR *name)
 Return a REAL8Vector parameter error value. More...
 
REAL8 PulsarGetREAL8VectorParamErrIndividual (const PulsarParameters *pars, const CHAR *name)
 Return an individual REAL8 value from a REAL8Vector parameter. More...
 
PulsarParamType PulsarGetParamType (const PulsarParameters *pars, const char *name)
 Get the required parameter's type. More...
 
REAL8 PulsarGetREAL8Param (const PulsarParameters *pars, const CHAR *name)
 Return a REAL8 parameter. More...
 
REAL8 PulsarGetREAL8ParamOrZero (const PulsarParameters *pars, const CHAR *name)
 Return a REAL8 parameter if it exists, otherwise return zero. More...
 
UINT4 PulsarGetUINT4Param (const PulsarParameters *pars, const CHAR *name)
 Return a UINT4 parameter. More...
 
UINT4 PulsarGetUINT4ParamOrZero (const PulsarParameters *pars, const CHAR *name)
 Return a UINT4 parameter if it exists, otherwise return zero. More...
 
const CHARPulsarGetStringParam (const PulsarParameters *pars, const CHAR *name)
 Return a string parameter. More...
 
void PulsarAddStringParam (PulsarParameters *pars, const CHAR *name, const CHAR *value)
 Add a string parameter to the PulsarParameters structure. More...
 
const REAL8VectorPulsarGetREAL8VectorParam (const PulsarParameters *pars, const CHAR *name)
 Return a REAL8Vector parameter. More...
 
void PulsarAddREAL8VectorParam (PulsarParameters *pars, const CHAR *name, const REAL8Vector *value)
 Add a REAL8Vector parameter to the PulsarParameters structure. More...
 
REAL8 PulsarGetREAL8VectorParamIndividual (const PulsarParameters *pars, const CHAR *name)
 Return an individual REAL8 value from a REAL8Vector parameter. More...
 
void PulsarAddParam (PulsarParameters *pars, const CHAR *name, void *value, PulsarParamType type)
 Add a parameter and value to the PulsarParameters structure. More...
 
void PulsarAddREAL8Param (PulsarParameters *pars, const CHAR *name, REAL8 value)
 Add a REAL8 parameter to the PulsarParameters structure. More...
 
void PulsarAddUINT4Param (PulsarParameters *pars, const CHAR *name, UINT4 value)
 Add a UINT4 parameter to the PulsarParameters structure. More...
 
void PulsarClearParams (PulsarParameters *pars)
 Free all the parameters from a PulsarParameters structure. More...
 
void PulsarRemoveParam (PulsarParameters *pars, const CHAR *name)
 Remove a given parameter from a PulsarParameters structure. More...
 
void PulsarSetParam (PulsarParameters *pars, const CHAR *name, const void *value)
 Set the value of a parameter in the PulsarParameters structure. More...
 
void PulsarSetParamErr (PulsarParameters *pars, const CHAR *name, void *value, const UINT4 *fitFlag, UINT4 len)
 Set the value of the error of a parameter in the PulsarParameters structure. More...
 
void PulsarSetREAL8ParamErr (PulsarParameters *pars, const CHAR *name, REAL8 value, UINT4 fitFlag)
 Set the error value for a REAL8 parameter. More...
 
void PulsarSetREAL8VectorParamErr (PulsarParameters *pars, const CHAR *name, const REAL8Vector *value, const UINT4 *fitFlag)
 Set the error values for a REAL8Vector parameter. More...
 
int PulsarCheckParam (const PulsarParameters *pars, const CHAR *name)
 Check for the existence of the parameter name in the PulsarParameters structure. More...
 
void PulsarFreeParams (PulsarParameters *par)
 Function to free memory from pulsar parameters. More...
 
void PulsarCopyParams (PulsarParameters *origin, PulsarParameters *target)
 Function to copy a PulsarParameters structure. More...
 
void ParConvToFloat (const CHAR *in, void *out)
 Conversion functions from units used in TEMPO parameter files into SI units. More...
 
void ParConvToInt (const CHAR *in, void *out)
 Convert the input string into a unsigned integer number. More...
 
void ParConvToString (const CHAR *in, void *out)
 Copy the input string into the output pointer. More...
 
void ParConvDegsToRads (const CHAR *in, void *out)
 Convert the input string from degrees to radians. More...
 
void ParConvMasPerYrToRadPerSec (const CHAR *in, void *out)
 Convert the input string from milliarcsecs per year to radians per second. More...
 
void ParConvSecsToRads (const CHAR *in, void *out)
 Convert the input string from seconds to radians. More...
 
void ParConvArcsecsToRads (const CHAR *in, void *out)
 Convert the input string from arcseconds to radians. More...
 
void ParConvMasToRads (const CHAR *in, void *out)
 Convert the input string from milliarcsecs to radians. More...
 
void ParConvInvArcsecsToInvRads (const CHAR *in, void *out)
 Convert the input string from 1/acrseconds to 1/radians. More...
 
void ParConvDaysToSecs (const CHAR *in, void *out)
 Convert the input string from days to seconds. More...
 
void ParConvKpcToMetres (const CHAR *in, void *out)
 Convert the input string from kiloparsecs to metres. More...
 
void ParConvBinaryUnits (const CHAR *in, void *out)
 Convert the binary system parameter from a string to a double, but make the check (as performed by TEMPO2) that this is > 1e-7 then it's in units of 1e-12, so needs converting by that factor. More...
 
void ParConvMJDToGPS (const CHAR *in, void *out)
 Convert the input string from a TT MJD value into a GPS time. More...
 
void ParConvDegPerYrToRadPerSec (const CHAR *in, void *out)
 Convert the input string from degrees per year to radians per second. More...
 
void ParConvSolarMassToKg (const CHAR *in, void *out)
 Convert the input string from solar masses to kilograms. More...
 
void ParConvRAToRads (const CHAR *in, void *out)
 Convert a right ascension input string in the format "hh:mm:ss.s" into radians. More...
 
void ParConvDecToRads (const CHAR *in, void *out)
 Convert a declination input string in the format "dd:mm:ss.s" into radians. More...
 
void ParConvMicrosecToSec (const CHAR *in, void *out)
 Convert an input string from microseconds into seconds. More...
 
PulsarParametersXLALReadTEMPOParFile (const CHAR *pulsarAndPath)
 Read in the parameters from a TEMPO(2) parameter file into a PulsarParameters structure. More...
 
void XLALReadTEMPOParFileOrig (BinaryPulsarParams *output, CHAR *pulsarAndPath)
 function to read in a TEMPO parameter file More...
 
LALStringVectorXLALReadTEMPOCorFile (REAL8Array *cormat, CHAR *corfile)
 This function will read in a TEMPO-style parameter correlation matrix. More...
 
void PrintPulsarParameters (BinaryPulsarParams params)
 function to print out all the pulsar parameters read in from a par file More...
 
REAL8 XLALTTMJDtoGPS (REAL8 MJD)
 Functions for converting times given in Terrestrial time TT, TDB, or TCB in MJD to times in GPS - this is important for epochs given in .par files which are in TDB(MJD). More...
 
REAL8 XLALTDBMJDtoGPS (REAL8 MJD)
 If you have an MJD arrival time on the Earth then this will convert it to the equivalent GPS time in TDB (see Table 1 of Seidelmann and Fukushima, Astronomy & Astrophysics, 265, 833-838 (1992). More...
 
REAL8 XLALTCBMJDtoGPS (REAL8 MJD)
 If you have an MJD arrival time on the Earth then this will convert it to the equivalent GPS time in TCB (see Table 1 of Seidelmann and Fukushima, Astronomy & Astrophysics, 265, 833-838, 1992). More...
 

Detailed Description

Functions to read TEMPO pulsar parameter files.

Author
Matt Pitkin
Date
2013

Here we define a function to read in pulsar parameters from a standard TEMPO(2) parameter (.par) file - XLALReadTEMPOParFile.

We also define a structure for holding pulsar parameters. This is a linked list of structures containing the parameter name (which is always converted to an uppercase string), the parameter value (which can be any data type) and the parameter uncertainty/error (a REAL8 value) if given.

Definition in file ReadPulsarParFile.h.

Go to the source code of this file.

Data Structures

struct  PulsarParam
 The PulsarParam list node structure. More...
 
struct  PulsarParameters
 The PulsarParameters structure to contain a set of pulsar parameters. More...
 
struct  BinaryPulsarParams
 A structure to contain all pulsar parameters and associated errors. More...
 

Macros

#define PULSAR_HASHTABLE_SIZE   512
 
#define PULSAR_PARNAME_MAX   128
 
#define GPS0MJD   44244.0 /* start of GPS time (MJD 44244) */
 
#define TDT_TAI   32.184
 
#define GPS_TDT   (TDT_TAI + XLAL_EPOCH_GPS_TAI_UTC)
 
#define LALPULSAR_TEMPO2_MTSUN_SI   4.925490947e-6 /* value of GMsun/c^3 used in TEMPO2 */
 
#define LALPULSAR_TEMPO2_MSUN_SI   (LALPULSAR_TEMPO2_MTSUN_SI * LAL_MPL_SI / LAL_TPL_SI) /* derived value of Msun */
 
Error Codes
#define READPULSARPARFILEH_ENULLOUTPUT   1
 
#define READPULSARPARFILEH_MSGENULLOUTPUT   "Output was Null"
 

Enumerations

enum  PulsarParamType {
  PULSARTYPE_UINT4_t = 0 , PULSARTYPE_REAL8_t , PULSARTYPE_REAL8Vector_t , PULSARTYPE_string_t ,
  PULSARTYPE_void_ptr_t
}
 An enumerated type for denoting the type of a variable. More...
 

Variables

size_t PulsarTypeSize [5]
 

Macro Definition Documentation

◆ READPULSARPARFILEH_ENULLOUTPUT

#define READPULSARPARFILEH_ENULLOUTPUT   1

Definition at line 52 of file ReadPulsarParFile.h.

◆ READPULSARPARFILEH_MSGENULLOUTPUT

#define READPULSARPARFILEH_MSGENULLOUTPUT   "Output was Null"

Definition at line 54 of file ReadPulsarParFile.h.

◆ PULSAR_HASHTABLE_SIZE

#define PULSAR_HASHTABLE_SIZE   512

Definition at line 57 of file ReadPulsarParFile.h.

◆ PULSAR_PARNAME_MAX

#define PULSAR_PARNAME_MAX   128

Definition at line 58 of file ReadPulsarParFile.h.

◆ GPS0MJD

#define GPS0MJD   44244.0 /* start of GPS time (MJD 44244) */

Definition at line 60 of file ReadPulsarParFile.h.

◆ TDT_TAI

#define TDT_TAI   32.184

Definition at line 63 of file ReadPulsarParFile.h.

◆ GPS_TDT

#define GPS_TDT   (TDT_TAI + XLAL_EPOCH_GPS_TAI_UTC)

Definition at line 65 of file ReadPulsarParFile.h.

◆ LALPULSAR_TEMPO2_MTSUN_SI

#define LALPULSAR_TEMPO2_MTSUN_SI   4.925490947e-6 /* value of GMsun/c^3 used in TEMPO2 */

Definition at line 69 of file ReadPulsarParFile.h.

◆ LALPULSAR_TEMPO2_MSUN_SI

#define LALPULSAR_TEMPO2_MSUN_SI   (LALPULSAR_TEMPO2_MTSUN_SI * LAL_MPL_SI / LAL_TPL_SI) /* derived value of Msun */

Definition at line 70 of file ReadPulsarParFile.h.

Enumeration Type Documentation

◆ PulsarParamType

An enumerated type for denoting the type of a variable.

Several LAL types are supported.

Enumerator
PULSARTYPE_UINT4_t 
PULSARTYPE_REAL8_t 
PULSARTYPE_REAL8Vector_t 
PULSARTYPE_string_t 
PULSARTYPE_void_ptr_t 

Definition at line 73 of file ReadPulsarParFile.h.

Function Documentation

◆ PulsarGetParam()

void* PulsarGetParam ( const PulsarParameters pars,
const CHAR name 
)

Get the required parameter value from the PulsarParameters structure.

This function will return a void pointer to the parameter value. This should be cast into the required variable type once returned.

Definition at line 223 of file ReadPulsarParFile.c.

◆ PulsarGetParamErr()

void* PulsarGetParamErr ( const PulsarParameters pars,
const CHAR name 
)

Get the required parameter error value from the PulsarParameters structure.

This function will return a void pointer to the parameter error value. The parameter error will be either a REAL8 or a REAL8Vector and should be cast accordingly once returned.

Definition at line 341 of file ReadPulsarParFile.c.

◆ PulsarGetParamFitFlag()

const UINT4* PulsarGetParamFitFlag ( const PulsarParameters pars,
const CHAR name 
)

Get the fit flag array for a given parameter from the PulsarParameters structure.

This function will return a UINT4 array to the parameter fit flag.

Definition at line 353 of file ReadPulsarParFile.c.

◆ PulsarGetParamFitFlagAsVector()

const UINT4Vector* PulsarGetParamFitFlagAsVector ( const PulsarParameters pars,
const CHAR name 
)

Get the fit flag array for a given parameter from the PulsarParameters structure.

This function will return a UINT4Vector array to the parameter fit flag.

Definition at line 373 of file ReadPulsarParFile.c.

◆ PulsarGetREAL8ParamErr()

REAL8 PulsarGetREAL8ParamErr ( const PulsarParameters pars,
const CHAR name 
)

Return a REAL8 parameter error value.

This function will call PulsarGetParamErr for a REAL8 parameter and properly cast it for returning.

Definition at line 389 of file ReadPulsarParFile.c.

◆ PulsarGetREAL8VectorParamErr()

const REAL8Vector* PulsarGetREAL8VectorParamErr ( const PulsarParameters pars,
const CHAR name 
)

Return a REAL8Vector parameter error value.

This function will call PulsarGetParamErr for a REAL8Vector parameter and properly cast it for returning.

Definition at line 406 of file ReadPulsarParFile.c.

◆ PulsarGetREAL8VectorParamErrIndividual()

REAL8 PulsarGetREAL8VectorParamErrIndividual ( const PulsarParameters pars,
const CHAR name 
)

Return an individual REAL8 value from a REAL8Vector parameter.

This function will call PulsarGetParam for a REAL8Vector parameter's errors and then return a specific value from within the vector. The input name must be of the form e.g. FB1, which will get the REAL8Vector for the FB parameter and return the value from the 1 index.

Definition at line 423 of file ReadPulsarParFile.c.

◆ PulsarGetParamType()

PulsarParamType PulsarGetParamType ( const PulsarParameters pars,
const char name 
)

Get the required parameter's type.

Definition at line 235 of file ReadPulsarParFile.c.

◆ PulsarGetREAL8Param()

REAL8 PulsarGetREAL8Param ( const PulsarParameters pars,
const CHAR name 
)

Return a REAL8 parameter.

This function will call PulsarGetParam for a REAL8 parameter and properly cast it for returning.

Definition at line 241 of file ReadPulsarParFile.c.

◆ PulsarGetREAL8ParamOrZero()

REAL8 PulsarGetREAL8ParamOrZero ( const PulsarParameters pars,
const CHAR name 
)

Return a REAL8 parameter if it exists, otherwise return zero.

Definition at line 252 of file ReadPulsarParFile.c.

◆ PulsarGetUINT4Param()

UINT4 PulsarGetUINT4Param ( const PulsarParameters pars,
const CHAR name 
)

Return a UINT4 parameter.

This function will call PulsarGetParam for a UINT4 parameter and properly cast it for returning.

Definition at line 259 of file ReadPulsarParFile.c.

◆ PulsarGetUINT4ParamOrZero()

UINT4 PulsarGetUINT4ParamOrZero ( const PulsarParameters pars,
const CHAR name 
)

Return a UINT4 parameter if it exists, otherwise return zero.

Definition at line 270 of file ReadPulsarParFile.c.

◆ PulsarGetStringParam()

const CHAR* PulsarGetStringParam ( const PulsarParameters pars,
const CHAR name 
)

Return a string parameter.

This function will call PulsarGetParam for a string parameter and properly cast it for returning. The return value should be copied e.g. with CHAR *str = XLALStringDuplicate( PulsarGetStringParam(pars, "NAME") ); It also needs to be freed afterwards.

Definition at line 277 of file ReadPulsarParFile.c.

◆ PulsarAddStringParam()

void PulsarAddStringParam ( PulsarParameters pars,
const CHAR name,
const CHAR value 
)

Add a string parameter to the PulsarParameters structure.

Definition at line 566 of file ReadPulsarParFile.c.

◆ PulsarGetREAL8VectorParam()

const REAL8Vector* PulsarGetREAL8VectorParam ( const PulsarParameters pars,
const CHAR name 
)

Return a REAL8Vector parameter.

This function will call PulsarGetParam for a REAL8Vector parameter and properly cast it for returning.

Definition at line 289 of file ReadPulsarParFile.c.

◆ PulsarAddREAL8VectorParam()

void PulsarAddREAL8VectorParam ( PulsarParameters pars,
const CHAR name,
const REAL8Vector value 
)

Add a REAL8Vector parameter to the PulsarParameters structure.

Definition at line 556 of file ReadPulsarParFile.c.

◆ PulsarGetREAL8VectorParamIndividual()

REAL8 PulsarGetREAL8VectorParamIndividual ( const PulsarParameters pars,
const CHAR name 
)

Return an individual REAL8 value from a REAL8Vector parameter.

This function will call PulsarGetParam for a REAL8Vector parameter and then return a specific value from within the vector. The input name must be of the form e.g. FB1, which will get the REAL8Vector for the FB parameter and return the value from the 1 index.

Definition at line 300 of file ReadPulsarParFile.c.

◆ PulsarAddParam()

void PulsarAddParam ( PulsarParameters pars,
const CHAR name,
void *  value,
PulsarParamType  type 
)

Add a parameter and value to the PulsarParameters structure.

This function adds a new parameter, and associated value to the PulsarParameters structure. If the parameter already exists then the old value is replaced with the new value.

Definition at line 464 of file ReadPulsarParFile.c.

◆ PulsarAddREAL8Param()

void PulsarAddREAL8Param ( PulsarParameters pars,
const CHAR name,
REAL8  value 
)

Add a REAL8 parameter to the PulsarParameters structure.

Definition at line 542 of file ReadPulsarParFile.c.

◆ PulsarAddUINT4Param()

void PulsarAddUINT4Param ( PulsarParameters pars,
const CHAR name,
UINT4  value 
)

Add a UINT4 parameter to the PulsarParameters structure.

Definition at line 549 of file ReadPulsarParFile.c.

◆ PulsarClearParams()

void PulsarClearParams ( PulsarParameters pars)

Free all the parameters from a PulsarParameters structure.

Definition at line 592 of file ReadPulsarParFile.c.

◆ PulsarRemoveParam()

void PulsarRemoveParam ( PulsarParameters pars,
const CHAR name 
)

Remove a given parameter from a PulsarParameters structure.

Definition at line 642 of file ReadPulsarParFile.c.

◆ PulsarSetParam()

void PulsarSetParam ( PulsarParameters pars,
const CHAR name,
const void *  value 
)

Set the value of a parameter in the PulsarParameters structure.

Set the value of the parameter given by name in the PulsarParameters structure. The parameter must already exist in the structure, otherwise it should be added using PulsarAddParam().

Definition at line 707 of file ReadPulsarParFile.c.

◆ PulsarSetParamErr()

void PulsarSetParamErr ( PulsarParameters pars,
const CHAR name,
void *  value,
const UINT4 fitFlag,
UINT4  len 
)

Set the value of the error of a parameter in the PulsarParameters structure.

Set the value of the error on the parameter given by name in the PulsarParameters structure. The parameter must already exist in the structure, otherwise it should be added using PulsarAddParam(). If the .par file contains a 1 before the error value (because that parameter has been included in the TEMPO(2) fitting procedure) then that must be input as the fit flag (this can be a vector for e.g. FB values with multiple parameters, in which case nfits will be the number of values in that vector).

Definition at line 725 of file ReadPulsarParFile.c.

◆ PulsarSetREAL8ParamErr()

void PulsarSetREAL8ParamErr ( PulsarParameters pars,
const CHAR name,
REAL8  value,
UINT4  fitFlag 
)

Set the error value for a REAL8 parameter.

Definition at line 767 of file ReadPulsarParFile.c.

◆ PulsarSetREAL8VectorParamErr()

void PulsarSetREAL8VectorParamErr ( PulsarParameters pars,
const CHAR name,
const REAL8Vector value,
const UINT4 fitFlag 
)

Set the error values for a REAL8Vector parameter.

Definition at line 774 of file ReadPulsarParFile.c.

◆ PulsarCheckParam()

int PulsarCheckParam ( const PulsarParameters pars,
const CHAR name 
)

Check for the existence of the parameter name in the PulsarParameters structure.

Definition at line 577 of file ReadPulsarParFile.c.

◆ PulsarFreeParams()

void PulsarFreeParams ( PulsarParameters par)

Function to free memory from pulsar parameters.

Definition at line 785 of file ReadPulsarParFile.c.

◆ PulsarCopyParams()

void PulsarCopyParams ( PulsarParameters origin,
PulsarParameters target 
)

Function to copy a PulsarParameters structure.

Definition at line 800 of file ReadPulsarParFile.c.

◆ ParConvToFloat()

void ParConvToFloat ( const CHAR in,
void *  out 
)

Conversion functions from units used in TEMPO parameter files into SI units.

Convert the input string into a double precision floating point number

◆ ParConvToInt()

void ParConvToInt ( const CHAR in,
void *  out 
)

Convert the input string into a unsigned integer number.

◆ ParConvToString()

void ParConvToString ( const CHAR in,
void *  out 
)

Copy the input string into the output pointer.

◆ ParConvDegsToRads()

void ParConvDegsToRads ( const CHAR in,
void *  out 
)

Convert the input string from degrees to radians.

◆ ParConvMasPerYrToRadPerSec()

void ParConvMasPerYrToRadPerSec ( const CHAR in,
void *  out 
)

Convert the input string from milliarcsecs per year to radians per second.

◆ ParConvSecsToRads()

void ParConvSecsToRads ( const CHAR in,
void *  out 
)

Convert the input string from seconds to radians.

◆ ParConvArcsecsToRads()

void ParConvArcsecsToRads ( const CHAR in,
void *  out 
)

Convert the input string from arcseconds to radians.

◆ ParConvMasToRads()

void ParConvMasToRads ( const CHAR in,
void *  out 
)

Convert the input string from milliarcsecs to radians.

◆ ParConvInvArcsecsToInvRads()

void ParConvInvArcsecsToInvRads ( const CHAR in,
void *  out 
)

Convert the input string from 1/acrseconds to 1/radians.

◆ ParConvDaysToSecs()

void ParConvDaysToSecs ( const CHAR in,
void *  out 
)

Convert the input string from days to seconds.

◆ ParConvKpcToMetres()

void ParConvKpcToMetres ( const CHAR in,
void *  out 
)

Convert the input string from kiloparsecs to metres.

◆ ParConvBinaryUnits()

void ParConvBinaryUnits ( const CHAR in,
void *  out 
)

Convert the binary system parameter from a string to a double, but make the check (as performed by TEMPO2) that this is > 1e-7 then it's in units of 1e-12, so needs converting by that factor.

It also checks if the number is too large (> 10000) and if so sets to to zero.

◆ ParConvMJDToGPS()

void ParConvMJDToGPS ( const CHAR in,
void *  out 
)

Convert the input string from a TT MJD value into a GPS time.

◆ ParConvDegPerYrToRadPerSec()

void ParConvDegPerYrToRadPerSec ( const CHAR in,
void *  out 
)

Convert the input string from degrees per year to radians per second.

◆ ParConvSolarMassToKg()

void ParConvSolarMassToKg ( const CHAR in,
void *  out 
)

Convert the input string from solar masses to kilograms.

◆ ParConvRAToRads()

void ParConvRAToRads ( const CHAR in,
void *  out 
)

Convert a right ascension input string in the format "hh:mm:ss.s" into radians.

◆ ParConvDecToRads()

void ParConvDecToRads ( const CHAR in,
void *  out 
)

Convert a declination input string in the format "dd:mm:ss.s" into radians.

◆ ParConvMicrosecToSec()

void ParConvMicrosecToSec ( const CHAR in,
void *  out 
)

Convert an input string from microseconds into seconds.

◆ XLALReadTEMPOParFile()

PulsarParameters* XLALReadTEMPOParFile ( const CHAR pulsarAndPath)

Read in the parameters from a TEMPO(2) parameter file into a PulsarParameters structure.

This function will read in a TEMPO(2) parameter file into a PulsarParameters structure. The structure of this function is similar to those in the TEMPO2 code readParfile.C and this supersedes the XLALReadTEMPOParFileOrig function.

Parameters
pulsarAndPath[in] The path to the pulsar parameter file

Definition at line 1480 of file ReadPulsarParFile.c.

◆ XLALReadTEMPOParFileOrig()

void XLALReadTEMPOParFileOrig ( BinaryPulsarParams output,
CHAR pulsarAndPath 
)

function to read in a TEMPO parameter file

Definition at line 1553 of file ReadPulsarParFile.c.

◆ XLALReadTEMPOCorFile()

LALStringVector* XLALReadTEMPOCorFile ( REAL8Array cormat,
CHAR corfile 
)

This function will read in a TEMPO-style parameter correlation matrix.

This function will read in a TEMPO-style parameter correlation matrix file, which contains the correlations between parameters as fit by TEMPO. An example the format would be:

     RA     DEC    F0
RA   1.000
DEC  0.954  1.000
F0   -0.007 0.124  1.000

In the output all parameter names will sometimes be converted to a more convenient naming convention. If non-diagonal parameter correlation values are +/-1 then they will be converted to be +/-0.99999 to avoid some problems of the matrix becoming singular. The output matrix will have both the upper and lower triangle completed.

Parameters
cormat[out] A REAL8 array into which the correlation matrix will be output
corfile[in] A string containing the path and filename of the TEMPO-style correlation matrix file

Definition at line 2915 of file ReadPulsarParFile.c.

◆ PrintPulsarParameters()

void PrintPulsarParameters ( BinaryPulsarParams  params)

function to print out all the pulsar parameters read in from a par file

Definition at line 2849 of file ReadPulsarParFile.c.

◆ XLALTTMJDtoGPS()

REAL8 XLALTTMJDtoGPS ( REAL8  MJD)

Functions for converting times given in Terrestrial time TT, TDB, or TCB in MJD to times in GPS - this is important for epochs given in .par files which are in TDB(MJD).

TT and GPS are different by a factor of 51.184 secs, this is just the historical factor of 32.184 secs between TT and TAI (International Atomic Time) and the other 19 seconds come from the leap seonds added between the TAI and UTC up to the point of definition of GPS time at UTC 01/01/1980.

Functions for converting times given in Terrestrial time TT, TDB, or TCB in MJD to times in GPS - this is important for epochs given in .par files which are in TDB(MJD).

Definition at line 3045 of file ReadPulsarParFile.c.

◆ XLALTDBMJDtoGPS()

REAL8 XLALTDBMJDtoGPS ( REAL8  MJD)

If you have an MJD arrival time on the Earth then this will convert it to the equivalent GPS time in TDB (see Table 1 of Seidelmann and Fukushima, Astronomy & Astrophysics, 265, 833-838 (1992).

Note that XLALBarycenter performs these TDBtoTT corrections (i.e. the Einstein delay) when correcting a GPS time on the Earth to TDB. Also, for TEMPO produced pulsar epochs given in MJD these are already in the TDB system and an equivalent GPS time in the TDB can be calculated just using XLALTTMJDtoGPS.

Definition at line 3066 of file ReadPulsarParFile.c.

◆ XLALTCBMJDtoGPS()

REAL8 XLALTCBMJDtoGPS ( REAL8  MJD)

If you have an MJD arrival time on the Earth then this will convert it to the equivalent GPS time in TCB (see Table 1 of Seidelmann and Fukushima, Astronomy & Astrophysics, 265, 833-838, 1992).

Note that for default TEMPO2 produced pulsar epochs given in MJD these are already in the TCB system and an equivalent GPS time in the TCB can be calculated just using XLALTTMJDtoGPS.

Definition at line 3110 of file ReadPulsarParFile.c.

Variable Documentation

◆ PulsarTypeSize

size_t PulsarTypeSize[5]
extern

Definition at line 85 of file ReadPulsarParFile.c.