Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyFstat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gregory Ashton
PyFstat
Commits
d83d27b7
Commit
d83d27b7
authored
8 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Add ability to record individual segment detStat values
parent
eff47496
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyfstat/core.py
+23
-19
23 additions, 19 deletions
pyfstat/core.py
with
23 additions
and
19 deletions
pyfstat/core.py
+
23
−
19
View file @
d83d27b7
...
@@ -542,7 +542,8 @@ class SemiCoherentSearch(BaseSearchClass, ComputeFstat):
...
@@ -542,7 +542,8 @@ class SemiCoherentSearch(BaseSearchClass, ComputeFstat):
def
run_semi_coherent_computefstatistic_single_point
(
def
run_semi_coherent_computefstatistic_single_point
(
self
,
F0
,
F1
,
F2
,
Alpha
,
Delta
,
asini
=
None
,
self
,
F0
,
F1
,
F2
,
Alpha
,
Delta
,
asini
=
None
,
period
=
None
,
ecc
=
None
,
tp
=
None
,
argp
=
None
):
period
=
None
,
ecc
=
None
,
tp
=
None
,
argp
=
None
,
record_segments
=
False
):
"""
Returns twoF or ln(BSGL) semi-coherently at a single point
"""
"""
Returns twoF or ln(BSGL) semi-coherently at a single point
"""
self
.
PulsarDopplerParams
.
fkdot
=
np
.
array
([
F0
,
F1
,
F2
,
0
,
0
,
0
,
0
])
self
.
PulsarDopplerParams
.
fkdot
=
np
.
array
([
F0
,
F1
,
F2
,
0
,
0
,
0
,
0
])
...
@@ -573,6 +574,8 @@ class SemiCoherentSearch(BaseSearchClass, ComputeFstat):
...
@@ -573,6 +574,8 @@ class SemiCoherentSearch(BaseSearchClass, ComputeFstat):
# return log10_BSGL/np.log10(np.exp(1))
# return log10_BSGL/np.log10(np.exp(1))
detStat
=
0
detStat
=
0
if
record_segments
:
self
.
detStat_per_segment
=
[]
for
tstart
,
tend
in
zip
(
self
.
tboundaries
[:
-
1
],
self
.
tboundaries
[
1
:]):
for
tstart
,
tend
in
zip
(
self
.
tboundaries
[:
-
1
],
self
.
tboundaries
[
1
:]):
self
.
windowRange
.
t0
=
int
(
tstart
)
# TYPE UINT4
self
.
windowRange
.
t0
=
int
(
tstart
)
# TYPE UINT4
self
.
windowRange
.
tau
=
int
(
tend
-
tstart
)
# TYPE UINT4
self
.
windowRange
.
tau
=
int
(
tend
-
tstart
)
# TYPE UINT4
...
@@ -581,9 +584,8 @@ class SemiCoherentSearch(BaseSearchClass, ComputeFstat):
...
@@ -581,9 +584,8 @@ class SemiCoherentSearch(BaseSearchClass, ComputeFstat):
self
.
FstatResults
.
multiFatoms
[
0
],
self
.
windowRange
,
False
)
self
.
FstatResults
.
multiFatoms
[
0
],
self
.
windowRange
,
False
)
if
self
.
BSGL
is
False
:
if
self
.
BSGL
is
False
:
detStat
+=
2
*
FS
.
F_mn
.
data
[
0
][
0
]
d_detStat
=
2
*
FS
.
F_mn
.
data
[
0
][
0
]
continue
else
:
FstatResults_single
=
copy
.
copy
(
self
.
FstatResults
)
FstatResults_single
=
copy
.
copy
(
self
.
FstatResults
)
FstatResults_single
.
lenth
=
1
FstatResults_single
.
lenth
=
1
FstatResults_single
.
data
=
self
.
FstatResults
.
multiFatoms
[
0
].
data
[
0
]
FstatResults_single
.
data
=
self
.
FstatResults
.
multiFatoms
[
0
].
data
[
0
]
...
@@ -597,8 +599,10 @@ class SemiCoherentSearch(BaseSearchClass, ComputeFstat):
...
@@ -597,8 +599,10 @@ class SemiCoherentSearch(BaseSearchClass, ComputeFstat):
self
.
twoFX
[
1
]
=
2
*
FS1
.
F_mn
.
data
[
0
][
0
]
self
.
twoFX
[
1
]
=
2
*
FS1
.
F_mn
.
data
[
0
][
0
]
log10_BSGL
=
lalpulsar
.
ComputeBSGL
(
log10_BSGL
=
lalpulsar
.
ComputeBSGL
(
2
*
FS
.
F_mn
.
data
[
0
][
0
],
self
.
twoFX
,
self
.
BSGLSetup
)
2
*
FS
.
F_mn
.
data
[
0
][
0
],
self
.
twoFX
,
self
.
BSGLSetup
)
d_detStat
=
log10_BSGL
/
np
.
log10
(
np
.
exp
(
1
))
detStat
+=
log10_BSGL
/
np
.
log10
(
np
.
exp
(
1
))
detStat
+=
d_detStat
if
record_segments
:
self
.
detStat_per_segment
.
append
(
d_detStat
)
return
detStat
return
detStat
...
...
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