Commit a52f48c5 authored by Miroslav Shaltev's avatar Miroslav Shaltev
Browse files

compile against lalsuite f15807bed63ae0f2a77814905dedb339ca2687f0, functionality not checked

parent e537148f
This diff is collapsed.
This diff is collapsed.
......@@ -554,7 +554,7 @@ void FStatGsl::SetUpSFTs( LALStatus *status, /**< pointer to LALStatus structu
REAL8 freqLo, freqHi;
INT4 extraBins;
INT4 sft_check_result = 0;
BOOLEAN sft_check_result = FALSE;
INITSTATUS(status);
ATTATCHSTATUSPTR (status);
......@@ -562,14 +562,16 @@ void FStatGsl::SetUpSFTs( LALStatus *status, /**< pointer to LALStatus structu
/* get sft catalog */
constraints.minStartTime = &(in->minStartTimeGPS);
constraints.maxStartTime = &(in->maxEndTimeGPS);
TRY( LALSFTdataFind( status->statusPtr, &catalog, in->sftbasename, &constraints), status);
XLAL_CHECK_LAL( status, ( catalog = XLALSFTdataFind( in->sftbasename, &constraints) ) != NULL, XLAL_EFUNC);
/* check CRC sums of SFTs */
TRY ( LALCheckSFTCatalog ( status->statusPtr, &sft_check_result, catalog ), status );
if (sft_check_result) {
LogPrintf(LOG_CRITICAL,"SFT validity check failed (%d)\n", sft_check_result);
ABORT ( status, FSTATGSL_ESFT, FSTATGSL_MSGESFT );
}
/* check CRC sums of SFTs */
XLAL_CHECK_LAL ( status, XLALCheckCRCSFTCatalog ( &sft_check_result, catalog ) == XLAL_SUCCESS, XLAL_EFUNC );
if (!sft_check_result) {
LogPrintf(LOG_CRITICAL,"SFT validity check failed\n");
ABORT ( status, FSTATGSL_ESFT, FSTATGSL_MSGESFT );
}
/* set some sft parameters */
deltaFsft = catalog->data[0].header.deltaF;
......@@ -684,10 +686,10 @@ void FStatGsl::SetUpSFTs( LALStatus *status, /**< pointer to LALStatus structu
/* get frequency and fdot bands at start time of sfts by extrapolating from reftime */
in->spinRange_refTime.refTime = refTimeGPS;
TRY( LALExtrapolatePulsarSpinRange( status->statusPtr, &in->spinRange_startTime, tStartGPS, &in->spinRange_refTime), status);
TRY( LALExtrapolatePulsarSpinRange( status->statusPtr, &in->spinRange_endTime, tEndGPS, &in->spinRange_refTime), status);
TRY( LALExtrapolatePulsarSpinRange( status->statusPtr, &in->spinRange_midTime, tMidGPS, &in->spinRange_refTime), status);
XLAL_CHECK_LAL( status, XLALExtrapolatePulsarSpinRange( &in->spinRange_startTime,&in->spinRange_refTime, XLALGPSGetREAL8(&tStartGPS)) == XLAL_SUCCESS, XLAL_EFUNC);
XLAL_CHECK_LAL( status, XLALExtrapolatePulsarSpinRange( &in->spinRange_endTime, &in->spinRange_refTime, XLALGPSGetREAL8(&tEndGPS)) == XLAL_SUCCESS, XLAL_EFUNC);
XLAL_CHECK_LAL( status, XLALExtrapolatePulsarSpinRange( &in->spinRange_midTime, &in->spinRange_refTime, XLALGPSGetREAL8(&tMidGPS)) == XLAL_SUCCESS, XLAL_EFUNC);
/* set Fstat spindown resolution (coarse grid) */
in->df1dot = HSMIN(in->df1dot, in->spinRange_midTime.fkdotBand[1]);
......@@ -816,7 +818,7 @@ void FStatGsl::SetUpSFTs( LALStatus *status, /**< pointer to LALStatus structu
LogPrintf( LOG_NORMAL, "Number of segments: %d, total number of SFTs in segments: %d\n", in->nStacks, in->nSFTs );
/* we don't need the original catalog anymore*/
TRY( LALDestroySFTCatalog( status->statusPtr, &catalog ), status);
XLALDestroySFTCatalog(catalog);
/* free catalog sequence */
for (k = 0; k < in->nStacks; k++)
......
......@@ -1551,7 +1551,7 @@ INT4 FCSearch::XLALInitUserVars ( int argc, char *argv[] )
}
/* get the log string */
LAL_CALL( LALUserVarGetLog(&status, &logstr, UVAR_LOGFMT_CFGFILE), &status);
logstr = XLALUserVarGetLog(UVAR_LOGFMT_CFGFILE);
fprintf( fpLog, "# Log file for FStatNomad.cpp\n\n");
fprintf( fpLog, "# User Input:\n");
......@@ -1609,7 +1609,7 @@ INT4 FCSearch::XLALInitUserVars ( int argc, char *argv[] )
}
/* set reference time for pulsar parameters */
if ( LALUserVarWasSet(&uvar->refTime))
if ( XLALUserVarWasSet(&uvar->refTime))
usefulParams.refTime = uvar->refTime;
else {
LogPrintf(LOG_DETAIL, "Reference time will be set to mid-time of observation time\n");
......
......@@ -57,14 +57,29 @@ REAL8 FStatNomad::DoPredictFStat(INT4 fstatsearchtype, LALSegList *segList) {
MultiSFTVector* multiSFTs = XLALLoadMultiSFTs( catalogSeq.data + i, freqmin, freqmax );
MultiNoiseWeights *multiNoiseWeights = NULL;
MultiPSDVector *psd = NULL;
LALNormalizeMultiSFTVect ( &lstatus, &psd, multiSFTs, blocksRngMed() );
LALComputeMultiNoiseWeights ( &lstatus, &multiNoiseWeights, psd, blocksRngMed(), 0 );
LALDestroyMultiPSDVector ( &lstatus, &psd );
psd = XLALNormalizeMultiSFTVect ( multiSFTs, blocksRngMed(), NULL);
multiNoiseWeights = XLALComputeMultiNoiseWeights ( psd, blocksRngMed(), 0 );
XLALDestroyMultiPSDVector ( psd );
MultiDetectorStateSeries *multiDetStates = NULL;
LALGetMultiDetectorStates( &lstatus, &multiDetStates, multiSFTs, edat);
MultiSFTCatalogView *multiCatalogView;
XLAL_CHECK ( (multiCatalogView = XLALGetMultiSFTCatalogView ( catalogSeq.data + i )) != NULL, XLAL_EFUNC );
MultiLIGOTimeGPSVector *mTS;
XLAL_CHECK ( (mTS = XLALTimestampsFromMultiSFTCatalogView ( multiCatalogView )) != NULL, XLAL_EFUNC );
MultiLALDetector XLAL_INIT_DECL(multiIFO);
XLAL_CHECK ( XLALMultiLALDetectorFromMultiSFTCatalogView ( &multiIFO, multiCatalogView ) == XLAL_SUCCESS, XLAL_EFUNC );
REAL8 tOffset = 0.5 * Tsft;
XLAL_CHECK ( ( multiDetStates = XLALGetMultiDetectorStates( mTS, &multiIFO, edat, tOffset )) != NULL, XLAL_EFUNC );
MultiAMCoeffs *multiAMcoef;
XLAL_CHECK ( ( multiAMcoef = XLALComputeMultiAMCoeffs ( multiDetStates, multiNoiseWeights, skypos ) ) != NULL, XLAL_EFUNC, "XLALComputeAMCoeffs() failed." );
LALGetMultiAMCoeffs ( &lstatus, &multiAMcoef, multiDetStates, skypos );
/* noise-weighting of Antenna-patterns and compute A,B,C */
if ( XLALWeightMultiAMCoeffs ( multiAMcoef, multiNoiseWeights ) != XLAL_SUCCESS ) {
LogPrintf (LOG_NORMAL, "XLALWeightMultiAMCoeffs() failed with error = %d\n\n", xlalErrno );
......@@ -882,7 +897,7 @@ printf("YYYYYYYYYYYYYYYYYYYYYYYYY SetUpSFTs\n");
REAL8 doppWings;
INT4 extraBins;
INT4 sft_check_result = 0;
BOOLEAN sft_check_result = FALSE;
INITSTATUS(status);
ATTATCHSTATUSPTR (status);
......@@ -896,15 +911,16 @@ printf("YYYYYYYYYYYYYYYYYYYYYYYYY SetUpSFTs\n");
LogPrintf(LOG_NORMAL,"Reuse SFT catalog of length: %d\n",catalog->length);
}
else {
TRY( LALSFTdataFind( status->statusPtr, &catalog, in->sftbasename, &constraints), status);
}
/* check CRC sums of SFTs */
TRY ( LALCheckSFTCatalog ( status->statusPtr, &sft_check_result, catalog ), status );
if (sft_check_result) {
LogPrintf(LOG_CRITICAL,"SFT validity check failed (%d)\n", sft_check_result);
ABORT ( status, FSTATFCNOMAD_ESFT, FSTATFCNOMAD_MSGESFT );
XLAL_CHECK_NULL( (catalog = XLALSFTdataFind( in->sftbasename, &constraints)) != NULL, XLAL_EFUNC);
}
/* check CRC sums of SFTs */
XLAL_CHECK_LAL ( status->statusPtr, XLALCheckCRCSFTCatalog ( &sft_check_result, catalog ) == XLAL_SUCCESS, XLAL_EFUNC );
if (!sft_check_result) {
LogPrintf(LOG_CRITICAL,"SFT validity check failed\n");
ABORT ( status, FSTATFCNOMAD_ESFT, FSTATFCNOMAD_MSGESFT );
}
/* set some sft parameters */
deltaFsft = catalog->data[0].header.deltaF;
timebase = 1.0/deltaFsft;
......@@ -1018,10 +1034,11 @@ printf("YYYYYYYYYYYYYYYYYYYYYYYYY SetUpSFTs\n");
/* get frequency and fdot bands at start time of sfts by extrapolating from reftime */
in->spinRange_refTime.refTime = refTimeGPS;
TRY( LALExtrapolatePulsarSpinRange( status->statusPtr, &in->spinRange_startTime, tStartGPS, &in->spinRange_refTime), status);
TRY( LALExtrapolatePulsarSpinRange( status->statusPtr, &in->spinRange_endTime, tEndGPS, &in->spinRange_refTime), status);
TRY( LALExtrapolatePulsarSpinRange( status->statusPtr, &in->spinRange_midTime, tMidGPS, &in->spinRange_refTime), status);
XLAL_CHECK_LAL( status->statusPtr, XLALExtrapolatePulsarSpinRange( &in->spinRange_startTime,&in->spinRange_refTime, XLALGPSGetREAL8(&tStartGPS)) == XLAL_SUCCESS, XLAL_EFUNC);
XLAL_CHECK_LAL( status->statusPtr, XLALExtrapolatePulsarSpinRange( &in->spinRange_endTime, &in->spinRange_refTime, XLALGPSGetREAL8(&tEndGPS)) == XLAL_SUCCESS, XLAL_EFUNC);
XLAL_CHECK_LAL( status->statusPtr, XLALExtrapolatePulsarSpinRange( &in->spinRange_midTime, &in->spinRange_refTime, XLALGPSGetREAL8(&tMidGPS)) == XLAL_SUCCESS, XLAL_EFUNC);
/* set Fstat spindown resolution (coarse grid) */
in->df1dot = HSMIN(in->df1dot, in->spinRange_midTime.fkdotBand[1]);
......@@ -1078,7 +1095,7 @@ printf("YYYYYYYYYYYYYYYYYYYYYYYYY SetUpSFTs\n");
/* fill detector name vector with all detectors present in any data sements */
in->detectorIDs = NULL;
for (k = 0; k < in->nStacks; k++) {
if ( ( in->detectorIDs = XLALGetDetectorIDsFromSFTCatalog ( in->detectorIDs, catalogSeq.data + k ) ) == NULL ) {
if ( ( in->detectorIDs = XLALListIFOsInCatalog( catalogSeq.data + k ) ) == NULL ) {
ABORT ( status, FSTATFCNOMAD_ENULL, FSTATFCNOMAD_MSGENULL );
}
}
......
......@@ -177,9 +177,9 @@ main(int argc, char *argv[])
PulsarParamsVector *injectionSources = NULL;
if ( uvar.injectionSources ) {
XLAL_CHECK ( (injectionSources = XLALPulsarParamsFromUserInput ( uvar.injectionSources ) ) != NULL, XLAL_EFUNC );
}
XLAL_CHECK ( (injectionSources = XLALPulsarParamsFromUserInput ( uvar.injectionSources, NULL ) ) != NULL, XLAL_EFUNC );
}
CWMFDataParams XLAL_INIT_DECL(DataParams);
DataParams.fMin = uvar.fmin;
DataParams.Band = uvar.Band;
......@@ -468,8 +468,6 @@ XLALInitMakefakedata ( ConfigVars_t *cfg, UserVariables_t *uvar )
int
XLALInitUserVars ( UserVariables_t *uvar, int argc, char *argv[] )
{
int ret;
XLAL_CHECK ( uvar != NULL, XLAL_EINVAL, "Invalid NULL input 'uvar'\n");
XLAL_CHECK ( argv != NULL, XLAL_EINVAL, "Invalid NULL input 'argv'\n");
......
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment