My Project
sif.h
Go to the documentation of this file.
1 /******************************************************************************
2 
3  Copyright (c) 2000-2008 Turku PET Centre
4 
5  ift.h
6 
7  Modification history:
8  2000-12-13 Vesa Oikonen
9  2004-08-23 VO
10  Doxygen style comments.
11  Functions "renamed" with defines.
12  2005-01-12 VO
13  Changed and additional comments not affecting compiled code.
14  2005-01-15 VO
15  SIF related stuff moved from libpet to new libsif.
16  2005-01-16 VO
17  studynr and isotope_name were added to SIF structure.
18 
19 
20 ******************************************************************************/
21 #ifndef _SIF_H
22 #define _SIF_H
23 /*****************************************************************************/
24 #include <stdio.h>
25 #include <stdlib.h>
26 #include <unistd.h>
27 #include <math.h>
28 #include <time.h>
29 #include <ctype.h>
30 #include <string.h>
31 #include <strings.h>
32 /*****************************************************************************/
33 char siferrmsg[128];
34 /*****************************************************************************/
36 typedef struct {
38  time_t scantime;
40  int frameNr;
42  int colNr;
44  int version;
46  char studynr[11];
48  char isotope_name[8];
50  double *x1;
52  double *x2;
54  double *prompts;
56  double *randoms;
58  double *trues;
60  double *weights;
61 } SIF;
62 /*****************************************************************************/
64 /*****************************************************************************/
65 extern void libsif_printdate(FILE *fp);
66 extern int sifRead(char *filename, SIF *data);
67 extern int sifWrite(SIF *data, char *filename);
68 extern void sifPrint(SIF *data);
69 extern void sifEmpty(SIF *data);
70 extern void sifInit(SIF *data);
71 extern int sifSetmem(SIF *data, int frameNr);
72 extern void sifWeight(SIF *data, double halflife);
73 extern void sifModerate(SIF *sif, double limit);
74 /*****************************************************************************/
75 #define readSIF sifRead
76 #define writeSIF sifWrite
77 #define printSIF sifPrint
78 #define emptySIF sifEmpty
79 #define weightSIF sifWeight
80 #define initSIF sifInit
81 #define setmemSIF sifSetmem
82 /*****************************************************************************/
83 #endif
84 
void sifModerate(SIF *sif, double limit)
Definition: weight.c:102
int sifWrite(SIF *data, char *filename)
Definition: sifio.c:167
void sifInit(SIF *data)
Definition: sif.c:61
void libsif_printdate(FILE *fp)
int SIF_TEST
Definition: sif.h:63
void sifPrint(SIF *data)
Definition: sifio.c:224
void sifWeight(SIF *data, double halflife)
Definition: weight.c:61
int sifSetmem(SIF *data, int frameNr)
Definition: sif.c:95
void sifEmpty(SIF *data)
Definition: sif.c:74
int sifRead(char *filename, SIF *data)
Definition: sifio.c:64
char siferrmsg[128]
Definition: sif.h:33
Definition: sif.h:36
double * x1
Definition: sif.h:50
double * prompts
Definition: sif.h:54
int frameNr
Definition: sif.h:40
double * x2
Definition: sif.h:52
int version
Definition: sif.h:44
time_t scantime
Definition: sif.h:38
double * weights
Definition: sif.h:60
int colNr
Definition: sif.h:42
double * randoms
Definition: sif.h:56
double * trues
Definition: sif.h:58