Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-8a6b96f
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
splitSFTs.c File Reference

This program reads in binary SFTs and writes out narrow-banded merged SFTs. More...

Prototypes

static void request_resource (UNIT_SOURCE *us, int units)
 request a resurce. More...
 
static int is_directory (const char *fname)
 
static UINT8 hash_SFTFilenameSpec (const void *x)
 
static int compare_SFTFilenameSpec (const void *x, const void *y)
 
static int move_to_next_SFT (FILE *fpin, int nsamples, int comment_length)
 
int main (int argc, char **argv)
 main program More...
 

Detailed Description

This program reads in binary SFTs and writes out narrow-banded merged SFTs.

Author
Bernd Machenschalk, Bruce Allen

Writen by Bernd Machenschalk for Einstein@home 2008

Revision splitSFTs.c,v 1.41 2008/10/29 16:54:13 was reviewed by the LSC CW Review Committee Thur Oct 30, 2008

Suggested improvements: issue warning at ambiguous frequency values that are so close to the boundary of a bin that rounding might end up giving an unintended bin check for consistency of input SFTs (same timebase, ascending timestamps etc., see spec) and merged SFTs (check last header of a file we are appending to)

Other possible improvements not suggested by the committee keep output files open (if there aren't too many) obscure a mystery factor in command-line record even if given with long option –factor

Definition in file splitSFTs.c.

Go to the source code of this file.

Data Structures

struct  UNIT_SOURCE
 

Macros

#define FALSE   0
 
#define TRUE   (!FALSE)
 
#define CMT_NONE   0
 
#define CMT_OLD   1
 
#define CMT_FULL   2
 
#define COMPARE_BY(x, y)   do { if ( (x) < (y) ) return -1; if ( (x) > (y) ) return +1; } while(0)
 

Variables

UNIT_SOURCE read_bandwidth = {0, 0, 0}
 throtteling settings More...
 
UNIT_SOURCE read_open_rate = {0, 0, 0}
 
UNIT_SOURCE write_bandwidth = {0, 0, 0}
 
UNIT_SOURCE write_open_rate = {0, 0, 0}
 

Macro Definition Documentation

◆ FALSE

#define FALSE   0

Definition at line 63 of file splitSFTs.c.

◆ TRUE

#define TRUE   (!FALSE)

Definition at line 64 of file splitSFTs.c.

◆ CMT_NONE

#define CMT_NONE   0

Definition at line 66 of file splitSFTs.c.

◆ CMT_OLD

#define CMT_OLD   1

Definition at line 67 of file splitSFTs.c.

◆ CMT_FULL

#define CMT_FULL   2

Definition at line 68 of file splitSFTs.c.

◆ COMPARE_BY

#define COMPARE_BY (   x,
  y 
)    do { if ( (x) < (y) ) return -1; if ( (x) > (y) ) return +1; } while(0)

Definition at line 71 of file splitSFTs.c.

Function Documentation

◆ request_resource()

static void request_resource ( UNIT_SOURCE us,
int  units 
)
static

request a resurce.

Function returns after waiting for throttle time

Definition at line 86 of file splitSFTs.c.

◆ is_directory()

static int is_directory ( const char fname)
static

Definition at line 116 of file splitSFTs.c.

◆ hash_SFTFilenameSpec()

static UINT8 hash_SFTFilenameSpec ( const void *  x)
static

Definition at line 133 of file splitSFTs.c.

◆ compare_SFTFilenameSpec()

static int compare_SFTFilenameSpec ( const void *  x,
const void *  y 
)
static

Definition at line 147 of file splitSFTs.c.

◆ move_to_next_SFT()

static int move_to_next_SFT ( FILE *  fpin,
int  nsamples,
int  comment_length 
)
static

Definition at line 161 of file splitSFTs.c.

◆ main()

int main ( int  argc,
char **  argv 
)

main program

Definition at line 170 of file splitSFTs.c.

Variable Documentation

◆ read_bandwidth

UNIT_SOURCE read_bandwidth = {0, 0, 0}

throtteling settings

Definition at line 80 of file splitSFTs.c.

◆ read_open_rate

UNIT_SOURCE read_open_rate = {0, 0, 0}

Definition at line 81 of file splitSFTs.c.

◆ write_bandwidth

UNIT_SOURCE write_bandwidth = {0, 0, 0}

Definition at line 82 of file splitSFTs.c.

◆ write_open_rate

UNIT_SOURCE write_open_rate = {0, 0, 0}

Definition at line 83 of file splitSFTs.c.