21 #ifndef _SFTREFERENCELIBRARY_H
22 #define _SFTREFERENCELIBRARY_H
58 unsigned short windowspec,
89 #define SFTEGETSTREAMPOS 3
90 #define SFTERESTORESTREAMPOS 4
94 #define SFTEBADCOMMENT 8
95 #define SFTEBADCRC64 9
97 #define SFTESIZEWRONG 11
99 #define SFTENULLPOINTER 13
101 #define SFTEHIDDENCOMMENT 15
102 #define SFTENONULLINCOMMENT 16
103 #define SFTEGPSNOTINCREASING 17
104 #define SFTETBASECHANGES 18
105 #define SFTEFIRSTINDEXCHANGES 19
106 #define SFTENSAMPLESCHANGES 20
107 #define SFTEINSTRUMENTCHANGES 21
108 #define SFTEVERSIONCHANGES 22
109 #define SFTETBASENOTPOS 23
110 #define SFTEFIRSTINDEXNEG 24
111 #define SFTENSAMPLESNOTPOS 25
112 #define SFTEINSTRUMENTUNKNOWN 26
113 #define SFTEBEFOREDATA 27
114 #define SFTEAFTERDATA 28
115 #define SFTNOTFINITE 29
116 #define SFTEWINDOWSPECCHANGES 300
const char * SFTErrorMessage(int errorcode)
int CheckSFTHeaderConsistency(struct headertag2 *headerone, struct headertag2 *headertwo)
int unknownDetector(const char *detector)
int ReadSFTHeader(FILE *fp, struct headertag2 *info, char **comment, int *swapendian, int validate)
int ValidateSFTFile(const char *fname)
Verify that the contents of a SFT file are valid.
int WriteSFT(FILE *fp, int gps_sec, int gps_nsec, double tbase, int firstfreqindex, int nsamples, const char *detector, unsigned short windowspec, const char *comment, float *data)
int ReadSFTData(FILE *fp, float *data, int firstbin, int nsamples, char **comment, struct headertag2 *info)