Commit f236d5ea authored by Ruslan Vaulin's avatar Ruslan Vaulin
Browse files

Merge branch 'master' of ligo-vcs.phys.uwm.edu:/usr/local/git/lalsuite

Made changes in pylal/pylal/auxmvc.py in the svm evaluation job and node classes.
Original: c526039331fc87c696502d2dfe6426e6be124857
parents 2b782d8e f6f33b4c
......@@ -1452,20 +1452,29 @@ int XLALSetFlatLatticeEllipticalBounds(
// Check input
XLAL_CHECK(tiling != NULL, XLAL_EFAULT);
XLAL_CHECK(x_semi > 0.0, XLAL_EINVAL);
XLAL_CHECK(y_semi > 0.0, XLAL_EINVAL);
XLAL_CHECK(x_semi >= 0.0, XLAL_EINVAL);
XLAL_CHECK(y_semi >= 0.0, XLAL_EINVAL);
// Allocate and set bounds data
double* bounds = XLALCalloc(4, sizeof(double));
XLAL_CHECK(bounds != NULL, XLAL_ENOMEM);
bounds[0] = x_centre;
bounds[1] = y_centre;
bounds[2] = x_semi;
bounds[3] = y_semi;
// Set parameter space bound
// Set parameter space X bound
XLAL_CHECK(XLALSetFlatLatticeConstantBound(tiling, x_dimension, x_centre - x_semi, x_centre + x_semi) == XLAL_SUCCESS, XLAL_EFAILED);
XLAL_CHECK(XLALSetFlatLatticeBound(tiling, x_dimension + 1, false, EllipticalYBound, (void*)bounds) == XLAL_SUCCESS, XLAL_EFAILED);
// Set parameter space Y bound
if (x_semi == 0.0 || y_semi == 0.0) {
XLAL_CHECK(XLALSetFlatLatticeConstantBound(tiling, x_dimension + 1, y_centre - y_semi, y_centre + y_semi) == XLAL_SUCCESS, XLAL_EFAILED);
} else {
// Allocate and set bounds data
double* bounds = XLALCalloc(4, sizeof(double));
XLAL_CHECK(bounds != NULL, XLAL_ENOMEM);
bounds[0] = x_centre;
bounds[1] = y_centre;
bounds[2] = x_semi;
bounds[3] = y_semi;
// Set parameter space bound
XLAL_CHECK(XLALSetFlatLatticeBound(tiling, x_dimension + 1, false, EllipticalYBound, (void*)bounds) == XLAL_SUCCESS, XLAL_EFAILED);
}
return XLAL_SUCCESS;
......
......@@ -28,6 +28,7 @@ summary values for each sky map:
* searched posterior probability
* angle between true sky location and maximum a posteriori estimate
* runtime in seconds
* (optional) areas of specified probability contours
The filenames of the sky maps may be provided as positional command line
arguments, and may also be provided as globs (such as '*.fits.gz').
......@@ -48,7 +49,11 @@ if __name__ == '__main__':
Option("-o", "--output", default="/dev/stdout",
help="Name of output file [default: %default]"),
Option("-j", "--jobs", default=1, type=int,
help="Number of threads [default: %default]")
help="Number of threads [default: %default]"),
Option("-p", "--contour", default=[], action="append",
type=float, metavar="PERCENT",
help="Report the area of the smallest contour containing this "
+ "much probability. Can be repeated mulitple times")
]
)
opts, args = parser.parse_args()
......@@ -70,9 +75,10 @@ from lalinference.bayestar import fits
from lalinference.bayestar import postprocess
def startup(dbfilename):
global db
def startup(dbfilename, opts_contour):
global db, contours
db = sqlite3.connect(dbfilename)
contours = opts_contour
def process(fitsfilename):
......@@ -94,10 +100,10 @@ def process(fitsfilename):
WHERE cem1.table_name = 'sim_inspiral'
AND cem2.table_name = 'coinc_event' AND cem2.event_id = ?""",
(coinc_event_id,)).fetchone()
searched_area, searched_prob, offset = postprocess.find_injection(
sky_map, true_ra, true_dec)
searched_area, searched_prob, offset, contour_areas = postprocess.find_injection(
sky_map, true_ra, true_dec, contours=[0.01 * p for p in contours])
return coinc_event_id, simulation_id, far, searched_area, searched_prob, offset, runtime
return [coinc_event_id, simulation_id, far, searched_area, searched_prob, offset, runtime] + contour_areas
if __name__ == '__main__':
......@@ -109,17 +115,19 @@ if __name__ == '__main__':
progress.update(-1, 'spawning {0} workers'.format(opts.jobs))
if opts.jobs == 1:
from itertools import imap
startup(dbfilename)
else:
import multiprocessing
imap = multiprocessing.Pool(opts.jobs, startup, (dbfilename,)).imap_unordered
imap = multiprocessing.Pool(opts.jobs, startup, (dbfilename, opts.contour)).imap_unordered
startup(dbfilename, opts.contour)
progress.update(-1, 'obtaining filenames of sky maps')
fitsfilenames = tuple(itertools.chain.from_iterable(glob.iglob(fitsfileglob)
for fitsfileglob in fitsfileglobs))
print('coinc_event_id', 'simulation_id', 'far', 'searched_area', 'searched_prob', 'offset', 'runtime',
sep="\t", file=outfile)
colnames = ['coinc_event_id', 'simulation_id', 'far', 'searched_area',
'searched_prob', 'offset', 'runtime'] + ["area({0:g})".format(p)
for p in contours]
print(*colnames, sep="\t", file=outfile)
count_records = 0
progress.max = len(fitsfilenames)
......
......@@ -19,14 +19,16 @@
"""
Produce GW sky maps for all coincidences in a LIGO-LW XML file.
A string naming the kind of prior -- "uniform in log distance" or
"uniform in volume" -- is a required command line argument as well as the
minimum and maximum distance. The filename of the (optionally gzip-compressed)
LIGO-LW XML input is an optional argument; if omitted, input is read from stdin.
The filename of the (optionally gzip-compressed) LIGO-LW XML input is an
optional argument; if omitted, input is read from stdin.
If the --min-distance argument is omitted, it defaults to half the minimum
effective distance among all of the detectors. If the --max-distance argument
is omitted, it defaults to twice the maximum effective distance among detectors.
The distance prior is controlled by the --prior-distance-power argument.
If you set --prior-distance-power=k, then the distance prior is
proportional to r^k. The default is 2, uniform in volume.
If the --min-distance argument is omitted, it defaults to zero. If the
--max-distance argument is omitted, it defaults to the SNR=4 horizon
distance of the most sensitive detector.
A FITS file is created for each sky map, having a filename of the form
......@@ -46,7 +48,7 @@ from lalinference.bayestar import command
parser = OptionParser(
formatter = command.NewlinePreservingHelpFormatter(),
description = __doc__,
usage = '%prog [options] --prior-distance-power -1|2 [INPUT.xml[.gz]]',
usage = '%prog [options] [INPUT.xml[.gz]]',
option_list = [
Option("--nside", "-n", type=int, default=-1,
help="HEALPix lateral resolution [default: auto]"),
......@@ -59,7 +61,7 @@ parser = OptionParser(
Option("--max-distance", type=float, metavar="Mpc",
help="Maximum distance of prior in megaparsecs [default: infer from effective distance]"),
Option("--prior-distance-power", type=int, metavar="-1|2",
help="Distance prior [required, -1 for uniform in log, 2 for uniform in distance]"),
help="Distance prior [-1 for uniform in log, 2 for uniform in volume, default: 2]"),
Option("--reference-frequency", type=float, metavar="Hz",
help="Shift trigger times from coalescence time to time when GW inspiral has this frequency [default: do not use]"),
Option("--keep-going", "-k", default=False, action="store_true",
......@@ -68,7 +70,7 @@ parser = OptionParser(
)
opts, args = parser.parse_args()
infilename = command.get_input_filename(parser, args)
command.check_required_arguments(parser, opts, "f_low", "waveform", "prior_distance_power")
command.check_required_arguments(parser, opts, "f_low", "waveform")
#
......
......@@ -20,14 +20,16 @@
Generate a sky map for a GraCEDb event by extracting times of arrival and SNRs
for the coinc_inspiral record that is present in a LIGO LW-XML file.
A string naming the kind of prior -- "uniform in log distance" or
"uniform in volume" -- is a required command line argument as well as the
minimum and maximum distance. The filename of the (optionally gzip-compressed)
LIGO-LW XML input is an optional argument; if omitted, input is read from stdin.
The filename of the (optionally gzip-compressed) LIGO-LW XML input is an
optional argument; if omitted, input is read from stdin.
If the --min-distance argument is omitted, it defaults to half the minimum
effective distance among all of the detectors. If the --max-distance argument
is omitted, it defaults to twice the maximum effective distance among detectors.
The distance prior is controlled by the --prior-distance-power argument.
If you set --prior-distance-power=k, then the distance prior is
proportional to r^k. The default is 2, uniform in volume.
If the --min-distance argument is omitted, it defaults to zero. If the
--max-distance argument is omitted, it defaults to the SNR=4 horizon
distance of the most sensitive detector.
Output is an optionally gzip-compressed HEALPix FITS file, whose filename is
provided by the required "-o" or "--output" argument.
......@@ -55,7 +57,7 @@ parser = OptionParser(
Option("--max-distance", type=float, metavar="Mpc",
help="Maximum distance of prior in megaparsecs [default: infer from effective distance]"),
Option("--prior-distance-power", type=int, metavar="-1|2",
help="Distance prior [required, -1 for uniform in log, 2 for uniform in distance]"),
help="Distance prior [-1 for uniform in log, 2 for uniform in volume, default: 2]"),
Option("--reference-frequency", type=float, metavar="Hz",
help="Shift trigger times from coalescence time to time when GW inspiral has this frequency"),
Option("--psd", metavar="PSD.xml[.gz]",
......@@ -66,7 +68,7 @@ parser = OptionParser(
)
opts, args = parser.parse_args()
infilename = command.get_input_filename(parser, args)
command.check_required_arguments(parser, opts, "prior_distance_power", "psd", "output")
command.check_required_arguments(parser, opts, "psd", "output")
#
......
......@@ -9,7 +9,7 @@ SUBDIRS = OptimizedCFS ResamplingFstat
bin_PROGRAMS = lalapps_ComputeFStatistic lalapps_FstatShapeTest lalapps_SemiAnalyticF \
lalapps_polka lalapps_uberpolka lalapps_FstatShapeTestLAL lalapps_compareFstats\
lalapps_makeInvetofile lalapps_extractSFTband lalapps_FindSh \
lalapps_monteint lalapps_zellepolka \
lalapps_zellepolka \
lalapps_PredictFStat lalapps_ComputeFStatistic_v2 \
lalapps_ComputeFStatAnalyticMonteCarloUpperLimit \
lalapps_synthesizeBstatMC lalapps_synthesizeTransientStats \
......@@ -31,7 +31,6 @@ LVsrc = ../GCT
OPTsrc = ./OptimizedCFS
lalapps_zellepolka_SOURCES = zellepolka.c
lalapps_monteint_SOURCES = monteint.c
CFSsources = ComputeFStatistic.h \
clusters.c clusters.h \
......
......@@ -27,8 +27,10 @@
#define LAL_USE_OLD_COMPLEX_STRUCTS
#include <lalapps.h>
#include <lal/Date.h>
#include <lal/UserInput.h>
#include <lal/SFTfileIO.h>
#include <lal/SFTutils.h>
/* Error codes and messages */
/**\name Error Codes */ /*@{*/
......
......@@ -31,6 +31,7 @@
#include <lal/UserInput.h>
#include <lal/SFTfileIO.h>
#include <lal/SFTutils.h>
#include "sft_extra.h"
/** \name Error codes */
......
......@@ -35,7 +35,9 @@
#include <lalapps.h>
#include <lal/UserInput.h>
#include <lal/PulsarDataTypes.h>
#include <lal/SFTfileIO.h>
#include <lal/SFTutils.h>
#include <lal/LogPrintf.h>
/** \name Error codes */
......
......@@ -96,6 +96,7 @@ int main(void) {fputs("disabled, no gsl or no lal frame library support.\n", std
#include <lal/RealFFT.h>
#include <lal/ComplexFFT.h>
#include <lal/SFTfileIO.h>
#include <lal/SFTutils.h>
#ifdef PSS_ENABLED
#include <XLALPSSInterface.h>
......
## Dummy Makefile.am, to record for posterity how sources/codes here used to be built
lalapps_monteint_SOURCES = monteint.c
\ No newline at end of file
......@@ -72,18 +72,17 @@ def ascii_trigger(line, columns=KLEINEWELLE_COLUMNS):
@returns a `SnglBurst` built from the `ASCII` data
"""
if isinstance(line, str):
dat = map(float, _delim.split(line.rstrip()))
else:
dat = map(float, line)
t = lsctables.SnglBurst()
t.search = u"kleinewelle"
dat = line.rstrip().split()
if len(dat) == 9:
channel = re.sub("_", ":", dat.pop(-1), 1)
if re.search("_\d+_\d+\Z", c):
if re.search("_\d+_\d+\Z", channel):
channel = channel.rsplit("_", 2)[0]
if 'channel' in columns:
t.channel = channel
elif len(dat) == 8:
if len(dat) == 8:
(start, stop, peak, freq, energy,
amplitude, n_pix, sig) = list(map(float, dat))
start = LIGOTimeGPS(start)
......@@ -96,8 +95,6 @@ def ascii_trigger(line, columns=KLEINEWELLE_COLUMNS):
raise ValueError("Wrong number of columns in ASCII line. "
"Cannot read.")
t = lsctables.SnglBurst()
t.search = u"kleinewelle"
# set times
if 'start_time' in columns:
t.start_time = start.gpsSeconds
......
......@@ -279,7 +279,7 @@ void XLALDetCharPruneTrigs( GSequence* trig_sequence, const LALSegList* onsource
* This trigger is in the subsequent segment, thus we need to advance
* the pointer to account for it
*/
if( pos > 0 && i < onsource->length ){
if( pos > 0 && i < onsource->length-1 ){
i++;
onseg = onsource->segs[i];
continue;
......
......@@ -159,6 +159,8 @@ void XLALFrameUFrFileClose(LALFrameUFrFile * stream)
fclose(stream->tmpfp);
}
LALFree(stream);
if (err)
XLAL_ERROR_VOID(XLAL_EFUNC);
}
return;
}
......@@ -898,6 +900,8 @@ void XLALFrameUFrDetectorFree(LALFrameUFrDetector * detector)
int err;
CALL_FRAMEC_FUNCTION(err, FrameCFrDetectorFree, detector->handle);
LALFree(detector);
if (err)
XLAL_ERROR_VOID(XLAL_EFUNC);
}
return;
}
......
......@@ -93,15 +93,25 @@ def ligolw_sky_map(sngl_inspirals, approximant, amplitude_order, phase_order, f_
responses = [det.response for det in detectors]
locations = [det.location for det in detectors]
# Use half the minimum effective distance as the default value for
# min_distance and twice the maximum effective distance as the default
# value for max_distance.
if min_distance is None or max_distance is None:
effective_distances = np.asarray(horizons) / np.abs(snrs)
if min_distance is None:
min_distance = 0.5 * min(effective_distances)
if max_distance is None:
max_distance = 2 * max(effective_distances)
# If minimum distance is not specified, then default to 0 Mpc.
if min_distance is None:
min_distance = 0
# If maximum distance is not specified, then default to the SNR=4
# horizon distance of the most sensitive detector.
if max_distance is None:
max_distance = max(horizons) / 4
# If prior_distance_power is not specified, then default to 2
# (p(r) ~ r^2, uniform in volume).
if prior_distance_power is None:
prior_distance_power = 2
# Raise an exception if 0 Mpc is the minimum effective distance and the prior
# is of the form r**k for k<0
if min_distance == 0 and prior_distance_power < 0:
raise ValueError(("Prior is a power law r^k with k={}, "
+ "undefined at min_distance=0").format(prior_distance_power))
# Time and run sky localization.
start_time = time.time()
......
......@@ -28,7 +28,8 @@ import healpy as hp
def angle_distance(theta0, phi0, theta1, phi1):
"""Angular separation in radians between two points on the unit sphere."""
cos_angle_distance = np.cos(phi1 - phi0) * np.sin(theta0) * np.sin(theta1) + np.cos(theta0) * np.cos(theta1)
cos_angle_distance = (np.cos(phi1 - phi0) * np.sin(theta0) * np.sin(theta1)
+ np.cos(theta0) * np.cos(theta1))
if cos_angle_distance > 1:
return 0.
elif cos_angle_distance < -1:
......@@ -37,17 +38,20 @@ def angle_distance(theta0, phi0, theta1, phi1):
return np.arccos(cos_angle_distance)
def find_injection(sky_map, true_ra, true_dec):
def find_injection(sky_map, true_ra, true_dec, contours=()):
"""
Given a sky map and the true right ascension and declination (in radians),
find the smallest area in deg^2 that would have to be searched to find the
source, the smallest posterior mass, and the angular offset in degrees from
the true location to the maximum (mode) of the posterior.
the true location to the maximum (mode) of the posterior. Optionally, also
compute the areas of the smallest contours containing a given total
probability.
"""
# Compute the HEALPix lateral resolution parameter for this sky map.
npix = len(sky_map)
nside = hp.npix2nside(npix)
deg2perpix = hp.nside2pixarea(nside, degrees=True)
# Convert from ra, dec to conventional spherical polar coordinates.
true_theta = 0.5 * np.pi - true_dec
......@@ -69,21 +73,29 @@ def find_injection(sky_map, true_ra, true_dec):
# Find the index of the true location in the cumulative distribution.
idx = (i for i, pix in enumerate(indices) if pix == true_pix).next()
# Find the smallest area that would have to be searched to find the true
# location.
searched_area = (idx + 1) * hp.nside2pixarea(nside, degrees=True)
# Find the smallest area that would have to be searched to find
# the true location. Note that 1 is added to the index because we want
# the **length** of the array up to and including the idx'th element,
# not the index itself.
searched_area = (idx + 1) * deg2perpix
# Find the smallest posterior mass that would have to be searched to find
# the true location.
searched_prob = cum_sky_map[idx]
# Permute the cumulative distribution so that it is indexed the same way
# as the original sky map.
cum_sky_map[indices] = cum_sky_map
# Reverse pixel order so that we can use np.searchsorted() to locate
# the index where a given confidence level ends.
cum_sky_map = cum_sky_map[::-1]
# For each of the given confidence levels, compute the area of the
# smallest region containing that probability.
contour_areas = [(np.searchsorted(cum_sky_map, p, side='right') + 1)
* deg2perpix for p in contours]
# Find the angular offset between the mode and true locations.
offset = np.rad2deg(angle_distance(true_theta, true_phi, mode_theta, mode_phi))
offset = np.rad2deg(angle_distance(true_theta, true_phi,
mode_theta, mode_phi))
# Done.
return searched_area, searched_prob, offset
return searched_area, searched_prob, offset, contour_areas
......@@ -168,7 +168,7 @@ int XLALSetFlatLatticeFnDotConstantBound(
info->bounds[1] = GSL_MAX(bound1, bound2);
// Set parameter space bound
XLAL_CHECK(XLALSetFlatLatticeBound(tiling, dimension, false, FnDotConstantBound, (void*)info) == XLAL_SUCCESS, XLAL_EFAILED);
XLAL_CHECK(XLALSetFlatLatticeBound(tiling, dimension, bound1 == bound2, FnDotConstantBound, (void*)info) == XLAL_SUCCESS, XLAL_EFAILED);
return XLAL_SUCCESS;
......
......@@ -48,7 +48,7 @@ extern "C" {
#include <lal/SkyCoordinates.h>
#include <lal/LALBarycenter.h>
#include "SFTutils.h"
#include <lal/SFTutils.h>
/** maximal number of spin-parameters (Freq + spindowns) we can handle */
#define PULSAR_MAX_SPINS 7
......
This diff is collapsed.
......@@ -20,6 +20,10 @@
#ifndef _SFTFILEIO_H /* Double-include protection. */
#define _SFTFILEIO_H
#ifdef __cplusplus /* C++ protection. */
extern "C" {
#endif
/* includes */
#include <stdlib.h>
#include <math.h>
......@@ -30,11 +34,6 @@
#include <lal/LALConstants.h>
#include <lal/AVFactories.h>
#include <lal/SeqFactories.h>
#include <lal/PulsarDataTypes.h>
#ifdef __cplusplus /* C++ protection. */
extern "C" {
#endif
/**
* \defgroup SFTfileIO_h Header SFTfileIO.h
......@@ -217,6 +216,74 @@ i.e. this will only be correct for v1-normalized data (i.e. data = DFT)
#define SFTFILEIO_MSGECRC64 "Invalid CRC64 checksum in SFT"
/*@}*/
// ---------- exported types ----------
/** A vector of COMPLEX8FrequencySeries */
typedef struct tagCOMPLEX8FrequencySeriesVector {
#ifdef SWIG /* SWIG interface directives */
SWIGLAL(ARRAY_1D(COMPLEX8FrequencySeriesVector, COMPLEX8FrequencySeries, data, UINT4, length));
#endif /* SWIG */
UINT4 length; /**< number of SFTs */
COMPLEX8FrequencySeries *data; /**< array of SFTs */
} COMPLEX8FrequencySeriesVector;
/** A vector of REAL4FrequencySeries */
typedef struct tagREAL4FrequencySeriesVector {
#ifdef SWIG /* SWIG interface directives */
SWIGLAL(ARRAY_1D(REAL4FrequencySeriesVector, REAL4FrequencySeries, data, UINT4, length));
#endif /* SWIG */
UINT4 length;
REAL4FrequencySeries *data;
} REAL4FrequencySeriesVector;
/** A collection of (multi-IFO) time-series */
typedef struct tagMultiREAL4TimeSeries {
#ifdef SWIG /* SWIG interface directives */
SWIGLAL(ARRAY_1D(MultiREAL4TimeSeries, REAL4TimeSeries*, data, UINT4, length));
#endif /* SWIG */
UINT4 length; /**< number of ifos */
REAL4TimeSeries **data; /**< vector of REAL4 timeseries */
} MultiREAL4TimeSeries;
/** A vector of 'timestamps' of type LIGOTimeGPS */
typedef struct tagLIGOTimeGPSVector {
#ifdef SWIG /* SWIG interface directives */
SWIGLAL(ARRAY_1D(LIGOTimeGPSVector, LIGOTimeGPS, data, UINT4, length));
#endif /* SWIG */
UINT4 length; /**< number of timestamps */
LIGOTimeGPS *data; /**< array of timestamps */
REAL8 deltaT; /**< 'length' of each timestamp (e.g. typically Tsft) */
} LIGOTimeGPSVector;
/** A vector of 'timestamps' of type LIGOTimeGPS */
typedef struct tagMultiLIGOTimeGPSVector {
#ifdef SWIG /* SWIG interface directives */
SWIGLAL(ARRAY_1D(MultiLIGOTimeGPSVector, LIGOTimeGPSVector*, data, UINT4, length));
#endif /* SWIG */
UINT4 length; /**< number of timestamps vectors or ifos */
LIGOTimeGPSVector **data; /**< timestamps vector for each ifo */
} MultiLIGOTimeGPSVector;
/** A so-called 'SFT' (short-Fourier-transform) will be stored in a COMPLEX8FrequencySeries */
typedef COMPLEX8FrequencySeries SFTtype;
/** The corresponding vector-type to hold a vector of 'SFTs' */
typedef COMPLEX8FrequencySeriesVector SFTVector;
/** A collection of SFT vectors -- one for each IFO in a multi-IFO search */
typedef struct tagMultiSFTVector {
#ifdef SWIG /* SWIG interface directives */
SWIGLAL(ARRAY_1D(MultiSFTVector, SFTVector*, data, UINT4, length));
#endif /* SWIG */
UINT4 length; /**< number of ifos */
SFTVector **data; /**< sftvector for each ifo */
} MultiSFTVector;
/** 'Constraints' for SFT-matching: which detector, within which time-stretch and which
* timestamps exactly should be loaded ?
* Any of the entries is optional, and they will be combined by logical AND.
......@@ -252,10 +319,31 @@ typedef struct tagSFTCatalog
SFTDescriptor *data; /**< array of data-entries describing matched SFTs */
} SFTCatalog;
/** A multi-SFT-catalogue "view": a multi-IFO vector of SFT-catalogs
*
* Note: this is only a multi-IFO "view" of an existing SFTCatalog,
* various allocated memory of the original catalog is only
* pointed to, not duplicated!
* This means one must not free the original catalog
* while this multi-view is still in use!
*/
typedef struct tagMultiSFTCatalogView
{
UINT4 length; /**< number of detectors */
SFTCatalog *data; /**< array of SFT-catalog pointers */
} MultiSFTCatalogView;
/*---------- Global variables ----------*/
/* empty init-structs for the types defined in here */
extern const SFTConstraints empty_SFTConstraints;
extern const SFTCatalog empty_SFTCatalog;
extern const SFTtype empty_SFTtype;
extern const SFTVector empty_SFTVector;
extern const MultiSFTVector empty_MultiSFTVector;
extern const MultiREAL4TimeSeries empty_MultiREAL4TimeSeries;
extern const LIGOTimeGPSVector empty_LIGOTimeGPSVector;
extern const MultiLIGOTimeGPSVector empty_MultiLIGOTimeGPSVector;
/*
* Functions Declarations (i.e., prototypes).
......@@ -266,18 +354,31 @@ extern const SFTCatalog empty_SFTCatalog;
*================================================================================*/
SFTCatalog *XLALSFTdataFind ( const CHAR *file_pattern, const SFTConstraints *constraints );
int XLALWriteSFT2fp (const SFTtype *sft, FILE *fp, const CHAR *SFTcomment );
int XLALWriteSFT2file (const SFTtype *sft, const CHAR *fname, const CHAR *SFTcomment );
int XLALWriteSFTVector2Dir (const SFTVector *sftVect, const CHAR *basename, const CHAR *SFTcomment, const CHAR *description);
int XLALWriteSFTVector2File(const SFTVector *sftVect, const CHAR *filename, const CHAR *SFTcomment);
int XLALWriteSFTVector2Dir ( const SFTVector *sftVect, const CHAR *dirname, const CHAR *SFTcomment, const CHAR *Misc );
int XLALWriteSFTVector2File ( const SFTVector *sftVect, const CHAR *dirname, const CHAR *SFTcomment, const CHAR *Misc );
int XLALWriteSFTVector2NamedFile ( const SFTVector *sftVect, const CHAR *filename, const CHAR *SFTcomment );
int XLALWriteSFT2fp ( const SFTtype *sft, FILE *fp, const CHAR *SFTcomment );
int XLALWriteSFT2file ( const SFTtype *sft, const CHAR *fname, const CHAR *SFTcomment );
LIGOTimeGPSVector *XLALReadTimestampsFile ( const CHAR *fname );
MultiLIGOTimeGPSVector *XLALReadMultiTimestampsFiles ( const LALStringVector *fnames );