LALPulsar  6.1.0.1-b72065a
Header SFTReferenceLibrary.h

Detailed Description

This is a reference library for the SFT data format [4].

Author
Bruce Allen, Reinhard Prix

Prototypes

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 ReadSFTHeader (FILE *fp, struct headertag2 *info, char **comment, int *swapendian, int validate)
 
int ReadSFTData (FILE *fp, float *data, int firstbin, int nsamples, char **comment, struct headertag2 *info)
 
int CheckSFTHeaderConsistency (struct headertag2 *headerone, struct headertag2 *headertwo)
 
int ValidateSFTFile (const char *fname)
 Verify that the contents of a SFT file are valid. More...
 
const charSFTErrorMessage (int errorcode)
 
int unknownDetector (const char *detector)
 

Data Structures

struct  headertag2
 

Macros

#define SFTNOERROR   0 /* MUST BE ZERO, MEANS NO ERROR */
 
#define SFTENULLFP   1
 
#define SFTESEEK   2
 
#define SFTEGETSTREAMPOS   3
 
#define SFTERESTORESTREAMPOS   4
 
#define SFTEREAD   5
 
#define SFTEUNKNOWN   6
 
#define SFTEGPSNSEC   7
 
#define SFTEBADCOMMENT   8
 
#define SFTEBADCRC64   9
 
#define SFTENOMEM   10
 
#define SFTESIZEWRONG   11
 
#define SFTEWRITE   12
 
#define SFTENULLPOINTER   13
 
#define SFTENONE   14
 
#define SFTEHIDDENCOMMENT   15
 
#define SFTENONULLINCOMMENT   16
 
#define SFTEGPSNOTINCREASING   17
 
#define SFTETBASECHANGES   18
 
#define SFTEFIRSTINDEXCHANGES   19
 
#define SFTENSAMPLESCHANGES   20
 
#define SFTEINSTRUMENTCHANGES   21
 
#define SFTEVERSIONCHANGES   22
 
#define SFTETBASENOTPOS   23
 
#define SFTEFIRSTINDEXNEG   24
 
#define SFTENSAMPLESNOTPOS   25
 
#define SFTEINSTRUMENTUNKNOWN   26
 
#define SFTEBEFOREDATA   27
 
#define SFTEAFTERDATA   28
 
#define SFTNOTFINITE   29
 
#define SFTEWINDOWSPECCHANGES   300
 

Function Documentation

◆ WriteSFT()

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 
)

Definition at line 235 of file SFTReferenceLibrary.c.

◆ ReadSFTHeader()

int ReadSFTHeader ( FILE *  fp,
struct headertag2 info,
char **  comment,
int swapendian,
int  validate 
)

Definition at line 356 of file SFTReferenceLibrary.c.

◆ ReadSFTData()

int ReadSFTData ( FILE *  fp,
float *  data,
int  firstbin,
int  nsamples,
char **  comment,
struct headertag2 info 
)

Definition at line 594 of file SFTReferenceLibrary.c.

◆ CheckSFTHeaderConsistency()

int CheckSFTHeaderConsistency ( struct headertag2 headerone,
struct headertag2 headertwo 
)

Definition at line 686 of file SFTReferenceLibrary.c.

◆ ValidateSFTFile()

int ValidateSFTFile ( const char fname)

Verify that the contents of a SFT file are valid.

Returns
0 if all SFTs are valid. The exit status will be non-zero if any of the validity checks do not pass. Error codes are defined in SFTReferenceLibrary.h .

This has been extracted from lalpulsar_SFTvalidate, original author: Bruce Allen

Definition at line 786 of file SFTReferenceLibrary.c.

◆ SFTErrorMessage()

const char* SFTErrorMessage ( int  errorcode)

Definition at line 162 of file SFTReferenceLibrary.c.

◆ unknownDetector()

int unknownDetector ( const char detector)

Definition at line 738 of file SFTReferenceLibrary.c.

Macro Definition Documentation

◆ SFTNOERROR

#define SFTNOERROR   0 /* MUST BE ZERO, MEANS NO ERROR */

Definition at line 86 of file SFTReferenceLibrary.h.

◆ SFTENULLFP

#define SFTENULLFP   1

Definition at line 87 of file SFTReferenceLibrary.h.

◆ SFTESEEK

