32#include <lal/UserInput.h>
33#include <lal/SFTfileIO.h>
34#include <lal/PulsarDataTypes.h>
35#include <lal/LALString.h>
36#include <lal/LALPulsarVCSInfo.h>
39#define MIN(x,y) ((x) < (y) ? (x) : (y))
70main(
int argc,
char *argv[] )
79 XLALPrintWarning(
"Nmax=%u requested but SFT catalog has only %u entries. Returning them all.", uvar.Nmax, catalog->
length );
82 if ( uvar.headerOnly ) {
91 else if ( uvar.timestampsOnly ) {
102 printf(
"%%%% Frequency-segmented SFTs: len(catalog) = %d, len(sft-vector) = %d\n", catalog->
length, sfts->
length );
103 if ( !uvar.dataOnly ) {
104 printf(
"%%%% For segmented SFTS we can't output SFT 'descriptors' + data. Use --headerOnly if you need the descriptor fields\n\n" );
111 if ( !uvar.dataOnly ) {
113 if ( !segmentedSFTs ) {
139 printf(
"%%%% ----- Descriptor:\n" );
141 printf(
"SFT version: %d\n",
desc->version );
142 printf(
"numBins: %d\n",
desc->numBins );
144 printf(
"window: %s(%0.10g)\n",
desc->window_type,
desc->window_param );
145 if (
desc->comment ) {
146 if ( strchr(
desc->comment,
'\n' ) ) {
147 printf(
"comment: ==========\n%s\nend comment: ------\n",
desc->comment );
149 printf(
"comment: %s\n",
desc->comment );
152 printf(
"comment: <none>\n" );
165 printf(
"%%%% ----- Header:\n" );
166 printf(
"Name: '%s'\n",
header->name );
167 printf(
"epoch: [%d, %d]\n",
header->epoch.gpsSeconds,
header->epoch.gpsNanoSeconds );
168 printf(
"f0: %.9f\n",
header->f0 );
169 printf(
"deltaF: %.9g\n",
header->deltaF );
171 printf(
"numBins: %d\n",
header->data->length );
182 printf(
"%%%% ----- Data x(f):\n" );
183 printf(
"%%%% Frequency f[Hz] Real(x) Imag(x) \n" );
213 printf(
"%s", logstr );
217 printf(
"%%%% Timestamps: seconds nano-seconds\n" );
220 printf(
"%10d %09d\n",
header->epoch.gpsSeconds,
header->epoch.gpsNanoSeconds );
234 " - '<SFT file>;<SFT file>;...', where <SFT file> may contain wildcards\n - 'list:<file containing list of SFT files>'" );
248 XLAL_CHECK(
UVAR_SET3( headerOnly, dataOnly, timestampsOnly ) <= 1,
XLAL_EINVAL,
"Contradictory input: at most *one* of --headerOnly, --dataOnly or --timestampsOnly allowed\n" );
void LALCheckMemoryLeaks(void)
const LALVCSInfoList lalPulsarVCSInfoList
NULL-terminated list of VCS and build information for LALPulsar and its dependencies
int main(int argc, char *argv[])
int XLALprintData(const SFTtype *sft)
int XLALReadUserInput(int argc, char *argv[], UserVariables_t *uvar)
int XLALprintDescriptor(const SFTDescriptor *ptr)
int XLALprintTimestamps(const SFTCatalog *catalog, const UINT4 Nmax)
int XLALprintHeader(const SFTtype *header)
#define XLAL_INIT_DECL(var,...)
int char * XLALStringAppend(char *s, const char *append)
char * XLALVCSInfoString(const LALVCSInfoList vcs_list, const int verbose, const char *prefix)
void XLALDestroySFTVector(SFTVector *vect)
XLAL interface to destroy an SFTVector.
void XLALDestroySFTCatalog(SFTCatalog *catalog)
Free an 'SFT-catalogue'.
SFTVector * XLALLoadSFTs(const SFTCatalog *catalog, REAL8 fMin, REAL8 fMax)
Load the given frequency-band [fMin, fMax) (half-open) from the SFT-files listed in the SFT-'catalogu...
SFTCatalog * XLALSFTdataFind(const CHAR *file_pattern, const SFTConstraints *constraints)
Find the list of SFTs matching the file_pattern and satisfying the given constraints,...
const CHAR * XLALshowSFTLocator(const struct tagSFTLocator *locator)
Mostly for debugging purposes: provide a user-API to allow inspecting the SFT-locator [which is an OP...
#define XLAL_CHECK(assertion,...)
#define XLAL_CHECK_MAIN(assertion,...)
int int XLALPrintWarning(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
A vector of COMPLEX8FrequencySeries.
COMPLEX8FrequencySeries * data
Pointer to the data array.
UINT4 length
Number of elements in array.
An "SFT-catalogue": a vector of SFTdescriptors, as returned by XLALSFTdataFind()
SFTDescriptor * data
array of data-entries describing matched SFTs
UINT4 length
number of SFTs in catalog
A 'descriptor' of an SFT: basically containing the header-info plus an opaque description of where ex...
SFTtype header
SFT-header info.