LALPulsar  6.1.0.1-b72065a
SFTnaming.c File Reference

Prototypes

int build_sft_windowspec (UINT2 *windowspec, CHAR(*windowspec_str)[9], const char *window_type, REAL8 window_param)
 Build an SFT 2-byte 'windowspec' or filename field 'windowspec_str' for the window given by 'window_type' and 'window_param'. More...
 
int parse_sft_windowspec (const UINT2 windowspec, const char **window_type, REAL8 *window_param)
 Parse an SFT 2-byte 'windowspec' into a window name 'window_type' and possible parameter 'window_param'. More...
 
int parse_sft_windowspec_str (const CHAR *windowspec_str, CHAR(*window_type)[32], REAL8 *window_param)
 Parse an SFT filename field 'windowspec_str' into a window name 'window_type' and possible parameter 'window_param'. More...
 
SFT file naming convention functions

int XLALRegisterSpecialCWDetector (const LALDetector *specialDetector)
 Register a special detector for use with CW codes. More...
 
int XLALFindCWDetector (CHAR **prefix, INT4 *lalCachedIndex, const CHAR *name, const BOOLEAN exactMatch)
 Parses valid CW detector names and prefixes. More...
 
BOOLEAN XLALIsValidCWDetector (const CHAR *name)
 Determine if 'name' is a valid detector name or prefix. More...
 
CHARXLALGetChannelPrefix (const CHAR *name)
 Find the valid CW detector prefix. More...
 
const LALDetectorXLALGetSiteInfo (const CHAR *name)
 Find the site geometry-information 'LALDetector' for given a detector name (or prefix). More...
 
int XLALFillSFTFilenameSpecStrings (SFTFilenameSpec *spec, const CHAR *path, const CHAR *extn, const CHAR *detector, const CHAR *window_type, const CHAR *privMisc, const CHAR *pubObsKind, const CHAR *pubChannel)
 Convenience function for filling out the string fields in a SFTFilenameSpec. More...
 
charXLALBuildSFTFilenameFromSpec (const SFTFilenameSpec *spec)
 Build an SFT file name from the given specification. More...
 
int XLALParseSFTFilenameIntoSpec (SFTFilenameSpec *spec, const char *SFTpath)
 Parse a SFT file path and return its specification. More...
 
int XLALCheckValidDescriptionField (const char *desc)
 Check whether given string qualifies as a valid 'description' field of a FRAME filename (per [25]) or SFT filename (per [4]) More...
 
int XLALCompareSFTWindows (const CHAR *type1, const REAL8 param1, const CHAR *type2, const REAL8 param2)
 Check whether two SFT windows, each defined by a type name and parameter value, match. More...
 

Go to the source code of this file.

Macros

#define _XOPEN_SOURCE
 
#define LAST_ELEMENT(buf)   ( (buf)[XLAL_NUM_ELEM(buf) - 1] )
 
#define STRCPYCHK(name, dest, src)
 

Variables

struct {
   const char *   window_type
 
   const char *   short_name
 
   UINT2   A
 
   UINT2   B
 
windowspec_table []
 SFT window specification; see [4]. More...
 
static LALDetector SpecialDetectorRegistry [30]
 

Macro Definition Documentation

◆ _XOPEN_SOURCE

#define _XOPEN_SOURCE

Definition at line 24 of file SFTnaming.c.

◆ LAST_ELEMENT

#define LAST_ELEMENT (   buf)    ( (buf)[XLAL_NUM_ELEM(buf) - 1] )

Definition at line 32 of file SFTnaming.c.

◆ STRCPYCHK

#define STRCPYCHK (   name,
  dest,
  src 
)
Value:
do { \
const char *const STRCPYCHK_p = (src); \
XLAL_CHECK( strlen(STRCPYCHK_p) < sizeof(dest), XLAL_ESIZE, "%s '%s' does not fit in a buffer of size %zu", name, STRCPYCHK_p, sizeof(dest) ); \
strncpy((dest), STRCPYCHK_p, sizeof(dest)); \
} while(0)
const char * name
Definition: SearchTiming.c:93
XLAL_ESIZE
src

Definition at line 34 of file SFTnaming.c.

Variable Documentation

◆ window_type

const char* window_type

Definition at line 44 of file SFTnaming.c.

◆ short_name

const char* short_name

Definition at line 45 of file SFTnaming.c.

◆ A

UINT2 A

Definition at line 46 of file SFTnaming.c.

◆ B

UINT2 B

Definition at line 47 of file SFTnaming.c.

◆ 

const { ... } windowspec_table[]
Initial value:
= {
{ .window_type = "unknown", .short_name = "UNKN", .B = 0 },
{ .window_type = "rectangular", .short_name = "RECT", .B = 1 },
{ .window_type = "hann", .short_name = "HANN", .B = 2 },
{ .window_type = "tukey", .short_name = "TKEY", .A = 1 },
}

SFT window specification; see [4].

◆ SpecialDetectorRegistry

LALDetector SpecialDetectorRegistry[30]
static

Definition at line 60 of file SFTnaming.c.