forked from scottransom/psrfits_utils
-
Notifications
You must be signed in to change notification settings - Fork 4
/
fold.h
48 lines (36 loc) · 1.01 KB
/
fold.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef _FOLD_H
#define _FOLD_H
#include "polyco.h"
struct foldbuf {
int nbin;
int nchan;
int npol;
float *data;
unsigned *count;
};
void malloc_foldbuf(struct foldbuf *f);
void free_foldbuf(struct foldbuf *f);
void clear_foldbuf(struct foldbuf *f);
size_t foldbuf_data_size(const struct foldbuf *f);
size_t foldbuf_count_size(const struct foldbuf *f);
int normalize_transpose_folds(float *out, const struct foldbuf *f);
struct fold_args {
struct polyco *pc;
int imjd;
double fmjd;
char *data;
int nsamp;
double tsamp;
int raw_signed;
struct foldbuf *fb;
float *scale;
float *offset;
};
void *fold_8bit_power_thread(void *_args);
int fold_8bit_power(const struct polyco *pc, int imjd, double fmjd,
const char *data, int nsamp, double tsamp, int raw_signed,
struct foldbuf *f);
int scale_offset_folds(struct foldbuf *f,
const float *scale, const float *offset);
int accumulate_folds(struct foldbuf *ftot, const struct foldbuf *f);
#endif