LAL  7.5.0.1-b72065a
ReadTimeSeries.c
Go to the documentation of this file.
1 #include <complex.h>
2 #include <lal/LALStdlib.h>
3 #include <lal/LALStdio.h>
4 #include <lal/FileIO.h>
5 #include <string.h>
6 #include <lal/LALDatatypes.h>
7 #include <lal/Units.h>
8 #include <lal/AVFactories.h>
9 #include <lal/ReadFTSeries.h>
10 
11 /* Change the first instance of the target to '\0'; returns 0 on success,
12  1 on failure */
13 static INT2 changeCharToNull (CHAR *string, CHAR target, CHAR *offEndOfString)
14 {
15  CHAR *charPtr;
16 
17  for ( charPtr=string; charPtr<offEndOfString; ++charPtr )
18  {
19  if ( *charPtr == target )
20  {
21  *charPtr = '\0';
22  return 0;
23  }
24  }
25  return 1;
26 }
27 
28 #define TYPECODE Z
29 #define TYPE COMPLEX16
30 #define BASETYPE REAL8
31 #define FMT "%lf\t%lf\t%lf\n"
32 #define ARG &(data.array[0]),&(data.array[1])
33 #define NARGS 2
34 #include "ReadTimeSeries_source.c"
35 #undef TYPECODE
36 #undef TYPE
37 #undef FMT
38 #undef ARG
39 #undef NARGS
40 
41 #define TYPECODE C
42 #define TYPE COMPLEX8
43 #define BASETYPE REAL4
44 #define FMT "%lf\t%f\t%f\n"
45 #define ARG &(data.array[0]),&(data.array[1])
46 #define NARGS 2
47 #include "ReadTimeSeries_source.c"
48 #undef TYPECODE
49 #undef TYPE
50 #undef FMT
51 #undef ARG
52 #undef NARGS
53 
54 #define TYPECODE D
55 #define TYPE REAL8
56 #define FMT "%lf\t%lf\n"
57 #define ARG data.array
58 #define NARGS 1
59 #include "ReadTimeSeries_source.c"
60 #undef TYPECODE
61 #undef TYPE
62 #undef FMT
63 #undef ARG
64 #undef NARGS
65 
66 #define TYPECODE S
67 #define TYPE REAL4
68 #define FMT "%lf\t%f\n"
69 #define ARG data.array
70 #define NARGS 1
71 #include "ReadTimeSeries_source.c"
72 #undef TYPECODE
73 #undef TYPE
74 #undef FMT
75 #undef ARG
76 #undef NARGS
77 
78 #define TYPECODE
79 #define TYPE REAL4
80 #define FMT "%lf\t%f\n"
81 #define ARG data.array
82 #define NARGS 1
83 #include "ReadTimeSeries_source.c"
84 #undef TYPECODE
85 #undef TYPE
86 #undef FMT
87 #undef ARG
88 #undef NARGS
static INT2 changeCharToNull(CHAR *string, CHAR target, CHAR *offEndOfString)
int16_t INT2
Two-byte signed integer.
char CHAR
One-byte signed integer, see Headers LAL(Atomic)Datatypes.h for more details.