Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lalsuite-archive
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Oliver Behnke
lalsuite-archive
Commits
4093c234
Commit
4093c234
authored
13 years ago
by
David Keitel
Committed by
Reinhard Prix
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use ComputeFStat() option returnSingleF in XLALComputeExtraStatsSemiCoherent()
parent
51a2f76c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lalapps/src/pulsar/GCT/LineVeto.c
+30
-14
30 additions, 14 deletions
lalapps/src/pulsar/GCT/LineVeto.c
with
30 additions
and
14 deletions
lalapps/src/pulsar/GCT/LineVeto.c
+
30
−
14
View file @
4093c234
...
...
@@ -38,6 +38,29 @@
#define TRUE (1==1)
#define FALSE (1==0)
/* Hooks for Einstein@Home / BOINC
These are defined to do nothing special in the standalone case
and will be set in boinc_extras.h if EAH_BOINC is set
*/
#ifdef EAH_BOINC
#include
"hs_boinc_extras.h"
#else
#ifdef HS_OPTIMIZATION
extern
void
LocalComputeFStat
(
LALStatus
*
status
,
Fcomponents
*
Fstat
,
const
PulsarDopplerParams
*
doppler
,
const
MultiSFTVector
*
multiSFTs
,
const
MultiNoiseWeights
*
multiWeights
,
const
MultiDetectorStateSeries
*
multiDetStates
,
const
ComputeFParams
*
params
,
ComputeFBuffer
*
cfBuffer
);
#define COMPUTEFSTAT LocalComputeFStat
#else
#define COMPUTEFSTAT ComputeFStat
#endif
#endif
/* EAH_BOINC */
/*----- Macros ----- */
#define INIT_MEM(x) memset(&(x), 0, sizeof((x)))
#define SQUARE(x) ( (x) * (x) )
...
...
@@ -116,6 +139,10 @@ int XLALComputeExtraStatsForToplist ( toplist_t *list,
PulsarDopplerParams
candidateDopplerParams
=
empty_PulsarDopplerParams
;
/* struct containing sky position, frequency and fdot for the current candidate */
UINT4
X
;
/* temporary copy of Fstatistic parameters structure, needed to change returnSingleF for function scope only */
ComputeFParams
CFparams_internal
=
(
*
CFparams
);
CFparams_internal
.
returnSingleF
=
TRUE
;
/* initialize doppler parameters */
candidateDopplerParams
.
refTime
=
refTimeGPS
;
/* spin parameters in toplist refer to this refTime */
...
...
@@ -191,7 +218,7 @@ int XLALComputeExtraStatsForToplist ( toplist_t *list,
candidateDopplerParams
.
fkdot
[
0
],
candidateDopplerParams
.
Alpha
,
candidateDopplerParams
.
Delta
,
candidateDopplerParams
.
fkdot
[
1
],
refTimeGPS
.
gpsSeconds
);
/* recalculate multi- and single-IFO Fstats for all segments for this candidate */
XLALComputeExtraStatsSemiCoherent
(
&
lineVeto
,
&
candidateDopplerParams
,
multiSFTsV
,
multiNoiseWeightsV
,
multiDetStatesV
,
detectorIDs
,
CFparams
,
SignalOnly
,
singleSegStatsFile
);
XLALComputeExtraStatsSemiCoherent
(
&
lineVeto
,
&
candidateDopplerParams
,
multiSFTsV
,
multiNoiseWeightsV
,
multiDetStatesV
,
detectorIDs
,
&
CFparams
_internal
,
SignalOnly
,
singleSegStatsFile
);
if
(
xlalErrno
!=
0
)
{
XLALPrintError
(
"
\n
Error in function %s, line %d : Failed call to XLALComputeLineVetoSemiCoherent().
\n\n
"
,
__func__
,
__LINE__
);
XLAL_ERROR
(
XLAL_EFUNC
);
...
...
@@ -270,10 +297,6 @@ int XLALComputeExtraStatsSemiCoherent ( LVcomponents *lineVeto,
XLAL_ERROR
(
XLAL_EBADLEN
);
}
/* temporary copy of Fstatistic parameters structure, needed to change returnAtoms for function scope only */
ComputeFParams
CFparams_internal
=
(
*
CFparams
);
CFparams_internal
.
returnAtoms
=
TRUE
;
/* initialiase LVcomponents structure */
lineVeto
->
TwoF
=
0
.
0
;
lineVeto
->
LV
=
0
.
0
;
...
...
@@ -335,7 +358,7 @@ int XLALComputeExtraStatsSemiCoherent ( LVcomponents *lineVeto,
if
(
singleSegStatsFile
)
fprintf
(
singleSegStatsFile
,
"%%%% Reftime: %d %%%% Freq: %.16g %%%% RA: %.13g %%%% Dec: %.13g %%%% f1dot: %.13g
\n
"
,
dopplerParams_temp
.
refTime
.
gpsSeconds
,
dopplerParams_temp
.
fkdot
[
0
],
dopplerParams_temp
.
Alpha
,
dopplerParams_temp
.
Delta
,
dopplerParams_temp
.
fkdot
[
1
]
);
fakeStatus
=
blank_status
;
C
omputeFStat
(
&
fakeStatus
,
&
Fstat
,
&
dopplerParams_temp
,
multiSFTsV
->
data
[
k
],
multiNoiseWeightsThisSeg
,
multiDetStatesV
->
data
[
k
],
&
CFparams
_internal
,
NULL
);
C
OMPUTEFSTAT
(
&
fakeStatus
,
&
Fstat
,
&
dopplerParams_temp
,
multiSFTsV
->
data
[
k
],
multiNoiseWeightsThisSeg
,
multiDetStatesV
->
data
[
k
],
CFparams
,
NULL
);
if
(
fakeStatus
.
statusCode
)
{
XLALPrintError
(
"\%s, line %d : Failed call to LAL function ComputeFStat(). statusCode=%d
\n\n
"
,
__func__
,
__LINE__
,
fakeStatus
.
statusCode
);
XLAL_ERROR
(
XLAL_EFUNC
);
...
...
@@ -369,11 +392,7 @@ int XLALComputeExtraStatsSemiCoherent ( LVcomponents *lineVeto,
}
numSegmentsX
[
detid
]
+=
1
;
/* have to keep this for correct averaging */
twoFXseg
->
data
[
detid
]
=
2
.
0
*
XLALComputeFstatFromAtoms
(
Fstat
.
multiFstatAtoms
,
X
);
if
(
xlalErrno
!=
0
)
{
XLALPrintError
(
"
\n
Error in function %s, line %d : Failed call to XLALComputeFstatFromAtoms().
\n\n
"
,
__func__
,
__LINE__
);
XLAL_ERROR
(
XLAL_EFUNC
);
}
twoFXseg
->
data
[
detid
]
=
2
.
0
*
Fstat
.
FX
[
X
];
if
(
SignalOnly
)
{
/* normalization factor correction */
twoFXseg
->
data
[
detid
]
*=
2
.
0
/
Tsft
;
...
...
@@ -390,9 +409,6 @@ int XLALComputeExtraStatsSemiCoherent ( LVcomponents *lineVeto,
fprintf
(
singleSegStatsFile
,
"
\n
"
);
}
/* free memory for atoms that was allocated within ComputeFStat */
XLALDestroyMultiFstatAtomVector
(
Fstat
.
multiFstatAtoms
);
}
/* for k < numSegments */
/* get average stats over all segments */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment