00001 /* 00002 * Copyright (C) 2007 Chris Messenger 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with with program; see the file COPYING. If not, write to the 00016 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00017 * MA 02111-1307 USA 00018 */ 00019 00020 #ifndef _READSOURCE_H 00021 #define _READSOURCE_H 00022 00023 #include <unistd.h> 00024 #include <sys/types.h> 00025 #include <fcntl.h> 00026 #include <stdio.h> 00027 #include <string.h> 00028 #include <stdlib.h> 00029 #include <math.h> 00030 #include <time.h> 00031 #include <errno.h> 00032 #include <unistd.h> 00033 #include <getopt.h> 00034 #include <lal/LALDatatypes.h> 00035 #include <lal/Date.h> 00036 #include <lal/LALStdio.h> 00037 #include <lal/FileIO.h> 00038 #include <lal/LALStdlib.h> 00039 00040 typedef struct skypositiontag { 00041 REAL8 ra; 00042 REAL8 dec; 00043 REAL8 ra_min; 00044 REAL8 ra_max; 00045 REAL8 dec_min; 00046 REAL8 dec_max; 00047 REAL8 ra_err; 00048 REAL8 dec_err; 00049 } skyposition; 00050 00051 typedef struct frequencytag { 00052 INT4 nband; 00053 REAL8 *f_min; 00054 REAL8 *f_max; 00055 REAL8 *f_err; 00056 } frequency; 00057 00058 typedef struct orbitaltag { 00059 REAL8 period; 00060 REAL8 period_err; 00061 REAL8 period_min; 00062 REAL8 period_max; 00063 REAL8 sma; 00064 REAL8 sma_min; 00065 REAL8 sma_max; 00066 REAL8 sma_err; 00067 LIGOTimeGPS tperi; 00068 LIGOTimeGPS tperi_min; 00069 LIGOTimeGPS tperi_max; 00070 REAL8 tperi_err; 00071 REAL8 argp; 00072 REAL8 argp_min; 00073 REAL8 argp_max; 00074 REAL8 argp_err; 00075 REAL8 ecc; 00076 REAL8 ecc_min; 00077 REAL8 ecc_max; 00078 REAL8 ecc_err; 00079 } orbital; 00080 00081 typedef struct binarysourcetag { 00082 char name[256]; 00083 skyposition skypos; 00084 frequency freq; 00085 orbital orbit; 00086 } binarysource; 00087 00088 int ReadSource(char *, char *, LIGOTimeGPS *, binarysource *); 00089 00090 #endif
1.5.2