LALPulsar  6.1.0.1-89842e6
SFTfileIO.c File Reference

Prototypes

static int read_header_from_fp (FILE *fp, SFTtype *header, UINT4 *nsamples, UINT8 *header_crc64, UINT8 *ref_crc64, UINT2 *SFTwindowspec, CHAR **SFTcomment, BOOLEAN swapEndian)
 
void endian_swap (CHAR *pdata, size_t dsize, size_t nelements)
 
FILE * fopen_SFTLocator (const struct tagSFTLocator *locator)
 Open an "SFT" defined by the SFT-locator, return a FILE-pointer to the beginning of this SFT. More...
 
int read_SFTversion_from_fp (UINT4 *version, BOOLEAN *need_swap, FILE *fp)
 Read valid SFT version-number at position fp, and determine if we need to endian-swap the data. More...
 
int read_sft_header_from_fp (FILE *fp, SFTtype *header, UINT4 *version, UINT8 *crc64, UINT2 *SFTwindowspec, BOOLEAN *swapEndian, CHAR **SFTcomment, UINT4 *numBins)
 
UINT4 read_sft_bins_from_fp (SFTtype *ret, UINT4 *firstBinRead, UINT4 firstBin2read, UINT4 lastBin2read, FILE *fp)
 
BOOLEAN has_valid_crc64 (FILE *fp)
 Check the SFT-block starting at fp for valid crc64 checksum. More...
 
SFT file reading functions

SFTVectorXLALLoadSFTs (const SFTCatalog *catalog, REAL8 fMin, REAL8 fMax)
 Load the given frequency-band [fMin, fMax) (half-open) from the SFT-files listed in the SFT-'catalogue' ( returned by XLALSFTdataFind() ). More...
 
MultiSFTVectorXLALLoadMultiSFTs (const SFTCatalog *inputCatalog, REAL8 fMin, REAL8 fMax)
 Function to load a catalog of SFTs from possibly different detectors. More...
 
MultiSFTVectorXLALLoadMultiSFTsFromView (const MultiSFTCatalogView *multiCatalogView, REAL8 fMin, REAL8 fMax)
 This function loads a MultiSFTVector from a given input MultiSFTCatalogView, otherwise the documentation of XLALLoadMultiSFTs() applies. More...
 
SFT file writing functions

int XLALWriteSFT2FilePointer (const SFTtype *sft, FILE *fp, const CHAR *SFTwindowtype, const REAL8 SFTwindowparam, const CHAR *SFTcomment)
 Write the given SFTtype to a FILE pointer. More...
 
int XLALWriteSFT2NamedFile (const SFTtype *sft, const CHAR *SFTfilename, const CHAR *SFTwindowtype, const REAL8 SFTwindowparam, const CHAR *SFTcomment)
 Write the given SFTtype to a SFT file with the supplied filename. More...
 
int XLALWriteSFT2StandardFile (const SFTtype *sft, SFTFilenameSpec *SFTfnspec, const CHAR *SFTcomment)
 Write the given SFTtype to a SFT file with a standard ([4]) filename. More...
 
int XLALWriteSFTVector2NamedFile (const SFTVector *sftVect, const CHAR *SFTfilename, const CHAR *SFTwindowtype, const REAL8 SFTwindowparam, const CHAR *SFTcomment)
 Write the given SFTVector to a single merged SFT file with the supplied filename. More...
 
int XLALWriteSFTVector2StandardFile (const SFTVector *sftVect, SFTFilenameSpec *SFTfnspec, const CHAR *SFTcomment, const BOOLEAN merged)
 Write the given SFTVector to SFT file(s) with a standard ([4]) filename(s). More...
 
int XLALCheckSFTFileIsValid (const char *fname)
 Verify that the contents of a SFT file are valid. More...
 

Go to the source code of this file.

Data Structures

struct  _SFT_header_t
 
struct  SFTReadSegment
 segments read so far from one SFT More...
 

Macros

#define BLOCKSIZE   8192 * 8
 blocksize used in SFT-reading for the CRC-checksum computation (has to be multiple of 8 !!) More...
 
#define XLALLOADSFTSERROR(eno)
 

Macro Definition Documentation

◆ BLOCKSIZE

#define BLOCKSIZE   8192 * 8

blocksize used in SFT-reading for the CRC-checksum computation (has to be multiple of 8 !!)

Definition at line 34 of file SFTfileIO.c.

◆ XLALLOADSFTSERROR

#define XLALLOADSFTSERROR (   eno)
Value:
{ \
if(fp) \
fclose(fp); \
if(segments) \
XLALFree(segments); \
if(locatalog.data) \
XLALFree(locatalog.data); \
if(thisSFT) \
XLALDestroySFT(thisSFT); \
if(sftVector) \
XLALDestroySFTVector(sftVector); \
XLAL_ERROR_NULL(eno); \
}