46#include <lal/LALInitBarycenter.h>
47#include <lal/LALgetopt.h>
48#include <lal/GeneratePulsarSignal.h>
49#include <lal/BinaryPulsarTiming.h>
50#include <lal/SFTfileIO.h>
51#include <lal/LALString.h>
52#include <lal/TranslateAngles.h>
71 { -4554231.5, 2816759.1, -3454036.3 },
72 { 3822626.04, -154105.65, 5086486.04 },
73 { 2390490.0, -5564764.0, 1994727.0 },
74 { 4033949.5, 486989.4, 4900430.8 },
75 { 4324165.81, 165927.11, 4670132.83},
76 { -3950077.96, 2522377.31, -4311667.52 },
77 { 5085442.780, 2668263.483, -2768697.034 },
78 { -1601192.0, -5041981.4, 3554871.4 },
79 { 3828445.659, 445223.600, 5064921.5677 }
82"Usage: %s [options]\n\n"\
83" --help (-h) display this message\n"\
84" --mjd (-m) a MJD time in TDB at the solar system barycenter\n"\
85" --gps (-g) a GPS equivalent time in TDB at the solar system barycenter\n"\
86" --ra (-r) the source right ascension (e.g. 15:21:34.76)\n"\
87" --dec (-d) the source declination (e.g. -09:53:12.36)\n"\
88" --telescope (-t) a detector acronym:\n\
90 H1/H2 - LIGO Hanford,\n\
91 L1 - LIGO Livingston,\n\
96 GBT - the Robert C. Byrd Green Bank Telescope,\n\
97 PKS - the Parkes Telescope,\n\
98 JBO - the Lovell Telescope at Jodrell Bank,\n\
99 AO - the Arecibo Telescope,\n\
100 EFF - the Effelsberg 100m Radio Telescope,\n\
101 NRT - the Nancay Decimetre Radio Telescope,\n\
102 HOB - the Mount Pleasant Radio Observatory, Hobart,\n\
103 HART - the Hartebeesthoek Radio Astronomy Observatory,\n\
104 VLA - the Very Large Array,\n\
105 WSRT - the Westerbork Synthesis Radio Telescope.\n"\
108int main(
int argc,
char *argv[] )
111 char *det = NULL, *ra = NULL, *dec = NULL;
115 char earth[1024], sun[1024];
135 int option_index = 0;
145 if ( long_options[option_index].
flag ) {
148 fprintf( stderr,
"Error parsing option %s with argument %s\n", long_options[option_index].
name,
LALoptarg );
170 fprintf( stderr,
"Unknown error while parsing options\n" );
174 fprintf( stderr,
"Unknown error while parsing options\n" );
180 if ( mjdtime <= 0. &&
gpstime <= 0. ) {
181 fprintf( stderr,
"Error... input MJD or GPS time is not sensible!\n" );
185 if ( mjdtime > 0. &&
gpstime > 0. ) {
186 fprintf( stderr,
"Error... required either an input MJD to or an input GPS time!\n" );
191 fprintf( stderr,
"Error... no right ascension given!\n" );
196 fprintf( stderr,
"Error... no declination given!\n" );
201 fprintf( stderr,
"Error... no telescope has been given!\n" );
206 if ( !strcmp( det,
"GBT" ) ) {
208 }
else if ( !strcmp( det,
"PKS" ) ) {
210 }
else if ( !strcmp( det,
"JBO" ) ) {
212 }
else if ( !strcmp( det,
"AO" ) ) {
214 }
else if ( !strcmp( det,
"EFF" ) ) {
216 }
else if ( !strcmp( det,
"NRT" ) ) {
218 }
else if ( !strcmp( det,
"HOB" ) ) {
220 }
else if ( !strcmp( det,
"HART" ) ) {
222 }
else if ( !strcmp( det,
"VLA" ) ) {
224 }
else if ( !strcmp( det,
"WSRT" ) ) {
245 char *lalpulsar_datadir = getenv(
"LALPULSAR_DATADIR" );
246 if ( lalpulsar_datadir != NULL ) {
247 sprintf( earth,
"%s/earth00-40-DE405.dat.gz", lalpulsar_datadir );
248 sprintf( sun,
"%s/sun00-40-DE405.dat.gz", lalpulsar_datadir );
251 if ( fopen( sun,
"r" ) == NULL || fopen( earth,
"r" ) == NULL ) {
252 fprintf( stderr,
"Error... ephemeris files not, or incorrectly, defined!\n" );
257 sprintf( earth,
"earth00-40-DE405.dat.gz" );
258 sprintf( sun,
"sun00-40-DE405.dat.gz" );
266 if ( mjdtime > 0. ) {
270 int ephemstart = 630720013;
271 int ephemend = 1893024018;
273 if ( gpstime < ephemstart || gpstime > ephemend ) {
274 fprintf( stderr,
"Time (GPS %.9lf) is outside the ephemeris file ranges!\n",
gpstime );
283 fprintf( stderr,
"Problem converting time!\n" );
int LALgetopt_long(int argc, char *const *argv, const char *options, const struct LALoption *long_options, int *opt_index)
#define required_argument
REAL8 XLALTTMJDtoGPS(REAL8 MJD)
This function converts a MJD format time corrected to Terrestrial Time (TT) into an equivalent GPS ti...
int XLALConvertSSB2GPS(LIGOTimeGPS *GPSout, LIGOTimeGPS SSBin, const PulsarSignalParams *params)
Convert barycentric frame SSB time into earth-frame GPS time.
EphemerisData * XLALInitBarycenter(const CHAR *earthEphemerisFile, const CHAR *sunEphemerisFile)
XLAL interface to reading ephemeris files 'earth' and 'sun', and return ephemeris-data in old backwar...
void * XLALMalloc(size_t n)
char char * XLALStringDuplicate(const char *s)
const LALDetector * XLALGetSiteInfo(const CHAR *name)
Find the site geometry-information 'LALDetector' for given a detector name (or prefix).
COORDINATESYSTEM_EQUATORIAL
int XLALTranslateHMStoRAD(REAL8 *radians, const CHAR *hms)
int XLALTranslateDMStoRAD(REAL8 *radians, const CHAR *dms)
#define XLAL_CHECK_MAIN(assertion,...)
LIGOTimeGPS * XLALGPSSetREAL8(LIGOTimeGPS *epoch, REAL8 t)
int main(int argc, char *argv[])
REAL8 scopelocations[NUMSCOPES][3]
This structure contains all information about the center-of-mass positions of the Earth and Sun,...
Input parameters to GeneratePulsarSignal(), defining the source and the time-series.