-
Notifications
You must be signed in to change notification settings - Fork 4
/
polyco.h
31 lines (27 loc) · 867 Bytes
/
polyco.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef _POLYCO_H
#define _POLYCO_H
#include <stdio.h>
#include <stdlib.h>
struct polyco {
char psr[15];
int mjd;
double fmjd;
double rphase;
double f0;
int nsite;
int nmin;
int nc;
float rf;
double c[15];
};
int read_one_pc(FILE *f, struct polyco *pc);
int read_pc(FILE *f, struct polyco *pc, const char *psr, int mjd, double fmjd);
int select_pc(const struct polyco *pc, int npc, const char *psr,
int imjd, double fmjd);
double psr_phase(const struct polyco *pc, int mjd, double fmjd, double *freq);
double psr_fdot(const struct polyco *pc, int mjd, double fmjd, double *fdot);
double psr_phase_avg(const struct polyco *pc, int mjd,
double fmjd1, double fmjd2);
int pc_range_check(const struct polyco *pc, int mjd, double fmjd);
int pc_out_of_range(const struct polyco *pc, int mjd, double fmjd);
#endif