00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _DETRESPONSE_UTIL_H
00025 #define _DETRESPONSE_UTIL_H
00026
00027
00028 #define DETRESPONSE_MIN(a, b) (((a) < (b)) ? (a) : (b))
00029
00030
00031 FILE *xfopen(const char *path, const char *mode);
00032 int xfclose(FILE * stream);
00033 void *xmalloc(size_t length);
00034 void *xrealloc(void *p, size_t length);
00035 void *xcalloc(size_t nmemb, size_t length);
00036
00037
00038 void PrintLALDetector(LALDetector * const detector);
00039
00040
00041 void print_source(const LALSource * source);
00042
00043
00044 void print_time_info(const LALTimeIntervalAndNSample * time_info);
00045
00046
00047 void print_response(const LALDetAMResponse *resp);
00048
00049 int mystrncasecmp(char *s1, char *s2, unsigned int n);
00050
00051
00052 size_t mystrlcpy(char *dst, const char *src, size_t size);
00053
00054 size_t mystrlcat(char *dst, const char *src, size_t size);
00055
00056 void square_timeseries(REAL4TimeSeries *ts);
00057 void add_timeseries(REAL4TimeSeries * sum, REAL4TimeSeries * a,
00058 REAL4TimeSeries * b);
00059
00060 void set_detector_params(LALStatus * status,
00061 LALFrDetector * frdet, LALDetector * det,
00062 const char * name,
00063 REAL8 vertex_longitude,
00064 REAL8 vertex_latitude,
00065 REAL4 vertex_elevation,
00066 REAL4 x_altitude,
00067 REAL4 x_azimuth,
00068 REAL4 y_altitude,
00069 REAL4 y_azimuth);
00070
00071 REAL8 deg_to_rad(REAL8 degrees);
00072
00073 #endif