LALPulsar 7.1.2.1-bf6a62b
ReadPulsarParFile.c File Reference

Prototypes

static void strtoupper (CHAR *s)
 Convert string to uppercase. More...
 
static void * new_elem (const char *name, PulsarParam *itemPtr)
 
static void del_elem (void *elem)
 
static UINT8 PulsarHash (const void *elem)
 
static int PulsarHashElemCmp (const void *elem1, const void *elem2)
 
static PulsarParamPulsarGetParamItemSlow (const PulsarParameters *pars, const CHAR *name)
 Get a pointer to a parameter of a given name from a PulsarParameters structure. More...
 
static PulsarParamPulsarGetParamItem (const PulsarParameters *pars, const CHAR *name)
 Get a pointer to a parameter of a given name from a PulsarParameters structure. More...
 
void * PulsarGetParam (const PulsarParameters *pars, const CHAR *name)
 Get the required parameter value from the PulsarParameters structure. 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...
 
const REAL8VectorPulsarGetREAL8VectorParam (const PulsarParameters *pars, const CHAR *name)
 Return a REAL8Vector parameter. More...
 
REAL8 PulsarGetREAL8VectorParamIndividual (const PulsarParameters *pars, const CHAR *name)
 Return an individual REAL8 value from a REAL8Vector parameter. 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...
 
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 PulsarAddREAL8VectorParam (PulsarParameters *pars, const CHAR *name, const REAL8Vector *value)
 Add a REAL8Vector parameter to the PulsarParameters structure. More...
 
void PulsarAddStringParam (PulsarParameters *pars, const CHAR *name, const CHAR *value)
 Add a string parameter to the PulsarParameters structure. More...
 
int PulsarCheckParam (const PulsarParameters *pars, const CHAR *name)
 Check for the existence of the parameter name in 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...
 
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...
 
 DEFINE_CONV_FACTOR_FUNCTION (ToFloat, 1., CONVFLOAT)
 A strcuture to contain all possible pulsar parameters that can be read in from a par file, and define the conversion function and type used for each. More...
 
static INT4 ParseParLine (PulsarParameters *par, const CHAR *name, FILE *fp)
 Parse a single line from a pulsar parameter file. More...
 
PulsarParametersXLALReadTEMPOParFile (const CHAR *pulsarAndPath)
 Read in the parameters from a TEMPO(2) parameter file into a PulsarParameters structure. More...
 
void PrintPulsarParameters (BinaryPulsarParams params)
 function to print out all the pulsar parameters read in from a par file More...
 
LALStringVectorXLALReadTEMPOCorFile (REAL8Array *cormat, CHAR *corfile)
 This function will read in a TEMPO-style parameter correlation matrix. More...
 
REAL8 XLALTTMJDtoGPS (REAL8 MJD)
 This function converts a MJD format time corrected to Terrestrial Time (TT) into an equivalent GPS time. 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...
 

Go to the source code of this file.

Data Structures

struct  hash_elem
 

Macros

#define DAYSTOSECS   86400.0 /* number of seconds in an SI day */
 
#define DEFINE_CONV_FACTOR_FUNCTION(name, convfactor, type)
 
#define NUM_PARS   132 /* number of allowed parameters */
 

Enumerations

enum  {
  CONVFLOAT = 0 , CONVINT , CONVSTRING , CONVHMS ,
  CONVDMS , CONVMJD , CONVBINUNITS
}
 

Variables

size_t PulsarTypeSize [5]
 
static const CHAR a2A [256]
 Array for conversion from lowercase to uppercase. More...
 
 ParConversion
 
ParConversion pc [NUM_PARS]
 Initialise conversion structure with most allowed TEMPO2 parameter names and conversion functions (convert all read in parameters to SI units where necessary). More...