#include <stdio.h>#include <math.h>#include <ctype.h>#include <stdlib.h>#include <unistd.h>#include <time.h>#include <string.h>#include <assert.h>#include <sys/types.h>#include "common.h"
Go to the source code of this file.
Defines | |
| #define | MIN_REG_POINTS 10 |
| #define | FIRST_PASS_RATIO 10. |
| #define | MIN_WINDOW_LEN (12*3600) |
| #define | ALLOC_BLOCK 128 |
Functions | |
| int | dtcmp (const void *p1, const void *p2) |
| int | LinearRegression (struct xy *data, int n, double *a, double *b) |
| compute the linear regression for the table x[] y[] time origin is supposed to be at the x[0] | |
| void | PulseFilter (char *dtfile, double dtmax) |
| read a dt file, filter the time pulses The resulting file is named after the input file, replacing 'dt' by 'flt' | |
| #define ALLOC_BLOCK 128 |
| #define FIRST_PASS_RATIO 10. |
| #define MIN_REG_POINTS 10 |
| #define MIN_WINDOW_LEN (12*3600) |
| int dtcmp | ( | const void * | p1, | |
| const void * | p2 | |||
| ) |
| int LinearRegression | ( | struct xy * | data, | |
| int | n, | |||
| double * | a, | |||
| double * | b | |||
| ) |
compute the linear regression for the table x[] y[] time origin is supposed to be at the x[0]
| data | the xy (time,dt) values | |
| n | the number of data (x,y) | |
| a | slope | |
| b | y at x=x[0] |
Definition at line 60 of file pulsefilter.c.
Referenced by PulseFilter().
| void PulseFilter | ( | char * | dtfile, | |
| double | dtmax | |||
| ) |
read a dt file, filter the time pulses The resulting file is named after the input file, replacing 'dt' by 'flt'
| dtfile | the file to be filtered | |
| dtmax | max acceptable dt difference |
Definition at line 99 of file pulsefilter.c.
References ALLOC_BLOCK, dtcmp(), FIRST_PASS_RATIO, fout, LinearRegression(), MIN_REG_POINTS, MIN_WINDOW_LEN, ndata, PrintError, PrintWarning, str2time(), and time2str().
Referenced by CloseTimeFile(), and ParseOptions().
1.5.6