#define SFTESEEK   2

Definition at line 88 of file SFTReferenceLibrary.h.

◆ SFTEGETSTREAMPOS

#define SFTEGETSTREAMPOS   3

Definition at line 89 of file SFTReferenceLibrary.h.

◆ SFTERESTORESTREAMPOS

#define SFTERESTORESTREAMPOS   4

Definition at line 90 of file SFTReferenceLibrary.h.

◆ SFTEREAD

#define SFTEREAD   5

Definition at line 91 of file SFTReferenceLibrary.h.

◆ SFTEUNKNOWN

#define SFTEUNKNOWN   6

Definition at line 92 of file SFTReferenceLibrary.h.

◆ SFTEGPSNSEC

#define SFTEGPSNSEC   7

Definition at line 93 of file SFTReferenceLibrary.h.

◆ SFTEBADCOMMENT

#define SFTEBADCOMMENT   8

Definition at line 94 of file SFTReferenceLibrary.h.

◆ SFTEBADCRC64

#define SFTEBADCRC64   9

Definition at line 95 of file SFTReferenceLibrary.h.

◆ SFTENOMEM

#define SFTENOMEM   10

Definition at line 96 of file SFTReferenceLibrary.h.

◆ SFTESIZEWRONG

#define SFTESIZEWRONG   11

Definition at line 97 of file SFTReferenceLibrary.h.

◆ SFTEWRITE

#define SFTEWRITE   12

Definition at line 98 of file SFTReferenceLibrary.h.

◆ SFTENULLPOINTER

#define SFTENULLPOINTER   13

Definition at line 99 of file SFTReferenceLibrary.h.

◆ SFTENONE

#define SFTENONE   14

Definition at line 100 of file SFTReferenceLibrary.h.

◆ SFTEHIDDENCOMMENT

#define SFTEHIDDENCOMMENT   15

Definition at line 101 of file SFTReferenceLibrary.h.

◆ SFTENONULLINCOMMENT

#define SFTENONULLINCOMMENT   16

Definition at line 102 of file SFTReferenceLibrary.h.

◆ SFTEGPSNOTINCREASING

#define SFTEGPSNOTINCREASING   17

Definition at line 103 of file SFTReferenceLibrary.h.

◆ SFTETBASECHANGES

#define SFTETBASECHANGES   18

Definition at line 104 of file SFTReferenceLibrary.h.

◆ SFTEFIRSTINDEXCHANGES

#define SFTEFIRSTINDEXCHANGES   19

Definition at line 105 of file SFTReferenceLibrary.h.

◆ SFTENSAMPLESCHANGES

#define SFTENSAMPLESCHANGES   20

Definition at line 106 of file SFTReferenceLibrary.h.

◆ SFTEINSTRUMENTCHANGES

#define SFTEINSTRUMENTCHANGES   21

Definition at line 107 of file SFTReferenceLibrary.h.

◆ SFTEVERSIONCHANGES

#define SFTEVERSIONCHANGES   22

Definition at line 108 of file SFTReferenceLibrary.h.

◆ SFTETBASENOTPOS

#define SFTETBASENOTPOS   23

Definition at line 109 of file SFTReferenceLibrary.h.

◆ SFTEFIRSTINDEXNEG

#define SFTEFIRSTINDEXNEG   24

Definition at line 110 of file SFTReferenceLibrary.h.

◆ SFTENSAMPLESNOTPOS

#define SFTENSAMPLESNOTPOS   25

Definition at line 111 of file SFTReferenceLibrary.h.

◆ SFTEINSTRUMENTUNKNOWN

#define SFTEINSTRUMENTUNKNOWN   26

Definition at line 112 of file SFTReferenceLibrary.h.

◆ SFTEBEFOREDATA

#define SFTEBEFOREDATA   27

Definition at line 113 of file SFTReferenceLibrary.h.

◆ SFTEAFTERDATA

#define SFTEAFTERDATA   28

Definition at line 114 of file SFTReferenceLibrary.h.

◆ SFTNOTFINITE

#define SFTNOTFINITE   29

Definition at line 115 of file SFTReferenceLibrary.h.

◆ SFTEWINDOWSPECCHANGES

#define SFTEWINDOWSPECCHANGES   300

Definition at line 116 of file SFTReferenceLibrary.h.